Skip to content

Commit

Permalink
validator starts
Browse files Browse the repository at this point in the history
  • Loading branch information
just-mitch committed Aug 19, 2024
1 parent 8829a15 commit 81300e8
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ data:
# Ask the bootnode for l1 contract addresses
output=$(node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js get-node-info -u http://{{ include "spartan-network.fullname" . }}-boot-node-0.{{ include "spartan-network.fullname" . }}-boot-node.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.bootNode.service.nodePort }})
echo "$output"
boot_node_enr=$(echo "$output" | grep -oP 'Node ENR: \Kenr:[a-zA-Z0-9\-\_\.]+')
rollup_address=$(echo "$output" | grep -oP 'Rollup Address: \K0x[a-fA-F0-9]{40}')
registry_address=$(echo "$output" | grep -oP 'Registry Address: \K0x[a-fA-F0-9]{40}')
inbox_address=$(echo "$output" | grep -oP 'L1 -> L2 Inbox Address: \K0x[a-fA-F0-9]{40}')
outbox_address=$(echo "$output" | grep -oP 'L2 -> L1 Outbox Address: \K0x[a-fA-F0-9]{40}')
availability_oracle_address=$(echo "$output" | grep -oP 'Availability Oracle Address: \K0x[a-fA-F0-9]{40}')
fee_juice_address=$(echo "$output" | grep -oP 'Fee Juice Address: \K0x[a-fA-F0-9]{40}')
gas_portal_address=$(echo "$output" | grep -oP 'Gas Portal Address: \K0x[a-fA-F0-9]{40}')
fee_juice_portal_address=$(echo "$output" | grep -oP 'Fee Juice Portal Address: \K0x[a-fA-F0-9]{40}')
# Write the addresses to a file in the shared volume
cat <<EOF > /shared/contracts.env
Expand All @@ -30,7 +32,7 @@ data:
export OUTBOX_CONTRACT_ADDRESS=$outbox_address
export AVAILABILITY_ORACLE_CONTRACT_ADDRESS=$availability_oracle_address
export FEE_JUICE_CONTRACT_ADDRESS=$fee_juice_address
export GAS_PORTAL_CONTRACT_ADDRESS=$gas_portal_address
export FEE_JUICE_PORTAL_CONTRACT_ADDRESS=$fee_juice_portal_address
EOF
cat /shared/contracts.env
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ data:
outbox_address=$(echo "$output" | grep -oP 'L2 -> L1 Outbox Address: \K0x[a-fA-F0-9]{40}')
availability_oracle_address=$(echo "$output" | grep -oP 'Availability Oracle Address: \K0x[a-fA-F0-9]{40}')
fee_juice_address=$(echo "$output" | grep -oP 'Fee Juice Address: \K0x[a-fA-F0-9]{40}')
gas_portal_address=$(echo "$output" | grep -oP 'Gas Portal Address: \K0x[a-fA-F0-9]{40}')
fee_juice_portal_address=$(echo "$output" | grep -oP 'Fee Juice Portal Address: \K0x[a-fA-F0-9]{40}')
# Write the addresses to a file in the shared volume
cat <<EOF > /shared/contracts.env
Expand All @@ -31,7 +31,7 @@ data:
export OUTBOX_CONTRACT_ADDRESS=$outbox_address
export AVAILABILITY_ORACLE_CONTRACT_ADDRESS=$availability_oracle_address
export FEE_JUICE_CONTRACT_ADDRESS=$fee_juice_address
export GAS_PORTAL_CONTRACT_ADDRESS=$gas_portal_address
export FEE_JUICE_PORTAL_CONTRACT_ADDRESS=$fee_juice_portal_address
EOF
cat /shared/contracts.env
2 changes: 1 addition & 1 deletion yarn-project/cli/src/cmds/l1/deploy_l1_contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ export async function deployL1Contracts(
log(`L2 -> L1 Outbox Address: ${l1ContractAddresses.outboxAddress.toString()}`);
log(`Availability Oracle Address: ${l1ContractAddresses.availabilityOracleAddress.toString()}`);
log(`Fee Juice Address: ${l1ContractAddresses.feeJuiceAddress.toString()}`);
log(`Gas Portal Address: ${l1ContractAddresses.feeJuicePortalAddress.toString()}`);
log(`Fee Juice Portal Address: ${l1ContractAddresses.feeJuicePortalAddress.toString()}`);
}
}
2 changes: 1 addition & 1 deletion yarn-project/cli/src/cmds/pxe/get_node_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function getNodeInfo(rpcUrl: string, debugLogger: DebugLogger, log:
log(` L2 -> L1 Outbox Address: ${info.l1ContractAddresses.outboxAddress.toString()}`);
log(` Availability Oracle Address: ${info.l1ContractAddresses.availabilityOracleAddress.toString()}`);
log(` Fee Juice Address: ${info.l1ContractAddresses.feeJuiceAddress.toString()}`);
log(` Gas Portal Address: ${info.l1ContractAddresses.feeJuicePortalAddress.toString()}`);
log(` Fee Juice Portal Address: ${info.l1ContractAddresses.feeJuicePortalAddress.toString()}`);

log(`L2 Contract Addresses:`);
log(` Class Registerer: ${info.protocolContractAddresses.classRegisterer.toString()}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class FeeJuicePortalTestingHarnessFactory {
const feeJuicePortalAddress = l1ContractAddresses.feeJuicePortalAddress;

if (feeJuiceAddress.isZero() || feeJuicePortalAddress.isZero()) {
throw new Error('Gas portal not deployed on L1');
throw new Error('Fee Juice portal not deployed on L1');
}

const outbox = getContract({
Expand Down
6 changes: 3 additions & 3 deletions yarn-project/ethereum/src/deploy_l1_contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export interface L1ContractArtifactsForDeployment {
*/
feeJuice: ContractArtifacts;
/**
* Gas portal contract artifacts. Optional for now as gas is not strictly enforced
* Fee juice portal contract artifacts. Optional for now as gas is not strictly enforced
*/
feeJuicePortal: ContractArtifacts;
}
Expand Down Expand Up @@ -242,7 +242,7 @@ export const deployL1Contracts = async (
// this contract remains uninitialized because at this point we don't know the address of the Fee Juice on L2
const feeJuicePortalAddress = await deployer.deploy(contractsToDeploy.feeJuicePortal);

logger.info(`Deployed Gas Portal at ${feeJuicePortalAddress}`);
logger.info(`Deployed Fee Juice Portal at ${feeJuicePortalAddress}`);

const feeJuicePortal = getContract({
address: feeJuicePortalAddress.toString(),
Expand All @@ -259,7 +259,7 @@ export const deployL1Contracts = async (
});

logger.info(
`Initialized Gas Portal at ${feeJuicePortalAddress} to bridge between L1 ${feeJuiceAddress} to L2 ${args.l2FeeJuiceAddress}`,
`Initialized Fee Juice Portal at ${feeJuicePortalAddress} to bridge between L1 ${feeJuiceAddress} to L2 ${args.l2FeeJuiceAddress}`,
);

// fund the rollup contract with Fee Juice
Expand Down

0 comments on commit 81300e8

Please sign in to comment.