Skip to content

cmd/hivechain: add calltree contract and tx mods for callTracer testing - #1587

Merged
lightclient merged 3 commits into
ethereum:masterfrom
MysticRyuujin:hivechain-calltree
Aug 11, 2026
Merged

lightclient merged 3 commits into
ethereum:masterfrom
MysticRyuujin:hivechain-calltree

Conversation

@MysticRyuujin

Copy link
Copy Markdown
Contributor

What

Adds a calltree contract (geas) plus fixed-address predeploys of the existing callme/callenv/callrevert contracts, and two block modifiers:

  • tx-calltree — one invocation produces every callTracer frame type: nested CALL (success with value / inner Error(string) revert), STATICCALL (success / write-protection failure), DELEGATECALL emitting a depth-2 log, CALLCODE, a precompile call, CREATE of a child that logs and self-destructs, and a top-level LOG1.
  • tx-callrevert — a whole-transaction revert with a decodable revert reason ("user error").

Why

The execution-apis test chain currently contains no CALL-family opcodes, inner reverts, CREATE-opcode frames, or SELFDESTRUCTs, so debug_trace* fixtures cannot exercise nested call trees. This unblocks the callTracer standardization spec (execution-apis PR to follow).

Predeploy addresses (0x9dcd…27d0–d3) are hardcoded in calltree.eas, mirrored in genesis.go, and guarded by a test asserting the constants appear in the compiled bytecode. The callees are predeployed (rather than reusing the deploy-* mods' instances) because deployment addresses depend on modifier scheduling and cannot be baked into committed bytecode.

One tx-calltree invocation produces every callTracer frame type; see
contracts/calltree.eas. tx-callrevert adds a whole-tx revert with a
decodable reason.

@lightclient lightclient left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lightclient
lightclient merged commit 2b28139 into ethereum:master Aug 11, 2026
1 of 3 checks passed
@MysticRyuujin
MysticRyuujin deleted the hivechain-calltree branch August 11, 2026 15:06
lightclient added a commit to MysticRyuujin/hive that referenced this pull request Aug 24, 2026
The calltree contract and tx mods landed upstream in ethereum#1587 (with
mod_calltree renamed to mod_tracetest); keep only the test that guards
the coupling between the callee address constants in genesis.go and the
addresses compiled into bytecode/calltree.bin.
lightclient added a commit that referenced this pull request Aug 24, 2026
* cmd/hivechain: add test guarding calltree callee addresses

The calltree contract and tx mods landed upstream in #1587 (with
mod_calltree renamed to mod_tracetest); keep only the test that guards
the coupling between the callee address constants in genesis.go and the
addresses compiled into bytecode/calltree.bin.

* simulators/ethereum/rpc-compat: tracer-aware schema selection for speconly tests

Validate speconly debug_trace* responses against the anyOf branch
matching the tracer the test requested. The whole-schema validation was
vacuous: the unconstrained named-tracer branch accepts any value. A
known tracer with no matching branch is an error, not a fallback.

* cmd/hivechain: generate Glamsterdam blocks

* go: tidy Glamsterdam geth dependencies

* cmd/hivechain: hex-encode Engine API requests

* clients: declare BPO blob schedules only for scheduled forks

The bpo1-bpo5 blobSchedule entries were emitted unconditionally with
hardcoded fallback values, while the matching bpoNTime fields are dropped
by remove_empty when their HIVE_BPON_TIMESTAMP is unset. On a chain whose
last fork is Amsterdam, geth then resolved the active fork's blob schedule
to the phantom bpo5 entry (target 9, max 14) rather than bpo2 (target 14,
max 21), so eth_config reported blob parameters that did not match the
chain and the rpc-compat eth_config test failed.

Gate each entry on its HIVE_BPON_TIMESTAMP so an unscheduled BPO is
omitted from the generated genesis entirely.

* hivechain: Add block-level access list output

* hivechain: EIP-7997 contract to genesis

* go: bump go-ethereum to glamsterdam-devnet-8

* go: bump go-ethereum to glamsterdam-devnet-8 tip

* cmd/hivechain: fix -outputs all expansion

The expanded output list was unconditionally overwritten by
splitAndTrim("all") right below, so -outputs all failed with an
unknown output name ever since the flag was introduced in #909.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants