Skip to content

test(drive): verify proof signatures in strategy tests - #1147

Merged
QuantumExplorer merged 15 commits into
v0.25-devfrom
test/block-sig-verification
Jun 13, 2023
Merged

test(drive): verify proof signatures in strategy tests#1147
QuantumExplorer merged 15 commits into
v0.25-devfrom
test/block-sig-verification

Conversation

@lklimek

@lklimek lklimek commented Jun 2, 2023

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

We need to correctly verify proof signatures in strategy tests.

What was done?

  • companion PR: implemented SignDigest trait for CanonicalVote in feat: impl SignDigest for CanonicalVote for easier light client verification rs-tenderdash-abci#22
  • implemented proof verification using light client algorithm in
  • MimicExecuteBlockOutcome includes all data required to verify a proof using light client approach
  • implemented easy way to enable logging in tests
  • enabled logging, block signing & verification in run_chain_insert_one_new_identity_per_block
  • implemented ProofVerification.verify_proof() that verifies provided proof, including full signature verification
  • refactored signing code to use (simpler) CanonicalVote approach
  • removed some unused code

How Has This Been Tested?

cargo test -p drive-abci

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 made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@lklimek
lklimek requested review from antouhou and shumkov as code owners June 2, 2023 13:58
@lklimek lklimek changed the title test: verify proof signatures in strategy tests test(drive): verify proof signatures in strategy tests Jun 2, 2023
Comment thread packages/rs-drive-abci/tests/strategy_tests/query.rs Outdated

@QuantumExplorer QuantumExplorer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very nice work, minimal changes requested.

Comment thread packages/rs-drive-abci/src/abci/mimic.rs Outdated
Comment thread packages/rs-drive-abci/src/abci/mimic.rs Outdated
Comment thread packages/rs-drive-abci/tests/strategy_tests/execution.rs Outdated
Comment thread packages/rs-drive-abci/tests/strategy_tests/main.rs Outdated
@lklimek lklimek self-assigned this Jun 6, 2023
@lklimek
lklimek requested a review from QuantumExplorer June 6, 2023 20:10
@QuantumExplorer
QuantumExplorer merged commit 992cc7b into v0.25-dev Jun 13, 2023
@QuantumExplorer
QuantumExplorer deleted the test/block-sig-verification branch June 13, 2023 13:59
@thephez thephez added this to the v0.25.0 milestone Oct 11, 2023
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.

3 participants