Add multi-file usage examples for lookup, key rotation, and audit#487
Open
albonec wants to merge 4 commits into
Open
Add multi-file usage examples for lookup, key rotation, and audit#487albonec wants to merge 4 commits into
albonec wants to merge 4 commits into
Conversation
Adds three new subcommands to the akd-examples binary: basic-lookup — publish a user pool and verify a lookup proof key-rotation — simulate key rotations and verify history proof append-only-audit — populate epochs and verify append-only integrity Each example is structured as a multi-file module matching the existing fixture_generator / mysql_demo pattern.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #487 +/- ##
==========================================
+ Coverage 88.61% 89.31% +0.70%
==========================================
Files 39 38 -1
Lines 9109 7442 -1667
==========================================
- Hits 8072 6647 -1425
+ Misses 1037 795 -242 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cf7160b to
d47f386
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #367
Adds three new subcommands to the
akd-examplesbinary, each as a multi-file module following the same pattern as the existingfixture_generatorandmysql_demoexamples:basic-lookup– publish a user pool in a single epoch and verify a client lookup proofkey-rotation– simulate successive key rotations for one user and verify the complete history proof across all versionsappend-only-audit– populate several epochs and verify append-only integrity as an independent auditorEach example is split across focused sub-files (
setup.rs,client.rs,proofs.rs, etc.) for readability, and each ships with atests/sub-module that exercises bothWhatsAppV1ConfigurationandExperimentalConfigurationvia thetest_config!macro. All 179 tests pass (cargo test -p examples).Test plan
cargo build -p examplescompiles cleanlycargo test -p examples— all 179 tests passcargo run -p examples -- basic-lookupruns and prints a verified lookupcargo run -p examples -- key-rotationruns and prints a verified history tablecargo run -p examples -- append-only-auditruns and prints a verified audit resultcargo run -p examples -- basic-lookup --users 10 --label judy@example.comworkscargo run -p examples -- key-rotation --rotations 10workscargo run -p examples -- append-only-audit --epochs 8works