Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 26 17:28
    wayjake opened #1307
  • Jan 26 17:05
    wayjake commented #1305
  • Jan 26 06:34
    atom06 commented #1305
  • Jan 26 01:56
    amark commented #1302
  • Jan 26 01:46
    tcurdt commented #1302
  • Jan 26 01:00
    amark commented #1302
  • Jan 25 16:09
    atjn commented #1297
  • Jan 24 23:55
    amark commented #1299
  • Jan 24 23:53

    amark on master

    Allow Dockerfile to auto-update… (compare)

  • Jan 24 23:53
    amark closed #1303
  • Jan 24 23:53
    amark commented #1303
  • Jan 24 23:51

    amark on master

    rad fixed dup text, perf, read … (compare)

  • Jan 24 08:17
    rex4539 synchronize #1299
  • Jan 23 16:45
    wayjake commented #1305
  • Jan 22 23:34
    draeder closed #1306
  • Jan 22 23:34
    draeder commented #1306
  • Jan 22 22:49
    draeder edited #1306
  • Jan 22 22:48
    draeder opened #1306
  • Jan 22 21:52
    atjn commented #1297
  • Jan 22 17:41
    atjn closed #1305
Mark Nadal
@amark
@ahg:it-dengler.de certs can set an expiry, tho you can also have a a 2ndary "revoke" list your app subscribes to & checks.
whoooooo wants to help add lots of tests to book / new RAD?
Can I get 3 people here to try testing their current app out against latest github? All my tests (unit & PANIC) are passing, and I'd like to get it published.
Mark Nadal
@amark
it has fixes (from what I can test) for login issues, reconnect issue (tho this might cause some perf issues during reconnect), much better peer handling logic (in prep for AXE), a NaN fix, and several cool new scaling features nobody here will probably care about: put sampling, mob checks, frame skipping, etc.
I keep delaying the v0.2022 because as many of the fixes I can do in old version (remember, I rewrote the whole thing with CPU scheduling, without version breaking!!) I want to. But RAD is in a bad shape, and the sooner I can get to v0.2022 to kill the enametoolong, have multi logged in users, frozen chaining, etc. the better
Mark Nadal
@amark
which btw, those last 2 items are vanity, therefore not something I've done yet, would be deeply appreciated if someone could help? Oh, also switching certify to embed itself in the value, not pass as opt since opt doesn't go to disk.
I guess put sampling should've been a version change, but false positives on it probably still safer than without since RAD hasn't been upgraded.
verschmelzen
@verschmelzen:matrix.org
[m]

I am getting deeper and deeper into cryptography, and all I want to do is get a key pair from a shared secret.

SubtleCrypto can only deriveKey from already valid key. So I found this package. But they have keyFromSecret only on EdDSA curve, and afaiu ECDSA does not support key generation from random data (which is weird because if I was able to replace internal random number generator with my own I would get what I want, no matter the curve).

So I have 2 options now:

  1. have some key pair embedded in code to use as initial point on ECDSA curve
  2. just use EdDSA keys instead

The question with 2 right now is if GUN could use those keys or is it only can work with what is compatible with SubtleCrypto?

also apparently secp256k1 is not safe 🤷
verschmelzen
@verschmelzen:matrix.org
[m]
And I am probably wrong for calling EdDSA or ECDSA a curve
Carlos Vega
@alterx
@amark I can test tomorrow 👀
Andre
@ahg:it-dengler.de
[m]
Get node by soul seems to work from "root" like gun.get(soul) and fails from a graph sub node like gun.get("first").get(soul) also if the node with soul is a child of "first". But I think if it's user graph could be better to use gun.user().get(soul)?
Is there a way to get / find the correct node base? If it's user or public context? Or is that for simple get(soul) not important (for example because of write context?!)?
7 replies
Chandan Das
@champ5898
getting this : RangeError: Maximum call stack size exceeded
Warning: You're syncing 1K+ records a second, faster than DOM can update - consider limiting query.
LnrCdr
@unameit10000000
@alterx @rococtz:matrix.org @amark Allright, thanks for answering. I can definitely work with this! 🚀
fitouch
@fitouch
@amark There's new React Native JSI that removes the need for a bridge between Native(Java/ObjC) and Javascript code. It also removes the requirement to serialize/deserialize all the information as JSON for communication between the two worlds. https://blog.notesnook.com/getting-started-react-native-jsi/ This might be big helpful for GUN
2 replies
Bo
@worldpeaceenginelabs

@draeder

@draeder is the code execution a gun feature or a gunsafe feature? is it possible to use the execution function from gunsafe solo?

It's a gunsafe feature, but really should be used with caution because both methods have access to the global scope.

hmm... what about encryption? the form and the globe could share a secret? than nobody except the original app's form and the original app's globe could communicate, or not?

@amark you right, that special class constructors could exist, ill give it a try
Danny Criss
@DannyCriss1_twitter
Hello, does gun work with Angular? bcs it gives me "WebSocket connection to 'ws://localhost:8765/gun' failed:" with it; React integration works fine
2 replies
Fedox
@fedox:fedox.pl
[m]
Could someone provide me with some directions as to when I can use load/open and when I should use once/on
?
ADAM BLVCK
@adam_blvck:matrix.org
[m]
Daniel Raeder
@draeder

@draeder

@draeder is the code execution a gun feature or a gunsafe feature? is it possible to use the execution function from gunsafe solo?

It's a gunsafe feature, but really should be used with caution because both methods have access to the global scope.

hmm... what about encryption? the form and the globe could share a secret? than nobody except the original app's form and the original app's globe could communicate, or not?

@worldpeaceenginelabs If it's your code from your app, it should be okay. You could sign the code with SEA.sign() and verify it with SEA.verify() to ensure it truly is your app's code.

ADAM BLVCK
@adam_blvck:matrix.org
[m]
Hey all, I've made this architectural image to represent how I see gun moving forward
ADAM BLVCK
@adam_blvck:matrix.org
[m]
Gun-nodes and relays will eventually cost money to run, and most of us are trying to make apps. So how to include simple payments into this app, while still using gun for operations? For example, say I'm building an AI-image generation service for users, through gun, images saved and encrypted with SEA in S3. The image tries to summarise building blocks to pull the problem apart. @amark the model includes your comments on payments with globally consistent data bases, vs eventually locally consistent. I just checked that I'm not using the WebView Bridge, I'm going to try that!
Bo
@worldpeaceenginelabs
@draeder cool. is that also secure against the console injection you guys warning often?
Manwë
@Manwe-777
@adam_blvck:matrix.org what is the point pf using gun in such infrastructure? Key pair identity is standard these days, so is encryption, im just failing to see the upsides over any regular centralized systems since the backend for business will still be centralized there
1 reply
Daniel Raeder
@draeder
@worldpeaceenginelabs I don't believe so.. Console injection is usually done through social engineering.. You could add a warning like what iris has that says something like "If someone is asking you to paste code here, it's a scam!", I have not tested Gunsafe in the browser. It should work.. but I haven't tested it
ADAM BLVCK
@adam_blvck:matrix.org
[m]
@Manwe-777: You could also see it in terms of distinctions. In a network of users, a few will provide a service (write pdf, make logo, generate video, help fixing the car, ...) which attracts more people. This service provider can then take small payments, if it's willing to setup a business configured node (centralisation of service).
Azarattum
@azarattum:matrix.org
[m]

What would be the best way to clear local GUN’s cache from specific nodes? Let’s say we have gun.get("cache") and gun.get("important"). Cache could get really big really fast, so I want to provide users with an option to clear it locally while leaving the important node intact. So, gun.get("cache").set(null) is not an option since it will propagate changes to the network.

What should I do? Should I access the localStorage directly? Is there a way to clear all the data that GUN currently isn’t subscribed to?

verschmelzen
@verschmelzen:matrix.org
[m]

Hey. Got a little question.

When I am doing user.get('members').map().on((m, key, ref) => {}), I am receiving some object as ref. I cannot find it in doc now, but I am sure that I saw somewhere that it sould be a reference to the gun node it .on is fired on (i.e. be equivalent of user.get('members').get(key)). But it is not like this and I am getting some different kind of object.

Question: should ref in user.get('members').map().on((m, key, ref) => {}) be same as user.get('members').get(key) or is ref a part of internal chaining api?

verschmelzen
@verschmelzen:matrix.org
[m]

Ok. I maybe got the source of my confusion now, I saw gun.promOnce return value and expected other methods to return the same, but gun.promPut for instance works differently.

Maybe all those methods and usual ones like .on, .once, etc can be better returning the same? Just a thought 🤔

for .on my use case is being able to chain .map().on(cb) and get a reference to the node in the map in cb along with data and key. This is more like sugar and unnecesary, but would be convenient
verschmelzen
@verschmelzen:matrix.org
[m]
I just found out that I have around 74 items in my GUN set, but when I run .map().on() it gets called ~6000 times
.map().once() triggers 74 times
and I have no peers (gun = new Gun()), so that means I am doing 6000 updates?
verschmelzen
@verschmelzen:matrix.org
[m]
I commented all put and set statements and tested .map().on() again, still a whopping 10 000 calls
but the number of calls gets down to 4 when I uncomments single .get('members').promSet
I am lost at this point
verschmelzen
@verschmelzen:matrix.org
[m]
so for me there is 2 points of confusion:
  1. when i try to call .get('members').put(null) in attempt to clean the set, all the entries are back after I reload the browser page
  2. the issue I described above where .on() gets called too much
wait, can it be so that .map().on() listeners are stacking each time I try to reload the page?
verschmelzen
@verschmelzen:matrix.org
[m]
nope, neither .get('members').put(null), nor .get('members').put({}) clean anything. I checked user._.root.graph[<id of members node>], everything is still there even before I reload the page
tried .get('members').once().map().on(), no luck
10 replies
verschmelzen
@verschmelzen:matrix.org
[m]
I am getting GUNn'ed down
verschmelzen
@verschmelzen:matrix.org
[m]
I might have found a pattern, idk but progression of calls looks to be x**2, 34**2 - i get around 1000 calls, 74**2 - around 6000
And it gets triggered when i do .promSet followed by .promOnce from saved reference with intention to get the .key
if I do only .promSet the disaster chain does not trigger, and I get linear dependency of number of calls from number of current items in the set
but when I try to get my .key back from GUN, x**2 calls happen
I might be wrong about x**2, but part about .promSet and .promOnce seems right
verschmelzen
@verschmelzen:matrix.org
[m]
Another question that might be able to expain the issue: when i do let members = user.get('members') and then try to "empty" members by doing members.put(null) or user.get('members').put(null) do I get a dangling reference members to the object that is not in the graph anymore? Does GUN reference each node by ID or does it remember relative path from the root?
1 reply
verschmelzen
@verschmelzen:matrix.org
[m]
My local relay just crushed with this
/dist.js:2632
                        var keys = (t[_]||no).sort || (t[_] = function $(){ $.sort = Object.keys(t).sort(); return $ }()).sort, rev; // ONLY 17% of ops are pre-sorted!
                                                            ^

TypeError: Cannot create property '' on number '1659871825218.001'
    at rap (/dist.js:2632:40)
    at rap (/dist.js:2663:12)
    at rap (/dist.js:2663:12)
    at rap (/dist.js:2663:12)
    at rap (/dist.js:2663:12)
    at rap (/dist.js:2663:12)
    at rap (/dist.js:2663:12)
    at rap (/dist.js:2663:12)
    at rap (/dist.js:2663:12)
    at Function.rap [as map] (/dist.js:2663:12)
Andre
@ahg:it-dengler.de
[m]
At the moment I use nodes as "database tables" to add entries with set(), but looks like set with object and not an existing gun node isn't the same ?!
So how to add items to an "table" like node the right way and correctly delete it by put null without the node still exists in the graph by soul?