feat: add keyed frame nonces - #489
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad543ee55f
ℹ️ 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".
| /** EIP-8250 nonce domains. `nonce` is their shared sequence; omitted keys preserve EIP-8141 encoding. */ | ||
| nonceKeys?: readonly bigintType[] | undefined |
There was a problem hiding this comment.
Infer EIP-8141 when nonceKeys is present
When an incomplete request supplies nonceKeys but omits both type and frames, TransactionRequest.toEnvelope delegates to TxEnvelope.getType, which only recognizes frames as the EIP-8141 discriminator. It therefore defaults to EIP-1559, interprets the shared sequence as a legacy nonce, and silently drops the keys instead of selecting EIP-8250 and reporting the missing required frames. Add nonceKeys to both the runtime and type-level getType inference so this input follows the EIP-8141 validation path.
AGENTS.md reference: AGENTS.md:L150-L150
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bfc8ae75a
ℹ️ 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".
| : true extends | ||
| | HasDefined<envelope, 'frames'> | ||
| | HasDefined<envelope, 'nonceKeys'> |
There was a problem hiding this comment.
Preserve optional explicit types during nonce-key inference
When a caller has an optional discriminator such as { type?: 'eip1559'; nonceKeys: readonly bigint[] }, the first conditional does not match because type is optional, so this branch declares the result as only eip8141. At runtime, however, a defined type wins and returns eip1559, making getType and dependent serialize/toRpc return types unsound. Preserve the possible explicit type alongside the inferred fallback and add a type test for this case.
AGENTS.md reference: AGENTS.md:L45-L45
Useful? React with 👍 / 👎.
Add EIP-8250
nonceKeyswith a sharednonceacross frame codecs, signing, validation, and schemas. Preserve EIP-8141 encoding when keys are omitted.RPC contract: ethereum/execution-apis#907