gun
gun copied to clipboard
SEA Certificate with Blacklist make put silently fail, and callback not called
Code
const Gun = require("gun");
require('gun/sea');
const gun = Gun();
(async()=>{
const user1Pair = await Gun.SEA.pair();
const user2Pair = await Gun.SEA.pair();
const cert = await Gun.SEA.certify("*",{"*" : "chat-with"},user1Pair,null,{
blacklist : 'blacklist' //if you delete this line, it works fine.
});
gun.user().auth(user2Pair,cb=>{
gun.get(`~${user1Pair.pub}`).get("chat-with").put({
"hello" : "world"
},ack=>{
console.log (ack);
},{
opt : {
cert : cert
}
})
})
})()
This is most likely due to blaclist being renamed to block.
https://github.com/amark/gun/commit/63b0043076e4d49a49279fdd245b2df300cdbea2
I also just noticed that block is currently not working.
That commit has tbe note: The "block" (former "blacklist") feature is not working yet (due to a bug in gun)
@mimiza is this waiting for me?
(heads up: I'm gonna be gone the next 2 weeks, just FYI to people)
@amark Yes. It's waiting for you.
This issue has been reported at #1137
Oh thank you! Apologies, I just saw that and though "d'oh!", thank you.
@mimiza @amark should we correct the docs to use 'block' instead of 'blacklist' already? Or do we need the fix to be published to NPM first?
@mimiza @amark should we correct the docs to use 'block' instead of 'blacklist' already? Or do we need the fix to be published to NPM first?
Hi. Some weeks ago, Mark and I discussed about this feature and we think it should be deprecated. So there will be no such feature in the future. Davay I think you could add something like "TO BE DEPRECATED" to the doc.
Yeah, I got the idea on removing non-O(1) requests from the chain. I'll take my time to remove the blacklist
from examples.