Skip to content

fix(tempo): harden relay sponsorship with fixes from the Tempo API relay - #5236

Merged
jxom merged 7 commits into
mainfrom
fix/tempo-relay-upstream-api
Oct 15, 2026
Merged

jxom merged 7 commits into
mainfrom
fix/tempo-relay-upstream-api

Conversation

@jxom

@jxom jxom commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

No description provided.

Ports relay-handler fixes made in tempoxyz/api since the relay handler landed:

- Recover raw sponsorship senders from their signatures (including keychain
  access keys) instead of trusting the envelope sender placeholder.
- Reject raw Tempo transactions whose encoding is not canonical.
- Let the sponsor's fee token override a raw envelope's `feeToken`.
- Accept a per-chain `feePayer.feeToken` resolver; external fee payers choose
  their own token.
- Bound returned fee-payer signatures by `validBefore` (`feePayer.validity`,
  default 1 hour); `eth_signRawTransaction` requires one.
- Add `feePayer.onRejected` for base-fee-floor broadcast rejections.
- Add `feePayer` to `SponsoredEvent`.
- Estimate sponsored fills without the sender's fee cap.
- Cap Relay fetch request bodies at 16 MiB.
- Require the full 12-byte TIP-20 address prefix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3wHL22Gq6TxRjXBPMiWL8
@changeset-bot

changeset-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f885912

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
viem Ready Ready Preview Oct 15, 2026 8:36pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 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-10-15T20:36:16.687255Z f885912 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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3wHL22Gq6TxRjXBPMiWL8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3wHL22Gq6TxRjXBPMiWL8
@pkg-pr-new

pkg-pr-new Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/viem@5236

commit: f885912

@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: dd97418e12

ℹ️ 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/tempo/internal/relay/feePayer.ts Resolved
Comment thread src/tempo/internal/relay/request.ts Resolved
Comment thread src/tempo/internal/relay/feePayer.ts Resolved
Sponsored fills that set only `maxPriorityFeePerGas` without `gas` now
estimate unpriced too, and restore the caller's tip (raising the node fee
cap when needed). Drops an unreachable malformed-envelope guard in
`requestsRawSponsorship`, since `compose` rejects those first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3wHL22Gq6TxRjXBPMiWL8

@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: 2e9e230f6e

ℹ️ 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/tempo/internal/relay/feePayer.ts Resolved
Comment thread src/tempo/internal/relay/request.ts Resolved
Comment thread src/tempo/internal/relay/feePayer.ts Resolved
`Relay.feePayer` now refuses a non-positive or non-integer `validity`, which
would otherwise admit unbounded `validBefore` values. Sponsored fills whose
tip exceeds their fee cap now reach the node unchanged so it rejects them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3wHL22Gq6TxRjXBPMiWL8

@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: 63881db784

ℹ️ 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/tempo/internal/relay/request.ts Resolved
Comment thread src/tempo/internal/relay/feePayer.ts Resolved
Non-canonical fee values (leading zeros, over 256 bits) now reach the node
unchanged instead of being stripped and rewritten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3wHL22Gq6TxRjXBPMiWL8

jxom commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

Verify / Test Local (transport: http, multicall: true, 2/3) failed on 6dd8ee0 in src/actions/public/watchBlocks.test.ts:50 (expected 5 to be 4). That is a block-polling timing assertion in the core suite, which excludes src/tempo. This PR only changes src/tempo and the changeset, and the same job passed on this PR's previous heads. No fix exists for it to port. I'll re-run the failed job once when the workflow finishes.


Generated by Claude Code

Raw sponsorship now accepts a configurable account, as sender or as a
same-transaction key authorization signer, only when its config matches the
on-chain commitment and its owner approvals reach quorum. Adds
`feePayer.minimumBaseFee` (default 600_000_000n) to set the floor below which
`onRejected` treats a base-fee rejection as permanent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D3wHL22Gq6TxRjXBPMiWL8
@jxom
jxom merged commit 72950dd into main Oct 15, 2026
38 of 40 checks passed
@jxom
jxom deleted the fix/tempo-relay-upstream-api branch October 15, 2026 20:56
@github-actions github-actions Bot mentioned this pull request Oct 15, 2026

This branch was successfully deployed

1 active deployment
Preview — f8859125 Deployed Oct 15, 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.

2 participants