Skip to content

Commit

Permalink
fix: call correct method on fee juice contract (#9137)
Browse files Browse the repository at this point in the history
also better logging when invalid proof quotes
  • Loading branch information
just-mitch authored Oct 9, 2024
1 parent 6ef0895 commit 2dff976
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 21 deletions.
2 changes: 1 addition & 1 deletion spartan/aztec-network/templates/l2-contracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion yarn-project/end-to-end/scripts/network_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ describe('benchmarks/proving', () => {
minTxsPerBlock: 1,
},
{},
true,
);

schnorrWalletSalt = Fr.random();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
14 changes: 5 additions & 9 deletions yarn-project/end-to-end/src/fixtures/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -330,7 +327,6 @@ export async function setup(
numberOfAccounts = 1,
opts: SetupOptions = {},
pxeOpts: Partial<PXEServiceConfig> = {},
enableGas = false,
chain: Chain = foundry,
): Promise<EndToEndContext> {
const config = { ...getConfigEnvVars(), ...opts };
Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -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)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/sequencer-client/src/publisher/l1-publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2dff976

Please sign in to comment.