-
Notifications
You must be signed in to change notification settings - Fork 34
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
Relax transaction isolation levels + fix insert identities constraints #795
base: main
Are you sure you want to change the base?
Conversation
/// Will return `Err` if identity is already queued for deletion, not in the | ||
/// tree, or the queue malfunctions. | ||
#[instrument(level = "debug", skip(self))] | ||
pub async fn recover_identity( |
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.
First step in disabling recovery - deleting the API endpoint
); | ||
tx.insert_pending_identity(leaf_idx, identity, &root, &pre_root) | ||
.await | ||
.expect("Failed to insert identity - tree will be out of sync"); |
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.
The most critical change in this PR is this and the other expect on line 70.
These are necessary to keep the sequencer state in sync with the db
@@ -213,76 +209,11 @@ impl App { | |||
return Err(ServerError::IdentityAlreadyDeleted); | |||
} | |||
|
|||
// Check if the id is already queued for deletion | |||
if tx.identity_is_queued_for_deletion(commitment).await? { |
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.
the insert_new_deletion
method has been changed to be idempotent. Therefore there's no longer a need to check if we have already accepted a deletion
No description provided.