Skip to content

Apply evmos.diff: trace DB, oe tracer, pre/trace RPC namespaces#1

Merged
cifer76 merged 13 commits intoxrplevmfrom
feature/evmos-trace-oe
Feb 26, 2026
Merged

Apply evmos.diff: trace DB, oe tracer, pre/trace RPC namespaces#1
cifer76 merged 13 commits intoxrplevmfrom
feature/evmos-trace-oe

Conversation

@cifer76
Copy link
Collaborator

@cifer76 cifer76 commented Feb 25, 2026

Applies changes from evmos.diff (adapted for cosmos/evm structure):

Trace infrastructure

  • Add RocksDB trace database (data/traces) in evmd app and pass to VM keeper
  • Add ReadTxTrace / WriteTxTrace to keeper for oe tracer persistence
  • Add TraceTx branch for TracerOe to read traces from DB
  • Handle TracerOe response in backend TraceTransaction (return raw RLP)

Config & types

  • Add oe to evmTracers in server config
  • Add Tracer and Args to TransactionArgs
  • Add PreResult, TraceStore, ActionTrace / ActionTraces types and TracerOe constant

RPC

  • Add pre and trace JSON-RPC namespaces
  • pre_traceMany: batch trace (calls EthCall with batch args; batch EthCall in keeper not yet implemented)
  • trace_transaction: returns oe trace from DB via backend TraceTransaction

Note: OeTracer write path (state_transition + PersistTrace) and batch EthCall in keeper are not included; this PR adds the infrastructure and read path for oe traces.

Made with Cursor

Cifer and others added 13 commits February 25, 2026 18:12
- Add RocksDB trace database in evmd app and pass to VM keeper
- Add ReadTxTrace/WriteTxTrace to keeper for oe tracer persistence
- Add TraceTx branch for TracerOe to read traces from DB
- Add 'oe' to evmTracers in server config
- Add Tracer and Args to TransactionArgs; PreResult, TraceStore, ActionTrace types
- Add pre and trace JSON-RPC namespaces (TraceMany, trace_transaction)
- Handle TracerOe response in backend TraceTransaction (return raw RLP)
- Add TracerOe constant to vm types

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add batch execution path in EthCall keeper: when TransactionArgs.Args
  contains sub-calls, iterate and apply each via ApplyMessageWithConfig,
  returning JSON-serialized []PreResult with logs, gas, and error info
- Add rpc/namespaces/ethereum/eth/multicall.go with PublicAPI.MultiCall:
  supports parallel/sequential execution, fast-fail, native token shortcut,
  and per-call timing stats

Co-authored-by: Cursor <cursoragent@cursor.com>
When the keeper's tracer is set to "oe", ApplyTransaction now creates a
callTracer via go-ethereum's tracers.DefaultDirectory, passes its hooks
into ApplyMessageWithConfig, and after execution persists the JSON-
serialized trace result to the keeper's traceDb keyed by tx hash.

Co-authored-by: Cursor <cursoragent@cursor.com>
The trace result from flatCallTracer is now RLP-encoded via
rlp.EncodeToBytes before writing to traceDb, matching the RLP
decoding used on the read path in trace_transaction.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Create a flatCallTracer per sub-call in ethCallBatch and pass its
  hooks into ApplyMessageWithConfig to collect structured call traces
- Collect trace result via GetResult() and store as json.RawMessage
  in PreResult.Trace
- Update PreResult.Trace type from []ActionTrace to json.RawMessage
  to hold the raw tracer output directly

Made-with: Cursor
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…sactionHash

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…dle JSON null

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cifer76 cifer76 merged commit 9d323e6 into xrplevm Feb 26, 2026
7 of 16 checks passed
@cifer76 cifer76 deleted the feature/evmos-trace-oe branch February 26, 2026 15:01
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.

1 participant