test: add Rex1 compute gas detention reset tests#238
Open
pieakshat wants to merge 1 commit intomegaeth-labs:mainfrom
Open
test: add Rex1 compute gas detention reset tests#238pieakshat wants to merge 1 commit intomegaeth-labs:mainfrom
pieakshat wants to merge 1 commit intomegaeth-labs:mainfrom
Conversation
Author
|
hi, any updates on this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a dedicated
tests/rex1/module covering the Rex1 fix for compute gas detention state leaking between transactions.Before Rex1, volatile data access (oracle call,
TIMESTAMP, etc.) in TX1 would lower the detained compute gas limit, and that lowered limit persistedinto subsequent transactions within the same block — causing unrelated transactions to fail with
ComputeGasLimitExceeded.Rex1 fixes this by resetting
detained_limitto the base TX compute gas limit at the start of each transaction.Five tests are added across three scenarios:
CALLto oracle contract): Rex1 resets the 1M cap between txs; REX spec does not (bug preserved for backward compat).TIMESTAMPopcode): same reset behavior for the 20M block-env cap — this scenario had no existing test coverage.Test plan
cargo test -p mega-evm --test rex1— all 5 tests pass.cargo test -p mega-evm— full suite passes with no regressions.Labels checklist
spec:stablecomp:coreapi:unchanged