Skip to content

Commit

Permalink
chore: re-enabling pubkey check (#1720)
Browse files Browse the repository at this point in the history
I tried reproducing #1556 issue but it doesn't seem to occur anymore.
For this reason the pubkey check can be re-enabled.

Fixes #1556 

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
  • Loading branch information
benesjan authored Aug 22, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent ec5241c commit 5385b18
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -92,10 +92,10 @@ export class AztecRPCServer implements AztecRPC {

public async registerAccount(privKey: PrivateKey, account: CompleteAddress) {
const pubKey = this.keyStore.addAccount(privKey);
// TODO: Re-enable this check once https://github.com/AztecProtocol/aztec-packages/issues/1556 is solved
// if (!pubKey.equals(account.publicKey)) {
// throw new Error(`Public key mismatch: ${pubKey.toString()} != ${account.publicKey.toString()}`);
// }
if (!pubKey.equals(account.publicKey)) {
// The derived public key must match the one provided in the complete address
throw new Error(`Public key mismatch: ${pubKey.toString()} != ${account.publicKey.toString()}`);
}
await this.db.addCompleteAddress(account);
this.synchroniser.addAccount(pubKey, this.keyStore);
}

0 comments on commit 5385b18

Please sign in to comment.