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

blocktree_processor to use slots as bank ids and squash() #2949

Merged
merged 1 commit into from
Feb 27, 2019

Conversation

rob-solana
Copy link
Contributor

Problem

  • in blocktree_processor, bank children aren't created for every slot as in replay stage
  • bankforks has all the banks, not just the heads

the 2 above combine to construct a bankforks that doesn't match the behavior of replay_stage or of (soon) locktower

Summary of Changes

  • bankforks made aware of parents, bank.id()
  • blocktree_processor follows slots as bank ids, squashes on forking (with TODO)

Fixes #

bank_id: slot,
entry_height,
last_entry_id,
next_blob_index: meta.consumed,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@carllin this is what I'd like to see, but it's failing the 2 node 1 tick/slot test...

@rob-solana rob-solana force-pushed the blocktree_processor.bank_id branch from 4bde968 to 1e52e9b Compare February 26, 2019 19:56
@codecov
Copy link

codecov bot commented Feb 26, 2019

Codecov Report

Merging #2949 into master will decrease coverage by 6.5%.
The diff coverage is 67%.

@@           Coverage Diff            @@
##           master   #2949     +/-   ##
========================================
- Coverage    78.3%   71.8%   -6.6%     
========================================
  Files         127     127             
  Lines       19719   21525   +1806     
========================================
+ Hits        15456   15471     +15     
- Misses       4263    6054   +1791

@carllin
Copy link
Contributor

carllin commented Feb 26, 2019

I think you're also going to have to change how these two lines interoperate:

  1. https://github.com/solana-labs/solana/blob/master/src/replay_stage.rs#L218
  2. https://github.com/solana-labs/solana/blob/master/src/replay_stage.rs#L227

If we give replay stage a completed slot n, line 1 is going to get the blob index for the end of slot n, but line 2 is going to set current_slot to slot n + 1

@rob-solana rob-solana force-pushed the blocktree_processor.bank_id branch from 1e52e9b to 6b26f58 Compare February 26, 2019 22:08
@rob-solana rob-solana force-pushed the blocktree_processor.bank_id branch from 6b26f58 to 3f8edb8 Compare February 26, 2019 23:16
@garious
Copy link
Contributor

garious commented Feb 26, 2019

ship it

@mvines
Copy link
Contributor

mvines commented Feb 27, 2019

Yes please, I want to rebase on this

@garious garious merged commit ea08379 into solana-labs:master Feb 27, 2019
@rob-solana rob-solana deleted the blocktree_processor.bank_id branch February 27, 2019 18:19
brooksprumo pushed a commit to brooksprumo/solana that referenced this pull request Sep 19, 2024
* build(deps): bump bytes from 1.7.1 to 1.7.2

Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](tokio-rs/bytes@v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: bytes
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update all Cargo files

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

4 participants