@aztec/end-to-end 0.0.0-test.0 → 0.0.1-commit.03f7ef2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/dest/bench/client_flows/benchmark.d.ts +61 -0
  2. package/dest/bench/client_flows/benchmark.d.ts.map +1 -0
  3. package/dest/bench/client_flows/benchmark.js +261 -0
  4. package/dest/bench/client_flows/client_flows_benchmark.d.ts +80 -0
  5. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -0
  6. package/dest/bench/client_flows/client_flows_benchmark.js +336 -0
  7. package/dest/bench/client_flows/config.d.ts +14 -0
  8. package/dest/bench/client_flows/config.d.ts.map +1 -0
  9. package/dest/bench/client_flows/config.js +106 -0
  10. package/dest/bench/client_flows/data_extractor.d.ts +2 -0
  11. package/dest/bench/client_flows/data_extractor.d.ts.map +1 -0
  12. package/dest/bench/client_flows/data_extractor.js +77 -0
  13. package/dest/bench/utils.d.ts +12 -38
  14. package/dest/bench/utils.d.ts.map +1 -1
  15. package/dest/bench/utils.js +26 -66
  16. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +21 -13
  17. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
  18. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +85 -57
  19. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +20 -25
  20. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  21. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +51 -70
  22. package/dest/e2e_deploy_contract/deploy_test.d.ts +16 -8
  23. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  24. package/dest/e2e_deploy_contract/deploy_test.js +13 -19
  25. package/dest/e2e_epochs/epochs_test.d.ts +65 -22
  26. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  27. package/dest/e2e_epochs/epochs_test.js +233 -49
  28. package/dest/e2e_fees/bridging_race.notest.d.ts +2 -0
  29. package/dest/e2e_fees/bridging_race.notest.d.ts.map +1 -0
  30. package/dest/e2e_fees/bridging_race.notest.js +63 -0
  31. package/dest/e2e_fees/fees_test.d.ts +27 -12
  32. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  33. package/dest/e2e_fees/fees_test.js +106 -109
  34. package/dest/e2e_l1_publisher/write_json.d.ts +10 -0
  35. package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -0
  36. package/dest/e2e_l1_publisher/write_json.js +58 -0
  37. package/dest/e2e_multi_validator/utils.d.ts +12 -0
  38. package/dest/e2e_multi_validator/utils.d.ts.map +1 -0
  39. package/dest/e2e_multi_validator/utils.js +214 -0
  40. package/dest/e2e_nested_contract/nested_contract_test.d.ts +10 -7
  41. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  42. package/dest/e2e_nested_contract/nested_contract_test.js +24 -20
  43. package/dest/e2e_p2p/inactivity_slash_test.d.ts +31 -0
  44. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -0
  45. package/dest/e2e_p2p/inactivity_slash_test.js +136 -0
  46. package/dest/e2e_p2p/p2p_network.d.ts +276 -23
  47. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  48. package/dest/e2e_p2p/p2p_network.js +188 -133
  49. package/dest/e2e_p2p/shared.d.ts +43 -7
  50. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  51. package/dest/e2e_p2p/shared.js +164 -19
  52. package/dest/e2e_token_contract/token_contract_test.d.ts +12 -6
  53. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  54. package/dest/e2e_token_contract/token_contract_test.js +50 -26
  55. package/dest/fixtures/e2e_prover_test.d.ts +61 -0
  56. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -0
  57. package/dest/{e2e_prover → fixtures}/e2e_prover_test.js +108 -112
  58. package/dest/fixtures/fixtures.d.ts +6 -8
  59. package/dest/fixtures/fixtures.d.ts.map +1 -1
  60. package/dest/fixtures/fixtures.js +5 -5
  61. package/dest/fixtures/get_acvm_config.d.ts +2 -2
  62. package/dest/fixtures/get_acvm_config.d.ts.map +1 -1
  63. package/dest/fixtures/get_acvm_config.js +3 -15
  64. package/dest/fixtures/get_bb_config.d.ts +2 -2
  65. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  66. package/dest/fixtures/get_bb_config.js +10 -17
  67. package/dest/fixtures/index.d.ts +1 -1
  68. package/dest/fixtures/l1_to_l2_messaging.d.ts +11 -7
  69. package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
  70. package/dest/fixtures/l1_to_l2_messaging.js +45 -19
  71. package/dest/fixtures/logging.d.ts +1 -1
  72. package/dest/fixtures/setup_p2p_test.d.ts +15 -14
  73. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  74. package/dest/fixtures/setup_p2p_test.js +82 -22
  75. package/dest/fixtures/snapshot_manager.d.ts +20 -14
  76. package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
  77. package/dest/fixtures/snapshot_manager.js +154 -140
  78. package/dest/fixtures/token_utils.d.ts +10 -4
  79. package/dest/fixtures/token_utils.d.ts.map +1 -1
  80. package/dest/fixtures/token_utils.js +28 -12
  81. package/dest/fixtures/utils.d.ts +95 -54
  82. package/dest/fixtures/utils.d.ts.map +1 -1
  83. package/dest/fixtures/utils.js +456 -389
  84. package/dest/fixtures/web3signer.d.ts +5 -0
  85. package/dest/fixtures/web3signer.d.ts.map +1 -0
  86. package/dest/fixtures/web3signer.js +53 -0
  87. package/dest/fixtures/with_telemetry_utils.d.ts +2 -2
  88. package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
  89. package/dest/fixtures/with_telemetry_utils.js +2 -2
  90. package/dest/index.d.ts +1 -1
  91. package/dest/quality_of_service/alert_checker.d.ts +2 -2
  92. package/dest/quality_of_service/alert_checker.d.ts.map +1 -1
  93. package/dest/shared/cross_chain_test_harness.d.ts +42 -35
  94. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  95. package/dest/shared/cross_chain_test_harness.js +104 -50
  96. package/dest/shared/gas_portal_test_harness.d.ts +29 -31
  97. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  98. package/dest/shared/gas_portal_test_harness.js +51 -30
  99. package/dest/shared/index.d.ts +1 -1
  100. package/dest/shared/jest_setup.d.ts +1 -1
  101. package/dest/shared/jest_setup.js +1 -1
  102. package/dest/shared/submit-transactions.d.ts +6 -4
  103. package/dest/shared/submit-transactions.d.ts.map +1 -1
  104. package/dest/shared/submit-transactions.js +8 -7
  105. package/dest/shared/uniswap_l1_l2.d.ts +16 -13
  106. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  107. package/dest/shared/uniswap_l1_l2.js +149 -117
  108. package/dest/simulators/index.d.ts +1 -1
  109. package/dest/simulators/lending_simulator.d.ts +7 -11
  110. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  111. package/dest/simulators/lending_simulator.js +16 -17
  112. package/dest/simulators/token_simulator.d.ts +6 -3
  113. package/dest/simulators/token_simulator.d.ts.map +1 -1
  114. package/dest/simulators/token_simulator.js +16 -13
  115. package/dest/spartan/setup_test_wallets.d.ts +26 -11
  116. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  117. package/dest/spartan/setup_test_wallets.js +202 -58
  118. package/dest/spartan/tx_metrics.d.ts +39 -0
  119. package/dest/spartan/tx_metrics.d.ts.map +1 -0
  120. package/dest/spartan/tx_metrics.js +95 -0
  121. package/dest/spartan/utils.d.ts +129 -313
  122. package/dest/spartan/utils.d.ts.map +1 -1
  123. package/dest/spartan/utils.js +559 -151
  124. package/package.json +65 -58
  125. package/src/bench/client_flows/benchmark.ts +341 -0
  126. package/src/bench/client_flows/client_flows_benchmark.ts +450 -0
  127. package/src/bench/client_flows/config.ts +61 -0
  128. package/src/bench/client_flows/data_extractor.ts +89 -0
  129. package/src/bench/utils.ts +22 -76
  130. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +80 -77
  131. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +70 -107
  132. package/src/e2e_deploy_contract/deploy_test.ts +24 -39
  133. package/src/e2e_epochs/epochs_test.ts +299 -65
  134. package/src/e2e_fees/bridging_race.notest.ts +80 -0
  135. package/src/e2e_fees/fees_test.ts +151 -141
  136. package/src/e2e_l1_publisher/write_json.ts +77 -0
  137. package/src/e2e_multi_validator/utils.ts +258 -0
  138. package/src/e2e_nested_contract/nested_contract_test.ts +29 -19
  139. package/src/e2e_p2p/inactivity_slash_test.ts +179 -0
  140. package/src/e2e_p2p/p2p_network.ts +274 -171
  141. package/src/e2e_p2p/shared.ts +251 -29
  142. package/src/e2e_token_contract/token_contract_test.ts +43 -39
  143. package/src/fixtures/dumps/epoch_proof_result.json +1 -1
  144. package/src/{e2e_prover → fixtures}/e2e_prover_test.ts +113 -160
  145. package/src/fixtures/fixtures.ts +5 -7
  146. package/src/fixtures/get_acvm_config.ts +4 -12
  147. package/src/fixtures/get_bb_config.ts +18 -13
  148. package/src/fixtures/l1_to_l2_messaging.ts +56 -24
  149. package/src/fixtures/setup_p2p_test.ts +127 -39
  150. package/src/fixtures/snapshot_manager.ts +196 -162
  151. package/src/fixtures/token_utils.ts +32 -15
  152. package/src/fixtures/utils.ts +562 -475
  153. package/src/fixtures/web3signer.ts +63 -0
  154. package/src/fixtures/with_telemetry_utils.ts +2 -2
  155. package/src/guides/up_quick_start.sh +7 -15
  156. package/src/quality_of_service/alert_checker.ts +1 -1
  157. package/src/shared/cross_chain_test_harness.ts +112 -80
  158. package/src/shared/gas_portal_test_harness.ts +59 -50
  159. package/src/shared/jest_setup.ts +1 -1
  160. package/src/shared/submit-transactions.ts +12 -8
  161. package/src/shared/uniswap_l1_l2.ts +187 -192
  162. package/src/simulators/lending_simulator.ts +15 -16
  163. package/src/simulators/token_simulator.ts +21 -13
  164. package/src/spartan/DEVELOP.md +128 -0
  165. package/src/spartan/setup_test_wallets.ts +252 -93
  166. package/src/spartan/tx_metrics.ts +130 -0
  167. package/src/spartan/utils.ts +641 -146
  168. package/dest/e2e_prover/e2e_prover_test.d.ts +0 -56
  169. package/dest/e2e_prover/e2e_prover_test.d.ts.map +0 -1
  170. package/dest/fixtures/setup_l1_contracts.d.ts +0 -6
  171. package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
  172. package/dest/fixtures/setup_l1_contracts.js +0 -17
  173. package/dest/sample-dapp/connect.js +0 -12
  174. package/dest/sample-dapp/contracts.js +0 -10
  175. package/dest/sample-dapp/deploy.js +0 -35
  176. package/dest/sample-dapp/index.js +0 -98
  177. package/src/fixtures/setup_l1_contracts.ts +0 -27
  178. package/src/sample-dapp/connect.mjs +0 -16
  179. package/src/sample-dapp/contracts.mjs +0 -14
  180. package/src/sample-dapp/deploy.mjs +0 -40
  181. package/src/sample-dapp/index.mjs +0 -128
@@ -1,20 +1,32 @@
1
1
  import { AztecNodeService } from '@aztec/aztec-node';
2
- import { Fr, getTimestampRangeForEpoch, retryUntil, sleep } from '@aztec/aztec.js';
3
- import { ChainMonitor } from '@aztec/aztec.js/ethereum';
2
+ import { getTimestampRangeForEpoch } from '@aztec/aztec.js/block';
3
+ import { getContractInstanceFromInstantiationParams } from '@aztec/aztec.js/contracts';
4
+ import { Fr } from '@aztec/aztec.js/fields';
5
+ import { MerkleTreeId } from '@aztec/aztec.js/trees';
6
+ import { EpochCache } from '@aztec/epoch-cache';
7
+ import { createExtendedL1Client } from '@aztec/ethereum/client';
8
+ import { DefaultL1ContractsConfig } from '@aztec/ethereum/config';
4
9
  import { RollupContract } from '@aztec/ethereum/contracts';
5
- import { waitUntilL1Timestamp } from '@aztec/ethereum/test';
6
- import { randomBytes } from '@aztec/foundation/crypto';
10
+ import { ChainMonitor, DelayedTxUtils, waitUntilL1Timestamp, withDelayer } from '@aztec/ethereum/test';
11
+ import { EpochNumber } from '@aztec/foundation/branded-types';
12
+ import { SecretValue } from '@aztec/foundation/config';
13
+ import { randomBytes } from '@aztec/foundation/crypto/random';
7
14
  import { withLogNameSuffix } from '@aztec/foundation/log';
