Skip to content

Commit

Permalink
chore(contracts): Rename Schnorr multi key account to just Schnorr ac…
Browse files Browse the repository at this point in the history
…count (#1447)

The name `SchnorrMultiKeyAccount` was confusing, since it seems to hint
to a multisig contract, whereas it's just a contract with a signing key
that's separate from the encryption key. Since this should be the
default behaviour for all account contracts, this PR renames
`SchnorrMultiKeyAccount` to just `SchnorrAccount`, following the same
naming as `EcdsaAccount`.

The distinct one, `SchnorrSingleKeyAccount`, which uses a single key for
encryption and signing (which is advised against) still has that name
until we can think of a better one.
  • Loading branch information
spalladino authored Aug 8, 2023
1 parent ff7ad30 commit 3afd853
Show file tree
Hide file tree
Showing 10 changed files with 155 additions and 155 deletions.
4 changes: 2 additions & 2 deletions yarn-project/aztec.js/src/abis/ecdsa_account_contract.json

Large diffs are not rendered by default.

147 changes: 147 additions & 0 deletions yarn-project/aztec.js/src/abis/schnorr_account_contract.json

Large diffs are not rendered by default.

147 changes: 0 additions & 147 deletions yarn-project/aztec.js/src/abis/schnorr_multi_key_account_contract.json

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Schnorr } from '@aztec/circuits.js/barretenberg';
import { ContractAbi } from '@aztec/foundation/abi';
import { NodeInfo, PrivateKey } from '@aztec/types';

import SchnorrMultiKeyAccountContractAbi from '../../abis/schnorr_multi_key_account_contract.json' assert { type: 'json' };
import SchnorrAccountContractAbi from '../../abis/schnorr_account_contract.json' assert { type: 'json' };
import { CompleteAddress } from '../complete_address.js';
import { StoredKeyAccountEntrypoint } from '../entrypoint/stored_key_account_entrypoint.js';
import { AccountContract } from './index.js';
Expand All @@ -24,6 +24,6 @@ export class SchnorrAccountContract implements AccountContract {
}

public getContractAbi(): ContractAbi {
return SchnorrMultiKeyAccountContractAbi as ContractAbi;
return SchnorrAccountContractAbi as ContractAbi;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "schnorr_multi_key_account_contract"
name = "schnorr_account_contract"
authors = [""]
compiler_version = "0.1"
type = "bin"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod public_key_note;

// Account contract that uses Schnorr signatures for authentication.
// The signing key is stored in an immutable private note and should be different from the encryption/nullifying key.
contract SchnorrMultiKeyAccount {
contract SchnorrAccount {
use dep::std;
use dep::aztec::entrypoint;
use dep::aztec::entrypoint::EntrypointPayload;
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/noir-contracts/src/scripts/copy_output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const log = createConsoleLogger('aztec:noir-contracts');

const PROJECT_CONTRACTS = [
{ name: 'SchnorrSingleKeyAccount', target: '../aztec.js/src/abis/', exclude: [] },
{ name: 'SchnorrMultiKeyAccount', target: '../aztec.js/src/abis/', exclude: [] },
{ name: 'SchnorrAccount', target: '../aztec.js/src/abis/', exclude: [] },
{ name: 'EcdsaAccount', target: '../aztec.js/src/abis/', exclude: [] },
];

Expand Down

0 comments on commit 3afd853

Please sign in to comment.