Skip to content

Kura writes block twice to disk #5372

@dima74

Description

@dima74

Kura always thinks there was a soft fork, as a result:

  • Blocks are duplicated in blocks.json (file for debugging which can be enabled using [kura.debug] output_new_blocks = true in config)
  • Kura writes block twice (this doesn't affect consumed disk space, but can be considered as a performance optimization)

if new_latest_written_block_hash != latest_written_block_hash {
written_block_count -= 1; // There has been a soft-fork and we need to rewrite the top block.
}

cc @timofeevmd

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions