Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 16 08:22
    davay42 updated the wiki
  • Jan 16 08:20
    davay42 updated the wiki
  • Jan 16 06:22
    Orimay opened #1191
  • Jan 16 05:22

    amark on master

    Update README.md (#1181) (compare)

  • Jan 16 05:22
    amark closed #1181
  • Jan 16 05:22
    amark commented #1181
  • Jan 15 00:46
    mbround18 commented #404
  • Jan 15 00:39
    mbround18 commented #404
  • Jan 15 00:38
    mbround18 commented #404
  • Jan 15 00:38
    mbround18 commented #404
  • Jan 15 00:38
    mbround18 commented #404
  • Jan 15 00:29
    mbround18 commented #404
  • Jan 14 23:39
    Orimay synchronize #1189
  • Jan 14 23:36
    Orimay synchronize #1189
  • Jan 14 23:35
    Orimay synchronize #1189
  • Jan 14 14:13
    shemeshg edited #1190
  • Jan 14 12:55
    shemeshg opened #1190
  • Jan 14 12:54
    soulsam480 commented #1174
  • Jan 14 12:51
    shemeshg closed #1188
  • Jan 14 03:39
    draeder updated the wiki
RilDev
@RilDev
@amark Thank you, I think that's it. I'll fix it ASAP!
shimon
@shimon_b_h_twitter
As I understand the DB syncs all the data across all peers
Is it possible to do selective sync (group of peers)?
for instance, in a chat app where you have different chat groups, you want to do selective sync only to the group members
1 reply
RilDev
@RilDev

@amark I fixed the SSL Certificate issue with an Nginx proxy looking like this

server {
    server_name gun.rildev.tk;

    location / {
        proxy_pass https://localhost:8765;
    }   

   # Certbot auto-generated config

}

So now gun.rildev.tk/gun should be usable right?

But when I connect to rildev.tk/chat/#gun-chat, it still doesn't sync like before.
Is there something else I'm missing here?

PS: for reference, yes the https instead of http in the proxy_passmatters.
Martti Malmi
@mmalmi
@achilles Maybe the server or browser peers can’t handle the amount of traffic. Or maybe it’s the lack of online peers who would persist the content (my server doesn’t)
Working on this rust port in order to improve performance and make the source code easier to read and contribute to https://github.com/mmalmi/rusty-gun
rococtz
@rococtz:matrix.org
[m]
@mmalmi: do you plan to migrate SEA as-well?
Martti Malmi
@mmalmi
Yes, I’m trying to add everything that Iris needs
rococtz
@rococtz:matrix.org
[m]
@mmalmi: That sounds great, but I was just curious if you had the chance to benchmark the performance of the rust version against the nodejs version?
Martti Malmi
@mmalmi
I haven’t tested against nodejs yet. In a simple memory-only browser test the Rust version was maybe 20% faster on Mark’s computer, but many times slower on my M1 — don’t know why. Different types of queries and network message processing will change the situation to one direction or another. Also the Rust version is not optimized yet, unlike gun.js.
You can test on https://rusty-gun-demo.netlify.app/ :
var i = 28000, j = i, s = +new Date; while(--i){ gun.get('a'+i).get('lol').put(i+'yo') } console.log(j / ((+new Date - s) / 1000), 'ops/sec');
If you want to test with networking, use a new instance of gun that connects to a peer, like new Gun(peerUrl) or new Gun({peers:[..]})
Wasm multithreading can also improve performance. And I believe the non-wasm version (for server and desktop application use) will be faster than wasm, because it doesn’t need to interface between javascript
rococtz
@rococtz:matrix.org
[m]
This is what I get:
91803.27868852459 'ops/sec'
Devin Santamaria
@webprismdevin
does anyone have a working example of password reset with SEA?
1 reply
rococtz
@rococtz:matrix.org
[m]
@webprismdevin: it's not very straight-forward... but very doable nonetheless. Maybe this examples makes sense?
https://gun.eco/docs/SEA#example
you don't really reset the password or anything like this. You just use two other separate words to encrypt a hint that will remind you what the password used to be
but you have to have already had that system into place when you want to remember it
Mark Nadal
@amark
@deathg0d :thinking: Hmmm. Interesting. Can you console network websocket tab to see if a network GET event goes out over the protocol?
@mmalmi :clap:
@achilldotes_twitter :fire: https://github.com/amark/gun/wiki/awesome-gun <- edit button upper right, in browser!
@shimon_b_h_twitter :wave: :clap: @RilDev correct! w00h00! Already helping, epic :)
@RilDev var gun = Gun('https://gun.rildev.tk/gun'); says "fails to connect" so something still wrong about how its exposed
@mmalmi @rococtz:matrix.org :clap: love the benchmark Qs, yupe, of course ;) anybody knowing me, I already started. Can't wait to :+1: this and do the A/B testing against it in-prod against the portions of the 60M and battle harden it!!
@webprismdevin :clap: @rococtz:matrix.org tho actually user.auth(alias, passphrase, callback, { change: 'new-pass-value' })https://gun.eco/docs/FAQ
also @aethiop 's mind blowing work: https://twitter.com/marknadal/status/1427715775838572545 (3FA password resets for lost/forgotten passwords, fully p2p & cryptographically secure)
deathg0d
@deathg0d
image.png
@amark it seems to be going. But empty array back?
Devin Santamaria
@webprismdevin
@amark && @rococtz ✌️🙏
Smarthug
@smarthug
@amark Hi I am a Web Game developer and planning to make web-based Fall Guys. I want to use Gun as a game server. Is it possible? What do I need?
Connor Davis
@connor-davis
It is possible indeed @smarthug all you need is to understand how gun works and then you can tie it in to keep things like the players x,y,z and all the other necessary game components in sync with all the players. Im sorry if this is a bad reply, 24hrs with no sleep is interesting.
Smarthug
@smarthug
@connor-davis Thanks and sorry for the different time zone. One last question is if it is possible, has anyone tried something like this ? How many relay server do I need if I want stable replication.
Connor Davis
@connor-davis
Can anyone help me with how to authenticate a user with their keypair?
RilDev
@RilDev
@amark Yes you were right! Here is the working Nginx configuration:
server {
    server_name gun.rildev.tk;

    location / {
        proxy_pass https://localhost:8765;
    }

    location /gun {
        proxy_pass https://localhost:8765;
        # websocket configuration
        proxy_http_version  1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
    }
    # Certbot automatic configuration
}
Now having a Gun server using HTTPS!
gun-https-chat-working.gif
Radu
@rococtz

