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

refactor: preserve voting block during block sync #4853

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

Erigara
Copy link
Contributor

@Erigara Erigara commented Jul 16, 2024

Description

This change allow to preserve voting block during block sync until iroha have to drop it to process transactions.

It is done in two ways:

  1. check block signatures before verification
  2. try verify block without discarding voting block

Linked issue

Closes #4834

Benefits

Preserve voting block in more cases.

Downsides

Resulting code is not pretty.
Because it has to handle soft-fork case explicitly and not just revert previous block and proceed.

How To Test

cargo test --package iroha_core --lib -- sumeragi::main_loop::tests::block_sync_commit_err_keep_voting_block --exact --show-output

@Erigara Erigara added Refactor Improvement to overall code quality Security This issue asks for improved security labels Jul 16, 2024
@Erigara Erigara self-assigned this Jul 16, 2024
dima74
dima74 previously approved these changes Jul 18, 2024
core/src/state.rs Outdated Show resolved Hide resolved
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
@Erigara Erigara merged commit b94fa54 into hyperledger:main Jul 22, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Improvement to overall code quality Security This issue asks for improved security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keep voting block in more cases
3 participants