fix: include aa_authorization_list in the 0x76/0x78 signing-hash preimages#696
Open
compusophy wants to merge 1 commit into
Open
fix: include aa_authorization_list in the 0x76/0x78 signing-hash preimages#696compusophy wants to merge 1 commit into
compusophy wants to merge 1 commit into
Conversation
…mages The sender-hash and fee-payer-hash field lists in spec-tempo-transaction.mdx omitted aa_authorization_list (and, for the sender hashes, the optional key_authorization), disagreeing with the node's shared rlp_encode_fields encoder and with the RLP Encoding section further down the same page. Also fixes the missing comma after sender_address in the fee-payer block. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@compusophy is attempting to deploy a commit to the Tempo Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
Companion PR for the canonical TIP: tempoxyz/tempo#6842 |
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
On
protocol/transactions/spec-tempo-transaction, the Signing Domains field lists disagree with the node's actual encoder:keccak256(0x78 || rlp([...]))) jumps fromsender_addressstraight tokey_authorization, omittingaa_authorization_list(and is missing the comma aftersender_address).keccak256(0x76 || rlp([...]))) end at the field-12 fee-payer placeholder, omittingaa_authorization_listand the optionalkey_authorization(true positions 13 and 14).The RLP Encoding section further down the same page already lists the envelope correctly (
... fee_payer_signature, aa_authorization_list, key_authorization?, sender_signature) — only the signing-hash blocks are stale. An implementor who follows them verbatim produces signatures the chain rejects whenever they trust the spec over the reference client.Ground truth
Node source —
tempoxyz/tempocrates/primitives/src/transaction/tempo_transaction.rs: bothsignature_hash()(viaencode_for_signing) andfee_payer_signature_hash()route through the sharedrlp_encode_fieldshelper, which unconditionally encodes the authorization list and the optional key authorization after the fee-payer-signature slot:For the fee-payer domain,
fee_payer_signature_hash(sender)passes a closure that encodessenderin that slot — the trailing fields are identical.wevm/ox —
src/tempo/TxEnvelopeTempo.tsuses one field list for both domains;deserializedestructures..., feePayerSignatureOrSender, authorizationList, keyAuthorizationOrSignature, ...in exactly this order.Live verification — the localharness Rust implementation (an independent 0x76 encoder, not derived from alloy or ox) only produced signatures accepted by both Moderato and Tempo mainnet once
aa_authorization_listwas included in both preimages; following this page as written yields invalid-signature rejections.Fix
Minimal edit to the three signing-hash code blocks: append
aa_authorization_listandkey_authorization?(comment style copied from the page's own RLP Encoding block), and add the missing comma aftersender_address. Nothing else touched.A mirror PR against the canonical TIP (
tempoxyz/tempotips/tip-0001.md, which this page tracks) is being filed simultaneously. Precedent for clarifying this section: #111.🤖 Generated with Claude Code