@connor-davis According to this https://gun.eco/docs/User#user-auth

user.auth(alias, pass, cb, opt)

or also

user.auth(pair, cb, opt)
Jay Leimer
@CodingJinxx
How can I accept a parameter of type gun instance, using gun with typescript
libensveto
@libensveto_twitter
sorting out user flows for era pay... did register product on dash -> then when you want to sell something link to us and we handle the code & sale, then send a confirmation email to client, and log data to your dash(? seems user friendly, criticism very welcome). This is done in the clip. There was an issue with editing data in another browser, however this holds not permanence and reverts. Dont mind all the red in console, peers being peers.
1 reply
RilDev
@RilDev
Is it possible to make Gun GDPR compliant? I'm referring to the fact that under the GDPR law in Europe, it is mandatory to be able to erase personal data. Fines can go up to 20 millions, I think.
Lorenzo Mangani @qxip
@lmangani:matrix.org
[m]
the only way is through absolute encryption to reduce the probability of a breach and thus avoid fines, as there's no 100% safe distributed delete in a decentralized graph by definition.
This said, even encrypted or pseudonymised data can be used to re-identify a person under the scope of GDPR so we're talking obscurity
RilDev
@RilDev
Got it, I'll make sure I understand the legal part before releasing my next "hit" app ^__^
Connor Davis
@connor-davis
@rococtz:matrix.org I have tried the second one and it didnt log me back in even though I provided the keypair hence why I hopped in here :)
Connor Davis
@connor-davis
Here is however a super secret project Im working on :P
rogowski
@rogowski
Very cool! @connor-davis
RilDev
@RilDev
@connor-davis No idea what it's for but it sure looks nice!
Oscar Hilton
@oscarhilton
Hello :wave:

I'm trying to write a little peer to peer program using Gun, React and Konva, the general idea being able to see the mouse of the other users on your screen, I can get gun to update using

swarm.map().on(({ name, x, y }: SwarmPeer) => {
    console.log(name, x, y);
});

but the problem is its super slow at updating. I'm console logging out the x, y of the mouse and I can see that firing rapidly. The console log inside that map.on function is however extremely slow and lags behind by several seconds. I have done the tutorials and managed to successfully get a live update of a textbox (like google docs) which seemed instantaneous and inspired this idea. Is there anything super obvious I might be getting wrong? Thanks in advance :)

Connor Davis
@connor-davis
How are you rendering the other mouse @oscarhilton
That can make a huge impact on performance
Adam
@adam-12:matrix.org
[m]
I'm deleting items under a node by setting their values to null. This is working but I don't like how I'm still see the nulled items the next time I query their parent node. Is there something else I need to do along with setting their values to null?
rococtz
@rococtz:matrix.org
[m]
@oscarhilton: it's hard to believe the slowness is coming from gun, are you sure it's not coming from the rendering part? Also, if you want to show someone's mouse position, I wouldn't use map (because I assume you keep pushing positions to a list of positions). Why not just keep overwriting the same item?
// John's computer
onMouseMove(() => {
   gun.get('John').get('position').put({ x,y  })
})

// Mike's computer
gun.get('John').get('position').on(renderThePosition)
if you record every single position update it will be useful if you want to do playback animation at a later time, but I assume you don't want that?
Adam: You can do .map( x => !!x || undefined)
If you return undefined from map, the callback won't be called.