Skip to content

Commit

Permalink
feat: introduce default public keys and replace empty public keys (#9277
Browse files Browse the repository at this point in the history
)

This PR further prepares our new address changes. Because we need to
prove correct derivation of the address, and that the definition of the
address has changed to be h (the pre-address) * G added to Ivpk, we need
this Ivpk to be an actual point on the curve because if it isn't, any
attempted derivation of the address will fail. Because of this we are
now removing the concept of "zeroed" or "empty" keys because they are no
longer valid in an address, as they would never be able to be used.

We replace our empty public keys in favor of the concept of default
public keys, and we replace all of them instead of only the ivpk for
consistency. These "default" keys are keys that derived from
 
"az_null_npk"
"az_null_ivpk"
"az_null_ovpk"
"az_null_tpk"
as bytes, hashed to curve using
`grumpkin::g1::affine_element::hash_to_curve(<X>, 0)`;
  • Loading branch information
sklppy88 authored Oct 24, 2024
1 parent ac8e6d7 commit 47718ea
Show file tree
Hide file tree
Showing 25 changed files with 144 additions and 70 deletions.
16 changes: 16 additions & 0 deletions l1-contracts/src/core/libraries/ConstantsGen.sol
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,22 @@ library Constants {
uint256 internal constant MULTI_CALL_ENTRYPOINT_ADDRESS = 4;
uint256 internal constant FEE_JUICE_ADDRESS = 5;
uint256 internal constant ROUTER_ADDRESS = 6;
uint256 internal constant DEFAULT_NPK_M_X =
582240093077765400562621227108555700500271598878376310175765873770292988861;
uint256 internal constant DEFAULT_NPK_M_Y =
10422444662424639723529825114205836958711284159673861467999592572974769103684;
uint256 internal constant DEFAULT_IVPK_M_X =
339708709767762472786445938838804872781183545349360029270386718856175781484;
uint256 internal constant DEFAULT_IVPK_M_Y =
12719619215050539905199178334954929730355853796706924300730604757520758976849;
uint256 internal constant DEFAULT_OVPK_M_X =
12212787719617305570587928860288475454328008955283046946846066128763901043335;
uint256 internal constant DEFAULT_OVPK_M_Y =
3646747884782549389807830220601404629716007431341772952958971658285958854707;
uint256 internal constant DEFAULT_TPK_M_X =
728059161893070741164607238299536939695876538801885465230641192969135857403;
uint256 internal constant DEFAULT_TPK_M_Y =
14575718736702206050102425029229426215631664471161015518982549597389390371695;
uint256 internal constant AZTEC_ADDRESS_LENGTH = 1;
uint256 internal constant GAS_FEES_LENGTH = 2;
uint256 internal constant GAS_LENGTH = 2;
Expand Down
16 changes: 16 additions & 0 deletions noir-projects/noir-protocol-circuits/crates/types/src/constants.nr
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,22 @@ global MULTI_CALL_ENTRYPOINT_ADDRESS = AztecAddress::from_field(4);
global FEE_JUICE_ADDRESS = AztecAddress::from_field(5);
global ROUTER_ADDRESS = AztecAddress::from_field(6);

// CANONICAL DEFAULT KEYS
// This below are:
// "az_null_npk"
// "az_null_ivpk"
// "az_null_ovpk"
// "az_null_tpk"
// as bytes, hashed to curve using grumpkin::g1::affine_element::hash_to_curve(<X>, 0);
global DEFAULT_NPK_M_X = 0x01498945581e0eb9f8427ad6021184c700ef091d570892c437d12c7d90364bbd;
global DEFAULT_NPK_M_Y = 0x170ae506787c5c43d6ca9255d571c10fa9ffa9d141666e290c347c5c9ab7e344;
global DEFAULT_IVPK_M_X = 0x00c044b05b6ca83b9c2dbae79cc1135155956a64e136819136e9947fe5e5866c;
global DEFAULT_IVPK_M_Y = 0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151;
global DEFAULT_OVPK_M_X = 0x1b00316144359e9a3ec8e49c1cdb7eeb0cedd190dfd9dc90eea5115aa779e287;
global DEFAULT_OVPK_M_Y = 0x080ffc74d7a8b0bccb88ac11f45874172f3847eb8b92654aaa58a3d2b8dc7833;
global DEFAULT_TPK_M_X = 0x019c111f36ad3fc1d9b7a7a14344314d2864b94f030594cd67f753ef774a1efb;
global DEFAULT_TPK_M_Y = 0x2039907fe37f08d10739255141bb066c506a12f7d1e8dfec21abc58494705b6f;

// LENGTH OF STRUCTS SERIALIZED TO FIELDS
global AZTEC_ADDRESS_LENGTH: u32 = 1;
global GAS_FEES_LENGTH: u32 = 2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
use crate::{
address::public_keys_hash::PublicKeysHash, constants::GENERATOR_INDEX__PUBLIC_KEYS_HASH,
hash::poseidon2_hash_with_separator, point::POINT_LENGTH,
traits::{Deserialize, Serialize, Empty, is_empty, Hash},
address::public_keys_hash::PublicKeysHash,
constants::{
GENERATOR_INDEX__PUBLIC_KEYS_HASH, DEFAULT_NPK_M_X, DEFAULT_NPK_M_Y, DEFAULT_IVPK_M_X,
DEFAULT_IVPK_M_Y, DEFAULT_OVPK_M_X, DEFAULT_OVPK_M_Y, DEFAULT_TPK_M_X, DEFAULT_TPK_M_Y,
}, hash::poseidon2_hash_with_separator, point::POINT_LENGTH,
traits::{Deserialize, Serialize, Hash},
};

use dep::std::embedded_curve_ops::EmbeddedCurvePoint as Point;
use dep::std::embedded_curve_ops::fixed_base_scalar_mul as derive_public_key;
use std::embedded_curve_ops::EmbeddedCurveScalar;
use std::default::Default;

pub global PUBLIC_KEYS_LENGTH: u32 = 12;

Expand Down Expand Up @@ -96,13 +102,21 @@ impl Serialize<POINT_LENGTH> for TpkM {
}
}

impl Empty for PublicKeys {
fn empty() -> Self {
impl Default for PublicKeys {
fn default() -> Self {
PublicKeys {
npk_m: NpkM { inner: Point::empty() },
ivpk_m: IvpkM { inner: Point::empty() },
ovpk_m: OvpkM { inner: Point::empty() },
tpk_m: TpkM { inner: Point::empty() },
npk_m: NpkM {
inner: Point { x: DEFAULT_NPK_M_X, y: DEFAULT_NPK_M_Y, is_infinite: false },
},
ivpk_m: IvpkM {
inner: Point { x: DEFAULT_IVPK_M_X, y: DEFAULT_IVPK_M_Y, is_infinite: false },
},
ovpk_m: OvpkM {
inner: Point { x: DEFAULT_OVPK_M_X, y: DEFAULT_OVPK_M_Y, is_infinite: false },
},
tpk_m: TpkM {
inner: Point { x: DEFAULT_TPK_M_X, y: DEFAULT_TPK_M_Y, is_infinite: false },
},
}
}
}
Expand All @@ -118,16 +132,10 @@ impl Eq for PublicKeys {

impl PublicKeys {
pub fn hash(self) -> PublicKeysHash {
PublicKeysHash::from_field(
if is_empty(self) {
0
} else {
poseidon2_hash_with_separator(
self.serialize(),
GENERATOR_INDEX__PUBLIC_KEYS_HASH as Field,
)
},
)
PublicKeysHash::from_field(poseidon2_hash_with_separator(
self.serialize(),
GENERATOR_INDEX__PUBLIC_KEYS_HASH as Field,
))
}
}

Expand Down Expand Up @@ -202,13 +210,13 @@ unconstrained fn compute_public_keys_hash() {
}

#[test]
unconstrained fn compute_empty_hash() {
let keys = PublicKeys::empty();
unconstrained fn compute_default_hash() {
let keys = PublicKeys::default();

let actual = keys.hash();
let test_data_empty_hash = 0x0000000000000000000000000000000000000000000000000000000000000000;
let test_data_default_hash = 0x1d3bf1fb93ae0e9cda83b203dd91c3bfb492a9aecf30ec90e1057eced0f0e62d;

assert(actual.to_field() == test_data_empty_hash);
assert(actual.to_field() == test_data_default_hash);
}

#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ impl Empty for FixtureBuilder {
returns_hash: 0,
function_leaf_membership_witness: MembershipWitness::empty(),
salted_initialization_hash: SaltedInitializationHash::from_field(0),
public_keys: PublicKeys::empty(),
public_keys: PublicKeys::default(),
contract_class_artifact_hash: 0,
contract_class_public_bytecode_commitment: 0,
acir_hash: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ global default_contract = ContractData {
contract_class_id: ContractClassId {
inner: 0x28e91aaf764bc6083e2796ff884079ad895d4b948d6ce8f37f01b29d0bc95a21,
},
public_keys: PublicKeys::empty(),
public_keys: PublicKeys::default(),
salted_initialization_hash: SaltedInitializationHash {
inner: 0x13a939daa511233e5446905ed2cadbee14948fa75df183b53b5c14b612bffe88,
},
Expand All @@ -56,7 +56,7 @@ global parent_contract = ContractData {
contract_class_id: ContractClassId {
inner: 0x00236b0dc6c537d5106543053c5b85c4cbe95b0474f8238b094bae63f1cbcfee,
},
public_keys: PublicKeys::empty(),
public_keys: PublicKeys::default(),
salted_initialization_hash: SaltedInitializationHash {
inner: 0x24bd6ac7a182e2cf25e437c72f53544ef81dfd97d9afee23abb07a638e7be749,
},
Expand All @@ -70,7 +70,8 @@ pub fn get_protocol_contract(index: u32) -> ContractData {
let artifact_hash = 576576 + seed;
let salted_initialization_hash = SaltedInitializationHash { inner: 281972 + seed };
let public_bytecode_commitment = 38383 + seed;
let public_keys = PublicKeys::empty();
// Empty public keys here will throw an error when doing ec ops
let public_keys = PublicKeys::default();

let function = get_protocol_contract_function(index);
let private_functions_root = private_functions_root_from_siblings(
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec.js/src/contract/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class Contract extends ContractBase {
*/
public static deploy(wallet: Wallet, artifact: ContractArtifact, args: any[], constructorName?: string) {
const postDeployCtor = (address: AztecAddress, wallet: Wallet) => Contract.at(address, artifact, wallet);
return new DeployMethod(PublicKeys.empty(), wallet, artifact, postDeployCtor, args, constructorName);
return new DeployMethod(PublicKeys.default(), wallet, artifact, postDeployCtor, args, constructorName);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec.js/src/deployment/contract_deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class ContractDeployer {
public deploy(...args: any[]) {
const postDeployCtor = (address: AztecAddress, wallet: Wallet) => Contract.at(address, this.artifact, wallet);
return new DeployMethod(
this.publicKeys ?? PublicKeys.empty(),
this.publicKeys ?? PublicKeys.default(),
this.wallet,
this.artifact,
postDeployCtor,
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec/src/cli/cmds/start_pxe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export async function addPXE(
address,
deployer: AztecAddress.ZERO,
contractClassId: getContractClassFromArtifact(artifact!).id,
publicKeys: PublicKeys.empty(),
publicKeys: PublicKeys.default(),
};
userLog(`Registering ${name} at ${address.toString()}`);
await pxe.registerContract({ artifact, instance });
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/builder/src/contract-interface-gen/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function generateDeploy(input: ContractArtifact) {
* Creates a tx to deploy a new instance of this contract.
*/
public static deploy(wallet: Wallet, ${args}) {
return new DeployMethod<${contractName}>(PublicKeys.empty(), wallet, ${artifactName}, ${contractName}.at, Array.from(arguments).slice(1));
return new DeployMethod<${contractName}>(PublicKeys.default(), wallet, ${artifactName}, ${contractName}.at, Array.from(arguments).slice(1));
}
/**
Expand All @@ -102,7 +102,7 @@ function generateDeploy(input: ContractArtifact) {
...args: Parameters<${contractName}['methods'][M]>
) {
return new DeployMethod<${contractName}>(
opts.publicKeys ?? PublicKeys.empty(),
opts.publicKeys ?? PublicKeys.default(),
opts.wallet,
${artifactName},
${contractName}.at,
Expand Down
8 changes: 8 additions & 0 deletions yarn-project/circuits.js/src/constants.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ export const REGISTERER_CONTRACT_ADDRESS = 3;
export const MULTI_CALL_ENTRYPOINT_ADDRESS = 4;
export const FEE_JUICE_ADDRESS = 5;
export const ROUTER_ADDRESS = 6;
export const DEFAULT_NPK_M_X = 582240093077765400562621227108555700500271598878376310175765873770292988861n;
export const DEFAULT_NPK_M_Y = 10422444662424639723529825114205836958711284159673861467999592572974769103684n;
export const DEFAULT_IVPK_M_X = 339708709767762472786445938838804872781183545349360029270386718856175781484n;
export const DEFAULT_IVPK_M_Y = 12719619215050539905199178334954929730355853796706924300730604757520758976849n;
export const DEFAULT_OVPK_M_X = 12212787719617305570587928860288475454328008955283046946846066128763901043335n;
export const DEFAULT_OVPK_M_Y = 3646747884782549389807830220601404629716007431341772952958971658285958854707n;
export const DEFAULT_TPK_M_X = 728059161893070741164607238299536939695876538801885465230641192969135857403n;
export const DEFAULT_TPK_M_Y = 14575718736702206050102425029229426215631664471161015518982549597389390371695n;
export const AZTEC_ADDRESS_LENGTH = 1;
export const GAS_FEES_LENGTH = 2;
export const GAS_LENGTH = 2;
Expand Down
6 changes: 3 additions & 3 deletions yarn-project/circuits.js/src/contract/contract_instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ export class SerializableContractInstance {
});
}

static empty() {
static default() {
return new SerializableContractInstance({
version: VERSION,
salt: Fr.zero(),
deployer: AztecAddress.zero(),
contractClassId: Fr.zero(),
initializationHash: Fr.zero(),
publicKeys: PublicKeys.empty(),
publicKeys: PublicKeys.default(),
});
}
}
Expand Down Expand Up @@ -122,7 +122,7 @@ export function getContractInstanceFromDeployParams(
args,
)
: computeInitializationHash(constructorArtifact, args);
const publicKeys = opts.publicKeys ?? PublicKeys.empty();
const publicKeys = opts.publicKeys ?? PublicKeys.default();

const instance: ContractInstance = {
contractClassId,
Expand Down
18 changes: 13 additions & 5 deletions yarn-project/circuits.js/src/types/public_keys.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,24 @@ describe('PublicKeys', () => {
expect(hash).toMatchInlineSnapshot(`"0x0fecd9a32db731fec1fded1b9ff957a1625c069245a3613a2538bd527068b0ad"`);

// Run with AZTEC_GENERATE_TEST_DATA=1 to update noir test data
updateInlineTestData('noir-projects/aztec-nr/aztec/src/keys/public_keys.nr', 'expected_public_keys_hash', hash);
updateInlineTestData(
'noir-projects/noir-protocol-circuits/crates/types/src/public_keys.nr',
'expected_public_keys_hash',
hash,
);
});

it('computes empty keys hash', () => {
const keys = PublicKeys.empty();
it('computes default keys hash', () => {
const keys = PublicKeys.default();

const hash = keys.hash().toString();
expect(hash).toMatchInlineSnapshot(`"0x0000000000000000000000000000000000000000000000000000000000000000"`);
expect(hash).toMatchInlineSnapshot(`"0x1d3bf1fb93ae0e9cda83b203dd91c3bfb492a9aecf30ec90e1057eced0f0e62d"`);

// Run with AZTEC_GENERATE_TEST_DATA=1 to update noir test data
updateInlineTestData('noir-projects/aztec-nr/aztec/src/keys/public_keys.nr', 'test_data_empty_hash', hash);
updateInlineTestData(
'noir-projects/noir-protocol-circuits/crates/types/src/public_keys.nr',
'test_data_default_hash',
hash,
);
});
});
21 changes: 18 additions & 3 deletions yarn-project/circuits.js/src/types/public_keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@ import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto';
import { Fr, Point } from '@aztec/foundation/fields';
import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';

import { GeneratorIndex } from '../constants.gen.js';
import {
DEFAULT_IVPK_M_X,
DEFAULT_IVPK_M_Y,
DEFAULT_NPK_M_X,
DEFAULT_NPK_M_Y,
DEFAULT_OVPK_M_X,
DEFAULT_OVPK_M_Y,
DEFAULT_TPK_M_X,
DEFAULT_TPK_M_Y,
GeneratorIndex,
} from '../constants.gen.js';
import { type PublicKey } from './public_key.js';

export class PublicKeys {
Expand Down Expand Up @@ -41,8 +51,13 @@ export class PublicKeys {
);
}

static empty(): PublicKeys {
return new PublicKeys(Point.ZERO, Point.ZERO, Point.ZERO, Point.ZERO);
static default(): PublicKeys {
return new PublicKeys(
new Point(new Fr(DEFAULT_NPK_M_X), new Fr(DEFAULT_NPK_M_Y), false),
new Point(new Fr(DEFAULT_IVPK_M_X), new Fr(DEFAULT_IVPK_M_Y), false),
new Point(new Fr(DEFAULT_OVPK_M_X), new Fr(DEFAULT_OVPK_M_Y), false),
new Point(new Fr(DEFAULT_TPK_M_X), new Fr(DEFAULT_TPK_M_Y), false),
);
}

static random(): PublicKeys {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/cli-wallet/src/cmds/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function deploy(
);
}

const deployer = new ContractDeployer(contractArtifact, wallet, publicKeys ?? PublicKeys.empty(), initializer);
const deployer = new ContractDeployer(contractArtifact, wallet, publicKeys ?? PublicKeys.default(), initializer);

let args = [];
if (rawArgs.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/cli/src/cmds/pxe/add_contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function addContract(
salt,
initializationHash,
contractClassId: getContractClassFromArtifact(artifact).id,
publicKeys: publicKeys ?? PublicKeys.empty(),
publicKeys: publicKeys ?? PublicKeys.default(),
address,
deployer: deployer ?? AztecAddress.ZERO,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ exports[`Data generation for noir tests Computes contract info for defaultContra
artifact_hash: 0x0000000000000000000000000000000000000000000000000000000000003039,
public_bytecode_commitment: 0x0000000000000000000000000000000000000000000000000000000000000005,
private_functions_root: 0x25d76df45434ec75a83321daf941cfc667ff3a9027942e17105da4f50d1d13f9,
address: AztecAddress { inner: 0x1119ce64278d82d5178d977b0921630b2834045c8dc4bec257813bcbafdddb57 },
address: AztecAddress { inner: 0x26a0c3dba9cc7290ebf910fe8a8ea00b99b51817ae686fdd7c35392860133410 },
partial_address: PartialAddress { inner: 0x0cf203c94c91bed28440b00ecd888d88cce1f86ddf2aa8d33acbb9b6fc06d382 },
contract_class_id: ContractClassId { inner: 0x28e91aaf764bc6083e2796ff884079ad895d4b948d6ce8f37f01b29d0bc95a21 },
public_keys: PublicKeys { inner: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 },
public_keys: PublicKeys { inner: 01498945581e0eb9f8427ad6021184c700ef091d570892c437d12c7d90364bbd170ae506787c5c43d6ca9255d571c10fa9ffa9d141666e290c347c5c9ab7e34400c044b05b6ca83b9c2dbae79cc1135155956a64e136819136e9947fe5e5866c1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb1511b00316144359e9a3ec8e49c1cdb7eeb0cedd190dfd9dc90eea5115aa779e287080ffc74d7a8b0bccb88ac11f45874172f3847eb8b92654aaa58a3d2b8dc7833019c111f36ad3fc1d9b7a7a14344314d2864b94f030594cd67f753ef774a1efb2039907fe37f08d10739255141bb066c506a12f7d1e8dfec21abc58494705b6f },
salted_initialization_hash: SaltedInitializationHash { inner: 0x13a939daa511233e5446905ed2cadbee14948fa75df183b53b5c14b612bffe88 },
deployer: AztecAddress { inner: 0x0000000000000000000000000000000000000000000000000000000000000000 }
}"
Expand All @@ -21,10 +21,10 @@ exports[`Data generation for noir tests Computes contract info for parentContrac
artifact_hash: 0x00000000000000000000000000000000000000000000000000000000000004bc,
public_bytecode_commitment: 0x0000000000000000000000000000000000000000000000000000000000000005,
private_functions_root: 0x1228b39ba6702af03e595300e8484c6373f00790d0148cc3d4ff0fd1c778a83a,
address: AztecAddress { inner: 0x218802a34637b05632108fedc42176dfce00e4daa8aa9aeadbf09f8c7069267a },
address: AztecAddress { inner: 0x00d81b0b87d6776f68155d9f2b92469fdcb461c1366b9635ab0030bbf6ec86cf },
partial_address: PartialAddress { inner: 0x245df9f519d616473880260dd64b19a838081bb44dc17cd6ea5d870a63d2bf57 },
contract_class_id: ContractClassId { inner: 0x00236b0dc6c537d5106543053c5b85c4cbe95b0474f8238b094bae63f1cbcfee },
public_keys: PublicKeys { inner: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 },
public_keys: PublicKeys { inner: 01498945581e0eb9f8427ad6021184c700ef091d570892c437d12c7d90364bbd170ae506787c5c43d6ca9255d571c10fa9ffa9d141666e290c347c5c9ab7e34400c044b05b6ca83b9c2dbae79cc1135155956a64e136819136e9947fe5e5866c1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb1511b00316144359e9a3ec8e49c1cdb7eeb0cedd190dfd9dc90eea5115aa779e287080ffc74d7a8b0bccb88ac11f45874172f3847eb8b92654aaa58a3d2b8dc7833019c111f36ad3fc1d9b7a7a14344314d2864b94f030594cd67f753ef774a1efb2039907fe37f08d10739255141bb066c506a12f7d1e8dfec21abc58494705b6f },
salted_initialization_hash: SaltedInitializationHash { inner: 0x24bd6ac7a182e2cf25e437c72f53544ef81dfd97d9afee23abb07a638e7be749 },
deployer: AztecAddress { inner: 0x0000000000000000000000000000000000000000000000000000000000000000 }
}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Data generation for noir tests', () => {
const defaultContract: FixtureContractData = {
artifactHash: new Fr(12345),
packedBytecode: Buffer.from([3, 4, 5, 6, 7]),
publicKeys: PublicKeys.empty(),
publicKeys: PublicKeys.default(),
salt: new Fr(56789),
privateFunctions: [
{ selector: FunctionSelector.fromField(new Fr(1010101)), vkHash: new Fr(0) },
Expand All @@ -37,7 +37,7 @@ describe('Data generation for noir tests', () => {
const parentContract: FixtureContractData = {
artifactHash: new Fr(1212),
packedBytecode: Buffer.from([3, 4, 3, 4]),
publicKeys: PublicKeys.empty(),
publicKeys: PublicKeys.default(),
salt: new Fr(5656),
privateFunctions: [{ selector: FunctionSelector.fromField(new Fr(334455)), vkHash: new Fr(0) }],
toString: () => 'parentContract',
Expand Down
Loading

0 comments on commit 47718ea

Please sign in to comment.