From f1836a66e3aca7106a5a98118d63bdb0806e49b9 Mon Sep 17 00:00:00 2001 From: Jean M <132435771+jeanmon@users.noreply.github.com> Date: Thu, 17 Aug 2023 09:52:23 +0200 Subject: [PATCH] 1452: Enabling some skipped tests (#1583) Resolves #1452 # Checklist: Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge. - [x] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag. - [x] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code. - [x] Every change is related to the PR description. - [x] 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). --- .../acir-simulator/src/public/index.test.ts | 1 + .../src/abis/__snapshots__/abis.test.ts.snap | 40 +++++++++++++++++++ .../circuits.js/src/abis/abis.test.ts | 4 +- .../barretenberg/crypto/ecdsa/index.test.ts | 4 +- .../src/rollup/rollup_wasm_wrapper.test.ts | 2 + .../src/structs/verification_key.test.ts | 9 ++--- .../src/e2e_nested_contract.test.ts | 3 ++ .../src/sparse_tree/sparse_tree.test.ts | 1 + .../src/publisher/l1-publisher.ts | 2 + 9 files changed, 55 insertions(+), 11 deletions(-) diff --git a/yarn-project/acir-simulator/src/public/index.test.ts b/yarn-project/acir-simulator/src/public/index.test.ts index eb59fa34d44..bd22df610fd 100644 --- a/yarn-project/acir-simulator/src/public/index.test.ts +++ b/yarn-project/acir-simulator/src/public/index.test.ts @@ -167,6 +167,7 @@ describe('ACIR public execution simulator', () => { // Contract storage reads and update requests are implemented as built-ins, which at the moment Noir does not // now whether they have side-effects or not, so they get run even when their code path // is not picked by a conditional. Once that's fixed, we should re-enable this test. + // Task to repair this test: https://github.com/AztecProtocol/aztec-packages/issues/1588 it.skip('should run the transfer function without enough sender balance', async () => { const senderBalance = new Fr(10n); const recipientBalance = new Fr(20n); diff --git a/yarn-project/circuits.js/src/abis/__snapshots__/abis.test.ts.snap b/yarn-project/circuits.js/src/abis/__snapshots__/abis.test.ts.snap index 28b96683cc6..d86a59faaf1 100644 --- a/yarn-project/circuits.js/src/abis/__snapshots__/abis.test.ts.snap +++ b/yarn-project/circuits.js/src/abis/__snapshots__/abis.test.ts.snap @@ -96,6 +96,46 @@ Fr { } `; +exports[`abis wasm bindings hashes VK 1`] = ` +{ + "data": [ + 18, + 27, + 182, + 124, + 37, + 144, + 241, + 62, + 203, + 104, + 141, + 178, + 22, + 93, + 79, + 221, + 21, + 63, + 245, + 104, + 71, + 249, + 55, + 250, + 39, + 168, + 54, + 232, + 57, + 46, + 130, + 254, + ], + "type": "Buffer", +} +`; + exports[`abis wasm bindings hashes a tx request 1`] = ` { "data": [ diff --git a/yarn-project/circuits.js/src/abis/abis.test.ts b/yarn-project/circuits.js/src/abis/abis.test.ts index d217490f99b..9a1657f440b 100644 --- a/yarn-project/circuits.js/src/abis/abis.test.ts +++ b/yarn-project/circuits.js/src/abis/abis.test.ts @@ -37,9 +37,7 @@ describe('abis wasm bindings', () => { expect(res).toMatchSnapshot(); }); - // TODO: This test fails on CI since build-system is not updating the latest circuits wasm - // We may need to wait until we bump to the next commit to see if it picks up the change - it.skip('hashes VK', () => { + it('hashes VK', () => { const vk = makeVerificationKey(); const res = hashVK(wasm, vk.toBuffer()); expect(res).toMatchSnapshot(); diff --git a/yarn-project/circuits.js/src/barretenberg/crypto/ecdsa/index.test.ts b/yarn-project/circuits.js/src/barretenberg/crypto/ecdsa/index.test.ts index 6b266de3945..f501df84210 100644 --- a/yarn-project/circuits.js/src/barretenberg/crypto/ecdsa/index.test.ts +++ b/yarn-project/circuits.js/src/barretenberg/crypto/ecdsa/index.test.ts @@ -11,7 +11,7 @@ describe('ecdsa', () => { ecdsa = new Ecdsa(wasm); }); - it.skip('should verify signature', () => { + it('should verify signature', () => { // prettier-ignore const privateKey = new PrivateKey(Buffer.from([ 0x0b, 0x9b, 0x3a, 0xde, 0xe6, 0xb3, 0xd8, 0x1b, 0x28, 0xa0, 0x88, 0x6b, 0x2a, 0x84, 0x15, 0xc7, @@ -25,7 +25,7 @@ describe('ecdsa', () => { expect(verified).toBe(true); }); - it.skip('should recover public key from signature', () => { + it('should recover public key from signature', () => { // prettier-ignore const privateKey = new PrivateKey(Buffer.from([ 0x0b, 0x9b, 0x3a, 0xde, 0xe6, 0xb3, 0xd8, 0x1b, 0x28, 0xa0, 0x88, 0x6b, 0x2a, 0x84, 0x15, 0xc7, diff --git a/yarn-project/circuits.js/src/rollup/rollup_wasm_wrapper.test.ts b/yarn-project/circuits.js/src/rollup/rollup_wasm_wrapper.test.ts index 2ff9d86770f..6b023b6e01f 100644 --- a/yarn-project/circuits.js/src/rollup/rollup_wasm_wrapper.test.ts +++ b/yarn-project/circuits.js/src/rollup/rollup_wasm_wrapper.test.ts @@ -43,6 +43,7 @@ describe('rollup/rollup_wasm_wrapper', () => { return input; }; + // Task to repair this test: https://github.com/AztecProtocol/aztec-packages/issues/1586 it.skip('calls base_rollup__sim', () => { const input = makeBaseRollupInputsForCircuit(); @@ -86,6 +87,7 @@ Refer to https://docs.aztec.network/aztec/protocol/errors for more information.` } }); + // Task to repair this test: https://github.com/AztecProtocol/aztec-packages/issues/1586 it.skip('calls root_rollup__sim', () => { const input = makeRootRollupInputs(); for (const rd of input.previousRollupData) { diff --git a/yarn-project/circuits.js/src/structs/verification_key.test.ts b/yarn-project/circuits.js/src/structs/verification_key.test.ts index 08c9e482812..40256ed8613 100644 --- a/yarn-project/circuits.js/src/structs/verification_key.test.ts +++ b/yarn-project/circuits.js/src/structs/verification_key.test.ts @@ -1,12 +1,9 @@ import { VerificationKey } from './verification_key.js'; describe('structs/verification_key', () => { - // The VK below was grabbed from a Noir build output, which is currently failing to deserialize - // apparently due to a mismatch in the VK format used across teams. Once Noir moves to the same - // format we're using (or the other way around), we can grab a new VK from a build artifact, - // paste it here, and check that it deserializes properly. - it.skip(`can deserialize vk built by noir`, () => { - const serialized = `0000000100000100000000300000000b00000003515f310c94cc788117a46753f05f3ca63659fe689529657338e0ac526d0b405a26d4090b00afd09d53eb6e37a91f7e7eba68d98653aca455d7f05003a8d9fcf5c75fff00000003515f3206852757d96b9a6063ba1f3a37dc369df432f440c63f452976d86f962b64761b2e313905d40943c8f134ec0faa000c9facc670d2acaa3affa69941ff0a3e5f3f00000003515f330709e3c949775037b37630dd2845ecacb5c4da4d04d094f65414edebe9292b262e2f9a2189107a99dad5259914f87419e4fc9c35023e8b9694f901c53cfc99c800000003515f3406852757d96b9a6063ba1f3a37dc`; + // The VK below was grabbed from the noir contract artifact child_contract.json + it(`can deserialize vk built by noir`, () => { + const serialized = `0000000200000800000000740000000f00000003515f3109623eb3c25aa5b16a1a79fd558bac7a7ce62c4560a8c537c77ce80dd339128d1d37b6582ee9e6df9567efb64313471dfa18f520f9ce53161b50dbf7731bc5f900000003515f322bc4cce83a486a92c92fd59bd84e0f92595baa639fc2ed86b00ffa0dfded2a092a669a3bdb7a273a015eda494457cc7ed5236f26cee330c290d45a33b9daa94800000003515f332729426c008c085a81bd34d8ef12dd31e80130339ef99d50013a89e4558eee6d0fa4ffe2ee7b7b62eb92608b2251ac31396a718f9b34978888789042b790a30100000003515f342be6b6824a913eb7a57b03cb1ee7bfb4de02f2f65fe8a4e97baa7766ddb353a82a8a25c49dc63778cd9fe96173f12a2bc77f3682f4c4448f98f1df82c75234a100000003515f351f85760d6ab567465aadc2f180af9eae3800e6958fec96aef53fd8a7b195d7c000c6267a0dd5cfc22b3fe804f53e266069c0e36f51885baec1e7e67650c62e170000000c515f41524954484d455449430d9d0f8ece2aa12012fa21e6e5c859e97bd5704e5c122064a66051294bc5e04213f61f54a0ebdf6fee4d4a6ecf693478191de0c2899bcd8e86a636c8d3eff43400000003515f43224a99d02c86336737c8dd5b746c40d2be6aead8393889a76a18d664029096e90f7fe81adcc92a74350eada9622ac453f49ebac24a066a1f83b394df54dfa0130000000c515f46495845445f42415345060e8a013ed289c2f9fd7473b04f6594b138ddb4b4cf6b901622a14088f04b8d2c83ff74fce56e3d5573b99c7b26d85d5046ce0c6559506acb7a675e7713eb3a00000007515f4c4f4749430721a91cb8da4b917e054f72147e1760cfe0ef3d45090ac0f4961d84ec1996961a25e787b26bd8b50b1a99450f77a424a83513c2b33af268cd253b0587ff50c700000003515f4d05dbd8623b8652511e1eb38d38887a69eceb082f807514f09e127237c5213b401b9325b48c6c225968002318095f89d0ef9cf629b2b7f0172e03bc39aacf6ed800000007515f52414e474504b57a3805e41df328f5ca9aefa40fad5917391543b7b65c6476e60b8f72e9ad07c92f3b3e11c8feae96dedc4b14a6226ef3201244f37cfc1ee5b96781f48d2b000000075349474d415f3125001d1954a18571eaa007144c5a567bb0d2be4def08a8be918b8c05e3b27d312c59ed41e09e144eab5de77ca89a2fd783be702a47c951d3112e3de02ce6e47c000000075349474d415f3223994e6a23618e60fa01c449a7ab88378709197e186d48d604bfb6931ffb15ad11c5ec7a0700570f80088fd5198ab5d5c227f2ad2a455a6edeec024156bb7beb000000075349474d415f3300cda5845f23468a13275d18bddae27c6bb189cf9aa95b6a03a0cb6688c7e8d829639b45cf8607c525cc400b55ebf90205f2f378626dc3406cc59b2d1b474fba000000075349474d415f342d299e7928496ea2d37f10b43afd6a80c90a33b483090d18069ffa275eedb2fc2f82121e8de43dc036d99b478b6227ceef34248939987a19011f065d8b5cef5c0000000010000000000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f`; const vk = VerificationKey.fromBuffer(Buffer.from(serialized, 'hex')); expect(vk.circuitSize).toBeGreaterThan(100); }); diff --git a/yarn-project/end-to-end/src/e2e_nested_contract.test.ts b/yarn-project/end-to-end/src/e2e_nested_contract.test.ts index 4b9860d8eb7..ff152ecec1e 100644 --- a/yarn-project/end-to-end/src/e2e_nested_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_nested_contract.test.ts @@ -96,6 +96,7 @@ describe('e2e_nested_contract', () => { // Fails with "solver opcode resolution error: cannot solve opcode: expression has too many unknowns %EXPR [ 0 ]%" // See https://github.com/noir-lang/noir/issues/1347 + // Task to repair this test: https://github.com/AztecProtocol/aztec-packages/issues/1587 it.skip('enqueues multiple public calls', async () => { const tx = parentContract.methods .enqueueCallToChildTwice( @@ -130,6 +131,7 @@ describe('e2e_nested_contract', () => { // Fails with "solver opcode resolution error: cannot solve opcode: expression has too many unknowns %EXPR [ 0 ]%" // See https://github.com/noir-lang/noir/issues/1347 + // Task to repair this test: https://github.com/AztecProtocol/aztec-packages/issues/1587 it.skip('enqueues multiple public calls with nested public calls', async () => { const tx = parentContract.methods .enqueueCallsToPubEntryPoint( @@ -149,6 +151,7 @@ describe('e2e_nested_contract', () => { // Regression for https://github.com/AztecProtocol/aztec-packages/issues/640 // Fails with "solver opcode resolution error: cannot solve opcode: expression has too many unknowns %EXPR [ 0 ]%" // See https://github.com/noir-lang/noir/issues/1347 + // Task to repair this test: https://github.com/AztecProtocol/aztec-packages/issues/1587 it.skip('reads fresh value after write within the same tx', async () => { const tx = parentContract.methods .pubEntryPointTwice( diff --git a/yarn-project/merkle-tree/src/sparse_tree/sparse_tree.test.ts b/yarn-project/merkle-tree/src/sparse_tree/sparse_tree.test.ts index 840f99564d1..d4b040b8a3e 100644 --- a/yarn-project/merkle-tree/src/sparse_tree/sparse_tree.test.ts +++ b/yarn-project/merkle-tree/src/sparse_tree/sparse_tree.test.ts @@ -160,6 +160,7 @@ describe('SparseTreeSpecific', () => { } }); + // This one is a performance measurement and is enabled only to check regression in performance. it.skip('measures time of inserting 1000 leaves at random positions for depth 254', async () => { const depth = 254; const maxIndex = 2 ** depth - 1; diff --git a/yarn-project/sequencer-client/src/publisher/l1-publisher.ts b/yarn-project/sequencer-client/src/publisher/l1-publisher.ts index bee646ba1f3..4b0ca9d8ee6 100644 --- a/yarn-project/sequencer-client/src/publisher/l1-publisher.ts +++ b/yarn-project/sequencer-client/src/publisher/l1-publisher.ts @@ -191,12 +191,14 @@ export class L1Publisher implements L2BlockReceiver { } // TODO: Check fee distributor has at least 0.5 ETH. + // Related to https://github.com/AztecProtocol/aztec-packages/issues/1588 // eslint-disable-next-line require-await private async checkFeeDistributorBalance(): Promise { return true; } // TODO: Fail if blockchainStatus.nextBlockNum > thisBlockNum. + // Related to https://github.com/AztecProtocol/aztec-packages/issues/1588 private checkNextL2BlockNum(_thisBlockNum: number): Promise { return Promise.resolve(true); }