diff --git a/.github/workflows/devnet-deploys.yml b/.github/workflows/devnet-deploys.yml index 2fba470b9f9..da3d47bb015 100644 --- a/.github/workflows/devnet-deploys.yml +++ b/.github/workflows/devnet-deploys.yml @@ -74,7 +74,7 @@ env: TF_VAR_BOT_NO_START: true TF_VAR_BOT_PRIVATE_TRANSFERS_PER_TX: 0 # no private transfers TF_VAR_BOT_PUBLIC_TRANSFERS_PER_TX: 1 - TF_VAR_BOT_TX_MINED_WAIT_SECONDS: 2400 + TF_VAR_BOT_TX_MINED_WAIT_SECONDS: 4800 TF_VAR_BOT_FOLLOW_CHAIN: "PROVEN" TF_VAR_BOT_TX_INTERVAL_SECONDS: 180 TF_VAR_BOT_COUNT: 1 @@ -112,6 +112,7 @@ jobs: faucet_lb_priority: ${{ steps.set_network_vars.outputs.faucet_lb_priority }} bot_no_wait: ${{ steps.set_network_vars.outputs.bot_no_wait }} max_txs_per_block: ${{ steps.set_network_vars.outputs.max_txs_per_block }} + bot_follow_chain: ${{ steps.set_network_vars.outputs.bot_follow_chain }} min_txs_per_block: ${{ steps.set_network_vars.outputs.min_txs_per_block }} bot_flush_setup_txs: ${{ steps.set_network_vars.outputs.bot_flush_setup_txs }} bot_max_pending_txs: ${{ steps.set_network_vars.outputs.bot_max_pending_txs }} @@ -139,6 +140,7 @@ jobs: echo "bot_no_wait=false" >> $GITHUB_OUTPUT echo "min_txs_per_block=1" >> $GITHUB_OUTPUT echo "max_txs_per_block=64" >> $GITHUB_OUTPUT + echo "bot_follow_chain=PROVEN" >> $GITHUB_OUTPUT echo "bot_flush_setup_txs=false" >> $GITHUB_OUTPUT echo "bot_max_pending_txs=1" >> $GITHUB_OUTPUT elif [ "$BRANCH_NAME" = "provernet" ] @@ -159,6 +161,7 @@ jobs: echo "bot_no_wait=true" >> $GITHUB_OUTPUT echo "min_txs_per_block=4" >> $GITHUB_OUTPUT echo "max_txs_per_block=4" >> $GITHUB_OUTPUT + echo "bot_follow_chain=NONE" >> $GITHUB_OUTPUT echo "bot_flush_setup_txs=true" >> $GITHUB_OUTPUT echo "bot_max_pending_txs=20" >> $GITHUB_OUTPUT elif [ "$BRANCH_NAME" = "alphanet" ] @@ -179,6 +182,7 @@ jobs: echo "bot_no_wait=false" >> $GITHUB_OUTPUT echo "min_txs_per_block=1" >> $GITHUB_OUTPUT echo "max_txs_per_block=64" >> $GITHUB_OUTPUT + echo "bot_follow_chain=PROVEN" >> $GITHUB_OUTPUT echo "bot_flush_setup_txs=false" >> $GITHUB_OUTPUT echo "bot_max_pending_txs=1" >> $GITHUB_OUTPUT else @@ -452,13 +456,13 @@ jobs: working-directory: ./yarn-project/aztec/terraform/node run: | terraform init -input=false -backend-config="key=${{ env.DEPLOY_TAG }}/aztec-node" - terraform apply -input=false -auto-approve -var="NODE_P2P_TCP_PORT=${{ needs.set-network.outputs.node_tcp_range_start }}" -var="NODE_P2P_UDP_PORT=${{ needs.set-network.outputs.node_udp_range_start }}" + terraform apply -input=false -auto-approve -replace="aws_efs_file_system.node_data_store" -var="NODE_P2P_TCP_PORT=${{ needs.set-network.outputs.node_tcp_range_start }}" -var="NODE_P2P_UDP_PORT=${{ needs.set-network.outputs.node_udp_range_start }}" - name: Deploy Aztec Prover Nodes working-directory: ./yarn-project/aztec/terraform/prover-node run: | terraform init -input=false -backend-config="key=${{ env.DEPLOY_TAG }}/aztec-prover-node" - terraform apply -input=false -auto-approve -var="NODE_P2P_TCP_PORT=${{ needs.set-network.outputs.prover_node_tcp_range_start }}" -var="NODE_P2P_UDP_PORT=${{ needs.set-network.outputs.prover_node_udp_range_start }}" + terraform apply -input=false -auto-approve -replace="aws_efs_file_system.prover_node_data_store" -var="NODE_P2P_TCP_PORT=${{ needs.set-network.outputs.prover_node_tcp_range_start }}" -var="NODE_P2P_UDP_PORT=${{ needs.set-network.outputs.prover_node_udp_range_start }}" - name: Deploy Provers working-directory: ./yarn-project/aztec/terraform/prover @@ -470,7 +474,7 @@ jobs: working-directory: ./yarn-project/aztec/terraform/pxe run: | terraform init -input=false -backend-config="key=${{ env.DEPLOY_TAG }}/pxe" - terraform apply -input=false -auto-approve + terraform apply -input=false -auto-approve -replace="aws_efs_file_system.pxe_data_store" bootstrap: runs-on: ubuntu-latest @@ -585,6 +589,7 @@ jobs: TF_VAR_BOT_MAX_PENDING_TXS: ${{ needs.set-network.outputs.bot_max_pending_txs }} TF_VAR_SEQ_MIN_TX_PER_BLOCK: ${{ needs.set-network.outputs.min_txs_per_block }} TF_VAR_SEQ_MAX_TX_PER_BLOCK: ${{ needs.set-network.outputs.max_txs_per_block }} + TF_VAR_BOT_FOLLOW_CHAIN: ${{ needs.set-network.outputs.bot_follow_chain }} TF_VAR_PROVING_ENABLED: true TF_VAR_BOT_NO_START: false steps: @@ -643,7 +648,8 @@ jobs: run: | ./.github/scripts/wait_for_infra.sh pxe ${{ env.DEPLOY_TAG }} ${{ env.API_KEY }} - - name: Deploy verifier + - name: Deploy verifier (allow failure) + continue-on-error: true working-directory: ./yarn-project/aztec/terraform/pxe run: | set -eo pipefail diff --git a/l1-contracts/src/core/FeeJuicePortal.sol b/l1-contracts/src/core/FeeJuicePortal.sol index 5b899bd577f..00e166a5147 100644 --- a/l1-contracts/src/core/FeeJuicePortal.sol +++ b/l1-contracts/src/core/FeeJuicePortal.sol @@ -22,7 +22,7 @@ contract FeeJuicePortal is IFeeJuicePortal, Ownable { IERC20 public underlying; bytes32 public l2TokenAddress; - constructor() Ownable(msg.sender) {} + constructor(address owner) Ownable(owner) {} /** * @notice Initialize the FeeJuicePortal diff --git a/l1-contracts/test/Rollup.t.sol b/l1-contracts/test/Rollup.t.sol index c47e631adf4..796d647ce45 100644 --- a/l1-contracts/test/Rollup.t.sol +++ b/l1-contracts/test/Rollup.t.sol @@ -56,7 +56,7 @@ contract RollupTest is DecoderBase { registry = new Registry(address(this)); availabilityOracle = new AvailabilityOracle(); portalERC20 = new PortalERC20(); - feeJuicePortal = new FeeJuicePortal(); + feeJuicePortal = new FeeJuicePortal(address(this)); portalERC20.mint(address(feeJuicePortal), Constants.FEE_JUICE_INITIAL_MINT); feeJuicePortal.initialize( address(registry), address(portalERC20), bytes32(Constants.FEE_JUICE_ADDRESS) diff --git a/yarn-project/aztec/terraform/node/main.tf b/yarn-project/aztec/terraform/node/main.tf index b0242406c40..ea920fe5613 100644 --- a/yarn-project/aztec/terraform/node/main.tf +++ b/yarn-project/aztec/terraform/node/main.tf @@ -359,7 +359,11 @@ resource "aws_ecs_task_definition" "aztec-node" { { name = "NETWORK_NAME", value = "${var.DEPLOY_TAG}" - } + }, + { + name = "VALIDATOR_DISABLED", + value = "1" + }, ] mountPoints = [ { diff --git a/yarn-project/aztec/terraform/prover-node/main.tf b/yarn-project/aztec/terraform/prover-node/main.tf index b81ebaf76b7..6ef10064885 100644 --- a/yarn-project/aztec/terraform/prover-node/main.tf +++ b/yarn-project/aztec/terraform/prover-node/main.tf @@ -170,7 +170,7 @@ resource "aws_ecs_task_definition" "aztec-prover-node" { environment = [ // General { name = "NODE_ENV", value = "production" }, - { name = "LOG_LEVEL", value = "debug" }, + { name = "LOG_LEVEL", value = "verbose" }, { name = "DEBUG", value = "aztec:*,-json-rpc:json_proxy:*,-aztec:avm_simulator:*" }, { name = "DEPLOY_TAG", value = var.DEPLOY_TAG }, { name = "NETWORK_NAME", value = "${var.DEPLOY_TAG}" }, @@ -198,6 +198,7 @@ resource "aws_ecs_task_definition" "aztec-prover-node" { { name = "PROVER_REAL_PROOFS", value = tostring(var.PROVING_ENABLED) }, { name = "BB_WORKING_DIRECTORY", value = "${local.data_dir}/prover_node_${count.index + 1}/temp" }, { name = "ACVM_WORKING_DIRECTORY", value = "${local.data_dir}/prover_node_${count.index + 1}/temp" }, + { name = "PROVER_NODE_MAX_PENDING_JOBS", value = tostring(var.PROVER_NODE_MAX_PENDING_JOBS) }, // Metrics { name = "OTEL_EXPORTER_OTLP_ENDPOINT", value = "http://aztec-otel.local:4318" }, diff --git a/yarn-project/aztec/terraform/prover-node/variables.tf b/yarn-project/aztec/terraform/prover-node/variables.tf index 2c8fc301f23..2f29c2f5b71 100644 --- a/yarn-project/aztec/terraform/prover-node/variables.tf +++ b/yarn-project/aztec/terraform/prover-node/variables.tf @@ -60,6 +60,11 @@ variable "PROVING_ENABLED" { default = false } +variable "PROVER_NODE_MAX_PENDING_JOBS" { + type = number + default = 16 +} + variable "BOOTSTRAP_NODES" { type = string default = "" diff --git a/yarn-project/bot/src/factory.ts b/yarn-project/bot/src/factory.ts index f4af49d1f1d..e909590c268 100644 --- a/yarn-project/bot/src/factory.ts +++ b/yarn-project/bot/src/factory.ts @@ -23,6 +23,8 @@ export class BotFactory { throw new Error(`Either a PXE client or a PXE URL must be provided`); } + this.node = dependencies.node; + if (dependencies.pxe) { this.log.info(`Using local PXE`); this.pxe = dependencies.pxe; @@ -30,7 +32,6 @@ export class BotFactory { } this.log.info(`Using remote PXE at ${config.pxeUrl!}`); this.pxe = createPXEClient(config.pxeUrl!); - this.node = dependencies.node; } /** @@ -60,6 +61,8 @@ export class BotFactory { } else { this.log.info(`Initializing account at ${account.getAddress().toString()}`); const sentTx = account.deploy(); + const txHash = await sentTx.getTxHash(); + this.log.info(`Sent tx with hash ${txHash.to0xString()}`); if (this.config.flushSetupTransactions) { this.log.verbose('Flushing transactions'); await this.node!.flushTxs(); @@ -93,6 +96,8 @@ export class BotFactory { } else { this.log.info(`Deploying token contract at ${address.toString()}`); const sentTx = deploy.send(deployOpts); + const txHash = await sentTx.getTxHash(); + this.log.info(`Sent tx with hash ${txHash.to0xString()}`); if (this.config.flushSetupTransactions) { this.log.verbose('Flushing transactions'); await this.node!.flushTxs(); @@ -123,6 +128,8 @@ export class BotFactory { return; } const sentTx = new BatchCall(token.wallet, calls).send(); + const txHash = await sentTx.getTxHash(); + this.log.info(`Sent tx with hash ${txHash.to0xString()}`); if (this.config.flushSetupTransactions) { this.log.verbose('Flushing transactions'); await this.node!.flushTxs(); diff --git a/yarn-project/ethereum/src/deploy_l1_contracts.ts b/yarn-project/ethereum/src/deploy_l1_contracts.ts index 9b63a51a5ae..d009a5f570c 100644 --- a/yarn-project/ethereum/src/deploy_l1_contracts.ts +++ b/yarn-project/ethereum/src/deploy_l1_contracts.ts @@ -183,12 +183,7 @@ export const deployL1Contracts = async ( logger.info(`Deployed Fee Juice at ${feeJuiceAddress}`); - const feeJuicePortalAddress = await deployL1Contract( - walletClient, - publicClient, - contractsToDeploy.feeJuicePortal.contractAbi, - contractsToDeploy.feeJuicePortal.contractBytecode, - ); + const feeJuicePortalAddress = await deployer.deploy(contractsToDeploy.feeJuicePortal, [account.address.toString()]); logger.info(`Deployed Gas Portal at ${feeJuicePortalAddress}`); @@ -224,19 +219,13 @@ export const deployL1Contracts = async ( `Initialized Gas Portal at ${feeJuicePortalAddress} to bridge between L1 ${feeJuiceAddress} to L2 ${args.l2FeeJuiceAddress}`, ); - const rollupAddress = await deployL1Contract( - walletClient, - publicClient, - contractsToDeploy.rollup.contractAbi, - contractsToDeploy.rollup.contractBytecode, - [ - getAddress(registryAddress.toString()), - getAddress(availabilityOracleAddress.toString()), - getAddress(feeJuicePortalAddress.toString()), - args.vkTreeRoot.toString(), - account.address.toString(), - ], - ); + const rollupAddress = await deployer.deploy(contractsToDeploy.rollup, [ + getAddress(registryAddress.toString()), + getAddress(availabilityOracleAddress.toString()), + getAddress(feeJuicePortalAddress.toString()), + args.vkTreeRoot.toString(), + account.address.toString(), + ]); logger.info(`Deployed Rollup at ${rollupAddress}`); // Set initial blocks as proven if requested diff --git a/yarn-project/foundation/src/log/logger.ts b/yarn-project/foundation/src/log/logger.ts index a653b233393..fbcfd832e02 100644 --- a/yarn-project/foundation/src/log/logger.ts +++ b/yarn-project/foundation/src/log/logger.ts @@ -1,4 +1,5 @@ import debug from 'debug'; +import { inspect } from 'util'; import { type LogData, type LogFn } from './log_fn.js'; @@ -88,8 +89,7 @@ function logWithDebug(debug: debug.Debugger, level: LogLevel, msg: string, data? * @returns A string with both the log message and the error message. */ function fmtErr(msg: string, err?: Error | unknown): string { - const errStr = err && [(err as Error).name, (err as Error).message].filter(x => !!x).join(' '); - return err ? `${msg}: ${errStr || err}` : msg; + return err ? `${msg}: ${inspect(err)}` : msg; } /** diff --git a/yarn-project/sequencer-client/src/publisher/l1-publisher.ts b/yarn-project/sequencer-client/src/publisher/l1-publisher.ts index e1980dcb4a4..405e68ea736 100644 --- a/yarn-project/sequencer-client/src/publisher/l1-publisher.ts +++ b/yarn-project/sequencer-client/src/publisher/l1-publisher.ts @@ -308,7 +308,7 @@ export class L1Publisher { ...pick(tx!, 'calldataGas', 'calldataSize'), eventName: 'proof-published-to-l1', }; - this.log.info(`Published L2 block to L1 rollup contract`, { ...stats, ...ctx }); + this.log.info(`Published proof to L1 rollup contract`, { ...stats, ...ctx }); this.metrics.recordSubmitProof(timer.ms(), stats); return true; }