Conversation
…, update docs and tests - Add MEGA_SYSTEM_ADDRESS check in host.rs sload() to exempt system transactions from Rex3 SLOAD-based oracle gas detention - Update Rex3.md spec with SLOAD semantics (caller-agnostic, DELEGATECALL escape, system address exemption difference) - Fix stale doc references (1M -> spec-dependent) in tracker.rs, instructions.rs, mod.rs, README.md, BLOCK_AND_TX_LIMITS.md - Add 8 new tests: system address exemption, non-oracle SLOAD, nested calls, combined limits, sendHint, keyless deploy compute gas limit
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
MEGA_SYSTEM_ADDRESSexemption to the Rex3 SLOAD-based oracle gas detention path inhost.rs. Without this, system transactions that read oracle storage would be incorrectly subject to gas detention.Changes
crates/mega-evm/src/evm/host.rsMEGA_SYSTEM_ADDRESSexemption to Rex3 SLOAD oracle detentionspecs/Rex3.mdREADME.mdcrates/mega-evm/src/evm/mod.rscrates/mega-evm/src/evm/instructions.rscrates/mega-evm/src/access/tracker.rsdocs/BLOCK_AND_TX_LIMITS.mdcrates/mega-evm/tests/rex3/system_address.rscrates/mega-evm/tests/rex3/oracle_gas_limit.rscrates/mega-evm/tests/rex3/keyless_deploy.rscrates/mega-evm/tests/rex3/main.rsmod system_addressTest plan
cargo check -p mega-evmpassescargo test -p mega-evm— all 311 tests pass (15 rex3 tests, including 8 new)cargo fmt --all --check— cleancargo clippy --workspace --lib --examples --tests --benches --all-features --locked— clean