fix(aptos): publish the version lower bound on the slot axis - #381
Merged
Merged
Conversation
The aptos detector published oldest_ledger_version as StateBound, but HeadData.Height for aptos is the block height. Ledger versions run about 7x ahead of block heights, so LowerBoundUpstreamStateEvent.Same discarded every publish as a bound above the head and the router never saw it. In production this left aptos with only LOWER_BOUND_BLOCK, which made dproxy reject every version-addressed request for having no bound data. SlotBound is the one type exempt from that comparison, and slot is the axis the head already carries for aptos (GetLatestBlock passes the ledger version as the block's slot). BlockBound is unchanged. Verified against a drpc aptos fullnode: the upstream now publishes LOWER_BOUND_SLOT=7230467940 alongside LOWER_BOUND_BLOCK=1049154233, matching the node's oldest_ledger_version and oldest_block_height.
KirillPamPam
approved these changes
Sep 21, 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.
In production,
aggregator_upstream_providers_lower_bounds{chain="aptos"}has onlytype="lower_block"— no version bound at all. The live upstream description confirms it:That left dproxy rejecting every version-addressed aptos request (
/v1/blocks/by_version,/v1/transactions/by_version) for having no bound data — 100% failure for a customer running Chainlink.Cause
internal/protocol/upstream_state_events.go:35The detector published
oldest_ledger_version(~7.23e9) asStateBound, butHeadData.Heightfor aptos is the block height (~1.05e9). Ledger versions run ~7x ahead, so every publish was discarded as a bound above the head.Fix
Publish it as
SlotBound, the one type exempt from that comparison, and the axis the head already carries —GetLatestBlockpasses the ledger version as the block'sSlot(aptos_chain_specific.go). This matches how solana already splits its two bounds.BlockBoundis unchanged.Verification
Patched nodecore against a drpc aptos fullnode (
fornex-eu-bcn-20), reading the chain-status stream a gRPC client sees:Both match the node's own
oldest_ledger_version/oldest_block_height, and the slot bound now survives even though 7.23e9 ≫ the head height.Notes
StateBound=1, which is below the head and so survived the guard, and would publish nothing until the dproxy side lands. No such upstream exists today, but don't rely on that.SlotBoundis exempt from the above-head comparison and there is no slot-axis equivalent, whileSamerejects decreases unless the value is exactly 1. A bogus oversizedoldest_ledger_versionwould now stick until restart. Worth aHeadData.Slotguard as a follow-up.