This repository was 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.7k
Stub out getBlocksSince
and getBlock
methods
#6853
Merged
CriesofCarrots
merged 4 commits into
solana-labs:master
from
CriesofCarrots:get-block-rpcs
Nov 11, 2019
Merged
Stub out getBlocksSince
and getBlock
methods
#6853
CriesofCarrots
merged 4 commits into
solana-labs:master
from
CriesofCarrots:get-block-rpcs
Nov 11, 2019
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
5c2bf0e
to
6ca92fc
Compare
Codecov Report
@@ Coverage Diff @@
## master #6853 +/- ##
=========================================
+ Coverage 62.7% 79.8% +17.1%
=========================================
Files 219 219
Lines 53718 42211 -11507
=========================================
+ Hits 33704 33719 +15
+ Misses 20014 8492 -11522 |
mvines
previously approved these changes
Nov 11, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
I assume updating the JSON RPC API doc is another follow-up item
} | ||
|
||
pub fn get_block(&self, slot: Slot) -> Result<Vec<(Transaction, transaction::Result<()>)>> { | ||
Ok(make_test_transactions(slot)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just add a comment here saying this method is not fully implemented yet.
6ca92fc
to
cd25715
Compare
11 tasks
Added to follow-up work, and created an issue for tracking after this PR is 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
Solana users need a way to introspect particular blocks on the ledger via a request/response workflow.
Summary of Changes
getBlocksSince
rpc method to return the chain of rooted slots from a particular slot until the current root. This method is complete and returning real data.getBlock
rpc method stub; currently returns a batch of test transaction tuples(Transaction, transaction::Result)
to demonstrate message format and a couple TransactionErrors. Transaction count == slot, and transaction keys are derived deterministically to allow testers to track the pubkeys across slots. (Most of this code, inclmake_test_transactions()
will be removed as part of item Research PoS implementations #3 below)Follow-up work:
get_slot_entries
from blocktree to return real data fromgetBlock