Skip to content

Changes the semantics of election::confirmed and clean up several unit tests#4200

Merged
clemahieu merged 1 commit intonanocurrency:developfrom
clemahieu:election_confirmed_durable
Mar 28, 2023
Merged

Changes the semantics of election::confirmed and clean up several unit tests#4200
clemahieu merged 1 commit intonanocurrency:developfrom
clemahieu:election_confirmed_durable

Conversation

@clemahieu
Copy link
Copy Markdown
Contributor

@clemahieu clemahieu commented Mar 27, 2023

Changes the semantics of election::confirmed to return if the block is durably confirmed on disk, rather than simply being confirmed in memory. This was causing subtle race conditions or unnecessary extra checking to ensure the confirmation has been committed to disk.

Rewriting test to use a block that is not confirmed on disk.
Cleaning up confirmation_height.conflict_rollback_cemented and reduce complexity.
Cleaning up election.quorum_minimum_confirm_success and fixing race condition where confirmation happens asynchronously.
Fixing race condition in election.quorum_minimum_update_weight_before_quorum_checks when checking asynchronous election confirmation.
Cleaning up and simplifying node.rollback_gap_source Removing some test calls to block_processor::flush which is being phased out.

@clemahieu clemahieu requested a review from thsfs March 28, 2023 00:29
@clemahieu clemahieu added this to the V25.0 milestone Mar 28, 2023
@clemahieu clemahieu added unit test Related to a new, changed or fixed unit test exclude from changelog Indicates the change is not relevant for appearing in the release changelog labels Mar 28, 2023
@clemahieu clemahieu force-pushed the election_confirmed_durable branch 2 times, most recently from 4d6e67f to b52fa93 Compare March 28, 2023 11:42
…s durably confirmed on disk, rather than simply being confirmed in memory. This was causing subtle race conditions or unnecessary extra checking to ensure the confirmation has been committed to disk.

Modifies tests:
active_transactions.dropped_cleanup
active_transactions.inactive_votes_cache_election_start
active_transactions.republish_winner
confirmation_height.conflict_rollback_cemented
election.quorum_minimum_confirm_success
election.quorum_minimum_update_weight_before_quorum_checks
node.rollback_gap_source
rpc.confirmation_active
vote_processor.invalid_signature

Rewriting test to use a block that is not confirmed on disk.
Cleaning up confirmation_height.conflict_rollback_cemented and reduce complexity.
Cleaning up election.quorum_minimum_confirm_success and fixing race condition where confirmation happens asynchronously.
Fixing race condition in election.quorum_minimum_update_weight_before_quorum_checks when checking asynchronous election confirmation.
Cleaning up and simplifying node.rollback_gap_source
Removing some test calls to block_processor::flush which is being phased out.
@clemahieu clemahieu force-pushed the election_confirmed_durable branch from b52fa93 to 0e580f8 Compare March 28, 2023 13:04
@clemahieu clemahieu merged commit fde815f into nanocurrency:develop Mar 28, 2023
pwojcikdev added a commit to pwojcikdev/nano-node that referenced this pull request Apr 18, 2023
… block is durably confirmed on disk, rather than simply being confirmed in memory. This was causing subtle race conditions or unnecessary extra checking to ensure the confirmation has been committed to disk. (nanocurrency#4200)"

This reverts commit fde815f.
clemahieu added a commit to clemahieu/nano-node that referenced this pull request Apr 24, 2023
…hich is now directly read within election::confirmed as of nanocurrency#4200
clemahieu added a commit that referenced this pull request Apr 24, 2023
…hich is now directly read within election::confirmed as of #4200 (#4218)
pwojcikdev added a commit to pwojcikdev/nano-node that referenced this pull request Jun 20, 2023
… block is durably confirmed on disk, rather than simply being confirmed in memory. This was causing subtle race conditions or unnecessary extra checking to ensure the confirmation has been committed to disk. (nanocurrency#4200)"

This reverts commit fde815f.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exclude from changelog Indicates the change is not relevant for appearing in the release changelog unit test Related to a new, changed or fixed unit test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants