Apply evmos.diff: trace DB, oe tracer, pre/trace RPC namespaces#1
Merged
Apply evmos.diff: trace DB, oe tracer, pre/trace RPC namespaces#1
Conversation
- 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>
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.
Applies changes from evmos.diff (adapted for cosmos/evm structure):
Trace infrastructure
data/traces) in evmd app and pass to VM keeperReadTxTrace/WriteTxTraceto keeper for oe tracer persistenceTraceTxbranch forTracerOeto read traces from DBTraceTransaction(return raw RLP)Config & types
oetoevmTracersin server configTracerandArgstoTransactionArgsPreResult,TraceStore,ActionTrace/ActionTracestypes andTracerOeconstantRPC
preandtraceJSON-RPC namespacespre_traceMany: batch trace (calls EthCall with batch args; batch EthCall in keeper not yet implemented)trace_transaction: returns oe trace from DB via backendTraceTransactionNote: 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