Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 05 10:50
    davidmaxwaterman commented #636
  • Oct 05 09:25
    worldpeaceenginelabs updated the wiki
  • Oct 04 00:29
    soulofmischief updated the wiki
  • Oct 03 16:40
    DvilDmonPsyAres edited #1284
  • Oct 03 16:39
    DvilDmonPsyAres edited #1284
  • Oct 03 16:38
    DvilDmonPsyAres opened #1284
  • Oct 03 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
Carlos Vega
@alterx
Is this the error some of you have been getting?
fitouch
@fitouch
Not me
Carlos Vega
@alterx
After that I'm no longer able to write, seems like it's corrupted. This is with the latest version on npm (0.2020.1237)
4 replies
@amark
ADAM BLVCK
@adam_blvck:matrix.org
[m]
I encounter it whenever I'm processing something that's too big to put
Here's my snippet for chunking and encrypting. You can then put the encrypted pieces to GunDB, or your a storage place of your desire:
const chunkString = (str, length) => {
    return str.match(new RegExp('.{1,' + length + '}', 'g'));
}

const largeFile = {
    base64: '', // your base64
    type: '',
}

// chunk image / file into smaller pieces of ~10kbytes
const file_chunks = chunkString(largeFile.base64, 1024*10);

// create promise array
const encrypt_promises = file_chunks.map(chunk => SEA.encrypt(chunk, user._.sea));

// encrypt promises
const encrypted_chunks = await Promise.all(encrypt_promises);

// write chunks, either to CDN, S3, or GUN (large file so take care in GUN!)
ADAM BLVCK
@adam_blvck:matrix.org
[m]
Anyhow, I believe I'm working on a killer app, but not persè a gun-killer app. I'm still drawing out the architecture for robust data protection of gun-server nodes (small businesses or contributors), which offer services for consumption by gun-user nodes (apps)
Daniel Raeder
@draeder

@worldpeaceenginelabs

@amark @draeder do i maybe missunderstand the capabilities of Gun (loads text and images), but NEED Gunsafe (or part of it) to load code in runtime for my project?

Gunsafe stores code in gun, and provides a way to execute it. It really should not be considered "safe" for application use outside personal code snippet storage, retrieval and execution.

6 replies
ADAM BLVCK
@adam_blvck:matrix.org
[m]

So imagine this would work with gun, @worldpeaceenginelabs : you have users which are having a normal and general gundb experience with all the nice social features... but then they want someone to generate taylor-made videos or images using AI. So a service-provider can now 'advertise' its AI-image-creation-service through GunDB. Credits are bought through third-party payment channel, but tokens are registered to GunDB. The transactions then all complete, encrypted, and tracked within Gun:

  • User requests prompt / styles / video-prompts
  • Service nodes receives requests, processes according to token-economy and business logic
  • Service nodes put product, target-encrypted, on gun and notifies user
  • User receives notification and downloads digital good

One thing that's missing in this whole thing is lifecycle management, both from a data as from an information management perspective. How can Service-nodes protect their assets and 'service-ledger' so to speak? In my experiments, over the last few weeks, have shown that data can get corrupt sometime, or overwritten.

