-
Notifications
You must be signed in to change notification settings - Fork 13
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
refactor: make solution extrinsic mortal #728
Conversation
nonce as u64, | ||
Default::default(), | ||
)?; | ||
let signed_phase_len = client |
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.
NOTE: this is static applies the extrinsic to live for "signed_phase_len" and if for example the last block in the sign phase it will "live" for additional blocks.
We could change that as well but that is a slightly bigger change.
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, I think this approximation is OK given that we also have the checks on the EPM side.
otoh, maybe it would be easier to know exactly the boundaries of the signed phase in on terms of block number if the Phase::Signed
in EPM wrapped the block number when it started? That way the miner could fetch the current EPM phase and know mortal(signed_phase_started, signed_phase_len)
. is this worth the change?
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.
Yeah, indeed it requires some changes because each block is executed in its own async task and needs synchronization.
Lemme create another issue for 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.
Thanks! I think for now this and the EPM-side changes are enough to tackle the original 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.
Added a comment regarding the approximation with number of blocks span of the tx and whether we could/should improve. Otherwise LGMT
nonce as u64, | ||
Default::default(), | ||
)?; | ||
let signed_phase_len = client |
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, I think this approximation is OK given that we also have the checks on the EPM side.
otoh, maybe it would be easier to know exactly the boundaries of the signed phase in on terms of block number if the Phase::Signed
in EPM wrapped the block number when it started? That way the miner could fetch the current EPM phase and know mortal(signed_phase_started, signed_phase_len)
. is this worth the change?
Close #727