Fix Aptos account transaction limit windows#449
Merged
Conversation
cll-gg
reviewed
Apr 30, 2026
yashnevatia
reviewed
Apr 30, 2026
364942c to
dc59c36
Compare
yashnevatia
approved these changes
Apr 30, 2026
JohnChangUK
approved these changes
Apr 30, 2026
This was referenced Apr 30, 2026
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
AccountTransactions(start=nil, limit=N)into an explicit bounded window before calling the Aptos SDKRoot Cause
The Chainlink merge queue Aptos CRE test started requesting recent transmitter account transactions with
start=nil, limit=10. That call shape was introduced by smartcontractkit/capabilities#574, specifically https://github.com/smartcontractkit/capabilities/commit/133e87d6fa49e380db7a4648587ef4dbd314e6b7, when the Aptos tx-search phase-1 probe changed fromstart=nil, limit=nilto a bounded latest-page request.For limit-only account transaction requests, the Aptos SDK queries the latest transactions and then computes a previous-page cursor from the first returned transaction sequence number. For new accounts with fewer transactions than the requested limit, the earliest returned sequence can be
0, so the SDK computes0 - 1and issues a REST request withstart=18446744073709551615. The observed CI failure was the Aptos REST API rejecting that invalid cursor.Fix
This PR handles the limit-only request shape in the relayer by resolving it into a safe explicit latest transaction window before calling the Aptos SDK. For accounts with sequence number
0, the relayer returns an empty transaction list directly. Requests that already provide an explicitstartare still passed through unchanged.Testing
go test ./relayer -count=1Failing runs / consumers:
Aptos SDK issue filed:
aptos-labs/aptos-go-sdk#213