generated from recmo/rust-service-template
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Feat: Deletion / Recovery #598
Merged
Merged
Conversation
This file contains 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
… update eligibility_timestamp
Added/updated database tables to support deletion/recovery.
* added deletion and recovery endpoints, added app functions for deletion * added deletion prover map * added prover_type to separate deletion and insertion provers * added prover_type during batch size removal * moved custom middleware * updated prover table migration * patching tests, added get_eligible_unprocessed_commitments * patched test_update_eligibility_timestamp * patched dynamic_batch_sizes * chore: cargo fmt * updated delete_identity to check if id has already been deleted or queued for deletion * updated recover_identity to delete existing commitment, and insert data in to recoveries table * removed unused function * added new tests for new database/identity manager logic * added new tests * fix: imported IdentityManager into test mod * updated IdentityManager tests * updated database tests * patched test_remove_prover * separated generate_proof into generate_insertion_proof and generate_deletion_proof * patched test_insert_provers * updated provers db schema, updated insert_prover_configuration test * removed commented out tests, will reimplement * removed todo
* added deletion and recovery endpoints, added app functions for deletion * added deletion prover map * added prover_type to separate deletion and insertion provers * added prover_type during batch size removal * moved custom middleware * updated prover table migration * patching tests, added get_eligible_unprocessed_commitments * patched test_update_eligibility_timestamp * patched dynamic_batch_sizes * chore: cargo fmt * updated delete_identity to check if id has already been deleted or queued for deletion * updated recover_identity to delete existing commitment, and insert data in to recoveries table * removed unused function * added new tests for new database/identity manager logic * added new tests * fix: imported IdentityManager into test mod * updated IdentityManager tests * updated database tests * patched test_remove_prover * added delete_identities task * updated DeleteIdentities methods * updated delete identities task * updated logic to remove deletions from table after inserting into identities table * updated delete task * Updated identity tree peek_next_updates to get contiguous insertion or deletion updates until max_update_count * updated processes identities * added deletion task to the task monitor startup * updated commit_identities * added helper functions for delete/insert identities, refactored commit_identities * added logic to separate insertion/deletion inputs * fix test * added logic to insert recovery commitments after deletion * added deletion indices to deletion proof input * removed identity manager from delete_identities task * removed unused imports, arguments and outdated comment * removed get_unprocessed_commitments * added peek next updates test * updated remove_deletions, added test * moved logic to process recoveries into mine identities task * added logic to get dynamic eligibility timestamp * adding logic to get time until next deletion * added logic to update latest deletion root * updated to track the latest deletion timestamp * chore: typo * removed todos, added fixme
* updated padding for deletion proof * updated deletion padding * packed deletion indices into bytearray * removed unused import * added padding for merkle proofs and commitments * fixed import * removed deletion index packing from deletion proof, added index packing to contract function input for delete_identities * updated zeroed proof
* added deletion test * added deleltion prover setup to spawn_deps * patched test_get_unprocessed_commitments * updated test setup, updated delete identities test, patched get_leaf fucntion for TreeVersionData * updated deletion test * updated identities table to drop unique commitment constraint * added recovery test * added a note that we need a mock deletion proof * updated deletion test * updated mock prover to handle deletion input * patched prove function * updated prove_deletion for mock prover * Add V2 chain mocks (#594) * updated compute_deletion_proof_input_hash * patched mock deletion proof * fixed id commitment population during deletion * updated input hash computation for deletion * updated logging * Fix verifier for deletion * Dzejkop/deletion-recovery-tests-fixes (#595) * Fix deletion tests * Remove commented out code * updated deletion test with todo * updated recovery test * add padded deletion test panicking atm * updated recovery test * updated pad index * added test function to get inclusion status * updated recovery test * Add V2 chain mocks (#594) * patched mock deletion proof * fixed id commitment population during deletion * updated input hash computation for deletion * updated logging * Fix verifier for deletion * Dzejkop/deletion-recovery-tests-fixes (#595) * Fix deletion tests * Remove commented out code * updated deletion test with todo * add padded deletion test panicking atm * fix calculation and rebase on fix still doesn't go through * conflict fix * updated BasicTreeOps to only update next leaf on non zero insertion * updated inclusion proof assertion for recover identity * updated inclusion proof inputs after recoveries * updated recover_identity to check inclusion status of replacement identities * patched recover identity test * add padded deletion tests (#597) * rebase on latest changes * Fix * rebase on latest changes * rebase on latest deletion-recovery-branch commit * fix merge conflict --------- Co-authored-by: Dzejkop <jakubtrad@gmail.com> * cargo fmt * chore: cargo clippy * chore: removed unused file * chore: removed duplicate test --------- Co-authored-by: Jakub Trąd <jakubtrad@gmail.com> Co-authored-by: dcbuilder.eth <dcbuilder@protonmail.com>
… update eligibility_timestamp
* added deletion and recovery endpoints, added app functions for deletion * added deletion prover map * added prover_type to separate deletion and insertion provers * added prover_type during batch size removal * moved custom middleware * updated prover table migration * patching tests, added get_eligible_unprocessed_commitments * patched test_update_eligibility_timestamp * patched dynamic_batch_sizes * chore: cargo fmt * updated delete_identity to check if id has already been deleted or queued for deletion * updated recover_identity to delete existing commitment, and insert data in to recoveries table * removed unused function * added new tests for new database/identity manager logic * added new tests * fix: imported IdentityManager into test mod * updated IdentityManager tests * updated database tests * patched test_remove_prover * separated generate_proof into generate_insertion_proof and generate_deletion_proof * patched test_insert_provers * updated provers db schema, updated insert_prover_configuration test * removed commented out tests, will reimplement * removed todo
* added deletion and recovery endpoints, added app functions for deletion * added deletion prover map * added prover_type to separate deletion and insertion provers * added prover_type during batch size removal * moved custom middleware * updated prover table migration * patching tests, added get_eligible_unprocessed_commitments * patched test_update_eligibility_timestamp * patched dynamic_batch_sizes * chore: cargo fmt * updated delete_identity to check if id has already been deleted or queued for deletion * updated recover_identity to delete existing commitment, and insert data in to recoveries table * removed unused function * added new tests for new database/identity manager logic * added new tests * fix: imported IdentityManager into test mod * updated IdentityManager tests * updated database tests * patched test_remove_prover * added delete_identities task * updated DeleteIdentities methods * updated delete identities task * updated logic to remove deletions from table after inserting into identities table * updated delete task * Updated identity tree peek_next_updates to get contiguous insertion or deletion updates until max_update_count * updated processes identities * added deletion task to the task monitor startup * updated commit_identities * added helper functions for delete/insert identities, refactored commit_identities * added logic to separate insertion/deletion inputs * fix test * added logic to insert recovery commitments after deletion * added deletion indices to deletion proof input * removed identity manager from delete_identities task * removed unused imports, arguments and outdated comment * removed get_unprocessed_commitments * added peek next updates test * updated remove_deletions, added test * moved logic to process recoveries into mine identities task * added logic to get dynamic eligibility timestamp * adding logic to get time until next deletion * added logic to update latest deletion root * updated to track the latest deletion timestamp * chore: typo * removed todos, added fixme
* updated padding for deletion proof * updated deletion padding * packed deletion indices into bytearray * removed unused import * added padding for merkle proofs and commitments * fixed import * removed deletion index packing from deletion proof, added index packing to contract function input for delete_identities * updated zeroed proof
* added deletion test * added deleltion prover setup to spawn_deps * patched test_get_unprocessed_commitments * updated test setup, updated delete identities test, patched get_leaf fucntion for TreeVersionData * updated deletion test * updated identities table to drop unique commitment constraint * added recovery test * added a note that we need a mock deletion proof * updated deletion test * updated mock prover to handle deletion input * patched prove function * updated prove_deletion for mock prover * Add V2 chain mocks (#594) * updated compute_deletion_proof_input_hash * patched mock deletion proof * fixed id commitment population during deletion * updated input hash computation for deletion * updated logging * Fix verifier for deletion * Dzejkop/deletion-recovery-tests-fixes (#595) * Fix deletion tests * Remove commented out code * updated deletion test with todo * updated recovery test * add padded deletion test panicking atm * updated recovery test * updated pad index * added test function to get inclusion status * updated recovery test * Add V2 chain mocks (#594) * patched mock deletion proof * fixed id commitment population during deletion * updated input hash computation for deletion * updated logging * Fix verifier for deletion * Dzejkop/deletion-recovery-tests-fixes (#595) * Fix deletion tests * Remove commented out code * updated deletion test with todo * add padded deletion test panicking atm * fix calculation and rebase on fix still doesn't go through * conflict fix * updated BasicTreeOps to only update next leaf on non zero insertion * updated inclusion proof assertion for recover identity * updated inclusion proof inputs after recoveries * updated recover_identity to check inclusion status of replacement identities * patched recover identity test * add padded deletion tests (#597) * rebase on latest changes * Fix * rebase on latest changes * rebase on latest deletion-recovery-branch commit * fix merge conflict --------- Co-authored-by: Dzejkop <jakubtrad@gmail.com> * cargo fmt * chore: cargo clippy * chore: removed unused file * chore: removed duplicate test --------- Co-authored-by: Jakub Trąd <jakubtrad@gmail.com> Co-authored-by: dcbuilder.eth <dcbuilder@protonmail.com>
* Split mainnet and secondary finalization * WIP * Fix padding issue * Bring bck commented code
Dzejkop
approved these changes
Sep 19, 2023
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.
This PR introduces functionality to delete / recover identity commitments from the protocol.
PR Checklist