Skip to content
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

shell's last_epoch field should only be updated during block commit #218

Closed
tzemanovic opened this issue Jul 26, 2022 · 0 comments · Fixed by #327
Closed

shell's last_epoch field should only be updated during block commit #218

tzemanovic opened this issue Jul 26, 2022 · 0 comments · Fixed by #327
Assignees
Labels
bug Something isn't working

Comments

@tzemanovic
Copy link
Member

There are 2 fields for epoch in storage - last_epoch and block.epoch , which were both being updated in ABCI EndBlock, but the last_epoch must be atomic - it can only be changed when the block is being committed (ABCI Commit). This was caught in the e2e tests in anoma/anoma#1234, because a MASP tx must be applied in the same epoch as it’s constructed, but because the last_epoch was being updated before commit, an RPC epoch query that could make it between the EndBlock and Commit would return the new epoch too early (this is timing sensitive, so not very deterministic)

@tzemanovic tzemanovic added the bug Something isn't working label Jul 26, 2022
@tzemanovic tzemanovic self-assigned this Jul 26, 2022
@tzemanovic tzemanovic moved this to Todo in Namada-Old Jul 26, 2022
@tzemanovic tzemanovic moved this from Todo to Queue in Namada-Old Jul 26, 2022
Repository owner moved this from Pending Devnet to Tested in Devnet in Namada-Old Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Tested in Devnet
1 participant