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

assert(!action_mroot.empty()) in valid_t block_state::new_valid() should not be needed #168

Closed
linh2931 opened this issue May 20, 2024 · 1 comment · Fixed by #176
Closed
Assignees
Labels
bug The product is not working as was intended. 👍 lgtm

Comments

@linh2931
Copy link
Member

linh2931 commented May 20, 2024

When running eosio_system_part1_tests/stake_unstake under Savanna,

I got
unit_test: .../libraries/chain/block_state.cpp:283: eosio::chain::valid_t eosio::chain::block_state::new_valid(const eosio::chain::block_header_state&, const digest_type&, const digest_type&) const: Assertion !action_mroot.empty()' failed``

assert(!action_mroot.empty());

should not be needed, as it is possible a block is empty.

@arhag
Copy link
Member

arhag commented May 20, 2024

We should not assume that we always have some action receipt in the block. The onblock can fail as part of the protocol in which case an empty block would have no action receipts.

We should create a new test with a test contract that only causes onblock to fail to reproduce this problem without all the other stuff that the system contract tests bring in.

@arhag arhag added bug The product is not working as was intended. 👍 lgtm and removed triage labels May 20, 2024
@arhag arhag added this to the Savanna: Production-Ready milestone May 20, 2024
@heifner heifner moved this from Todo to In Progress in Team Backlog May 21, 2024
@heifner heifner moved this from In Progress to Awaiting Review in Team Backlog May 21, 2024
heifner added a commit that referenced this issue May 21, 2024
heifner added a commit that referenced this issue May 21, 2024
Remove invalid assertion for action_mroot
@github-project-automation github-project-automation bot moved this from Awaiting Review to Done in Team Backlog May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The product is not working as was intended. 👍 lgtm
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants