Skip to content

rpc: Fix short-circuit condition going into big-table#12068

Merged
steviez merged 1 commit into
anza-xyz:masterfrom
joncinque:rpc-less-bt
Apr 24, 2026
Merged

rpc: Fix short-circuit condition going into big-table#12068
steviez merged 1 commit into
anza-xyz:masterfrom
joncinque:rpc-less-bt

Conversation

@joncinque
Copy link
Copy Markdown

Problem

While updating the bigtable fallback logic in #7937, we incorrectly short-circuited the check into bigtable. Currently, we always go into bigtable if until is not specified, even if we've hit the limit of transactions to return.

Summary of changes

Only respect found_until if until is provided.

#### Problem

While updating the bigtable fallback logic in solana-labs#7937, we incorrectly
short-circuited the check into bigtable. Currently, we always go into
bigtable if `until` is not specified, even if we've hit the limit of
transactions to return.

#### Summary of changes

Only respect `found_until` if `until` is provided.
@joncinque joncinque requested a review from steviez April 20, 2026 21:02
@joncinque joncinque self-assigned this Apr 20, 2026
@joncinque joncinque added the v4.0 Backport to v4.0 branch label Apr 20, 2026
@mergify
Copy link
Copy Markdown

mergify Bot commented Apr 20, 2026

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

@mergify
Copy link
Copy Markdown

mergify Bot commented Apr 20, 2026

If this PR represents a change to the public RPC API:

  1. Make sure it includes a complementary update to rpc-client/ (example)
  2. Open a follow-up PR to update the JavaScript client @solana/kit (example)

Thank you for keeping the RPC clients in sync with the server API @joncinque.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.2%. Comparing base (813aede) to head (adcda86).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #12068     +/-   ##
=========================================
- Coverage    83.2%    83.2%   -0.1%     
=========================================
  Files         861      861             
  Lines      322768   322768             
=========================================
- Hits       268743   268740      -3     
- Misses      54025    54028      +3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@steviez steviez left a comment

Choose a reason for hiding this comment

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

Makes sense and confirmed that found_until is false if the until sig is None:

agave/ledger/src/blockstore.rs

Lines 4002 to 4003 in 81e58b2

let (lowest_slot, until_excluded_signatures, found_until) = match until {
None => (first_available_block, HashSet::new(), false),

The change looks fine to fix + BP by keeping it minimal. Afterwards, I'm thinking we might consider using the type system to avoid the ambiguity / the bug. Namely, make this an Option<bool>:

pub found_until: bool,

Then we'd have:

  • None => until wasn't set so we didn't look in bstore / don't need to look in bigtable
  • Some(false) => until was set but we didn't find it in bstore so go check bigtable
  • Some(true) => until was set and we found it in bstore so skip bigtable

@steviez
Copy link
Copy Markdown

steviez commented Apr 24, 2026

Going to merge on your behalf to get CI rolling on the BP

@steviez steviez added this pull request to the merge queue Apr 24, 2026
Merged via the queue into anza-xyz:master with commit 1a36fe0 Apr 24, 2026
49 checks passed
@joncinque joncinque deleted the rpc-less-bt branch April 24, 2026 09:24
steviez pushed a commit that referenced this pull request Apr 24, 2026
… of #12068) (#12167)

#### Problem

While updating the bigtable fallback logic in #7937, we incorrectly
short-circuited the check into bigtable. Currently, we always go into
bigtable if `until` is not specified, even if we've hit the limit of
transactions to return.

#### Summary of changes

Only respect `found_until` if `until` is provided.

(cherry picked from commit 1a36fe0)

Co-authored-by: Jon C <me@jonc.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4.0 Backport to v4.0 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants