feat(blocklog): parse ethrex block execution throughput logs#240
Draft
edg-l wants to merge 1 commit into
Draft
Conversation
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.
What
Implements the ethrex block-log parser in
pkg/blocklog(replacing the stub), so ethrex runs produce per-block metrics like the other clients.It parses ethrex's per-block execution metric header (emitted on the
engine_newPayloadpath) into the shared{ "block": { "hash": ... }, ... }shape:Captured fields:
block.number,block.hash,block.gas_used_mgas,block.gas_used_pct,block.tx_count,throughput.ggas_per_sec,timing.total_ms. ANSI is stripped; the hash is optional in the regex so the line still parses on builds that don't log it (it just won't match a test withoutblock.hash).Dependency
Matching a log to a test requires
block.hash, and ethrex does not yet include the hash on this line. That is addressed upstream in lambdaclass/ethrex#6736, which adds the hash exactly where this parser expects it (BLOCK <num> 0x<hash> | ...). Once that lands and reaches the ethrex image used here, ethrex runs will start attaching per-block metrics.Marking this draft until the ethrex change is merged and released.
Notes
|- validate/exec/merkle/storelines; since the collector matches one payload per line by hash, only the header is captured. Folding in the phase breakdown would need ethrex to emit a single structured line (follow-up).reth_test.go: hash / no-hash / zero-gas / ANSI / non-matching lines.gofmt,go vet, andgo test ./pkg/blocklog/pass.