8
- import { MerkleTreeId } from '@aztec/stdlib/trees';
15
+ import { retryUntil } from '@aztec/foundation/retry';
16
+ import { sleep } from '@aztec/foundation/sleep';
17
+ import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
18
+ import { getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers';
19
+ import { SequencerState } from '@aztec/sequencer-client';
20
+ import { EthAddress } from '@aztec/stdlib/block';
21
+ import { getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
22
+ import { tryStop } from '@aztec/stdlib/interfaces/server';
9
23
  import { join } from 'path';
24
+ import { privateKeyToAccount } from 'viem/accounts';
10
25
  import { createAndSyncProverNode, getPrivateKeyFromIndex, setup } from '../fixtures/utils.js';
11
- // This can be lowered to as much as 2s in non-CI
12
- export const L1_BLOCK_TIME_IN_S = process.env.L1_BLOCK_TIME ? parseInt(process.env.L1_BLOCK_TIME) : 8;
13
- export const EPOCH_DURATION_IN_L2_SLOTS = 4;
14
- export const L2_SLOT_DURATION_IN_L1_SLOTS = 2;
15
26
  export const WORLD_STATE_BLOCK_HISTORY = 2;
16
27
  export const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
17
28
  export const ARCHIVER_POLL_INTERVAL = 50;
29
+ export const DEFAULT_L1_BLOCK_TIME = process.env.CI ? 12 : 8;
18
30
  /**
19
31
  * Tests building of epochs using fast block times and short epochs.
20
32
  * Spawns an aztec node and a prover node with fake proofs.
@@ -26,38 +38,62 @@ export const ARCHIVER_POLL_INTERVAL = 50;
26
38
  constants;
27
39
  logger;
28
40
  monitor;
41
+ epochCache;
29
42
  proverDelayer;
30
43
  sequencerDelayer;
31
44
  proverNodes = [];
32
45
  nodes = [];
46
+ epochDuration;
47
+ L1_BLOCK_TIME_IN_S;
48
+ L2_SLOT_DURATION_IN_S;
33
49
  static async setup(opts = {}) {
34
50
  const test = new EpochsTestContext();
35
51
  await test.setup(opts);
36
52
  return test;
37
53
  }
54
+ static getSlotDurations(opts = {}) {
55
+ const envEthereumSlotDuration = process.env.L1_BLOCK_TIME ? parseInt(process.env.L1_BLOCK_TIME) : DEFAULT_L1_BLOCK_TIME;
56
+ const ethereumSlotDuration = opts.ethereumSlotDuration ?? envEthereumSlotDuration;
57
+ const aztecSlotDuration = opts.aztecSlotDuration ?? ethereumSlotDuration * 2;
58
+ const aztecEpochDuration = opts.aztecEpochDuration ?? 6;
59
+ const aztecProofSubmissionEpochs = opts.aztecProofSubmissionEpochs ?? 1;
60
+ const l1PublishingTime = opts.l1PublishingTime ?? 1;
61
+ return {
62
+ l1PublishingTime,
63
+ ethereumSlotDuration,
64
+ aztecSlotDuration,
65
+ aztecEpochDuration,
66
+ aztecProofSubmissionEpochs
67
+ };
68
+ }
38
69
  async setup(opts = {}) {
70
+ const { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration, aztecProofSubmissionEpochs, l1PublishingTime } = EpochsTestContext.getSlotDurations(opts);
71
+ this.L1_BLOCK_TIME_IN_S = ethereumSlotDuration;
72
+ this.L2_SLOT_DURATION_IN_S = aztecSlotDuration;
39
73
  // Set up system without any account nor protocol contracts
40
74
  // and with faster block times and shorter epochs.
41
- const context = await setup(0, {
75
+ const context = await setup(opts.numberOfAccounts ?? 0, {
76
+ automineL1Setup: true,
42
77
  checkIntervalMs: 50,
43
78
  archiverPollingIntervalMS: ARCHIVER_POLL_INTERVAL,
44
79
  worldStateBlockCheckIntervalMS: WORLD_STATE_BLOCK_CHECK_INTERVAL,
45
- skipProtocolContracts: true,
46
- salt: 1,
47
- aztecEpochDuration: EPOCH_DURATION_IN_L2_SLOTS,
48
- aztecSlotDuration: L1_BLOCK_TIME_IN_S * L2_SLOT_DURATION_IN_L1_SLOTS,
49
- ethereumSlotDuration: L1_BLOCK_TIME_IN_S,
50
- aztecProofSubmissionWindow: EPOCH_DURATION_IN_L2_SLOTS * 2 - 1,
80
+ aztecEpochDuration,
81
+ aztecSlotDuration,
82
+ ethereumSlotDuration,
83
+ aztecProofSubmissionEpochs,
84
+ aztecTargetCommitteeSize: opts.initialValidators?.length ?? 0,
51
85
  minTxsPerBlock: 0,
52
86
  realProofs: false,
53
87
  startProverNode: true,
88
+ proverTestDelayMs: opts.proverTestDelayMs ?? 0,
54
89
  // We use numeric incremental prover ids for simplicity, but we can switch to
55
90
  // using the prover's eth address if the proverId is used for something in the rollup contract
56
- proverId: Fr.fromString('1'),
57
- // This must be enough so that the tx from the prover is delayed properly,
58
- // but not so much to hang the sequencer and timeout the teardown
59
- txPropagationMaxQueryAttempts: 12,
91
+ // Use numeric EthAddress for deterministic prover id
92
+ proverId: EthAddress.fromNumber(1),
60
93
  worldStateBlockHistory: WORLD_STATE_BLOCK_HISTORY,
94
+ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
95
+ slasherFlavor: 'none',
96
+ l1PublishingTime,
61
97
  ...opts
62
98
  });
63
99
  this.context = context;
@@ -68,52 +104,108 @@ export const ARCHIVER_POLL_INTERVAL = 50;
68
104
  context.aztecNode
69
105
  ] : [];
70
106
  this.logger = context.logger;
71
- this.l1Client = context.deployL1ContractsValues.publicClient;
107
+ this.l1Client = context.deployL1ContractsValues.l1Client;
72
108
  this.rollup = RollupContract.getFromConfig(context.config);
109
+ this.epochCache = await EpochCache.create(this.rollup, context.config, {
110
+ dateProvider: context.dateProvider
111
+ });
73
112
  // Loop that tracks L1 and L2 block numbers and logs whenever there's a new one.
74
- this.monitor = new ChainMonitor(this.rollup, this.logger).start();
113
+ this.monitor = new ChainMonitor(this.rollup, context.dateProvider, this.logger).start();
75
114
  // This is hideous.
76
115
  // We ought to have a definite reference to the l1TxUtils that we're using in both places, provided by the test context.
77
116
  this.proverDelayer = context.proverNode ? context.proverNode.publisher.l1TxUtils.delayer : undefined;
78
- this.sequencerDelayer = context.sequencer.sequencer.publisher.l1TxUtils.delayer;
79
- if (context.proverNode && !this.proverDelayer || !this.sequencerDelayer) {
117
+ this.sequencerDelayer = context.sequencer ? context.sequencer.sequencer.publisher.l1TxUtils.delayer : undefined;
118
+ if (context.proverNode && !this.proverDelayer || context.sequencer && !this.sequencerDelayer) {
80
119
  throw new Error(`Could not find prover or sequencer delayer`);
81
120
  }
82
121
  // Constants used for time calculation
122
+ this.epochDuration = aztecEpochDuration;
83
123
  this.constants = {
84
- epochDuration: EPOCH_DURATION_IN_L2_SLOTS,
85
- slotDuration: L1_BLOCK_TIME_IN_S * L2_SLOT_DURATION_IN_L1_SLOTS,
124
+ epochDuration: aztecEpochDuration,
125
+ slotDuration: aztecSlotDuration,
86
126
  l1StartBlock: await this.rollup.getL1StartBlock(),
87
127
  l1GenesisTime: await this.rollup.getL1GenesisTime(),
88
- ethereumSlotDuration: L1_BLOCK_TIME_IN_S
128
+ ethereumSlotDuration,
129
+ proofSubmissionEpochs: Number(await this.rollup.getProofSubmissionEpochs())
89
130
  };
90
131
  this.logger.info(`L2 genesis at L1 block ${this.constants.l1StartBlock} (timestamp ${this.constants.l1GenesisTime})`);
91
132
  }
92
133
  async teardown() {
93
- this.monitor.stop();
94
- await Promise.all(this.proverNodes.map((node)=>node.stop()));
95
- await Promise.all(this.nodes.map((node)=>node.stop()));
134
+ await this.monitor.stop();
135
+ await Promise.all(this.proverNodes.map((node)=>tryStop(node, this.logger)));
136
+ await Promise.all(this.nodes.map((node)=>tryStop(node, this.logger)));
96
137
  await this.context.teardown();
97
138
  }
98
- async createProverNode() {
139
+ async createProverNode(opts = {}) {
99
140
  this.logger.warn('Creating and syncing a simulated prover node...');
100
141
  const proverNodePrivateKey = this.getNextPrivateKey();
101
142
  const suffix = (this.proverNodes.length + 1).toString();
102
143
  const proverNode = await withLogNameSuffix(suffix, ()=>createAndSyncProverNode(proverNodePrivateKey, {
103
- ...this.context.config,
104
- proverId: Fr.fromString(suffix)
105
- }, this.context.aztecNode, join(this.context.config.dataDirectory, randomBytes(8).toString('hex'))));
144
+ ...this.context.config
145
+ }, {
146
+ dataDirectory: join(this.context.config.dataDirectory, randomBytes(8).toString('hex')),
147
+ proverId: EthAddress.fromNumber(parseInt(suffix, 10)),
148
+ dontStart: opts.dontStart,
149
+ ...opts
150
+ }, this.context.aztecNode, undefined, {
151
+ dateProvider: this.context.dateProvider
152
+ }));
106
153
  this.proverNodes.push(proverNode);
107
154
  return proverNode;
108
155
  }
109
- async createNonValidatorNode() {
156
+ createNonValidatorNode(opts = {}) {
110
157
  this.logger.warn('Creating and syncing a node without a validator...');
158
+ return this.createNode({
159
+ ...opts,
160
+ disableValidator: true
161
+ });
162
+ }
163
+ createValidatorNode(privateKeys, opts = {}) {
164
+ this.logger.warn('Creating and syncing a validator node...');
165
+ return this.createNode({
166
+ ...opts,
167
+ disableValidator: false,
168
+ validatorPrivateKeys: new SecretValue(privateKeys)
169
+ });
170
+ }
171
+ async createNode(opts = {}) {
111
172
  const suffix = (this.nodes.length + 1).toString();
173
+ const { mockGossipSubNetwork } = this.context;
174
+ const resolvedConfig = {
175
+ ...this.context.config,
176
+ ...opts
177
+ };
178
+ const p2pEnabled = resolvedConfig.p2pEnabled || mockGossipSubNetwork !== undefined;
179
+ const p2pIp = resolvedConfig.p2pIp ?? (p2pEnabled ? '127.0.0.1' : undefined);
112
180
  const node = await withLogNameSuffix(suffix, ()=>AztecNodeService.createAndSync({
113
- ...this.context.config,
114
- disableValidator: true,
115
- dataDirectory: join(this.context.config.dataDirectory, randomBytes(8).toString('hex'))
181
+ ...resolvedConfig,
182
+ dataDirectory: join(this.context.config.dataDirectory, randomBytes(8).toString('hex')),
183
+ validatorPrivateKeys: opts.validatorPrivateKeys ?? new SecretValue([]),
184
+ p2pEnabled,
185
+ p2pIp
186
+ }, {
187
+ dateProvider: this.context.dateProvider,
188
+ p2pClientDeps: {
189
+ p2pServiceFactory: mockGossipSubNetwork ? getMockPubSubP2PServiceFactory(mockGossipSubNetwork) : undefined
190
+ }
191
+ }, {
192
+ prefilledPublicData: this.context.prefilledPublicData,
193
+ ...opts
116
194
  }));
195
+ // REFACTOR: We're getting too much into the internals of the sequencer here.
196
+ // We should have a single method for constructing an aztec node that returns a TestAztecNodeService
197
+ // which directly exposes the delayer and sets any test config.
198
+ if (opts.txDelayerMaxInclusionTimeIntoSlot !== undefined) {
199
+ this.logger.info(`Setting tx delayer max inclusion time into slot to ${opts.txDelayerMaxInclusionTimeIntoSlot} seconds`);
200
+ // Here we reach into the sequencer and hook in a tx delayer. The problem is that the sequencer's l1 utils only uses a public client, not a wallet.
201
+ // The delayer needs a wallet (a client that can sign), so we have to create one here.
202
+ const l1Client = createExtendedL1Client(resolvedConfig.l1RpcUrls, resolvedConfig.publisherPrivateKeys[0].getValue());
203
+ const sequencer = node.getSequencer();
204
+ const publisher = sequencer.sequencer.publisher;
205
+ const delayed = DelayedTxUtils.fromL1TxUtils(publisher.l1TxUtils, this.L1_BLOCK_TIME_IN_S, l1Client);
206
+ delayed.delayer.setMaxInclusionTimeIntoSlot(opts.txDelayerMaxInclusionTimeIntoSlot);
207
+ publisher.l1TxUtils = delayed;
208
+ }
117
209
  this.nodes.push(node);
118
210
  return node;
119
211
  }
@@ -122,34 +214,126 @@ export const ARCHIVER_POLL_INTERVAL = 50;
122
214
  return `0x${key.toString('hex')}`;
123
215
  }
124
216
  /** Waits until the epoch begins (ie until the immediately previous L1 block is mined). */ async waitUntilEpochStarts(epoch) {
125
- const [start] = getTimestampRangeForEpoch(BigInt(epoch), this.constants);
217
+ const [start] = getTimestampRangeForEpoch(EpochNumber(epoch), this.constants);
126
218
  this.logger.info(`Waiting until L1 timestamp ${start} is reached as the start of epoch ${epoch}`);
127
- await waitUntilL1Timestamp(this.l1Client, start - BigInt(L1_BLOCK_TIME_IN_S));
219
+ await waitUntilL1Timestamp(this.l1Client, start - BigInt(this.L1_BLOCK_TIME_IN_S), undefined, 30 * this.epochDuration);
128
220
  return start;
129
221
  }
130
- /** Waits until the given L2 block number is mined. */ async waitUntilL2BlockNumber(target, timeout = 60) {
131
- await retryUntil(()=>Promise.resolve(target === this.monitor.l2BlockNumber), `Wait until L2 block ${target}`, timeout, 0.1);
222
+ /** Waits until the given checkpoint number is mined. */ async waitUntilCheckpointNumber(target, timeout = 120) {
223
+ await retryUntil(()=>Promise.resolve(target <= this.monitor.checkpointNumber), `Wait until checkpoint ${target}`, timeout, 0.1);
132
224
  }
133
- /** Waits until the given L2 block number is marked as proven. */ async waitUntilProvenL2BlockNumber(t, timeout = 60) {
134
- await retryUntil(()=>Promise.resolve(t === this.monitor.l2ProvenBlockNumber), `Wait proven L2 block ${t}`, timeout, 0.1);
225
+ /** Waits until the given checkpoint number is marked as proven. */ async waitUntilProvenCheckpointNumber(target, timeout = 120) {
226
+ await retryUntil(()=>Promise.resolve(target <= this.monitor.provenCheckpointNumber), `Wait proven checkpoint ${target}`, timeout, 0.1);
227
+ return this.monitor.provenCheckpointNumber;
228
+ }
229
+ /** Waits until the last slot of the proof submission window for a given epoch. */ async waitUntilLastSlotOfProofSubmissionWindow(epochNumber) {
230
+ const deadline = getProofSubmissionDeadlineTimestamp(EpochNumber.fromBigInt(BigInt(epochNumber)), this.constants);
231
+ const oneSlotBefore = deadline - BigInt(this.constants.slotDuration);
232
+ const date = new Date(Number(oneSlotBefore) * 1000);
233
+ this.logger.info(`Waiting until last slot of submission window for epoch ${epochNumber} at ${date}`, {
234
+ oneSlotBefore
235
+ });
236
+ await waitUntilL1Timestamp(this.l1Client, oneSlotBefore);
135
237
  }
136
238
  /** Waits for the aztec node to sync to the target block number. */ async waitForNodeToSync(blockNumber, type) {
137
239
  const waitTime = ARCHIVER_POLL_INTERVAL + WORLD_STATE_BLOCK_CHECK_INTERVAL;
138
240
  let synched = false;
139
241
  while(!synched){
140
242
  await sleep(waitTime);
141
- const syncState = await this.context.aztecNode.getWorldStateSyncStatus();
142
- if (type === 'finalised') {
143
- synched = syncState.finalisedBlockNumber >= blockNumber;
243
+ const [syncState, tips] = await Promise.all([
244
+ this.context.aztecNode.getWorldStateSyncStatus(),
245
+ await this.context.aztecNode.getL2Tips()
246
+ ]);
247
+ this.logger.info(`Wait for node synch ${blockNumber} ${type}`, {
248
+ blockNumber,
249
+ type,
250
+ syncState,
251
+ tips
252
+ });
253
+ if (type === 'proven') {
254
+ synched = tips.proven.number >= blockNumber && syncState.latestBlockNumber >= blockNumber;
255
+ } else if (type === 'finalized') {
256
+ synched = syncState.finalizedBlockNumber >= blockNumber;
144
257
  } else {
145
258
  synched = syncState.oldestHistoricBlockNumber >= blockNumber;
146
259
  }
147
260
  }
148
261
  }
262
+ /** Registers the SpamContract on the given wallet. */ async registerSpamContract(wallet, salt = Fr.ZERO) {
263
+ const instance = await getContractInstanceFromInstantiationParams(SpamContract.artifact, {
264
+ constructorArgs: [],
265
+ constructorArtifact: undefined,
266
+ salt,
267
+ publicKeys: undefined,
268
+ deployer: undefined
269
+ });
270
+ await wallet.registerContract(instance, SpamContract.artifact);
271
+ return SpamContract.at(instance.address, wallet);
272
+ }
273
+ /** Creates an L1 client using a fresh account with funds from anvil, with a tx delayer already set up. */ async createL1Client() {
274
+ const { client, delayer } = withDelayer(createExtendedL1Client([
275
+ ...this.l1Client.chain.rpcUrls.default.http
276
+ ], privateKeyToAccount(this.getNextPrivateKey()), this.l1Client.chain), this.context.dateProvider, {
277
+ ethereumSlotDuration: this.L1_BLOCK_TIME_IN_S
278
+ });
279
+ expect(await client.getBalance({
280
+ address: client.account.address
281
+ })).toBeGreaterThan(0n);
282
+ return {
283
+ client,
284
+ delayer
285
+ };
286
+ }
149
287
  /** Verifies whether the given block number is found on the aztec node. */ async verifyHistoricBlock(blockNumber, expectedSuccess) {
150
- const result = await this.context.aztecNode.findBlockNumbersForIndexes(blockNumber, MerkleTreeId.NULLIFIER_TREE, [
151
- 0n
288
+ // We use `findLeavesIndexes` here, but could use any function that queries the world-state
289
+ // at a particular block, so we know whether that historic block is available or has been
290
+ // pruned. Note that `getBlock` would not work here, since it only hits the archiver.
291
+ const result = await this.context.aztecNode.findLeavesIndexes(blockNumber, MerkleTreeId.NULLIFIER_TREE, [
292
+ Fr.ZERO
152
293
  ]).then((_)=>true).catch((_)=>false);
153
294
  expect(result).toBe(expectedSuccess);
154
295
  }
296
+ watchSequencerEvents(sequencers, getMetadata = ()=>({})) {
297
+ const stateChanges = [];
298
+ const failEvents = [];
299
+ // Note we do not include the 'block-tx-count-check-failed' event here, since it is fine if we dont build
300
+ // due to lack of txs available.
301
+ const failEventsKeys = [
302
+ 'block-build-failed',
303
+ 'checkpoint-publish-failed',
304
+ 'proposer-rollup-check-failed'
305
+ ];
306
+ const makeEvent = (i, eventName, args)=>({
307
+ ...args,
308
+ type: eventName,
309
+ sequencerIndex: i + 2,
310
+ ...getMetadata(i)
311
+ });
312
+ sequencers.forEach((sequencer, i)=>{
313
+ const sequencerIndex = i + 2;
314
+ sequencer.getSequencer().on('state-changed', (args)=>{
315
+ const noisyStates = [
316
+ SequencerState.IDLE,
317
+ SequencerState.PROPOSER_CHECK,
318
+ SequencerState.SYNCHRONIZING
319
+ ];
320
+ if (!noisyStates.includes(args.newState)) {
321
+ const evt = makeEvent(i, 'state-changed', args);
322
+ stateChanges.push(evt);
323
+ this.logger.verbose(`Sequencer ${sequencerIndex} transitioned from state ${args.oldState} to state ${args.newState}`, evt);
324
+ }
325
+ });
326
+ failEventsKeys.forEach((eventName)=>{
327
+ sequencer.getSequencer().on(eventName, (args)=>{
328
+ const evt = makeEvent(i, eventName, args);
329
+ failEvents.push(evt);
330
+ this.logger.error(`Failed event ${eventName} from sequencer ${sequencerIndex}`, undefined, evt);
331
+ });
332
+ });
333
+ });
334
+ return {
335
+ failEvents,
336
+ stateChanges
337
+ };
338
+ }
155
339
  }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJpZGdpbmdfcmFjZS5ub3Rlc3QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lMmVfZmVlcy9icmlkZ2luZ19yYWNlLm5vdGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridging_race.notest.d.ts","sourceRoot":"","sources":["../../src/e2e_fees/bridging_race.notest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,63 @@
1
+ import { SchnorrAccountContract } from '@aztec/accounts/schnorr';
2
+ import { Fr } from '@aztec/aztec.js/fields';
3
+ import { Fq } from '@aztec/foundation/curves/bn254';
4
+ import { sleep } from '@aztec/foundation/sleep';
5
+ import { jest } from '@jest/globals';
6
+ import { FeesTest } from './fees_test.js';
7
+ jest.setTimeout(300_000);
8
+ // Regression for https://github.com/AztecProtocol/aztec-packages/issues/12366
9
+ // Similar to e2e_fees/account_init but with no automine
10
+ describe('e2e_fees bridging_race', ()=>{
11
+ const ETHEREUM_SLOT_DURATION = 4;
12
+ const AZTEC_SLOT_DURATION = ETHEREUM_SLOT_DURATION * 2;
13
+ const t = new FeesTest('bridging_race', 1, {
14
+ ethereumSlotDuration: ETHEREUM_SLOT_DURATION,
15
+ aztecSlotDuration: AZTEC_SLOT_DURATION,
16
+ minTxsPerBlock: 0
17
+ });
18
+ beforeAll(async ()=>{
19
+ await t.applyInitialAccountsSnapshot();
20
+ await t.applyPublicDeployAccountsSnapshot();
21
+ await t.applySetupFeeJuiceSnapshot();
22
+ ({ wallet, logger } = await t.setup());
23
+ });
24
+ afterAll(async ()=>{
25
+ await t.teardown();
26
+ });
27
+ let logger;
28
+ let bobsAddress;
29
+ let wallet;
30
+ beforeEach(async ()=>{
31
+ const bobsSecretKey = Fr.random();
32
+ const bobsPrivateSigningKey = Fq.random();
33
+ const bobsSalt = Fr.random();
34
+ const bobsAccountManager = await wallet.createAccount({
35
+ secret: bobsSecretKey,
36
+ salt: bobsSalt,
37
+ contract: new SchnorrAccountContract(bobsPrivateSigningKey)
38
+ });
39
+ bobsAddress = bobsAccountManager.address;
40
+ });
41
+ it('Alice bridges funds to Bob', async ()=>{
42
+ // Tweak the token manager so the bridging happens immediately before the end of the current L2 slot
43
+ // This caused the message to be "not in state" when tried to be used
44
+ const l1TokenManager = t.feeJuiceBridgeTestHarness.l1TokenManager;
45
+ const origApprove = l1TokenManager.approve.bind(l1TokenManager);
46
+ l1TokenManager.approve = async (amount, address, addressName = '')=>{
47
+ await origApprove(amount, address, addressName);
48
+ const sleepTime = (Number(t.chainMonitor.checkpointTimestamp) + AZTEC_SLOT_DURATION) * 1000 - Date.now() - 500;
49
+ logger.info(`Sleeping for ${sleepTime}ms until near end of L2 slot before sending L1 fee juice to L2 inbox`);
50
+ await sleep(sleepTime);
51
+ };
52
+ // Waiting for the archiver to sync the message _before_ waiting for the mandatory 2 L2 blocks to pass fixed it
53
+ // This was added everywhere we wait for two blocks, which is spread across three different places in the codebase
54
+ // Yes, we need to REFACTOR it at some point
55
+ const claim = await t.feeJuiceBridgeTestHarness.prepareTokensOnL1(bobsAddress);
56
+ const { claimSecret: secret, messageLeafIndex: index } = claim;
57
+ await t.feeJuiceContract.methods.claim(bobsAddress, claim.claimAmount, secret, index).send({
58
+ from: bobsAddress
59
+ }).wait();
60
+ const [balance] = await t.getGasBalanceFn(bobsAddress);
61
+ expect(balance).toEqual(claim.claimAmount);
62
+ });
63
+ });
@@ -1,12 +1,21 @@
1
- import { type AccountWallet, type AztecAddress, type AztecNode, ChainMonitor, CheatCodes, type Logger, type PXE } from '@aztec/aztec.js';
2
- import { type DeployL1ContractsArgs } from '@aztec/ethereum';
1
+ import type { AztecAddress } from '@aztec/aztec.js/addresses';
2
+ import { type Logger } from '@aztec/aztec.js/log';
3
+ import type { AztecNode } from '@aztec/aztec.js/node';
4
+ import { CheatCodes } from '@aztec/aztec/testing';
5
+ import { RollupContract } from '@aztec/ethereum/contracts';
6
+ import type { DeployAztecL1ContractsArgs } from '@aztec/ethereum/deploy-aztec-l1-contracts';
7
+ import { ChainMonitor } from '@aztec/ethereum/test';
8
+ import { BlockNumber } from '@aztec/foundation/branded-types';
3
9
  import { EthAddress } from '@aztec/foundation/eth-address';
4
10
  import { AppSubscriptionContract } from '@aztec/noir-contracts.js/AppSubscription';
5
- import { CounterContract } from '@aztec/noir-contracts.js/Counter';
6
11
  import { FPCContract } from '@aztec/noir-contracts.js/FPC';
7
12
  import { FeeJuiceContract } from '@aztec/noir-contracts.js/FeeJuice';
13
+ import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
8
14
  import { TokenContract as BananaCoin } from '@aztec/noir-contracts.js/Token';
15
+ import { CounterContract } from '@aztec/noir-test-contracts.js/Counter';
9
16
  import { GasSettings } from '@aztec/stdlib/gas';
17
+ import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
18
+ import { TestWallet } from '@aztec/test-wallet/server';
10
19
  import { type SubsystemsContext } from '../fixtures/snapshot_manager.js';
11
20
  import { type BalancesFn, type SetupOptions } from '../fixtures/utils.js';
12
21
  import { type GasBridgingTestHarness } from '../shared/gas_portal_test_harness.js';
@@ -16,28 +25,30 @@ import { type GasBridgingTestHarness } from '../shared/gas_portal_test_harness.j
16
25
  * PublicDeployAccounts: Deploys the accounts publicly.
17
26
  * DeployFeeJuice: Deploys the Fee Juice contract.
18
27
  * FPCSetup: Deploys BananaCoin and FPC contracts, and bridges gas from L1.
28
+ * SponsoredFPCSetup: Deploys Sponsored FPC contract, and bridges gas from L1.
19
29
  * FundAlice: Mints private and public bananas to Alice.
20
30
  * SetupSubscription: Deploys a counter contract and a subscription contract, and mints Fee Juice to the subscription contract.
21
31
  */
22
32
  export declare class FeesTest {
23
33
  private numberOfAccounts;
24
34
  private snapshotManager;
25
- private wallets;
35
+ private accounts;
26
36
  logger: Logger;
27
- pxe: PXE;
28
37
  aztecNode: AztecNode;
38
+ aztecNodeAdmin: AztecNodeAdmin;
29
39
  cheatCodes: CheatCodes;
30
- aliceWallet: AccountWallet;
40
+ wallet: TestWallet;
31
41
  aliceAddress: AztecAddress;
32
- bobWallet: AccountWallet;
33
42
  bobAddress: AztecAddress;
34
43
  sequencerAddress: AztecAddress;
35
44
  coinbase: EthAddress;
36
45
  fpcAdmin: AztecAddress;
37
46
  gasSettings: GasSettings;
47
+ rollupContract: RollupContract;
38
48
  feeJuiceContract: FeeJuiceContract;
39
49
  bananaCoin: BananaCoin;
40
50
  bananaFPC: FPCContract;
51
+ sponsoredFPC: SponsoredFPCContract;
41
52
  counterContract: CounterContract;
42
53
  subscriptionContract: AppSubscriptionContract;
43
54
  feeJuiceBridgeTestHarness: GasBridgingTestHarness;
@@ -48,16 +59,20 @@ export declare class FeesTest {
48
59
  getGasBalanceFn: BalancesFn;
49
60
  getBananaPublicBalanceFn: BalancesFn;
50
61
  getBananaPrivateBalanceFn: BalancesFn;
51
- getProverFee: (blockNumber: number) => Promise<bigint>;
62
+ getProverFee: (blockNumber: BlockNumber) => Promise<bigint>;
52
63
  readonly ALICE_INITIAL_BANANAS: bigint;
53
64
  readonly SUBSCRIPTION_AMOUNT: bigint;
54
65
  readonly APP_SPONSORED_TX_GAS_LIMIT: bigint;
55
- constructor(testName: string, numberOfAccounts?: number, setupOptions?: Partial<SetupOptions & DeployL1ContractsArgs>);
66
+ constructor(testName: string, numberOfAccounts?: number, setupOptions?: Partial<SetupOptions & DeployAztecL1ContractsArgs>);
56
67
  setup(): Promise<this>;
57
68
  teardown(): Promise<void>;
58
69
  setIsMarkingAsProven(b: boolean): void;
59
70
  catchUpProvenChain(): Promise<void>;
60
- mintAndBridgeFeeJuice(address: AztecAddress, amount: bigint): Promise<void>;
71
+ getBlockRewards(): Promise<{
72
+ sequencerBlockRewards: bigint;
73
+ proverBlockRewards: bigint;
74
+ }>;
75
+ mintAndBridgeFeeJuice(minter: AztecAddress, recipient: AztecAddress): Promise<void>;
61
76
  /** Alice mints bananaCoin tokens privately to the target address and redeems them. */
62
77
  mintPrivateBananas(amount: bigint, address: AztecAddress): Promise<void>;
63
78
  applyBaseSnapshots(): Promise<void>;
@@ -66,8 +81,8 @@ export declare class FeesTest {
66
81
  applySetupFeeJuiceSnapshot(): Promise<void>;
67
82
  applyDeployBananaTokenSnapshot(): Promise<void>;
68
83
  applyFPCSetupSnapshot(): Promise<void>;
84
+ applySponsoredFPCSetupSnapshot(): Promise<void>;
69
85
  applyFundAliceWithBananas(): Promise<void>;
70
86
  applyFundAliceWithPrivateBananas(): Promise<void>;
71
- applySetupSubscription(): Promise<void>;
72
87
  }
73
- //# sourceMappingURL=fees_test.d.ts.map
88
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlc190ZXN0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZTJlX2ZlZXMvZmVlc190ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQzlELE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBZ0IsTUFBTSxxQkFBcUIsQ0FBQztBQUNoRSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUN0RCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFFbEQsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQzNELE9BQU8sS0FBSyxFQUFFLDBCQUEwQixFQUFFLE1BQU0sMkNBQTJDLENBQUM7QUFDNUYsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3BELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUM5RCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFHM0QsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sMENBQTBDLENBQUM7QUFDbkYsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLDhCQU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