-
Notifications
You must be signed in to change notification settings - Fork 795
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
Vote stapling #1006
Vote stapling #1006
Conversation
rai/node/node.cpp
Outdated
{ | ||
chunks_xor ^= matrix[i][chunk] & free_cols_flip[f][chunk]; | ||
} | ||
if (__builtin_parityl (chunks_xor)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add msvc compatibility to the PR's TODO list ? Possibly a compiler specific macro that does __builtin_popcount (gcc) or __popcnt (msvc) with an LSB mask.
rai/core_test/node.cpp
Outdated
@@ -125,7 +125,8 @@ TEST (node, send_single_observing_peer) | |||
} | |||
} | |||
|
|||
TEST (node, send_single_many_peers) | |||
// TODO: rai::system fails to connect peers | |||
TEST (node, DISABLED_send_single_many_peers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to the max_peers_per_ip
reduction it seems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, nice catch. Thank you very much. I was wondering how that happened.
4b40cd4
to
cac166e
Compare
9b0b07d
to
46062ea
Compare
b797ed3
to
3dc3e9b
Compare
6a2b1c2
to
a06b50d
Compare
I'm moving this to V19 (V18 is still intended to be cleanup) since it will likely not be ready to merge in time for V17 and we don't want to rush the work on such a large change. |
Some weaknesses have been found in the 2 round MuSig, so we'd definitely need to implement this with the 3 round MuSig or a pairing based multisignature scheme. I'm closing this PR because it's very out of date now, and a future implementation would probably need to be separate. |
Simple explanation:
With vote stapling, when a node publishes a block, it will first communicate directly with representatives to make an aggregate signature. Then, the node will publish the block along with the aggregate signature in the same message. The aggregate signature is the same size as a normal signature, because it uses a multisignature protocol called MuSig: https://blockstream.com/2018/01/23/musig-key-aggregation-schnorr-signatures.html. This means that we can package up the entire voting process into the size of one vote.
Protocol explanation (knowledge of the MuSig protocol in the link above is required):
H(H(pk[0] || pk[1] || ... || pk[n]) || pk[i])
, and the inner hash is l_base), and a signature of that info with its node id.TODO:
Fix sporadic node.auto_bootstrap failure (may not be related to vote stapling, not sure)seems unrelated