Skip to content

rpc/jsonrpc: encode executionWitness headers as RLP#21543

Merged
awskii merged 1 commit into
awskii/witness-keys-headerorderfrom
awskii/witness-headers-rlp
May 31, 2026
Merged

rpc/jsonrpc: encode executionWitness headers as RLP#21543
awskii merged 1 commit into
awskii/witness-keys-headerorderfrom
awskii/witness-headers-rlp

Conversation

@awskii

@awskii awskii commented May 31, 2026

Copy link
Copy Markdown
Member

Return headers as RLP-encoded bytes instead of JSON header objects, matching the canonical stateless-witness format (Reth compatibility). Field type []map[string]any[]hexutil.Bytes; drops marshalWitnessHeader.

Diverges from Geth's debug_executionWitness (header objects) — deliberate; the target is Reth-canonical.

Corpus (zkevm@v0.4.0): header hashes match (RLP round-trips), no regressions, no decode errors.

Re-raise of the earlier #21537 (its branch was lost). Stacked on #21532. Refs #20534.

The headers field returned JSON header objects. The canonical
stateless-witness format carries RLP-encoded headers, which is what a
stateless verifier consumes. Encode each header with rlp.EncodeToBytes and
change the field type to []hexutil.Bytes.

This diverges from Geth's debug_executionWitness, which returns header
objects; the target here is the canonical witness format.

Verified against the EEST zkevm@v0.4.0 corpus: header hashes match (RLP
round-trips), no regressions.
@awskii awskii requested review from lupin012 and yperbasis as code owners May 31, 2026 13:59
@awskii awskii merged commit ad5ff9a into awskii/witness-keys-headerorder May 31, 2026
1 check passed
@awskii awskii deleted the awskii/witness-headers-rlp branch May 31, 2026 16:19
@yperbasis

Copy link
Copy Markdown
Member

@awskii it was merged not into main, but some other branch.

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.

3 participants