From 2dff976202022cc474fdcc67bdcd3bc72e61dc70 Mon Sep 17 00:00:00 2001 From: just-mitch <68168980+just-mitch@users.noreply.github.com> Date: Wed, 9 Oct 2024 22:29:51 +0100 Subject: [PATCH] fix: call correct method on fee juice contract (#9137) also better logging when invalid proof quotes --- spartan/aztec-network/templates/l2-contracts.yaml | 2 +- yarn-project/end-to-end/scripts/network_test.sh | 1 - .../end-to-end/src/benchmarks/bench_prover.test.ts | 1 - .../src/benchmarks/bench_tx_size_fees.test.ts | 2 +- yarn-project/end-to-end/src/fixtures/utils.ts | 14 +++++--------- .../e2e_public_testnet_transfer.test.ts | 8 +------- .../sequencer-client/src/publisher/l1-publisher.ts | 3 ++- 7 files changed, 10 insertions(+), 21 deletions(-) diff --git a/spartan/aztec-network/templates/l2-contracts.yaml b/spartan/aztec-network/templates/l2-contracts.yaml index 9b556a0ff76..9d3275f9309 100644 --- a/spartan/aztec-network/templates/l2-contracts.yaml +++ b/spartan/aztec-network/templates/l2-contracts.yaml @@ -27,7 +27,7 @@ spec: done echo "PXE service is ready!" set -e - node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js setup-protocol-contracts + node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js setup-protocol-contracts --skipProofWait echo "L2 contracts initialized" env: - name: PXE_URL diff --git a/yarn-project/end-to-end/scripts/network_test.sh b/yarn-project/end-to-end/scripts/network_test.sh index 490dfa91d78..72cfef176ef 100755 --- a/yarn-project/end-to-end/scripts/network_test.sh +++ b/yarn-project/end-to-end/scripts/network_test.sh @@ -35,7 +35,6 @@ if ! docker image ls --format '{{.Repository}}:{{.Tag}}' | grep -q "aztecprotoco fi # Load the Docker images into kind -kind load docker-image aztecprotocol/end-to-end:$AZTEC_DOCKER_TAG kind load docker-image aztecprotocol/aztec:$AZTEC_DOCKER_TAG # If FRESH_INSTALL is true, delete the namespace diff --git a/yarn-project/end-to-end/src/benchmarks/bench_prover.test.ts b/yarn-project/end-to-end/src/benchmarks/bench_prover.test.ts index 6093e33a5d2..fb9ca25c781 100644 --- a/yarn-project/end-to-end/src/benchmarks/bench_prover.test.ts +++ b/yarn-project/end-to-end/src/benchmarks/bench_prover.test.ts @@ -60,7 +60,6 @@ describe('benchmarks/proving', () => { minTxsPerBlock: 1, }, {}, - true, ); schnorrWalletSalt = Fr.random(); diff --git a/yarn-project/end-to-end/src/benchmarks/bench_tx_size_fees.test.ts b/yarn-project/end-to-end/src/benchmarks/bench_tx_size_fees.test.ts index c0ca0e2e23b..fb2f9e53fca 100644 --- a/yarn-project/end-to-end/src/benchmarks/bench_tx_size_fees.test.ts +++ b/yarn-project/end-to-end/src/benchmarks/bench_tx_size_fees.test.ts @@ -30,7 +30,7 @@ describe('benchmarks/tx_size_fees', () => { // setup the environment beforeAll(async () => { - ctx = await setup(3, {}, {}, true); + ctx = await setup(3, {}, {}); aliceWallet = ctx.wallets[0]; bobAddress = ctx.wallets[1].getAddress(); diff --git a/yarn-project/end-to-end/src/fixtures/utils.ts b/yarn-project/end-to-end/src/fixtures/utils.ts index 8093f9f8d0c..618f70dfbed 100644 --- a/yarn-project/end-to-end/src/fixtures/utils.ts +++ b/yarn-project/end-to-end/src/fixtures/utils.ts @@ -207,7 +207,6 @@ async function setupWithRemoteEnvironment( config: AztecNodeConfig, logger: DebugLogger, numberOfAccounts: number, - enableGas: boolean, ) { // we are setting up against a remote environment, l1 contracts are already deployed const aztecNodeUrl = getAztecUrl(); @@ -238,11 +237,9 @@ async function setupWithRemoteEnvironment( const teardown = () => Promise.resolve(); const { l1ChainId: chainId, protocolVersion } = await pxeClient.getNodeInfo(); - if (enableGas) { - await setupCanonicalFeeJuice( - new SignerlessWallet(pxeClient, new DefaultMultiCallEntrypoint(chainId, protocolVersion)), - ); - } + await setupCanonicalFeeJuice( + new SignerlessWallet(pxeClient, new DefaultMultiCallEntrypoint(chainId, protocolVersion)), + ); logger.verbose('Constructing available wallets from already registered accounts...'); const wallets = await getDeployedTestAccountsWallets(pxeClient); @@ -330,7 +327,6 @@ export async function setup( numberOfAccounts = 1, opts: SetupOptions = {}, pxeOpts: Partial = {}, - enableGas = false, chain: Chain = foundry, ): Promise { const config = { ...getConfigEnvVars(), ...opts }; @@ -389,7 +385,7 @@ export async function setup( if (PXE_URL) { // we are setting up against a remote environment, l1 contracts are assumed to already be deployed - return await setupWithRemoteEnvironment(publisherHdAccount!, config, logger, numberOfAccounts, enableGas); + return await setupWithRemoteEnvironment(publisherHdAccount!, config, logger, numberOfAccounts); } const deployL1ContractsValues = @@ -441,7 +437,7 @@ export async function setup( const { pxe } = await setupPXEService(aztecNode!, pxeOpts, logger); - if (!config.skipProtocolContracts && enableGas) { + if (!config.skipProtocolContracts) { logger.verbose('Setting up Fee Juice...'); await setupCanonicalFeeJuice( new SignerlessWallet(pxe, new DefaultMultiCallEntrypoint(config.l1ChainId, config.version)), diff --git a/yarn-project/end-to-end/src/public-testnet/e2e_public_testnet_transfer.test.ts b/yarn-project/end-to-end/src/public-testnet/e2e_public_testnet_transfer.test.ts index 22cb491facf..31fcb352394 100644 --- a/yarn-project/end-to-end/src/public-testnet/e2e_public_testnet_transfer.test.ts +++ b/yarn-project/end-to-end/src/public-testnet/e2e_public_testnet_transfer.test.ts @@ -22,13 +22,7 @@ describe(`deploys and transfers a private only token`, () => { beforeEach(async () => { const chainId = !process.env.L1_CHAIN_ID ? foundry.id : +process.env.L1_CHAIN_ID; const chain = chainId == sepolia.id ? sepolia : foundry; // Not the best way of doing this. - ({ logger, pxe, teardown } = await setup( - 0, - { skipProtocolContracts: true, stateLoad: undefined }, - {}, - false, - chain, - )); + ({ logger, pxe, teardown } = await setup(0, { skipProtocolContracts: true, stateLoad: undefined }, {}, chain)); }, 600_000); afterEach(async () => { diff --git a/yarn-project/sequencer-client/src/publisher/l1-publisher.ts b/yarn-project/sequencer-client/src/publisher/l1-publisher.ts index a0a40a3bc0f..3f76c7aa51b 100644 --- a/yarn-project/sequencer-client/src/publisher/l1-publisher.ts +++ b/yarn-project/sequencer-client/src/publisher/l1-publisher.ts @@ -263,8 +263,9 @@ export class L1Publisher { try { await this.rollupContract.read.validateEpochProofRightClaim(args, { account: this.account }); } catch (err) { + this.log.verbose(JSON.stringify(err)); const errorName = tryGetCustomErrorName(err); - this.log.verbose(`Proof quote validation failed: ${errorName}`); + this.log.warn(`Proof quote validation failed: ${errorName}`); return undefined; } return quote;