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(drive): encapsulate chain lock validation quorum logic #1868

Merged
merged 3 commits into from
Jun 14, 2024

Conversation

shumkov
Copy link
Member

@shumkov shumkov commented May 31, 2024

Issue being fixed or feature implemented

We are going to intoriduce Instant lock signature verification which will be very similar to existing chain lock verification. We need to prepare the related code to be re-used.

What was done?

  • Combine chain lock complex types from PlatformState into a separate structure that can be re-used for instant locks.

How Has This Been Tested?

With existing tests

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@shumkov shumkov requested a review from QuantumExplorer as a code owner May 31, 2024 06:03
@shumkov shumkov changed the title refactor: encapsulate chain lock validation quorum logic to be re-used refactor(drive): encapsulate chain lock validation quorum logic to be re-used May 31, 2024
@shumkov shumkov changed the title refactor(drive): encapsulate chain lock validation quorum logic to be re-used refactor(drive): encapsulate chain lock validation quorum logic Jun 13, 2024
@shumkov
Copy link
Member Author

shumkov commented Jun 14, 2024

Drive ABCI test is not starting due to an infrastructure issue.

This test is passing locally:

...
test result: ok. 191 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 8.39s

     Running unittests src/main.rs (/Users/ivanshumkov/Projects/dashpay/platform2/target/debug/deps/drive_abci-ef52b3bfb71553f9)

running 1 test
test test::test_verify_grovedb_corrupt_0th_root ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.29s

     Running tests/strategy_tests/main.rs (/Users/ivanshumkov/Projects/dashpay/platform2/target/debug/deps/strategy_tests-27abaa59c2006499)

