Skip to content
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

chore: re-enabling pubkey check #1720

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down