-
Notifications
You must be signed in to change notification settings - Fork 615
chore: New alpha-net environment #20800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| NAMESPACE=${NAMESPACE:-alpha-net} | ||
| CLUSTER=aztec-gke-private | ||
| GCP_REGION=us-west1-a | ||
| DESTROY_NAMESPACE=true | ||
| DESTROY_ETH_DEVNET=true | ||
| CREATE_ETH_DEVNET=${CREATE_ETH_DEVNET:-true} | ||
| AZTEC_EPOCH_DURATION=8 | ||
| AZTEC_SLOT_DURATION=72 | ||
| AZTEC_PROOF_SUBMISSION_EPOCHS=2 | ||
| ETHEREUM_CHAIN_ID=1337 | ||
| LABS_INFRA_MNEMONIC="test test test test test test test test test test test junk" | ||
| FUNDING_PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" | ||
| # CREATE_CHAOS_MESH=true | ||
|
|
||
| # Install chaos mesh peer isolation after Aztec infra deploys. Validators, | ||
| # RPC nodes, and prover nodes can only peer with full-nodes, not each other. | ||
| # Requires P2P_PUBLIC_IP=false so P2P uses pod IPs that iptables rules can match. | ||
| P2P_PUBLIC_IP=false | ||
| CHAOS_MESH_SCENARIOS_FILE=network-requirements.yaml | ||
|
|
||
| AZTEC_MANA_TARGET=2147483647 | ||
|
|
||
| P2P_TX_POOL_DELETE_TXS_AFTER_REORG=true | ||
|
|
||
| # For mbps | ||
| SEQ_BUILD_CHECKPOINT_IF_EMPTY=true | ||
| SEQ_BLOCK_DURATION_MS=6000 | ||
| SEQ_SKIP_CHECKPOINT_PUBLISH_PERCENT=5 | ||
|
|
||
| CREATE_ROLLUP_CONTRACTS=true | ||
| REDEPLOY_ROLLUP_CONTRACTS=true | ||
| VERIFY_CONTRACTS=false | ||
| DESTROY_AZTEC_INFRA=true | ||
|
|
||
| AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET=1 | ||
| AZTEC_LAG_IN_EPOCHS_FOR_RANDAO=1 | ||
|
|
||
| OTEL_COLLECTOR_ENDPOINT=REPLACE_WITH_GCP_SECRET | ||
|
|
||
| VALIDATOR_REPLICAS=12 | ||
| VALIDATORS_PER_NODE=4 | ||
| PUBLISHERS_PER_VALIDATOR_KEY=2 | ||
| VALIDATOR_PUBLISHER_MNEMONIC_START_INDEX=5000 | ||
| VALIDATOR_RESOURCE_PROFILE="2-core-dedicated" | ||
|
|
||
| REAL_VERIFIER=false | ||
|
|
||
| RPC_REPLICAS=12 | ||
| RPC_INGRESS_ENABLED=false | ||
|
|
||
| FULL_NODE_REPLICAS=500 | ||
| FULL_NODE_RESOURCE_PROFILE="2-core-spot" | ||
|
|
||
| PUBLISHERS_PER_PROVER=2 | ||
| PROVER_PUBLISHER_MNEMONIC_START_INDEX=8000 | ||
| PROVER_REPLICAS=128 | ||
| PROVER_RESOURCE_PROFILE="hi-tps" | ||
| PROVER_AGENT_POLL_INTERVAL_MS=10000 | ||
|
|
||
| RUN_TESTS=false | ||
|
|
||
| PROVER_TEST_DELAY_TYPE=fixed | ||
|
|
||
| AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS=1 | ||
| AZTEC_SLASHING_QUORUM=5 | ||
| AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS=0 | ||
| AZTEC_SLASHING_OFFSET_IN_ROUNDS=1 | ||
| AZTEC_LOCAL_EJECTION_THRESHOLD=90000000000000000000 | ||
|
|
||
| SEQ_MAX_TX_PER_BLOCK=10 | ||
| SEQ_MIN_TX_PER_BLOCK=0 | ||
|
|
||
| # Override L1 tx utils bump percentages for scenario tests | ||
| VALIDATOR_L1_PRIORITY_FEE_BUMP_PERCENTAGE=0 | ||
| VALIDATOR_L1_PRIORITY_FEE_RETRY_BUMP_PERCENTAGE=0 | ||
| PROVER_L1_PRIORITY_FEE_BUMP_PERCENTAGE=0 | ||
| PROVER_L1_PRIORITY_FEE_RETRY_BUMP_PERCENTAGE=0 | ||
|
|
||
| # Enable latency mesaruement for p2p messages | ||
| DEBUG_P2P_INSTRUMENT_MESSAGES=true | ||
|
|
||
| # Inject artificial delay of proof verification for all nodes | ||
| PROVER_TEST_VERIFICATION_DELAY_MS=250 | ||
|
|
||
| # Reduce the amount of metrics produced by prover agents and full nodes | ||
| PROVER_AGENT_INCLUDE_METRICS="aztec.circuit" | ||
| FULL_NODE_INCLUDE_METRICS="aztec.p2p.gossip.agg_" | ||
| LOG_LEVEL=info | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,7 @@ import { | |
| getChartDir, | ||
| getGitProjectRoot, | ||
| getRPCEndpoint, | ||
| hasDeployedHelmRelease, | ||
| installChaosMeshChart, | ||
| setupEnvironment, | ||
| startPortForwardForPrometeheus, | ||
|
|
@@ -226,6 +227,32 @@ describe('sustained N TPS test', () => { | |
| }); | ||
| const spartanDir = `${getGitProjectRoot()}/spartan`; | ||
|
|
||
| // Skip chaos mesh installation if it was already deployed by deploy_network.sh | ||
| // (via CHAOS_MESH_SCENARIOS_FILE). Installing before infra ensures partition | ||
| // rules are in place when pods start, preventing unwanted peer connections. | ||
| const alreadyDeployed = await hasDeployedHelmRelease(CHAOS_MESH_NAME, config.NAMESPACE); | ||
| if (alreadyDeployed) { | ||
| logger.info('Chaos mesh chart already deployed, skipping installation'); | ||
| } else { | ||
| logger.info('Installing chaos mesh chart', { | ||
| name: CHAOS_MESH_NAME, | ||
| namespace: config.NAMESPACE, | ||
| valuesFile: 'network-requirements.yaml', | ||
| }); | ||
| await installChaosMeshChart({ | ||
| logger, | ||
| targetNamespace: config.NAMESPACE, | ||
| instanceName: CHAOS_MESH_NAME, | ||
| valuesFile: 'network-requirements.yaml', | ||
| helmChartDir: getChartDir(spartanDir, 'aztec-chaos-scenarios'), | ||
| }); | ||
|
Comment on lines
+242
to
+248
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW this removes existing Chaos experiments so if both the deployment and the test install Chaos mesh then it's losing some time. |
||
| logger.info('Chaos mesh installation complete'); | ||
|
|
||
| logger.info('Waiting for network to stabilize after chaos mesh installation...'); | ||
| await sleep(30 * 1000); | ||
| logger.info('Network stabilization wait complete'); | ||
| } | ||
|
|
||
| const rpcEndpoint = await getRPCEndpoint(config.NAMESPACE); | ||
| endpoints.push(rpcEndpoint); | ||
| const rpcUrl = rpcEndpoint.url; | ||
|
|
@@ -285,24 +312,6 @@ describe('sustained N TPS test', () => { | |
| }); | ||
| logger.info('Benchmark contract deployed', { address: benchmarkContract.address.toString() }); | ||
|
|
||
| logger.info('Installing chaos mesh chart', { | ||
| name: CHAOS_MESH_NAME, | ||
| namespace: config.NAMESPACE, | ||
| valuesFile: 'network-requirements.yaml', | ||
| }); | ||
| await installChaosMeshChart({ | ||
| logger, | ||
| targetNamespace: config.NAMESPACE, | ||
| instanceName: CHAOS_MESH_NAME, | ||
| valuesFile: 'network-requirements.yaml', | ||
| helmChartDir: getChartDir(spartanDir, 'aztec-chaos-scenarios'), | ||
| }); | ||
| logger.info('Chaos mesh installation complete'); | ||
|
|
||
| logger.info('Waiting for network to stabilize after chaos mesh installation...'); | ||
| await sleep(30 * 1000); | ||
| logger.info('Network stabilization wait complete'); | ||
|
|
||
| logger.info(`Test setup complete`); | ||
| }); | ||
|
|
||
|
|
@@ -328,7 +337,7 @@ describe('sustained N TPS test', () => { | |
| prototypeTxs.set(from.toString(), prototypeTx); | ||
| } | ||
|
|
||
| const tx = await cloneTx(prototypeTx, priorytFee); | ||
| const tx = await cloneTx(prototypeTx, priorytFee, logger); | ||
| return tx; | ||
| }; | ||
|
|
||
|
|
@@ -345,15 +354,23 @@ describe('sustained N TPS test', () => { | |
| let lowValueTxs = 0; | ||
| const lowValueSendTx = async (wallet: TestWallet) => { | ||
| lowValueTxs++; | ||
| //const feeAmount = Number(randomBigInt(100n)) + 1; | ||
| //const feeAmount = 1; | ||
| const feeAmount = Math.floor(lowValueTxs / 1000) + 1; | ||
| const fee = new GasFees(0, feeAmount); | ||
| logger.info('Sending low value tx ' + lowValueTxs + ' with fee ' + feeAmount); | ||
|
|
||
| const t0 = performance.now(); | ||
| const tx = await (config.REAL_VERIFIER ? submitProven(wallet, fee) : submitUnproven(wallet, fee)); | ||
| const t1 = performance.now(); | ||
|
|
||
| const txHash = await tx.send({ wait: NO_WAIT }); | ||
| const t2 = performance.now(); | ||
|
|
||
| logger.info('Low value tx sent', { | ||
| txNum: lowValueTxs, | ||
| feeAmount, | ||
| cloneMs: Math.round(t1 - t0), | ||
| sendMs: Math.round(t2 - t1), | ||
| totalMs: Math.round(t2 - t0), | ||
| }); | ||
| return txHash.toString(); | ||
| }; | ||
|
|
||
|
|
@@ -362,13 +379,23 @@ describe('sustained N TPS test', () => { | |
| highValueTxs++; | ||
| const feeAmount = Number(randomBigInt(10n)) + 1000; | ||
| const fee = new GasFees(0, feeAmount); | ||
| logger.info('Sending high value tx ' + highValueTxs + ' with fee ' + feeAmount); | ||
|
|
||
| const t0 = performance.now(); | ||
| const tx = await (config.REAL_VERIFIER ? submitProven(wallet, fee) : submitUnproven(wallet, fee)); | ||
| const t1 = performance.now(); | ||
|
|
||
| metrics.recordSentTx(tx, `high_value_${highValueTps}tps`); | ||
|
|
||
| const txHash = await tx.send({ wait: NO_WAIT }); | ||
| const t2 = performance.now(); | ||
|
|
||
| logger.info('High value tx sent', { | ||
| txNum: highValueTxs, | ||
| feeAmount, | ||
| cloneMs: Math.round(t1 - t0), | ||
| sendMs: Math.round(t2 - t1), | ||
| totalMs: Math.round(t2 - t0), | ||
| }); | ||
| return txHash.toString(); | ||
| }; | ||
|
|
||
|
|
@@ -514,9 +541,11 @@ function sendTxsAtTps( | |
| return txHashes; | ||
| } | ||
|
|
||
| async function cloneTx(tx: ProvenTx, priorityFee: GasFees): Promise<ProvenTx> { | ||
| // Clone the transaction | ||
| async function cloneTx(tx: ProvenTx, priorityFee: GasFees, logger: Logger): Promise<ProvenTx> { | ||
| const t0 = performance.now(); | ||
| const clonedTxData = Tx.clone(tx, false); | ||
| const t1 = performance.now(); | ||
|
|
||
| (clonedTxData.data.constants.txContext.gasSettings as any).maxPriorityFeesPerGas = priorityFee; | ||
|
|
||
| if (clonedTxData.data.forRollup) { | ||
|
|
@@ -534,7 +563,17 @@ async function cloneTx(tx: ProvenTx, priorityFee: GasFees): Promise<ProvenTx> { | |
| clonedTxData.data.forPublic.nonRevertibleAccumulatedData.nullifiers[i] = Fr.random(); | ||
| } | ||
| } | ||
| const t2 = performance.now(); | ||
|
|
||
| const clonedTx = new ProvenTx((tx as any).node, clonedTxData, tx.offchainEffects, tx.stats); | ||
| await clonedTx.recomputeHash(); | ||
| const t3 = performance.now(); | ||
|
|
||
| logger.debug('cloneTx timing', { | ||
| cloneMs: Math.round(t1 - t0), | ||
| mutateMs: Math.round(t2 - t1), | ||
| rehashMs: Math.round(t3 - t2), | ||
| totalMs: Math.round(t3 - t0), | ||
| }); | ||
| return clonedTx; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This undoes some work in the merge train to remove
REDEPLOYif favour of only usingCREATE_to control contractsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I wondered about that. I'll get ride of
REDEPLOY.