It's one thing to resolve conflicts when 30 parties are collaborating on a same canvas or document, but it's another thing to be certain from a business perspective, that while serving 10 000 k users daily, with about $3000 daily costs in AWS infrastructure (AI image generation), my private ledger is not fucked with, yet perfectly consistent with the rest of the network in case of trouble from the other nodes
ADAM BLVCK
@adam_blvck:matrix.org
[m]
And by "trouble", I mean the odd corrupt error like @alterx is getting. How to keep "one's service-node data" secure, backed-up, and reported on? How to entertain lifecycle and change management within a gun-only ecosystem, or ought one to introduce infrastructure gundb is meant to abolish (SQL for reporting, NoSQL for user-data, 3rd-party data-ingestion for dashboarding and viz)?
This is all enterprise architecture talk, but to go back to @worldpeaceenginelabs , a killer app requires an impeccable enterprise architecture, be it even a decentralised one where everyone can start an enterprise just by going to an url in his/her/* browser.
fitouch
@fitouch
Do anyone here know who can do merges for webview-crypto and react-native-webview-crypto? They seems are not update to the latest. I have a few fixes for them.
Fedox
@fedox:fedox.pl
[m]
Can anyone point me in the right direction? What should I do with error Invalid data: number at fh8q95.order.l6fhbcak.users.l6fhbcak.clockStatus.pausedAt.target. Where can I find further information about this error etc.
6 replies
Mark Nadal
@amark
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.
Mark Nadal
@amark
@VittorioParagallo I'm sorry to hear :( . My hope with Rust is that any/all other languages can bind/bridge to it easily, since it is hyped up as a "systems" language. Is that not true? I'd deeply appreciate it if you could share your experience with Rust+Flutter more, cause maybe it'll change my mind that Rust is not as universal as I thought. Anyone want to chime in here? Am I mistaken? + @tylerjwatson (PS, @mmalmi tyler was up for helping test Rust apps also.)
@worldpeaceenginelabs This is a cool idea. Tho I'm not actually sure what is going on with this pictogram app. ++ @adam_blvck:matrix.org 's ideas of scoring.
You want to have a separator between your lat/lon in your GUN get, so that way you don't accidentally mix them up on query. Further... lat/lon probably not what you want, you probably want to use the Z tile index + X/Y tile coordinates from the apps, not lat/lon. Unfortunately don't have time to explain it all.
(tho a neat thing: Is with the upcoming Book replacement in RAD and hopeful integration into AXE/GUN, could probably get "closest" data results from a query. Tho can't do 2 dimensions in 1 go... maybe would have to combine 2 different queries... not sure yet, will be cool to explore in future...).
Please be careful: never run arbitrary JS, it does not matter if it is encrypted or not, you risk security exploits. I am glad @draeder is repeating this. To me, getting access to hardware is easier attack ( + @adam_blvck:matrix.org ) than a lot of other types of attacks. NSA/etc. has all sorts of backdoors, even telecoms, for getting device ID etc. info.
@Hr4rjuku :clap: @Lexi:matrix.org :clap: @rococtz:matrix.org . I think this was a bug someone reported a while back... map().open(cb) is suppose to work (I thought it was) but they mentioned it doesn't. If you do just .open(cb) no map, do you see all items as sub-objects? Note, .open(cb, {depth: 5})may be a good idea - new feature! Tho that bug fix is needed. Anyone want to help?
@lightningx10 :clap: @abow :clap: @Manwe-777 .
@fitouch @adam_blvck:matrix.org webview-crypto-bridge is that slow? :( :( :/ I thought the bridge has access to all the real native cryptography standards, so digest/etc. should all be supported. No? Are you sure you're not in the non-bridge crypto.js shim?
@alterx @adam_blvck:matrix.org RAD is not updated to latest (it needs to be CPU scheduled, fix the enametoolong, etc.) so if you need storage you should probably stay on the older version. The process will start erring and fail to write, but please confirm: Old data / data on disk itself should not be corrupted, right? After a restart it reads?
The Book replacement in RAD is suppose to be the upgrade, and fixes the enametoolong issue which has been killing me for wayyyy too long - but this also requires migration, which I really really really don't want to write. But new RAD w/ Book hasn't been tested enough yet (Jonathan has been busy with real work, etc.). Overall, I'm just really scared about a lot of the storage stuff & upgrades, but current state also leads to errors too, so uuuggh. I feel stuck. Be nice if we could get some company or blockchain team to donate to have Jonathan work more hours, or if anyone else here can help contribute a bunch of testing - @alterx still willing to get on a screencall? You haven't sent me any times, tho lol, I also don't blame you, its tedious work.
@adam_blvck:matrix.org remember: GUN is NOT a globally consistent system, it is a highly available, partition tolerant system. Anything involving money should use a CP system, not AP. You can still do lifecycle/state management with GUN, like @davay42 just demoed with his kickstarter/gofundme example app (video & demo here) https://twitter.com/marknadal/status/1555405053569036288 , but actual money need/has to be transferred outside of the system. Likewise, the app should have a UI like he has, that lets both parties update whether the money was actually sent or not - so GUN can be used to track whether parties agree with each other or not.
1 reply
If both do, then it is probably safe to assume the non-GUN banking side (traditional, ACH, SWIFT, blockchain, whatever) succeeded, for programmatic purposes. But I always discourage people from doing banking on GUN itself, because its offline/local-first which is not how banks/payment systems work.
@fitouch OH WOW, that is wonderful to hear. Can you link me the PR or fork?
@fedox:fedox.pl oh odd, number is valid, that makes wonder if it is NaN since typeof NaN is number ROFL in js. Or Infinity is also a number that is not valid JSON (tho I want it to be valid in GUN. I LOVE infinity). :clap: @fitouch
Andre
@ahg:it-dengler.de
[m]

I really like petite-vue. Easy to use and works fine. Quickly started by gun listener updates the Vue reactivity objects. Changes direct written to gun and synced back by gun.on to Vue store.
Store is used for reactivity in ui.
But at the moment limited to simple data structure (object or table like. No object with collection / table for now). Can't direct follow references.

I read gun could be direct used in svelte as store, but recommended is a separate store object? Also saw svelte can handle promises with "if" blocks. And I can't svelte use direct by script tag at client side.
Examples are code, but don't know how to compile to a static app.

React and alpinejs looks similar to Vue, but which one is better and easier working with gun as backend / storage?

Best would be to work with native gun node objects for easier use of gun references between nodes?

Short tested gun nodes, but with reactivity the Vue proxy around the gun object kills use of get / map methods?
Hr4rjuku
@Hr4rjuku
@amark Thanks for your response. Yes when I'm using only .open (without map) it shows every item.
Bo
@worldpeaceenginelabs

@amark thx. the pictures are used instead of words in a translation or travel dictionary. so even if you in a country which language or even their signs you dont understand, you will have that handy, digital dictionary of pictures, which everybody in the world will understand by showing plus additional hand gestures...

and its lat/long i will use, because its what cesium devs use already and it works out. imagine the 3D globe has a coordinate overlay in 2D. only problem that comes up very seldom is on mountains, but cesium has a workaround integrated, so the position is visualized on top of the mountain at the end.

Is there any way to gun.put the blue code snippet from above plain into gun? i want to try out whats possible... and look for security later...

Bo
@worldpeaceenginelabs
@draeder is the code execution a gun feature or a gunsafe feature? is it possible to use the execution function from gunsafe solo?
@adam_blvck:matrix.org thx for the inspiration. i will copy paste your text and think it through.
fitouch
@fitouch
@amark here's my first PR for LEX fix amark/gun#1268
@amark this one is for webview-crypto webview-crypto/webview-crypto#16 but webview-crypto is still slow only when we use user graph or frozen graph. I can tell the difference when storing text, image, etc that takes more than 2 seconds in React Native than web.
fitouch
@fitouch
Right now I'm using CryptoJS to encrypt the data in public graph for now because it's so fast. I can't have a bad user experience with slow performance. I hope we can improve webview-crypto library.
GUN is still amazing!
Carlos Vega
@alterx
@amark yeah, I haven't really had the bandwidth yet (I have my full time gig and a side project that we're launching to clients this month)
Also, I'm not using what's on master, i'm just using the latest release on npm. Or does that one already include the changes?
The data can be read, it's just that I could no longer write to that node. It was just dead. Stuck with the data it already had in
Carlos Vega
@alterx
+1 to @fitouch 's PR to fix LEX in user space @amark :D
LnrCdr
@unameit10000000
I'm having a hardtime figuring out how to implement GUN without using a browser. My goal is to have a bunch of relays/peers communicating but then browserless.
Tried setting up some nodejs apps but they only seem to write to a folder/file called radata and no datasharing happens between peers.
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