-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix round timer #26
Fix round timer #26
Conversation
It is not needed. When node.start() is called, the connection establishment is done in bin/tapyrus-signerd.rs.
It used Block::hash() for checking sighash value.
Round timer must follow below rules * The timer is started on rounds start only. * New round is started on only receiving completedblock message or previous round is timeout.
By using schnorr threshold signing, the term of communications for it became longer. So sometimes it needs over 5s.
ci looks like failure. |
The test node receive nodevss message after it started. This is a effect of changing which is that 10s sleep code for waiting connect to redis was removed. To respond to this, the test track only blockvss message.
03e47dc
to
83ba4b7
Compare
It was fixed! |
src/signer_node.rs
Outdated
@@ -663,15 +680,15 @@ impl<T: TapyrusApi, C: ConnectionManager> SignerNode<T, C> { | |||
new_signatures.len(), | |||
self.params.threshold | |||
); | |||
if candidate_block.hash().unwrap() != blockhash { | |||
if candidate_block.sighash().unwrap() != blockhash { |
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.
Why Block#hash
returns Result
? I think it should be return hash::Hash
directly.
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.
Block#sighash can return Hash. I will fix it.
About Block#hash
, It is possible to return Error because of no proof block.
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.
About Block#hash, It is possible to return Error because of no proof block.
Computing the hash and validating the block should be considered separately. If proof is empty, Block#hash
should return hash value with empty proof and another logic checks block validity.
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.
I see. I will separate it.
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.
Regarding validity, current Block implement is roughly. It should use rust-tapyrus create.
I want to change using rust-tapyrus in other PR sometime soon.
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.
I fixed!
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.
Please create new issue.
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.
Yes, here #28
Fix round timer behavior. The timer behavior didn't have consistent policy. So, it worked inconsistent way.
After this PR, Round timer must follow below basically rule.