-
Notifications
You must be signed in to change notification settings - Fork 46
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
test: DIP consumer tests #611
Conversation
@Ad96el please ignore the CI error, it is a consequence of the shitty benchmarking logic, which I plan to get rid of in the upcoming PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. Nice job 👏
Some minor comments
crates/kilt-dip-primitives/src/merkle/v0/dip_subject_state/mod.rs
Outdated
Show resolved
Hide resolved
crates/kilt-dip-primitives/src/merkle/v0/dip_subject_state/tests.rs
Outdated
Show resolved
Hide resolved
crates/kilt-dip-primitives/src/merkle/v0/provider_state/tests.rs
Outdated
Show resolved
Hide resolved
crates/kilt-dip-primitives/src/merkle/v0/provider_state/tests.rs
Outdated
Show resolved
Hide resolved
3cd2292
to
740c79d
Compare
Last picky comment: In the crates/kilt-dip-primitives, there is the module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
Fixes KILTprotocol/ticket#3104, based on top of #611. It fixes the logic for the `dip-consumer` pallet, by delegating the generation of a proof worst case to the proof verifier, which must make sure the proof is indeed the one that requires the most weight to verify, and that it verifies successfully. This also means that each consumer runtime is responsible to implement this method, as there cannot be a "universal" worst proof, as that depends on the use case. The pallet benchmarking logic is now generic enough to make this possible and flexible ✨✨✨
Partially fixes KILTprotocol/ticket#2562. Adds unit tests for the verifier components (components tested are shown in the checklist below). It also splits up the proof verification logic into multiple files, split by when those checks are performed. Check the `crates/kilt-dip-primitives/src/merkle/v0/` folder for more details. It addresses an open comment in the DIP refactoring PR: #602 (comment). ## Elements to add tests for - [x] `pallet-dip-consumer` - [x] `pallet-relay-store` - [x] `ProofVerifier` - [x] Merge #612 - [x] Merge #613
Partially fixes KILTprotocol/ticket#2562. Adds unit tests for the verifier components (components tested are shown in the checklist below). It also splits up the proof verification logic into multiple files, split by when those checks are performed. Check the `crates/kilt-dip-primitives/src/merkle/v0/` folder for more details. It addresses an open comment in the DIP refactoring PR: #602 (comment). ## Elements to add tests for - [x] `pallet-dip-consumer` - [x] `pallet-relay-store` - [x] `ProofVerifier` - [x] Merge #612 - [x] Merge #613
Partially fixes https://github.com/KILTprotocol/ticket/issues/2562.
Adds unit tests for the verifier components (components tested are shown in the checklist below).
It also splits up the proof verification logic into multiple files, split by when those checks are performed. Check the
crates/kilt-dip-primitives/src/merkle/v0/
folder for more details. It addresses an open comment in the DIP refactoring PR: #602 (comment).Elements to add tests for
pallet-dip-consumer
pallet-relay-store
ProofVerifier