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

Fix finalization after conclude dispute against candidate #1809

Merged
merged 28 commits into from
Sep 29, 2023

Conversation

xDimon
Copy link
Member

@xDimon xDimon commented Sep 18, 2023

Referenced issues

Resolves #1787
Resolves #1659

Description of the Change

Changes in chain scraper (part of dispute coordinator).
Revert block by dispute conclusion against.
Optimize search best including block (avoiding storage call if it possible).
Fix processing of on chain disputes (wrong way of signature calculation).
Some refactors.

Benefits

Finalization does not stop after dispute conclusion against candidate

Tests

Existing tests was adapted.
Added test for calculation of best block.

Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
core/consensus/babe/impl/babe_impl.cpp Outdated Show resolved Hide resolved
core/dispute_coordinator/impl/dispute_coordinator_impl.cpp Outdated Show resolved Hide resolved
core/blockchain/impl/cached_tree.hpp Outdated Show resolved Hide resolved
core/blockchain/impl/cached_tree.cpp Outdated Show resolved Hide resolved
core/blockchain/impl/block_tree_impl.cpp Outdated Show resolved Hide resolved
core/blockchain/impl/block_tree_impl.cpp Show resolved Hide resolved
BOOST_ASSERT(not node.empty());

auto &reverting_tree_node = node.value();
reverting_tree_node->reverted = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Rust distinguishes explicit (disputed, POL1 digest) and inherited revert.

Rare incidents, when force recovery is used may require node restart.
Maybe add comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you provide more details for understanding?

core/blockchain/impl/cached_tree.cpp Show resolved Hide resolved
core/blockchain/impl/block_tree_impl.cpp Outdated Show resolved Hide resolved
core/blockchain/impl/block_tree_impl.cpp Outdated Show resolved Hide resolved
@esganesh
Copy link
Contributor

Fails:
0001-parachains-smoke-test-kagome
0002-parachains-upgrade-smoke-tests-kagome
0012-parachains-pvf

Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
This reverts commit c9d0458.
@xDimon xDimon enabled auto-merge (squash) September 29, 2023 09:26
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
@xDimon xDimon merged commit fd8d4b7 into master Sep 29, 2023
3 of 10 checks passed
@xDimon xDimon deleted the fix/finalization_after_dispute branch September 29, 2023 13:06
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.

Ensure finalization after disputes conclusion is false Revert disputed block
4 participants