Skip to content
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

Put parent_header to PreloadUnverified, and keep small block in memory #4461

Conversation

eval-exec
Copy link
Collaborator

@eval-exec eval-exec commented May 15, 2024

LonelyBlockHash

What problem does this PR solve?

  1. keep small block in LonelyBlockHash
    Change
pub struct LonelyBlockHash {
    /// block
    pub block_number_and_hash: BlockNumberAndHash,

to

pub struct LonelyBlockHash {
    /// block
    pub block_number_and_hash: Either<BlockNumberAndHash, Arc<BlockView>>,
  1. put parent_header to PreloadUnverified

What's Changed:

Related changes

  • Keep small block in PreloadUnverified's channel, then we can reduce many get operation from RocksDB.
  • put parent_header to PreloadUnverified, then we may reduce one get operation from RocksDB.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code ci-runs-only: [ quick_checks,linters ]

Side effects

  • None

Release note

None: Exclude this PR from the release note.

eval-exec and others added 24 commits May 13, 2024 10:39
Signed-off-by: Eval EXEC <[email protected]>
…ng_unverified_blocks_on_startup`

Signed-off-by: Eval EXEC <[email protected]>
@eval-exec eval-exec requested a review from a team as a code owner May 15, 2024 00:47
@eval-exec eval-exec requested review from zhangsoledad and removed request for a team May 15, 2024 00:47
@eval-exec eval-exec marked this pull request as draft May 15, 2024 00:50
@eval-exec eval-exec closed this May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants