Skip to content

feat: add keyed frame nonces - #489

Merged
jxom merged 4 commits into
mainfrom
jxom/eip-8250-keyed-nonces
Sep 29, 2026
Merged

jxom merged 4 commits into
mainfrom
jxom/eip-8250-keyed-nonces

Conversation

@jxom

@jxom jxom commented Sep 28, 2026

Copy link
Copy Markdown
Member

Add EIP-8250 nonceKeys with a shared nonce across frame codecs, signing, validation, and schemas. Preserve EIP-8141 encoding when keys are omitted.

RPC contract: ethereum/execution-apis#907

@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ox Ready Ready Preview Sep 29, 2026 12:15am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T00:17:08.078784Z 1bfc8ae New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/ox@489

commit: 1bfc8ae

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +62 to +63
/** EIP-8250 nonce domains. `nonce` is their shared sequence; omitted keys preserve EIP-8141 encoding. */
nonceKeys?: readonly bigintType[] | undefined

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/core/TxEnvelope.ts
Comment on lines +452 to +454
: true extends
| HasDefined<envelope, 'frames'>
| HasDefined<envelope, 'nonceKeys'>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@jxom
jxom merged commit 277594a into main Sep 29, 2026
16 checks passed
@jxom
jxom deleted the jxom/eip-8250-keyed-nonces branch September 29, 2026 00:17
@github-actions github-actions Bot mentioned this pull request Sep 29, 2026

This branch was successfully deployed

1 active deployment
Preview — 1bfc8ae7 Deployed Sep 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant