-
Notifications
You must be signed in to change notification settings - Fork 955
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
Make generated block proposals cancel each other out #3249
Make generated block proposals cancel each other out #3249
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@ndr-ds It's already a rotation |
Ah, I guess it is, but there's a bug. The bug made me think this wasn't actually supposed to rotate. I'll just fix the bug in this PR then. |
29ae5ec
to
1822992
Compare
@@ -959,7 +959,11 @@ where | |||
fungible_application_id: Option<ApplicationId>, | |||
) -> Vec<RpcMessage> { | |||
let mut proposals = Vec::new(); | |||
let mut next_recipient = self.wallet.last_chain().unwrap().chain_id; |
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.
If you run it with 100 chains, then after that you run with 10 chains, your wallet will actually still have 100 chains, but you're only gonna use the first 10. So in this case, the last chain in the wallet won't actually match the last chain in the key_pairs
. But for this to properly rotate and cancel each other out, it needs to always match the last chain in key_pairs
.
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.
Right, good catch!
@@ -959,7 +959,11 @@ where | |||
fungible_application_id: Option<ApplicationId>, | |||
) -> Vec<RpcMessage> { | |||
let mut proposals = Vec::new(); | |||
let mut next_recipient = self.wallet.last_chain().unwrap().chain_id; |
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.
Right, good catch!
8bfe558
to
b48ea1f
Compare
1822992
to
3467d73
Compare
b48ea1f
to
33bf983
Compare
3467d73
to
2fba85e
Compare
33bf983
to
a480e16
Compare
2fba85e
to
83f3775
Compare
a480e16
to
eed7006
Compare
83f3775
to
646f774
Compare
This comment was marked as spam.
This comment was marked as spam.
eed7006
to
98d8d58
Compare
646f774
to
66caa6a
Compare
98d8d58
to
add6a9c
Compare
7936bf0
to
8d32a72
Compare
90c2c62
to
8bdcfb6
Compare
8d32a72
to
9d2a160
Compare
9d2a160
to
6a3fb45
Compare
Motivation
The block proposals are supposed to rotate and cancel each other out, but there's currently a bug in how we do it.
Proposal
Fix the bug
Test Plan
CI + ran locally
Release Plan