amark on master
Allow Dockerfile to auto-update… (compare)
amark on master
rad fixed dup text, perf, read … (compare)
opt
since opt doesn't go to disk.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:
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
?
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)
?get(soul)
not important (for example because of write context?!)?
@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?
@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.
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?
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?
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 🤔
.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
.map().on()
it gets called ~6000 times
.map().once()
triggers 74 times
gun = new Gun()
), so that means I am doing 6000 updates?
put
and set
statements and tested .map().on()
again, still a whopping 10 000 calls
.get('members').promSet
.get('members').put(null)
in attempt to clean the set, all the entries are back after I reload the browser page.on()
gets called too much.map().on()
listeners are stacking each time I try to reload the page?
.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
.get('members').once().map().on()
, no luck
x**2
, 34**2
- i get around 1000 calls, 74**2
- around 6000
.promSet
followed by .promOnce
from saved reference with intention to get the .key
.promSet
the disaster chain does not trigger, and I get linear dependency of number of calls from number of current items in the set
.key
back from GUN, x**2
calls happen
x**2
, but part about .promSet
and .promOnce
seems right
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?
/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)
set()
, but looks like set with object and not an existing gun node isn't the same ?!Added by set({key: val})
as seen in Todo example without creating a gun node before ...
https://gun.eco/docs/Basic-Todo-App-Guide#add-gun
So gun.get(soul).put(null)
should delete that node or I'm wrong...?
@adam_blvck:matrix.org SpellBook is quite interesting and really cool! But may turn away people who are anti-new-age / magic, etc.. I noticed the MR codes look an awful lot like they symbols found in the 'Key of Solomon'... Either way, I love love love the concept! Collaborative features using Gun is a no brainer! Especially once the DHT is finished. This is a killer-app, for sure..
When the DHT is finished, Gun's Book system will make it pretty easy to find peers who have data matching what your app wants using a lexical query style system. This can be useful for making the app find users with similar interests, but there may need to be some AI on top of Gun/Book queries to make it work.