Repository navigation
fix(tempo): coordinate owner approvals over http to a relay - #5672
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 036175d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Codex Review Summary: ✅ CompletedThis 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. |
jxom
enabled auto-merge (squash)
November 26, 2026 05:56
jxom
disabled auto-merge
November 26, 2026 05:56
This was referenced Nov 26, 2026
Merged
This branch had an error being deployed
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.
Summary
Owner-approved Tempo sends now coordinate through any transport that serves the
account_*methods, not onlywithRelay. A plainhttp(...)transport pointed at a relay withRelay.accounts(for examplehttps://api.tempo.xyz/rpc/sponsor) now stores pending approvals on a random nonce lane and loads missing configs from the relay, the same aswithRelay.Problem
src/tempo/chainConfig.tsonly treated an owner-approved send as coordinated whenclient.transport.accounts === true, which onlywithRelaysets. Over plainhttpto a relay:Nonce provided for the transaction is lower than the current nonce of the account.Account.fromConfig(address)threwAn account config is required to prepare a transaction.even though the relay holds the config.Fix
When
owneris passed and the transport does not advertiseaccounts, Viem probesaccount_getConfigonce per transport. A successful answer (a config ornull) means the transport serves the account methods, so the send is coordinated.MethodNotFound/MethodNotSupportedmeans it does not, and Viem keeps the previous behavior (nonce key 0, config required). Only definitive answers are cached; other errors fall back to the previous behavior for that call and are probed again next time. Sends withoutownermake no extra request.withRelayshort-circuits on itsaccountsflag, so it behaves exactly as before.I chose detection over "always use a random nonce lane when
owneris passed" because owners submitting a full quorum straight to a node would otherwise pay for a new nonce key on every send, and the missing-config case needs the relay anyway.Repro and proof
Tempo testnet (42431), a local
Relay.createserver withRelay.accountsandRelay.feePayer, a 2-of-2 configurable account. Create two pending owner-approved operations, then complete both (two.ts):http(relay), beforeNonce provided for the transaction is lower than the current nonce of the account.http(relay), afterwithRelay(http(), http(relay)), after(Before: reproduced on 2 of 2 runs. One unrelated run timed out on testnet latency in each configuration.)
two.ts
Tests
coordinates pending operations through an http transport to a Fetch relay: plainhttpto aRelay.createFetch server, two pending operations (the second from an address-only account), asserts distinct non-zero nonce keys and that both complete. Fails without the fix (An account config is required to prepare a transaction.).address requires a configtest still passes against a plain node transport, covering the fallback when the probe getsMethodNotFound.pnpm test --project tempo --runone2e.accounts,chainConfig.accounts,chainConfig,Transport,actions/accessKey,Account.accounts,Relay: all pass.tsc -b: clean.Docs
Account.fromConfigandcreateClientdocs no longer imply onlywithRelaycoordinates.