-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stub out getBlocksSince
and getBlock
methods
#6853
Stub out getBlocksSince
and getBlock
methods
#6853
Conversation
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 |
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
Added to follow-up work, and created an issue for tracking after this PR is closed. |
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