Conversation
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
40230e0 to
4ed82ad
Compare
| */ | ||
| export function getSingleKeyAccount(pxe: PXE, secretKey: Fr, salt?: Salt): AccountManager { | ||
| const encryptionPrivateKey = sha512ToGrumpkinScalar([secretKey, GeneratorIndex.IVSK_M]); | ||
| const encryptionPrivateKey = deriveMasterIncomingViewingSecretKey(secretKey); |
There was a problem hiding this comment.
Sneaked this change in - it's better to use 1 function for this.
|
|
||
| export const INITIAL_TEST_ENCRYPTION_KEYS = INITIAL_TEST_SECRET_KEYS.map(secretKey => | ||
| sha512ToGrumpkinScalar([secretKey, GeneratorIndex.IVSK_M]), | ||
| deriveMasterIncomingViewingSecretKey(secretKey), |
There was a problem hiding this comment.
Sneaked this change in - it's better to use 1 function for this.
| return Promise.all( | ||
| INITIAL_TEST_SECRET_KEYS.filter(initialSecretKey => { | ||
| const initialEncryptionKey = sha512ToGrumpkinScalar([initialSecretKey, GeneratorIndex.IVSK_M]); | ||
| const initialEncryptionKey = deriveMasterIncomingViewingSecretKey(initialSecretKey); |
There was a problem hiding this comment.
Sneaked this change in - it's better to use 1 function for this.
| ); | ||
| }).map(secretKey => { | ||
| const signingKey = sha512ToGrumpkinScalar([secretKey, GeneratorIndex.IVSK_M]); | ||
| const signingKey = deriveSigningKey(secretKey); |
There was a problem hiding this comment.
Sneaked this change in - it's better to use 1 function for this.
| export function createAccount(pxe: PXE): Promise<AccountWalletWithSecretKey> { | ||
| const secretKey = Fr.random(); | ||
| const signingKey = sha512ToGrumpkinScalar([secretKey, GeneratorIndex.IVSK_M]); | ||
| const signingKey = deriveSigningKey(secretKey); |
There was a problem hiding this comment.
Sneaked this change in - it's better to use 1 function for this.
| pxe: PXE, | ||
| numberOfAccounts = 1, | ||
| secrets: Fr[] = [], | ||
| ): Promise<AccountWalletWithSecretKey[]> { |
There was a problem hiding this comment.
Added secrets param here to be able to generate nsk_app for the account (I need the secret for that). There is a getNullifierKeys API on PXE database which is used by oracles but it didn't seem to make sense to expose it on PXE as I don't think it will be needed by anything else but this 1 test case.
| return Promise.resolve(this.synchronizer.getSyncStatus()); | ||
| } | ||
|
|
||
| public getKeyStore() { |
There was a problem hiding this comment.
Nuked this as it seemed like something we don't want exposed and it was not used.
| } | ||
| const owner = knownAccounts[0]; | ||
| // TODO(#5726): this is messy, maybe we should expose publicKeysHash on account | ||
| const publicKeysHash = deriveKeys(INITIAL_TEST_SECRET_KEYS[0]).publicKeys.hash(); |
There was a problem hiding this comment.
This was no longer necessary after I cleaned up the complete address.
LHerskind
left a comment
There was a problem hiding this comment.
Not obvious to me if the change broke the authwit test, or if that is unrelated and just ci.
The signing key should still be similar, so strange to me 🤔
7c7901f to
20e7b2b
Compare
| const accounts = []; | ||
|
|
||
| if (secrets.length == 0) { | ||
| secrets = Array.from({ length: numberOfAccounts }, () => Fr.random()); |
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.40.0</summary> ## [0.40.0](aztec-package-v0.39.0...aztec-package-v0.40.0) (2024-05-14) ### Miscellaneous * **aztec-package:** Synchronize aztec-packages versions </details> <details><summary>barretenberg.js: 0.40.0</summary> ## [0.40.0](barretenberg.js-v0.39.0...barretenberg.js-v0.40.0) (2024-05-14) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.40.0</summary> ## [0.40.0](aztec-packages-v0.39.0...aztec-packages-v0.40.0) (2024-05-14) ### ⚠ BREAKING CHANGES * debug logs for all ([#6392](#6392)) ### Features * Add wasmtime ([#6314](#6314)) ([ea6ccdd](ea6ccdd)) * Debug logs for all ([#6392](#6392)) ([10afa13](10afa13)) * Demonstrating use of nsk_app to check nullification ([#6362](#6362)) ([ddf4461](ddf4461)) * Use gas estimation in aztecjs contract function interactions ([#6260](#6260)) ([18192ac](18192ac)) ### Miscellaneous * Add more serialisation traits to protocol circuits ([#6385](#6385)) ([97d5422](97d5422)) * **ci:** Bump timeout of prover-client-test ([#6394](#6394)) ([d05cd07](d05cd07)) * Reenable bench summary ([#6211](#6211)) ([713b243](713b243)) * **token-contract-tests:** Change intrinsic assertion messages ([#6386](#6386)) ([aca81ae](aca81ae)) </details> <details><summary>barretenberg: 0.40.0</summary> ## [0.40.0](barretenberg-v0.39.0...barretenberg-v0.40.0) (2024-05-14) ### ⚠ BREAKING CHANGES * debug logs for all ([#6392](#6392)) ### Features * Debug logs for all ([#6392](#6392)) ([10afa13](10afa13)) ### Miscellaneous * Add more serialisation traits to protocol circuits ([#6385](#6385)) ([97d5422](97d5422)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.40.0</summary> ## [0.40.0](AztecProtocol/aztec-packages@aztec-package-v0.39.0...aztec-package-v0.40.0) (2024-05-14) ### Miscellaneous * **aztec-package:** Synchronize aztec-packages versions </details> <details><summary>barretenberg.js: 0.40.0</summary> ## [0.40.0](AztecProtocol/aztec-packages@barretenberg.js-v0.39.0...barretenberg.js-v0.40.0) (2024-05-14) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.40.0</summary> ## [0.40.0](AztecProtocol/aztec-packages@aztec-packages-v0.39.0...aztec-packages-v0.40.0) (2024-05-14) ### ⚠ BREAKING CHANGES * debug logs for all ([#6392](AztecProtocol/aztec-packages#6392)) ### Features * Add wasmtime ([#6314](AztecProtocol/aztec-packages#6314)) ([ea6ccdd](AztecProtocol/aztec-packages@ea6ccdd)) * Debug logs for all ([#6392](AztecProtocol/aztec-packages#6392)) ([10afa13](AztecProtocol/aztec-packages@10afa13)) * Demonstrating use of nsk_app to check nullification ([#6362](AztecProtocol/aztec-packages#6362)) ([ddf4461](AztecProtocol/aztec-packages@ddf4461)) * Use gas estimation in aztecjs contract function interactions ([#6260](AztecProtocol/aztec-packages#6260)) ([18192ac](AztecProtocol/aztec-packages@18192ac)) ### Miscellaneous * Add more serialisation traits to protocol circuits ([#6385](AztecProtocol/aztec-packages#6385)) ([97d5422](AztecProtocol/aztec-packages@97d5422)) * **ci:** Bump timeout of prover-client-test ([#6394](AztecProtocol/aztec-packages#6394)) ([d05cd07](AztecProtocol/aztec-packages@d05cd07)) * Reenable bench summary ([#6211](AztecProtocol/aztec-packages#6211)) ([713b243](AztecProtocol/aztec-packages@713b243)) * **token-contract-tests:** Change intrinsic assertion messages ([#6386](AztecProtocol/aztec-packages#6386)) ([aca81ae](AztecProtocol/aztec-packages@aca81ae)) </details> <details><summary>barretenberg: 0.40.0</summary> ## [0.40.0](AztecProtocol/aztec-packages@barretenberg-v0.39.0...barretenberg-v0.40.0) (2024-05-14) ### ⚠ BREAKING CHANGES * debug logs for all ([#6392](AztecProtocol/aztec-packages#6392)) ### Features * Debug logs for all ([#6392](AztecProtocol/aztec-packages#6392)) ([10afa13](AztecProtocol/aztec-packages@10afa13)) ### Miscellaneous * Add more serialisation traits to protocol circuits ([#6385](AztecProtocol/aztec-packages#6385)) ([97d5422](AztecProtocol/aztec-packages@97d5422)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.40.0</summary> ## [0.40.0](aztec-package-v0.39.0...aztec-package-v0.40.0) (2024-05-14) ### Miscellaneous * **aztec-package:** Synchronize aztec-packages versions </details> <details><summary>barretenberg.js: 0.40.0</summary> ## [0.40.0](barretenberg.js-v0.39.0...barretenberg.js-v0.40.0) (2024-05-14) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.40.0</summary> ## [0.40.0](aztec-packages-v0.39.0...aztec-packages-v0.40.0) (2024-05-14) ### ⚠ BREAKING CHANGES * debug logs for all ([#6392](#6392)) ### Features * Add wasmtime ([#6314](#6314)) ([ea6ccdd](ea6ccdd)) * Debug logs for all ([#6392](#6392)) ([10afa13](10afa13)) * Demonstrating use of nsk_app to check nullification ([#6362](#6362)) ([ddf4461](ddf4461)) * Use gas estimation in aztecjs contract function interactions ([#6260](#6260)) ([18192ac](18192ac)) ### Miscellaneous * Add more serialisation traits to protocol circuits ([#6385](#6385)) ([97d5422](97d5422)) * **ci:** Bump timeout of prover-client-test ([#6394](#6394)) ([d05cd07](d05cd07)) * Reenable bench summary ([#6211](#6211)) ([713b243](713b243)) * **token-contract-tests:** Change intrinsic assertion messages ([#6386](#6386)) ([aca81ae](aca81ae)) </details> <details><summary>barretenberg: 0.40.0</summary> ## [0.40.0](barretenberg-v0.39.0...barretenberg-v0.40.0) (2024-05-14) ### ⚠ BREAKING CHANGES * debug logs for all ([#6392](#6392)) ### Features * Debug logs for all ([#6392](#6392)) ([10afa13](10afa13)) ### Miscellaneous * Add more serialisation traits to protocol circuits ([#6385](#6385)) ([97d5422](97d5422)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).

Fixes #5664
+ sneaked in various minor cleanups --> not bothering with having a separate PR due to having enough fun with CI and low complexity of this one.