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

EVM: Clean up construct block validation #2526

Merged
merged 29 commits into from
Oct 4, 2023

Conversation

sieniven
Copy link
Contributor

@sieniven sieniven commented Oct 3, 2023

Summary

  • This PR depends on PR Set correct timestamp in queue backend #2521 and PR EVM: Fix gas used for system txs in tx receipts #2516 to be merged in first.
  • Adds additional layer of check to ensure that block gas limit is not exceeded when executing txs in the txqueue.
  • This PR safeguards and removes the assumption that the state should match on consensus when adding txs to the queue vs the state on actual construct block
  • EVM txs are now allowed to fail if they exceed block gas limit in construct block pipeline on the miner, which will subsequently be removed on the block template on the DVM miner side.
  • On connect block, EVM txs should never fail from block gas limit now. Thus block will be invalidated if any EVM tx fails on construct block pipeline.
  • Refactor block gas limit check into executor

Implications

  • Storage

    • Database reindex required
    • Database reindex optional
    • Database reindex not required
    • None
  • Consensus

    • Network upgrade required
    • Includes backward compatible changes
    • Includes consensus workarounds
    • Includes consensus refactors
    • None

@sieniven sieniven added the v/next-release Items ready or targeted for upcoming release(s) label Oct 3, 2023
src/miner.cpp Outdated Show resolved Hide resolved
src/miner.cpp Outdated Show resolved Hide resolved
src/validation.cpp Outdated Show resolved Hide resolved
src/miner.cpp Show resolved Hide resolved
Bushstar
Bushstar previously approved these changes Oct 4, 2023
@sieniven sieniven dismissed Bushstar’s stale review October 4, 2023 07:10

The merge-base changed after approval.

@prasannavl prasannavl merged commit 507dd16 into master Oct 4, 2023
@prasannavl prasannavl deleted the evm/construct-block-validation branch October 4, 2023 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v/next-release Items ready or targeted for upcoming release(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants