Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 09:16
    expelledboy commented #1277
  • Sep 30 03:31
    Alengeorge-01 commented #1279
  • Sep 29 21:58
    draeder commented #1279
  • Sep 29 21:55
    draeder commented #1279
  • Sep 28 07:58
    mmalmi commented #1282
  • Sep 28 04:07
    Alengeorge-01 commented #1279
  • Sep 28 04:07
    Alengeorge-01 commented #1279
  • Sep 28 04:06
    Alengeorge-01 commented #1279
  • Sep 27 23:41
    amark closed #1283
  • Sep 27 23:41
    amark commented #1283
  • Sep 27 23:39
    amark commented #1280
  • Sep 27 23:25
    amark edited #1279
  • Sep 27 23:24
    amark commented #1279
  • Sep 27 23:21
    amark closed #1273
  • Sep 27 23:21
    amark commented #1273
  • Sep 27 23:16
    amark commented #1271
  • Sep 27 23:10
    amark commented #1282
  • Sep 27 23:02
    amark commented #1277
  • Sep 27 22:59
    amark commented #1024
  • Sep 27 22:48
    amark commented #1275
LnrCdr
@unameit10000000
Any idea's/suggestions/examples?
Lexi
@Lexi:matrix.org
[m]
@unameit10000000: how did you try to connect the peers?
Adam Bowman
@abow

Any idea's/suggestions/examples?

https://gun.eco/docs/API#examples

did you pass gun constructor array of peers?
Daniel Raeder
@draeder

@worldpeaceenginelabs

@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.

1 reply
LnrCdr
@unameit10000000
I've tried alot of things. Example below is one of the things I tried:

nodejs, relay.js

const server = http.createServer();
server.listen(9000);

const gun = new Gun({
    web: server,
    verify: {
        check: function(){
            console.log("peer connected");
            return true;
        }
    }
})

nodejs, peer.js

const gun = new Gun({
    peers: ['localhost:9000']
})

function setData() {}
function getData() {}
LnrCdr
@unameit10000000
Peers connect, but data doesn't get shared between them
verschmelzen
@verschmelzen:matrix.org
[m]

Hey. I am trying out GUN and so far it looks nice. And what I am trying to understand right now is how visibility of graph database works in GUN.

For instance, docs mention that there are different spaces with different "permissions" as shown in the image.

I wonder if it is possible to have a different type of space (like session space) or build such space using the user space, where the presence of data is visible only to he participants of such space who know some common secret (any random string for instance) and for other users who don't know this secred the data is not visible, but those other users still can be connected to same relay servers.

Is it something that GUN can do? afaiu SEA grants capability to sign and verify messages, but I am not sure if it is possible to make relays and peers ignore invalid messages. How can I protect the data in a "session" from a bad actor who might start traversing the graph and writing random data there?

I might be misunderstanding GUNs purpose here and I wonder if those things in the scope of GUN, or am I asking for too much

verschmelzen
@verschmelzen:matrix.org
[m]

I maybe can have a way of deterministicaly generatin key pairs from some random string. That way peers would be able to encrypt/decrypt messages with such common key.

But how would I make the peers know what part of the graph they should use for exchange with those messages without exposing the initial string.

Maybe hash this string it and attach it to the root node with this hash as key, but again, how would I then protect such communication from misbehaving actor who will be finding all the nodes from root node and overwriting every node to erase information.

Can many root nodes be hosted on a same network of relays and peers, where there would be no paths between those root nodes and the only way to write/read data to some root node is to know it's soul?

Just wondering
verschmelzen
@verschmelzen:matrix.org
[m]

:point_up: Edit: I maybe can have a way of deterministicaly generate key pairs from some random string. That way peers would be able to encrypt/decrypt messages with such common key.

But how would I make the peers know what part of the graph they should use for exchange with those messages without exposing the initial string.

Maybe hash this string it and attach it to the root node with this hash as key, but again, how would I then protect such communication from misbehaving actor who will be finding all the nodes from root node and overwriting every node to erase information.

Can many root nodes be hosted on a same network of relays and peers, where there would be no paths between those root nodes and the only way to write/read data to some root node is to know it's soul?

‹› ‹(•_•)› ‹›
@computervillain_twitter
The internet is a legacy system. This is the only group currently online that provides me a shred of hope. Thank you for being here and keep on keepin' on.
Lexi
@Lexi:matrix.org
[m]

verschmelzen: hello, welcome to the community. What you are looking for may just be the user space of a "user" that your group users? So create an account and share the public and private key with all users you want to be able to edit the messages.

And if you don't want others to read the saved data use encryption

2 replies
LnrCdr
@unameit10000000
@Lexi:matrix.org @abow Thnx both💚, I fixed it!🔫
Every peer now connects to a relay and are able to read/write eachothers messages.
peer.js:
var gun = Gun(
    {    
        web: server, 
        radisk: true, 
        localStorage: false,
        peers: ['http://localhost:9000'], /* Relay Server */
    }
);
Lexi
@Lexi:matrix.org
[m]
Yes, only the user (and certified other users) can write to that user's user space
LnrCdr
@unameit10000000
Just a wild thought. What if 100mil+ (100.000.000) peers (apps/users) where connected to let's say 10/100 or 1000 relay servers, using Radisk only instead of LocalStorage.
How would one (from a single peers standpoint) restrict the amount of data that gets stored on disk?
LnrCdr
@unameit10000000
For example: At this moment i've connected a bunch of peers and a few relay servers. But each peer seem to store a exact copy of all data in the network. So if 100mil+ data records/units (however you wanna call it) are created on the network my entire disk will eventually run out of ammo. How can I control this?
Carlos Vega
@alterx
You can't, really. At least that's how the ideal situation would work: it's a huge network in which everyone stores everyone's content
If you want to control it you need to write custom "middleware" so you can filter at peer (node peer)level
And then the browsers only are supposed to sync the data the client subscribes to
For example, https://github.com/zrrrzzt/bullet-catcher this validates if a message has certain token. You could start from there and just allow certain IP addresses, domains, etc to write to your peer
It depends on your use case, really. But I don't think there's anything built in to specifically control storage space. You'd have to come up with some method that fits your use case
rococtz
@rococtz:matrix.org
[m]
@unameit10000000: The peers only store the data they subscribe too. It's not like bitcoin where everybody stores everything.
Carlos Vega
@alterx
@rococtz:matrix.org this is true for browser peers, but is it true for node peers? I thought they aggressively replicated all the data

OK.
Who is the person running a pirating site ontop of GUN?
Fess up now, to me, in a twitter DM.
Cause I turn on my DHT tests and my computer literally starts streaming 5MB/s of data from random peers out there
and when I peek at the data, its a whole catalogue if movie titles, descriptions, etc.
TBH, I have no clue how this is happening or working.
The DHT test is already connecting to random machines that should be impossible (it's already found Iris' rust peer, even tho we never coded it to find it, and I haven't even published the code yet! I'm not sure how this is possible.)
Ugh...
I've already seen the test crash multiple random relays.
I apologize, please watch your relays as they might get DDoSed as I'm trying to stabilize network.
And then I'll need everyone to upgrade code, so we're running the same stabilizers.
I guess I'll catch up with chats now instead, seeing some bugs reported.
Give me a bit to read thru & reply.

at least this seems to be how it's going to work

AndrewRailton
@AndrewRailton
Having a bunch of uncontactable peers (I was using the volunteers list) seems to tank my apps performance, is that normal?
It's really snappy when it's just the relay I control
Carlos Vega
@alterx
I think I remember Martti had some issues with Iris when he had more than one peer
Mark Nadal
@amark
@VittorioParagallo yo @mmalmi can you talk to @tylerjwatson etc. ?
@ahg:it-dengler.de or vanilla or SecureRender?
@Hr4rjuku :+1:
@worldpeaceenginelabs can't the data be converted into plain object properties of text / numbers, etc.? Just save that to GUN, Cesium probably has special Class constructors, ignore it, just grab the values.
@fitouch pinged sirpy. Dang, sad to hear about RN perf even with native bridges. Maybe this will help throw more weight towards SecureRender?
@alterx what's the side project?? :)
@unameit10000000 :clap: @abow @Lexi:matrix.org . AXE cuts off data if not subscribed, so you need to subscribe to data. Also, try latest github main, quite a few fixes to AXE.
@verschmelzen:matrix.org :clap: @Lexi:matrix.org . Yeah, if you already have a common secret key, use that as await SEA.encrypt("hi group", commonSecret) don't forget to study the https://gun.eco/docs/Cartoon-Cryptography .
:clap: @alterx :clap: @rococtz:matrix.org . In future (much closer now, with book) relays can define a shard key (a range of data they save).
@AndrewRailton which version? I'm currently experimenting with this stuff. Did your peer get auto-connected to, or?
@computervillain_twitter :fire: <3 thanks!!!!
@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
?