Skip to content

Commit

Permalink
1452: Enabling some skipped tests (#1583)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
jeanmon authored Aug 17, 2023
1 parent d90c460 commit f1836a6
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 11 deletions.
1 change: 1 addition & 0 deletions yarn-project/acir-simulator/src/public/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
40 changes: 40 additions & 0 deletions yarn-project/circuits.js/src/abis/__snapshots__/abis.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
4 changes: 1 addition & 3 deletions yarn-project/circuits.js/src/abis/abis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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) {
Expand Down
9 changes: 3 additions & 6 deletions yarn-project/circuits.js/src/structs/verification_key.test.ts
Original file line number Diff line number Diff line change
@@ -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);
});
Expand Down
3 changes: 3 additions & 0 deletions yarn-project/end-to-end/src/e2e_nested_contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions yarn-project/sequencer-client/src/publisher/l1-publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean> {
return true;
}

// TODO: Fail if blockchainStatus.nextBlockNum > thisBlockNum.
// Related to https://github.com/AztecProtocol/aztec-packages/issues/1588
private checkNextL2BlockNum(_thisBlockNum: number): Promise<boolean> {
return Promise.resolve(true);
}
Expand Down

0 comments on commit f1836a6

Please sign in to comment.