running 57 tests
test masternode_list_item_helpers::tests::test_random_keys_update_determinism ... ok
test masternodes::tests::verify_generate_test_masternodes_is_deterministic_no_updates ... ok
test masternodes::tests::verify_generate_test_masternodes_is_deterministic_with_updates ... ok
test masternodes::tests::verify_generate_test_masternodes_is_deterministic_no_updates_with_random_seeds ... ok
test masternodes::tests::verify_generate_test_masternodes_is_deterministic_with_updates_with_random_seeds ... ok
test failures::tests::run_chain_insert_one_new_identity_and_a_contract_with_bad_update ... ok
test failures::tests::run_chain_block_failure_on_genesis_block_correctly_fixes_itself ... ok
test tests::run_chain_block_signing ... ok
test core_update_tests::tests::run_chain_random_bans_and_unbans ... ok
test core_update_tests::tests::run_chain_random_removals ... ok
test core_update_tests::tests::run_chain_random_bans ... ok
test chain_lock_update::tests::run_chain_lock_update_quorums_not_changing ... ok
test tests::run_chain_core_height_randomly_increasing_with_quorum_updates_changing_proposers ... ok
test tests::run_chain_core_height_randomly_increasing_with_quorum_updates_new_proposers ... ok
test tests::run_chain_core_height_randomly_increasing_with_quorum_updates_updating_proposers ... ok
test tests::run_chain_heavy_rotation_deterministic_before_payout ... ok
test query::tests::run_chain_query_epoch_info ... ok
test query::tests::run_chain_prove_epoch_info ... ok
test query::tests::run_chain_query_epoch_info_latest ... ok
test tests::run_chain_core_height_randomly_increasing ... ok
test tests::run_chain_insert_one_new_identity_and_a_contract ... ok
test tests::run_chain_insert_one_new_identity_and_a_contract_with_updates ... ok
test tests::run_chain_core_height_randomly_increasing_with_epoch_change ... ok
test tests::run_chain_core_height_randomly_increasing_with_quick_epoch_change ... ok
test tests::run_chain_insert_one_new_identity_per_block_many_document_insertions_and_deletions_with_higher_than_max_nonce_gaps_with_epoch_change ... ok
test tests::run_chain_insert_one_new_identity_per_block_many_document_insertions_and_deletions_with_max_nonce_gaps_with_epoch_change ... ok
test tests::run_chain_insert_one_new_identity_per_block_and_one_new_document ... ok
test tests::run_chain_insert_many_new_identity_per_block_many_document_insertions_updates_and_deletions_with_epoch_change ... ok
test tests::run_chain_insert_many_new_identity_per_block_many_document_insertions_updates_transfers_and_deletions_with_epoch_change ... ok
test tests::run_chain_insert_many_new_identity_per_block_many_document_insertions_and_deletions_with_epoch_change ... ok
test tests::run_chain_nothing_happening ... ok
test tests::run_chain_insert_one_new_identity_per_block_and_a_document_with_epoch_change ... ok
test tests::run_chain_rotation_is_deterministic_1_block ... ok
test tests::run_chain_insert_one_new_identity_and_many_big_contracts ... ok
test tests::run_chain_insert_one_new_identity_per_block_document_insertions_and_deletions_with_epoch_change ... ok
test tests::run_chain_insert_one_new_identity_per_block_with_block_signing ... ok
test tests::run_chain_top_up_and_withdraw_from_identities ... ok
test tests::run_chain_core_height_randomly_increasing_with_quorum_updates ... ok
test tests::run_chain_stop_and_restart ... ok
test tests::run_chain_one_identity_in_solitude ... ok
test tests::run_chain_stop_and_restart_multiround ... ok
test tests::run_chain_top_up_identities ... ok
test tests::run_chain_stop_and_restart_with_rotation ... ok
test tests::run_chain_update_identities_add_keys ... ok
test tests::run_chain_update_identities_remove_keys ... ok
test tests::run_chain_insert_one_new_identity_per_block_many_document_insertions_and_deletions_with_epoch_change ... ok
test upgrade_fork_tests::tests::run_chain_on_epoch_change_with_new_version_and_removing_votes ... ok
test tests::run_transactions_exceeding_max_block_size ... ok
test tests::run_chain_transfer_between_identities ... ok
test tests::run_chain_insert_one_new_identity_per_block_with_epoch_change ... ok
test upgrade_fork_tests::tests::run_chain_quick_version_upgrade ... ok
test tests::run_chain_insert_one_new_identity_per_block_many_document_insertions_and_deletions_with_nonce_gaps_with_epoch_change ... ok
test tests::run_chain_proposer_proposes_a_chainlock_that_would_remove_themselves_from_the_list_deterministic ... ok
test upgrade_fork_tests::tests::run_chain_version_upgrade ... ok
test upgrade_fork_tests::tests::run_chain_version_upgrade_multiple_versions ... ok
test upgrade_fork_tests::tests::run_chain_version_upgrade_slow_upgrade has been running for over 60 seconds
test upgrade_fork_tests::tests::run_chain_version_upgrade_slow_upgrade_quick_reversion_after_lock_in has been running for over 60 seconds
test upgrade_fork_tests::tests::run_chain_version_upgrade_slow_upgrade_quick_reversion_after_lock_in ... ok
test upgrade_fork_tests::tests::run_chain_version_upgrade_slow_upgrade ... ok

test result: ok. 57 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 202.14s

   Doc-tests drive-abci

running 11 tests
test packages/rs-drive-abci/src/logging/logger.rs - logging::logger::Loggers::install (line 139) - compile ... ok
test packages/rs-drive-abci/src/logging/logger.rs - logging::logger::LogBuilder::with_configs (line 66) ... ok
test packages/rs-drive-abci/src/metrics.rs - metrics::Prometheus::new (line 137) ... ok
test packages/rs-drive-abci/src/logging/logger.rs - logging::logger::Loggers::try_install (line 176) ... ok
test packages/rs-drive-abci/src/logging/logger.rs - logging::logger::LogBuilder (line 26) ... ok
test packages/rs-drive-abci/src/metrics.rs - metrics::abci_last_platform_height (line 222) ... ok
test packages/rs-drive-abci/src/logging/logger.rs - logging::logger::LogBuilder::with_config (line 89) ... ok
test packages/rs-drive-abci/src/logging/logger.rs - logging::logger::Loggers::default (line 245) ... ok
test packages/rs-drive-abci/src/metrics.rs - metrics::abci_request_duration (line 253) ... ok
test packages/rs-drive-abci/src/metrics.rs - metrics::Prometheus (line 117) ... ok
test packages/rs-drive-abci/src/metrics.rs - metrics::query_duration_metric (line 278) ... ok

test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 7.16s

@shumkov shumkov merged commit 75398b7 into v1.0-dev Jun 14, 2024
22 of 23 checks passed
@shumkov shumkov deleted the refactor/validating-quorums branch June 14, 2024 08:51
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.

2 participants