-
Notifications
You must be signed in to change notification settings - Fork 677
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
Do not accept signatures, block proposals, or block responses for blocks from different reward cycles #5662
Conversation
…cks in a different reward cycle Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
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.
LGTM!
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
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.
LGTM -- once the integration test is added with injected stackerdb messages, I'll approve.
… into fix/signers-verify-reward-cycle
I don't know what the purpose of injecting stackerdb messages is. I do test already that signers ignore messages based on reward cycle in both integration tests. If we want to have further checks on validity of messages we will need the following implemented #5671. I think this PR should be merged regardless. EDIT: Actually, I think there is one additional path that I do not test that I could check with an injection as you suggest. Let me give that a shot quickly. |
Signed-off-by: Jacinta Ferrant <[email protected]>
… into fix/signers-verify-reward-cycle
Maybe you're thinking the same thing (you later said there was a scenario you could think of), but to me the purpose is that signers properly ignore/handle block responses that come from these "other" signers. For example, it could be a malicious signer, or it could just be an un-upgraded signer. The tests you have assert that signers ignore block proposals, but really what triggered this issue was not ignoring block responses. I do think the code you have in this PR covers the functionality we want already, I just also think this test scenario would be helpful. |
It kind of already does this. It handles this case by keeping incoming and outgoing signers around and forcing the valid signers to respond. I verify that none of the "not your cycle signers" do nothing in response to the block proposals as well as the signer signatures. I guess I don't explicitly write to the "wrong" signers signer db, but the slot it is written to does not matter in the signer. They don't care who the originator of a message is so I am still testing the same signer side code. I will add one to accomodate the threshold test though to aid in debugging if we ever have some other bug occur specifically at that point. |
Signed-off-by: Jacinta Ferrant <[email protected]>
…stacks-network/stacks-core into fix/signers-verify-reward-cycle
… into fix/signers-verify-reward-cycle
Release playbook for the code in this PR:
Targeting Monday, but knowing most folks are traveling this might be released on Tuesday. |
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.
LGTM, nice test(s)!
Expands upon #5612
Closes #5611