-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-broadcast interval resets when receiving the self-broadcasted #15
Comments
It's not clear how this should be resolved. As far as I can see, there's no way to distinguish between a broadcast of a head by us or a peer. If broadcasts identified the publisher of the head, then the solution would be easy. I found this comment in the code:
Would it make sense to kill two birds with one stone here? It seems like this would allow us to identify the broadcaster of a head to solve this issue, and at the same time protect against bad behaviour by other peers. |
Yeah, that might be the best way. |
Here's what I had in mind to implement, what do you think?
I'm not sure I see the need for a timecache. It seems that we need to retain the CreatorSignature of received heads for as long as they remain heads, rather than on a time basis. As for verification of signatures, maybe make |
I'm going to need more time to think about this. The issue is that in a crdt swarm where only a subset of peers is "trusted", and I am simply a follower. We'd want that if the trusted peers go away for some reason, the rest of the peers, without trusting themselves, can still sync the crdt-chain if the heads were actually issued by a trusted peer. Currently, a non trusted peer will re-broadcast a head if it does not see anyone else doing so, but:
However:
All in all, it seems this may need to be a full wrapper around the broadcasting part (putting an envelope around the current broadcast protobuf) transparently to this library. But this also has problems (i.e. a broadcast with several heads first issued by several different peers). |
A peer doing a re-broadcast will receive it's own block and reset the timer so the interval doubles. Thus an interval of 10s actually becomes 20s.
The text was updated successfully, but these errors were encountered: