docs: clarify fee payer placeholder wire format vs signing payload encoding#111
Closed
brendanjryan wants to merge 1 commit intomainfrom
Closed
docs: clarify fee payer placeholder wire format vs signing payload encoding#111brendanjryan wants to merge 1 commit intomainfrom
brendanjryan wants to merge 1 commit intomainfrom
Conversation
…coding The spec was ambiguous about how the fee_payer_signature placeholder is encoded. The Sender Signature section described the 0x00 byte without clarifying it applies only to the signing payload, while the Transaction Flow section referenced Some(Signature::default()) (the wire format) without explaining the mapping. This caused an interop issue where ox/viem deserialized the Rust/alloy wire format placeholder (RLP list [0, 0x00…, 0x00…]) as a real signature object instead of the null sentinel, breaking sender recovery. Clarifies: - Wire format: Some(Signature::default()) → RLP list [v, r, s] zeros - Signing payload: always 0x00 (single byte) - Implementations MUST map zero-valued sigs → 0x00 in encode_for_signing
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Problem
The spec for the fee payer signature placeholder was ambiguous, describing two different encodings without clarifying which applies where:
0x00placeholderSome(Signature::default())[0, 0x00…, 0x00…]RLP list [v, r, s] if SomeThis caused an interop bug: ox/viem deserialized Rust/alloy's wire format placeholder (RLP list of zeros) as a real signature object instead of the null sentinel, breaking sender recovery and fee payer co-signing.
Fix
Clarifies that these are two different contexts:
Some(Signature::default())→ RLP list[0, 0x00…, 0x00…](c3 80 80 80)encode_for_signing): single byte0x00Adds an explicit implementor note: deserializers MUST treat a zero-valued signature (
v=0, r=0, s=0) as the unsigned placeholder and encode it as0x00when recomputing the sender's signing payload.Related