Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Add ConfirmedBlock struct, and rework Blocktree apis to include block… #7004

Merged
merged 2 commits into from
Nov 18, 2019

Conversation

CriesofCarrots
Copy link
Contributor

@CriesofCarrots CriesofCarrots commented Nov 16, 2019

…hash info and dummy tx statuses

Problem

The getConfirmedBlock rpc endpoint only returns part of the data needed about a confirmed block by our main downstream use case. It is missing blockhash, previous_blockhash, and real transaction status data.

Summary of Changes

  • Adds RpcConfirmedBlock struct, to organize data needed from Blocktree and to be returned by RPC
  • Extends Blocktree api to get blockhash and previous_blockhash for a confirmed block
  • Adds Blocktree api to map transactions to their statuses. This does not yet return real transaction status data, but moves the generation of dummy statuses from rpc.rs up into blocktree.rs, ready to be plugged in after feat: rocksdb (persistent) transaction status cache #6958 and implementation of writes into that store

Toward #6867

This will break getConfirmedBlock in https://github.com/solana-labs/solana-web3.js again
(sorry, @jstarry ...)

@CriesofCarrots CriesofCarrots force-pushed the blocktree-apis branch 2 times, most recently from d7f2baf to e0101f2 Compare November 16, 2019 21:10
@codecov
Copy link

codecov bot commented Nov 16, 2019

Codecov Report

Merging #7004 into master will decrease coverage by 2.3%.
The diff coverage is 63.4%.

@@           Coverage Diff            @@
##           master   #7004     +/-   ##
========================================
- Coverage    78.8%   76.4%   -2.4%     
========================================
  Files         223     223             
  Lines       42948   44307   +1359     
========================================
+ Hits        33856   33890     +34     
- Misses       9092   10417   +1325

mvines
mvines previously approved these changes Nov 17, 2019
@mergify mergify bot dismissed mvines’s stale review November 18, 2019 02:32

Pull request has been modified.

@CriesofCarrots CriesofCarrots merged commit 3bc8d78 into solana-labs:master Nov 18, 2019
@CriesofCarrots CriesofCarrots deleted the blocktree-apis branch January 15, 2020 01:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants