This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Rpc: enable getConfirmedBlock and getConfirmedTransaction to return confirmed (not yet finalized) data #16142
Merged
CriesofCarrots
merged 12 commits into
solana-labs:master
from
CriesofCarrots:truly-confirmed-block
Mar 26, 2021
Merged
Rpc: enable getConfirmedBlock and getConfirmedTransaction to return confirmed (not yet finalized) data #16142
CriesofCarrots
merged 12 commits into
solana-labs:master
from
CriesofCarrots:truly-confirmed-block
Mar 26, 2021
Conversation
This file contains 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
@carllin could you please review the first 3 commits, plus the logic identified in comment? |
CriesofCarrots
commented
Mar 25, 2021
c719a50
to
11bab32
Compare
Codecov Report
@@ Coverage Diff @@
## master #16142 +/- ##
=========================================
Coverage 79.9% 80.0%
=========================================
Files 409 410 +1
Lines 108093 109296 +1203
=========================================
+ Hits 86457 87496 +1039
- Misses 21636 21800 +164 |
mvines
previously approved these changes
Mar 26, 2021
carllin
reviewed
Mar 26, 2021
carllin
reviewed
Mar 26, 2021
carllin
reviewed
Mar 26, 2021
carllin
reviewed
Mar 26, 2021
c925ac9
to
9bbeb60
Compare
9bbeb60
to
32d8d33
Compare
mergify bot
pushed a commit
that referenced
this pull request
Mar 26, 2021
…onfirmed (not yet finalized) data (#16142) * Add Blockstore block and tx apis that allow unrooted responses * Add TransactionStatusMessage, and send on bank freeze; also refactor TransactionStatusSender * Track highest slot with tx-status writes complete * Rename and unpub fn * Add commitment to GetConfirmed input configs * Support confirmed blocks in getConfirmedBlock * Support confirmed txs in getConfirmedTransaction * Update sigs-for-addr2 comment * Enable confirmed block in cli * Enable confirmed transaction in cli * Review comments * Rename blockstore method (cherry picked from commit 433f1ea) # Conflicts: # core/src/replay_stage.rs # core/src/rpc.rs # core/src/validator.rs
mergify bot
pushed a commit
that referenced
this pull request
Mar 26, 2021
…onfirmed (not yet finalized) data (#16142) * Add Blockstore block and tx apis that allow unrooted responses * Add TransactionStatusMessage, and send on bank freeze; also refactor TransactionStatusSender * Track highest slot with tx-status writes complete * Rename and unpub fn * Add commitment to GetConfirmed input configs * Support confirmed blocks in getConfirmedBlock * Support confirmed txs in getConfirmedTransaction * Update sigs-for-addr2 comment * Enable confirmed block in cli * Enable confirmed transaction in cli * Review comments * Rename blockstore method (cherry picked from commit 433f1ea) # Conflicts: # core/src/replay_stage.rs
mergify bot
added a commit
that referenced
this pull request
Mar 27, 2021
…onfirmed (not yet finalized) data (bp #16142) (#16160) * Rpc: enable getConfirmedBlock and getConfirmedTransaction to return confirmed (not yet finalized) data (#16142) * Add Blockstore block and tx apis that allow unrooted responses * Add TransactionStatusMessage, and send on bank freeze; also refactor TransactionStatusSender * Track highest slot with tx-status writes complete * Rename and unpub fn * Add commitment to GetConfirmed input configs * Support confirmed blocks in getConfirmedBlock * Support confirmed txs in getConfirmedTransaction * Update sigs-for-addr2 comment * Enable confirmed block in cli * Enable confirmed transaction in cli * Review comments * Rename blockstore method (cherry picked from commit 433f1ea) # Conflicts: # core/src/replay_stage.rs * Fix conflict Co-authored-by: Tyera Eulberg <teulberg@gmail.com> Co-authored-by: Tyera Eulberg <tyera@solana.com>
mergify bot
added a commit
that referenced
this pull request
Mar 27, 2021
…onfirmed (not yet finalized) data (bp #16142) (#16159) * Rpc: enable getConfirmedBlock and getConfirmedTransaction to return confirmed (not yet finalized) data (#16142) * Add Blockstore block and tx apis that allow unrooted responses * Add TransactionStatusMessage, and send on bank freeze; also refactor TransactionStatusSender * Track highest slot with tx-status writes complete * Rename and unpub fn * Add commitment to GetConfirmed input configs * Support confirmed blocks in getConfirmedBlock * Support confirmed txs in getConfirmedTransaction * Update sigs-for-addr2 comment * Enable confirmed block in cli * Enable confirmed transaction in cli * Review comments * Rename blockstore method (cherry picked from commit 433f1ea) # Conflicts: # core/src/replay_stage.rs # core/src/rpc.rs # core/src/validator.rs * Fix conflicts Co-authored-by: Tyera Eulberg <teulberg@gmail.com> Co-authored-by: Tyera Eulberg <tyera@solana.com>
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
Despite their names,
getConfirmedBlock
andgetConfirmedTransaction
only return finalized data, forcing users to wait 30+ slots longer than necessary to get tx or block details.Summary of Changes
getConfirmedSignaturesForAddress2
)getConfirmedBlock
andgetConfirmedTransaction
via the commitment parameter; default remainsfinalized
solana block <slot>
andsolana confirm <signature> -v
Follow-up work:
getConfirmedSignaturesForAddress2
; handling in separate PR because blockstore api is so convolutedgetConfirmedBlocks
andgetConfirmedBlocksWithLimit
; the former will need some rework a la Rpc: support extended config for getConfirmedBlock #15827 to retain backward compatibility while adding a config parametergetX
methods and deprecategetConfirmedX
methods