Repository navigation
feat(tempo)!: migrate configurable accounts - #449
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1dd720109e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,5 @@ | |||
| --- | |||
| "ox": patch | |||
There was a problem hiding this comment.
Release the breaking multisig migration as a major change
This commit removes the released genesisConfig/init API, requires a recovery-factory argument, and replaces the multisig RPC and wire shapes, but the changeset schedules only a patch release. Consumers accepting patch updates will encounter compile failures or incompatible serialized signatures; mark this as a major change and include the required before/after migration diff.
AGENTS.md reference: AGENTS.md:L120-L120
Useful? React with 👍 / 👎.
| /** Complete current configuration, included in every signature. */ | ||
| config: MultisigConfig.Config<numberType> | ||
| /** Primitive owner approvals in ascending recovered-address order. */ | ||
| signatures: readonly Primitive<numberType>[] |
There was a problem hiding this comment.
Regenerate the multisig guide for the new envelope shape
After making every multisig signature carry account, config, and primitive approvals, the published guide at site/src/pages/tempo/guides/transaction-envelopes/multisig-transactions.mdx still describes the removed init bootstrap flow, calls getAddress without a factory (line 61), and passes the removed genesisConfig/init inputs throughout lines 113-138 and 187-211. Its primary recipes therefore no longer compile or produce the protocol shape introduced here; regenerate the Tempo documentation from updated source rather than shipping the stale guide.
AGENTS.md reference: AGENTS.md:L68-L69
Useful? React with 👍 / 👎.
| /** Account address this authorization is bound to. Required for multisig grants. */ | ||
| account?: Address.Address | undefined |
There was a problem hiding this comment.
Require account binding for multisig key grants
When type is 'multisig', this property is documented as required but remains optional in the public type, and neither from, toTuple, nor the Zod schema enforces the relationship. A caller can therefore construct and sign a multisig grant without account; it serializes successfully but lacks the parent-account binding required by this delegation flow and will be rejected by the node. Model this as a discriminated union or reject the missing account during encoding.
Useful? React with 👍 / 👎.
| if (keychain.version === 'v1' && getType(keychain.inner) === 'multisig') | ||
| throw new InvalidMultisigApprovalError({ | ||
| reason: 'multisig access keys require keychain V2', | ||
| }) | ||
| assert(keychain.inner) |
There was a problem hiding this comment.
Reject multisig delegates nested under keychain V1
When a V1 keychain wraps another keychain whose eventual inner signature is multisig, this check sees only the immediate 'keychain' type and passes; recursive validation then accepts the inner V2 multisig and serialize emits the whole envelope beneath a 0x03 V1 wrapper. This bypasses the requirement that multisig delegates use keychain V2, so inspect the recursive signer chain rather than only the immediate child.
AGENTS.md reference: AGENTS.md:L138-L138
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 625a968e99
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (typeof request.keyAuthorizationSimulation !== 'undefined') | ||
| request_rpc.keyAuthorizationSimulation = z.encode( | ||
| z_MultisigSimulation.MultisigSimulation, | ||
| request.keyAuthorizationSimulation, | ||
| ) |
There was a problem hiding this comment.
Mark key-authorization-only simulations as Tempo requests
When the Zod codec encodes a request whose only Tempo-specific field is keyAuthorizationSimulation, this assignment emits the field but the tempo predicate above does not include it. Consequently the codec omits type: '0x76' and the synthetic calls entry, unlike TransactionRequest.toRpc, so the node can interpret the request as a legacy transaction instead of a Tempo key-authorization simulation.
Useful? React with 👍 / 👎.
| if (typeof envelope === 'string') { | ||
| const serialized = Hex.concat(serializedMultisigType, envelope) | ||
| const result = deserialize(serialized) | ||
| if ( | ||
| result.type !== 'multisig' || | ||
| !Hex.isEqual(serialize(result), serialized) | ||
| ) | ||
| throw new InvalidSerializedError({ | ||
| reason: 'invalid multisig RPC signature', | ||
| serialized: envelope, | ||
| }) | ||
| return result | ||
| const signature = deserialize(Hex.concat(serializedMultisigType, envelope)) | ||
| if (signature.type !== 'multisig') throw new CoercionError({ envelope }) | ||
| return signature |
There was a problem hiding this comment.
Recheck canonical RLP before accepting multisig RPC
For string-valued multisig RPC signatures, deserialize validates the decoded fields but the underlying RLP decoder accepts noncanonical length encodings. For example, a valid outer f8 <len> list can be supplied as f9 00 <len>; this path accepts it, while toRpc silently rewrites it to canonical bytes. That permits RPC data which the node can reject and breaks byte-stable round trips, so compare the reserialized RPC bytes with the input before returning.
Useful? React with 👍 / 👎.
Updated Tempo multisig APIs to versioned configurations, factory-derived addresses, primitive approvals, and configurable-account delegation, matching tempoxyz/tempo#7581. Pinned integration tests to
sha-83f3ccd.