fix: encode fee payer signature as [v, r, s] with normalized parity#72
Merged
zerosnacks merged 3 commits intomasterfrom Feb 17, 2026
Merged
fix: encode fee payer signature as [v, r, s] with normalized parity#72zerosnacks merged 3 commits intomasterfrom
zerosnacks merged 3 commits intomasterfrom
Conversation
The _encodeFeePayerSignature function encoded signature components as [r, s, v] but Rust's Signature::decode_rlp_vrs expects [v, r, s]. Additionally, v was encoded as raw uint8 (27/28) but Rust decodes it as a bool parity (0/1). Changes: - Reorder RLP list from [r, s, v] to [v, r, s] - Normalize v from 27/28 to 0/1 parity before encoding
gakonst
added a commit
to tempoxyz/tempo
that referenced
this pull request
Feb 14, 2026
- Update tempo-std submodule to fix _encodeFeePayerSignature: reorder [r,s,v] → [v,r,s] and normalize v from 27/28 → 0/1 - Fix same issue in TxBuilder.sol's copy of _encodeFeePayerSignature - Add test_feePayerSignatureDecodesCorrectly smoke test confirming sponsored txs decode without RLP overflow errors Depends on: tempoxyz/tempo-std#72
- signingHash(): computes user signing hash matching Rust's encode_for_signing (skips fee_token + placeholder for fee payer sig) - feePayerSignatureHash(): computes fee payer hash matching Rust's fee_payer_signature_hash (magic byte 0x78 + sender address)
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.
Summary
Fix fee payer signature RLP encoding order and parity normalization.
Motivation
_encodeFeePayerSignatureencoded as[r, s, v]but Rust'sSignature::decode_rlp_vrsexpects[v, r, s]. Alsovwas 27/28 but Rust decodes as bool (0/1), causing RLP overflow.Changes
[r, s, v]to[v, r, s]inTempoTransactionLib.sol