@aztec/end-to-end 0.0.0-test.1 → 0.0.1-commit.24de95ac
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.
- package/dest/bench/client_flows/benchmark.d.ts +61 -0
- package/dest/bench/client_flows/benchmark.d.ts.map +1 -0
- package/dest/bench/client_flows/benchmark.js +261 -0
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +73 -0
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -0
- package/dest/bench/client_flows/client_flows_benchmark.js +311 -0
- package/dest/bench/client_flows/config.d.ts +14 -0
- package/dest/bench/client_flows/config.d.ts.map +1 -0
- package/dest/bench/client_flows/config.js +106 -0
- package/dest/bench/client_flows/data_extractor.d.ts +2 -0
- package/dest/bench/client_flows/data_extractor.d.ts.map +1 -0
- package/dest/bench/client_flows/data_extractor.js +99 -0
- package/dest/bench/utils.d.ts +10 -36
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +26 -66
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +20 -12
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +85 -57
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +18 -24
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +48 -69
- package/dest/e2e_deploy_contract/deploy_test.d.ts +14 -6
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_deploy_contract/deploy_test.js +13 -19
- package/dest/e2e_epochs/epochs_test.d.ts +58 -17
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +224 -43
- package/dest/e2e_fees/bridging_race.notest.d.ts +2 -0
- package/dest/e2e_fees/bridging_race.notest.d.ts.map +1 -0
- package/dest/e2e_fees/bridging_race.notest.js +63 -0
- package/dest/e2e_fees/fees_test.d.ts +20 -9
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +98 -107
- package/dest/e2e_l1_publisher/write_json.d.ts +10 -0
- package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -0
- package/dest/e2e_l1_publisher/write_json.js +57 -0
- package/dest/e2e_multi_validator/utils.d.ts +12 -0
- package/dest/e2e_multi_validator/utils.d.ts.map +1 -0
- package/dest/e2e_multi_validator/utils.js +214 -0
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +9 -6
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +22 -19
- package/dest/e2e_p2p/inactivity_slash_test.d.ts +31 -0
- package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -0
- package/dest/e2e_p2p/inactivity_slash_test.js +135 -0
- package/dest/e2e_p2p/p2p_network.d.ts +69 -22
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +180 -129
- package/dest/e2e_p2p/shared.d.ts +41 -5
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +163 -19
- package/dest/e2e_token_contract/token_contract_test.d.ts +11 -5
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +50 -26
- package/dest/{e2e_prover → fixtures}/e2e_prover_test.d.ts +14 -9
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -0
- package/dest/{e2e_prover → fixtures}/e2e_prover_test.js +95 -100
- package/dest/fixtures/fixtures.d.ts +5 -6
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +4 -3
- package/dest/fixtures/get_acvm_config.d.ts +1 -1
- package/dest/fixtures/get_acvm_config.d.ts.map +1 -1
- package/dest/fixtures/get_acvm_config.js +2 -14
- package/dest/fixtures/get_bb_config.d.ts +1 -1
- package/dest/fixtures/get_bb_config.d.ts.map +1 -1
- package/dest/fixtures/get_bb_config.js +10 -17
- package/dest/fixtures/l1_to_l2_messaging.d.ts +8 -5
- package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
- package/dest/fixtures/l1_to_l2_messaging.js +44 -18
- package/dest/fixtures/setup_l1_contracts.d.ts +3 -3
- package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
- package/dest/fixtures/setup_l1_contracts.js +4 -4
- package/dest/fixtures/setup_p2p_test.d.ts +14 -13
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +73 -21
- package/dest/fixtures/snapshot_manager.d.ts +15 -7
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +147 -121
- package/dest/fixtures/token_utils.d.ts +6 -3
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +23 -10
- package/dest/fixtures/utils.d.ts +76 -37
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +464 -368
- package/dest/fixtures/web3signer.d.ts +5 -0
- package/dest/fixtures/web3signer.d.ts.map +1 -0
- package/dest/fixtures/web3signer.js +53 -0
- package/dest/quality_of_service/alert_checker.d.ts +1 -1
- package/dest/quality_of_service/alert_checker.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.d.ts +41 -25
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +104 -50
- package/dest/shared/gas_portal_test_harness.d.ts +32 -24
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +50 -29
- package/dest/shared/jest_setup.js +1 -1
- package/dest/shared/submit-transactions.d.ts +5 -3
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/submit-transactions.js +8 -7
- package/dest/shared/uniswap_l1_l2.d.ts +13 -11
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +138 -108
- package/dest/simulators/lending_simulator.d.ts +6 -6
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +13 -16
- package/dest/simulators/token_simulator.d.ts +5 -2
- package/dest/simulators/token_simulator.d.ts.map +1 -1
- package/dest/simulators/token_simulator.js +16 -13
- package/dest/spartan/setup_test_wallets.d.ts +23 -10
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +167 -58
- package/dest/spartan/utils.d.ts +106 -303
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +434 -130
- package/package.json +61 -56
- package/src/bench/client_flows/benchmark.ts +341 -0
- package/src/bench/client_flows/client_flows_benchmark.ts +402 -0
- package/src/bench/client_flows/config.ts +61 -0
- package/src/bench/client_flows/data_extractor.ts +111 -0
- package/src/bench/utils.ts +22 -76
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +80 -77
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +63 -105
- package/src/e2e_deploy_contract/deploy_test.ts +23 -38
- package/src/e2e_epochs/epochs_test.ts +274 -54
- package/src/e2e_fees/bridging_race.notest.ts +80 -0
- package/src/e2e_fees/fees_test.ts +137 -136
- package/src/e2e_l1_publisher/write_json.ts +76 -0
- package/src/e2e_multi_validator/utils.ts +258 -0
- package/src/e2e_nested_contract/nested_contract_test.ts +27 -18
- package/src/e2e_p2p/inactivity_slash_test.ts +178 -0
- package/src/e2e_p2p/p2p_network.ts +272 -166
- package/src/e2e_p2p/shared.ts +244 -29
- package/src/e2e_token_contract/token_contract_test.ts +43 -39
- package/src/fixtures/dumps/epoch_proof_result.json +1 -1
- package/src/{e2e_prover → fixtures}/e2e_prover_test.ts +101 -145
- package/src/fixtures/fixtures.ts +4 -3
- package/src/fixtures/get_acvm_config.ts +3 -11
- package/src/fixtures/get_bb_config.ts +18 -13
- package/src/fixtures/l1_to_l2_messaging.ts +53 -23
- package/src/fixtures/setup_l1_contracts.ts +6 -7
- package/src/fixtures/setup_p2p_test.ts +112 -38
- package/src/fixtures/snapshot_manager.ts +187 -139
- package/src/fixtures/token_utils.ts +29 -12
- package/src/fixtures/utils.ts +552 -425
- package/src/fixtures/web3signer.ts +63 -0
- package/src/guides/up_quick_start.sh +6 -14
- package/src/quality_of_service/alert_checker.ts +1 -1
- package/src/shared/cross_chain_test_harness.ts +108 -79
- package/src/shared/gas_portal_test_harness.ts +58 -49
- package/src/shared/jest_setup.ts +1 -1
- package/src/shared/submit-transactions.ts +12 -8
- package/src/shared/uniswap_l1_l2.ts +173 -176
- package/src/simulators/lending_simulator.ts +12 -15
- package/src/simulators/token_simulator.ts +21 -13
- package/src/spartan/DEVELOP.md +121 -0
- package/src/spartan/setup_test_wallets.ts +215 -93
- package/src/spartan/utils.ts +490 -130
- package/dest/e2e_prover/e2e_prover_test.d.ts.map +0 -1
- package/dest/sample-dapp/connect.js +0 -12
- package/dest/sample-dapp/contracts.js +0 -10
- package/dest/sample-dapp/deploy.js +0 -35
- package/dest/sample-dapp/index.js +0 -98
- package/src/sample-dapp/connect.mjs +0 -16
- package/src/sample-dapp/contracts.mjs +0 -14
- package/src/sample-dapp/deploy.mjs +0 -40
- package/src/sample-dapp/index.mjs +0 -128
|
@@ -1,51 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SchnorrAccountContractArtifact,
|
|
3
|
-
getSchnorrAccount,
|
|
4
|
-
getSchnorrWalletWithSecretKey,
|
|
5
|
-
} from '@aztec/accounts/schnorr';
|
|
6
1
|
import type { InitialAccountData } from '@aztec/accounts/testing';
|
|
7
2
|
import { type Archiver, createArchiver } from '@aztec/archiver';
|
|
3
|
+
import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
|
|
4
|
+
import { type Logger, createLogger } from '@aztec/aztec.js/log';
|
|
5
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
6
|
+
import { CheatCodes } from '@aztec/aztec/testing';
|
|
8
7
|
import {
|
|
9
|
-
|
|
10
|
-
type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
EthAddress,
|
|
15
|
-
type Logger,
|
|
16
|
-
type PXE,
|
|
17
|
-
createLogger,
|
|
18
|
-
deployL1Contract,
|
|
19
|
-
} from '@aztec/aztec.js';
|
|
20
|
-
import { BBCircuitVerifier, type ClientProtocolCircuitVerifier, TestCircuitVerifier } from '@aztec/bb-prover';
|
|
8
|
+
BBCircuitVerifier,
|
|
9
|
+
type ClientProtocolCircuitVerifier,
|
|
10
|
+
QueuedIVCVerifier,
|
|
11
|
+
TestCircuitVerifier,
|
|
12
|
+
} from '@aztec/bb-prover';
|
|
21
13
|
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
22
14
|
import type { BlobSinkServer } from '@aztec/blob-sink/server';
|
|
15
|
+
import type { DeployL1ContractsReturnType } from '@aztec/ethereum';
|
|
23
16
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
24
|
-
import {
|
|
17
|
+
import { SecretValue } from '@aztec/foundation/config';
|
|
18
|
+
import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts';
|
|
25
19
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
26
20
|
import { type ProverNode, type ProverNodeConfig, createProverNode } from '@aztec/prover-node';
|
|
27
|
-
import type {
|
|
21
|
+
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
22
|
+
import { TestWallet } from '@aztec/test-wallet/server';
|
|
28
23
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
29
24
|
|
|
30
25
|
import { type Hex, getContract } from 'viem';
|
|
31
26
|
import { privateKeyToAddress } from 'viem/accounts';
|
|
32
27
|
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
28
|
+
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
29
|
+
import { getACVMConfig } from './get_acvm_config.js';
|
|
30
|
+
import { getBBConfig } from './get_bb_config.js';
|
|
35
31
|
import {
|
|
36
32
|
type ISnapshotManager,
|
|
37
33
|
type SubsystemsContext,
|
|
38
34
|
createSnapshotManager,
|
|
39
35
|
deployAccounts,
|
|
40
36
|
publicDeployAccounts,
|
|
41
|
-
} from '
|
|
42
|
-
import { getPrivateKeyFromIndex,
|
|
43
|
-
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
37
|
+
} from './snapshot_manager.js';
|
|
38
|
+
import { getPrivateKeyFromIndex, getSponsoredFPCAddress, setupPXEAndGetWallet } from './utils.js';
|
|
44
39
|
|
|
45
40
|
const { E2E_DATA_PATH: dataPath } = process.env;
|
|
46
41
|
|
|
47
42
|
type ProvenSetup = {
|
|
48
|
-
|
|
43
|
+
wallet: TestWallet;
|
|
49
44
|
teardown: () => Promise<void>;
|
|
50
45
|
};
|
|
51
46
|
|
|
@@ -62,20 +57,21 @@ export class FullProverTest {
|
|
|
62
57
|
static TOKEN_DECIMALS = 18n;
|
|
63
58
|
private snapshotManager: ISnapshotManager;
|
|
64
59
|
logger: Logger;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
accounts:
|
|
60
|
+
wallet!: TestWallet;
|
|
61
|
+
provenWallet!: TestWallet;
|
|
62
|
+
accounts: AztecAddress[] = [];
|
|
63
|
+
deployedAccounts!: InitialAccountData[];
|
|
68
64
|
fakeProofsAsset!: TokenContract;
|
|
69
65
|
tokenSim!: TokenSimulator;
|
|
70
66
|
aztecNode!: AztecNode;
|
|
71
|
-
|
|
67
|
+
aztecNodeAdmin!: AztecNodeAdmin;
|
|
72
68
|
cheatCodes!: CheatCodes;
|
|
73
69
|
blobSink!: BlobSinkServer;
|
|
74
70
|
private provenComponents: ProvenSetup[] = [];
|
|
75
71
|
private bbConfigCleanup?: () => Promise<void>;
|
|
76
72
|
private acvmConfigCleanup?: () => Promise<void>;
|
|
77
73
|
circuitProofVerifier?: ClientProtocolCircuitVerifier;
|
|
78
|
-
|
|
74
|
+
provenAsset!: TokenContract;
|
|
79
75
|
private context!: SubsystemsContext;
|
|
80
76
|
private proverNode!: ProverNode;
|
|
81
77
|
private simulatedProverNode!: ProverNode;
|
|
@@ -93,7 +89,9 @@ export class FullProverTest {
|
|
|
93
89
|
`full_prover_integration/${testName}`,
|
|
94
90
|
dataPath,
|
|
95
91
|
{ startProverNode: true, fundRewardDistributor: true, coinbase },
|
|
96
|
-
{
|
|
92
|
+
{
|
|
93
|
+
realVerifier: realProofs,
|
|
94
|
+
},
|
|
97
95
|
);
|
|
98
96
|
}
|
|
99
97
|
|
|
@@ -106,13 +104,11 @@ export class FullProverTest {
|
|
|
106
104
|
await this.snapshotManager.snapshot(
|
|
107
105
|
'2_accounts',
|
|
108
106
|
deployAccounts(2, this.logger),
|
|
109
|
-
|
|
107
|
+
({ deployedAccounts }, { wallet }) => {
|
|
110
108
|
this.deployedAccounts = deployedAccounts;
|
|
111
|
-
this.
|
|
112
|
-
|
|
113
|
-
);
|
|
114
|
-
this.accounts = this.wallets.map(w => w.getCompleteAddress());
|
|
115
|
-
this.wallets.forEach((w, i) => this.logger.verbose(`Wallet ${i} address: ${w.getAddress()}`));
|
|
109
|
+
this.accounts = deployedAccounts.map(a => a.address);
|
|
110
|
+
this.wallet = wallet;
|
|
111
|
+
return Promise.resolve();
|
|
116
112
|
},
|
|
117
113
|
);
|
|
118
114
|
|
|
@@ -122,17 +118,17 @@ export class FullProverTest {
|
|
|
122
118
|
// Create the token contract state.
|
|
123
119
|
// Move this account thing to addAccounts above?
|
|
124
120
|
this.logger.verbose(`Public deploy accounts...`);
|
|
125
|
-
await publicDeployAccounts(this.
|
|
121
|
+
await publicDeployAccounts(this.wallet, this.accounts.slice(0, 2));
|
|
126
122
|
|
|
127
123
|
this.logger.verbose(`Deploying TokenContract...`);
|
|
128
124
|
const asset = await TokenContract.deploy(
|
|
129
|
-
this.
|
|
125
|
+
this.wallet,
|
|
130
126
|
this.accounts[0],
|
|
131
127
|
FullProverTest.TOKEN_NAME,
|
|
132
128
|
FullProverTest.TOKEN_SYMBOL,
|
|
133
129
|
FullProverTest.TOKEN_DECIMALS,
|
|
134
130
|
)
|
|
135
|
-
.send()
|
|
131
|
+
.send({ from: this.accounts[0] })
|
|
136
132
|
.deployed();
|
|
137
133
|
this.logger.verbose(`Token deployed to ${asset.address}`);
|
|
138
134
|
|
|
@@ -140,17 +136,20 @@ export class FullProverTest {
|
|
|
140
136
|
},
|
|
141
137
|
async ({ tokenContractAddress }) => {
|
|
142
138
|
// Restore the token contract state.
|
|
143
|
-
this.fakeProofsAsset = await TokenContract.at(tokenContractAddress, this.
|
|
139
|
+
this.fakeProofsAsset = await TokenContract.at(tokenContractAddress, this.wallet);
|
|
144
140
|
this.logger.verbose(`Token contract address: ${this.fakeProofsAsset.address}`);
|
|
145
141
|
|
|
146
142
|
this.tokenSim = new TokenSimulator(
|
|
147
143
|
this.fakeProofsAsset,
|
|
148
|
-
this.
|
|
144
|
+
this.wallet,
|
|
145
|
+
this.accounts[0],
|
|
149
146
|
this.logger,
|
|
150
|
-
this.accounts
|
|
147
|
+
this.accounts,
|
|
151
148
|
);
|
|
152
149
|
|
|
153
|
-
expect(await this.fakeProofsAsset.methods.get_admin().simulate(
|
|
150
|
+
expect(await this.fakeProofsAsset.methods.get_admin().simulate({ from: this.accounts[0] })).toBe(
|
|
151
|
+
this.accounts[0].toBigInt(),
|
|
152
|
+
);
|
|
154
153
|
},
|
|
155
154
|
);
|
|
156
155
|
}
|
|
@@ -163,12 +162,12 @@ export class FullProverTest {
|
|
|
163
162
|
|
|
164
163
|
this.simulatedProverNode = this.context.proverNode!;
|
|
165
164
|
({
|
|
166
|
-
pxe: this.pxe,
|
|
167
165
|
aztecNode: this.aztecNode,
|
|
168
166
|
deployL1ContractsValues: this.l1Contracts,
|
|
169
167
|
cheatCodes: this.cheatCodes,
|
|
170
168
|
blobSink: this.blobSink,
|
|
171
169
|
} = this.context);
|
|
170
|
+
this.aztecNodeAdmin = this.context.aztecNode;
|
|
172
171
|
|
|
173
172
|
const blobSinkClient = createBlobSinkClient({ blobSinkUrl: `http://localhost:${this.blobSink.port}` });
|
|
174
173
|
|
|
@@ -188,17 +187,18 @@ export class FullProverTest {
|
|
|
188
187
|
throw new Error(`Test must be run with BB native configuration`);
|
|
189
188
|
}
|
|
190
189
|
|
|
191
|
-
|
|
190
|
+
const verifier = await BBCircuitVerifier.new(bbConfig);
|
|
191
|
+
this.circuitProofVerifier = new QueuedIVCVerifier(bbConfig, verifier);
|
|
192
192
|
|
|
193
193
|
this.logger.debug(`Configuring the node for real proofs...`);
|
|
194
|
-
await this.
|
|
194
|
+
await this.aztecNodeAdmin.setConfig({
|
|
195
195
|
realProofs: true,
|
|
196
196
|
minTxsPerBlock: this.minNumberOfTxsPerBlock,
|
|
197
197
|
});
|
|
198
198
|
} else {
|
|
199
199
|
this.logger.debug(`Configuring the node min txs per block ${this.minNumberOfTxsPerBlock}...`);
|
|
200
200
|
this.circuitProofVerifier = new TestCircuitVerifier();
|
|
201
|
-
await this.
|
|
201
|
+
await this.aztecNodeAdmin.setConfig({
|
|
202
202
|
minTxsPerBlock: this.minNumberOfTxsPerBlock,
|
|
203
203
|
});
|
|
204
204
|
}
|
|
@@ -210,51 +210,31 @@ export class FullProverTest {
|
|
|
210
210
|
await this.context.cheatCodes.rollup.markAsProven();
|
|
211
211
|
|
|
212
212
|
this.logger.verbose(`Main setup completed, initializing full prover PXE, Node, and Prover Node`);
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
await result.pxe.registerContract(this.fakeProofsAsset);
|
|
226
|
-
|
|
227
|
-
for (let i = 0; i < 2; i++) {
|
|
228
|
-
await result.pxe.registerAccount(
|
|
229
|
-
this.deployedAccounts[i].secret,
|
|
230
|
-
this.wallets[i].getCompleteAddress().partialAddress,
|
|
231
|
-
);
|
|
232
|
-
await this.pxe.registerAccount(
|
|
233
|
-
this.deployedAccounts[i].secret,
|
|
234
|
-
this.wallets[i].getCompleteAddress().partialAddress,
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
const account = await getSchnorrAccount(
|
|
239
|
-
result.pxe,
|
|
240
|
-
this.deployedAccounts[0].secret,
|
|
241
|
-
this.deployedAccounts[0].signingKey,
|
|
242
|
-
this.deployedAccounts[0].salt,
|
|
243
|
-
);
|
|
244
|
-
|
|
245
|
-
await result.pxe.registerContract({
|
|
246
|
-
instance: account.getInstance(),
|
|
247
|
-
artifact: SchnorrAccountContractArtifact,
|
|
248
|
-
});
|
|
213
|
+
const { wallet: provenWallet, teardown: provenTeardown } = await setupPXEAndGetWallet(
|
|
214
|
+
this.aztecNode,
|
|
215
|
+
{
|
|
216
|
+
proverEnabled: this.realProofs,
|
|
217
|
+
bbBinaryPath: bbConfig?.bbBinaryPath,
|
|
218
|
+
bbWorkingDirectory: bbConfig?.bbWorkingDirectory,
|
|
219
|
+
},
|
|
220
|
+
undefined,
|
|
221
|
+
true,
|
|
222
|
+
);
|
|
223
|
+
this.logger.debug(`Contract address ${this.fakeProofsAsset.address}`);
|
|
224
|
+
await provenWallet.registerContract(this.fakeProofsAsset);
|
|
249
225
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
this.
|
|
253
|
-
pxe: result.pxe,
|
|
254
|
-
teardown: result.teardown,
|
|
255
|
-
});
|
|
256
|
-
this.provenAssets.push(asset);
|
|
226
|
+
for (let i = 0; i < 2; i++) {
|
|
227
|
+
await provenWallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
228
|
+
await this.wallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
257
229
|
}
|
|
230
|
+
|
|
231
|
+
const asset = await TokenContract.at(this.fakeProofsAsset.address, provenWallet);
|
|
232
|
+
this.provenComponents.push({
|
|
233
|
+
wallet: provenWallet,
|
|
234
|
+
teardown: provenTeardown,
|
|
235
|
+
});
|
|
236
|
+
this.provenAsset = asset;
|
|
237
|
+
this.provenWallet = provenWallet;
|
|
258
238
|
this.logger.info(`Full prover PXE started`);
|
|
259
239
|
|
|
260
240
|
// Shutdown the current, simulated prover node
|
|
@@ -265,7 +245,7 @@ export class FullProverTest {
|
|
|
265
245
|
this.logger.verbose('Starting archiver for new prover node');
|
|
266
246
|
const archiver = await createArchiver(
|
|
267
247
|
{ ...this.context.aztecNodeConfig, dataDirectory: undefined },
|
|
268
|
-
blobSinkClient,
|
|
248
|
+
{ blobSinkClient },
|
|
269
249
|
{ blockUntilSync: true },
|
|
270
250
|
);
|
|
271
251
|
|
|
@@ -275,25 +255,31 @@ export class FullProverTest {
|
|
|
275
255
|
this.proverAddress = EthAddress.fromString(proverNodeSenderAddress);
|
|
276
256
|
|
|
277
257
|
this.logger.verbose(`Funding prover node at ${proverNodeSenderAddress}`);
|
|
278
|
-
await this.
|
|
258
|
+
await this.mintFeeJuice(proverNodeSenderAddress);
|
|
279
259
|
|
|
280
260
|
this.logger.verbose('Starting prover node');
|
|
281
261
|
const proverConfig: ProverNodeConfig = {
|
|
282
262
|
...this.context.aztecNodeConfig,
|
|
283
|
-
|
|
263
|
+
txCollectionNodeRpcUrls: [],
|
|
284
264
|
dataDirectory: undefined,
|
|
285
|
-
proverId: this.proverAddress
|
|
265
|
+
proverId: this.proverAddress,
|
|
286
266
|
realProofs: this.realProofs,
|
|
287
267
|
proverAgentCount: 2,
|
|
288
|
-
|
|
268
|
+
publisherPrivateKeys: [new SecretValue(`0x${proverNodePrivateKey!.toString('hex')}` as const)],
|
|
289
269
|
proverNodeMaxPendingJobs: 100,
|
|
290
270
|
proverNodeMaxParallelBlocksPerEpoch: 32,
|
|
291
271
|
proverNodePollingIntervalMs: 100,
|
|
292
|
-
txGatheringTimeoutMs: 60000,
|
|
293
272
|
txGatheringIntervalMs: 1000,
|
|
294
|
-
|
|
273
|
+
txGatheringBatchSize: 10,
|
|
274
|
+
txGatheringMaxParallelRequestsPerNode: 100,
|
|
275
|
+
txGatheringTimeoutMs: 24_000,
|
|
276
|
+
proverNodeFailedEpochStore: undefined,
|
|
277
|
+
proverNodeEpochProvingDelayMs: undefined,
|
|
295
278
|
};
|
|
296
|
-
const
|
|
279
|
+
const sponsoredFPCAddress = await getSponsoredFPCAddress();
|
|
280
|
+
const { prefilledPublicData } = await getGenesisValues(
|
|
281
|
+
this.context.initialFundedAccounts.map(a => a.address).concat(sponsoredFPCAddress),
|
|
282
|
+
);
|
|
297
283
|
this.proverNode = await createProverNode(
|
|
298
284
|
proverConfig,
|
|
299
285
|
{
|
|
@@ -303,18 +289,19 @@ export class FullProverTest {
|
|
|
303
289
|
},
|
|
304
290
|
{ prefilledPublicData },
|
|
305
291
|
);
|
|
306
|
-
this.proverNode.start();
|
|
292
|
+
await this.proverNode.start();
|
|
307
293
|
|
|
308
294
|
this.logger.warn(`Proofs are now enabled`);
|
|
309
295
|
return this;
|
|
310
296
|
}
|
|
311
297
|
|
|
312
|
-
private async
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
const
|
|
316
|
-
const
|
|
317
|
-
await
|
|
298
|
+
private async mintFeeJuice(recipient: Hex) {
|
|
299
|
+
const handlerAddress = this.context.deployL1ContractsValues.l1ContractAddresses.feeAssetHandlerAddress!;
|
|
300
|
+
this.logger.verbose(`Minting fee juice to ${recipient} using handler at ${handlerAddress}`);
|
|
301
|
+
const client = this.context.deployL1ContractsValues.l1Client;
|
|
302
|
+
const handler = getContract({ abi: FeeAssetHandlerAbi, address: handlerAddress.toString(), client });
|
|
303
|
+
const hash = await handler.write.mint([recipient]);
|
|
304
|
+
await this.context.deployL1ContractsValues.l1Client.waitForTransactionReceipt({ hash });
|
|
318
305
|
}
|
|
319
306
|
|
|
320
307
|
snapshot = <T>(
|
|
@@ -346,16 +333,14 @@ export class FullProverTest {
|
|
|
346
333
|
const privateAmount = 10000n;
|
|
347
334
|
const publicAmount = 10000n;
|
|
348
335
|
|
|
349
|
-
const waitOpts = { proven: false };
|
|
350
|
-
|
|
351
336
|
this.logger.verbose(`Minting ${privateAmount + publicAmount} publicly...`);
|
|
352
337
|
await asset.methods
|
|
353
|
-
.mint_to_public(accounts[0]
|
|
354
|
-
.send()
|
|
355
|
-
.wait(
|
|
338
|
+
.mint_to_public(accounts[0], privateAmount + publicAmount)
|
|
339
|
+
.send({ from: accounts[0] })
|
|
340
|
+
.wait();
|
|
356
341
|
|
|
357
342
|
this.logger.verbose(`Transferring ${privateAmount} to private...`);
|
|
358
|
-
await asset.methods.transfer_to_private(accounts[0]
|
|
343
|
+
await asset.methods.transfer_to_private(accounts[0], privateAmount).send({ from: accounts[0] }).wait();
|
|
359
344
|
|
|
360
345
|
this.logger.verbose(`Minting complete.`);
|
|
361
346
|
|
|
@@ -364,21 +349,21 @@ export class FullProverTest {
|
|
|
364
349
|
async ({ amount }) => {
|
|
365
350
|
const {
|
|
366
351
|
fakeProofsAsset: asset,
|
|
367
|
-
accounts: [
|
|
352
|
+
accounts: [address],
|
|
368
353
|
tokenSim,
|
|
369
354
|
} = this;
|
|
370
355
|
tokenSim.mintPublic(address, amount);
|
|
371
356
|
|
|
372
|
-
const publicBalance = await asset.methods.balance_of_public(address).simulate();
|
|
357
|
+
const publicBalance = await asset.methods.balance_of_public(address).simulate({ from: address });
|
|
373
358
|
this.logger.verbose(`Public balance of wallet 0: ${publicBalance}`);
|
|
374
359
|
expect(publicBalance).toEqual(this.tokenSim.balanceOfPublic(address));
|
|
375
360
|
|
|
376
361
|
tokenSim.mintPrivate(address, amount);
|
|
377
|
-
const privateBalance = await asset.methods.balance_of_private(address).simulate();
|
|
362
|
+
const privateBalance = await asset.methods.balance_of_private(address).simulate({ from: address });
|
|
378
363
|
this.logger.verbose(`Private balance of wallet 0: ${privateBalance}`);
|
|
379
364
|
expect(privateBalance).toEqual(tokenSim.balanceOfPrivate(address));
|
|
380
365
|
|
|
381
|
-
const totalSupply = await asset.methods.total_supply().simulate();
|
|
366
|
+
const totalSupply = await asset.methods.total_supply().simulate({ from: address });
|
|
382
367
|
this.logger.verbose(`Total supply: ${totalSupply}`);
|
|
383
368
|
expect(totalSupply).toEqual(tokenSim.totalSupply);
|
|
384
369
|
|
|
@@ -386,33 +371,4 @@ export class FullProverTest {
|
|
|
386
371
|
},
|
|
387
372
|
);
|
|
388
373
|
}
|
|
389
|
-
|
|
390
|
-
async deployVerifier() {
|
|
391
|
-
if (!this.realProofs) {
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
if (!this.circuitProofVerifier) {
|
|
396
|
-
throw new Error('No verifier');
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
const { walletClient, publicClient, l1ContractAddresses } = this.context.deployL1ContractsValues;
|
|
400
|
-
const rollup = getContract({
|
|
401
|
-
abi: RollupAbi,
|
|
402
|
-
address: l1ContractAddresses.rollupAddress.toString(),
|
|
403
|
-
client: walletClient,
|
|
404
|
-
});
|
|
405
|
-
|
|
406
|
-
const { address: verifierAddress } = await deployL1Contract(
|
|
407
|
-
walletClient,
|
|
408
|
-
publicClient,
|
|
409
|
-
HonkVerifierAbi,
|
|
410
|
-
HonkVerifierBytecode,
|
|
411
|
-
);
|
|
412
|
-
this.logger.info(`Deployed honk verifier at ${verifierAddress}`);
|
|
413
|
-
|
|
414
|
-
await rollup.write.setEpochVerifier([verifierAddress.toString()]);
|
|
415
|
-
|
|
416
|
-
this.logger.info('Rollup only accepts valid proofs now');
|
|
417
|
-
}
|
|
418
374
|
}
|
package/src/fixtures/fixtures.ts
CHANGED
|
@@ -8,17 +8,18 @@ export const shouldCollectMetrics = () => {
|
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export const TEST_PEER_CHECK_INTERVAL_MS = 1000;
|
|
11
|
+
export const TEST_MAX_TX_POOL_SIZE = 2 * 1024 * 1024 * 1024; // 2GB
|
|
11
12
|
|
|
12
13
|
export const MNEMONIC = 'test test test test test test test test test test test junk';
|
|
13
14
|
export const privateKey = Buffer.from('ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80', 'hex');
|
|
14
15
|
export const privateKey2 = Buffer.from('59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d', 'hex');
|
|
15
16
|
|
|
16
17
|
/// Common errors
|
|
17
|
-
export const U128_UNDERFLOW_ERROR =
|
|
18
|
-
export const U128_OVERFLOW_ERROR =
|
|
18
|
+
export const U128_UNDERFLOW_ERROR = 'Assertion failed: attempt to subtract with overflow';
|
|
19
|
+
export const U128_OVERFLOW_ERROR = 'Assertion failed: attempt to add with overflow';
|
|
19
20
|
export const BITSIZE_TOO_BIG_ERROR = "Assertion failed: call to assert_max_bit_size 'self.__assert_max_bit_size'";
|
|
20
21
|
// TODO(https://github.com/AztecProtocol/aztec-packages/issues/5818): Make these a fixed error after transition.
|
|
21
|
-
export const DUPLICATE_NULLIFIER_ERROR = /dropped|
|
|
22
|
+
export const DUPLICATE_NULLIFIER_ERROR = /dropped|nullifier|reverted/i;
|
|
22
23
|
export const NO_L1_TO_L2_MSG_ERROR =
|
|
23
24
|
/No non-nullified L1 to L2 message found for message hash|Tried to consume nonexistent L1-to-L2 message/;
|
|
24
25
|
export const STATIC_CALL_STATE_MODIFICATION_ERROR =
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { Logger } from '@aztec/aztec.js';
|
|
1
|
+
import type { Logger } from '@aztec/aztec.js/log';
|
|
2
2
|
import { parseBooleanEnv } from '@aztec/foundation/config';
|
|
3
3
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
4
|
+
import { tryRmDir } from '@aztec/foundation/fs';
|
|
4
5
|
|
|
5
6
|
import { promises as fs } from 'fs';
|
|
6
7
|
|
|
@@ -36,16 +37,7 @@ export async function getACVMConfig(logger: Logger): Promise<
|
|
|
36
37
|
|
|
37
38
|
const directoryToCleanup = ACVM_WORKING_DIRECTORY ? undefined : tempWorkingDirectory;
|
|
38
39
|
|
|
39
|
-
const cleanup =
|
|
40
|
-
if (directoryToCleanup) {
|
|
41
|
-
try {
|
|
42
|
-
logger.info(`Cleaning up ACVM temp directory ${directoryToCleanup}`);
|
|
43
|
-
await fs.rm(directoryToCleanup, { recursive: true, force: true, maxRetries: 3 });
|
|
44
|
-
} catch (err) {
|
|
45
|
-
logger.warn(`Failed to delete ACVM temp directory at ${directoryToCleanup}: ${err}`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
40
|
+
const cleanup = () => tryRmDir(directoryToCleanup, logger);
|
|
49
41
|
|
|
50
42
|
return {
|
|
51
43
|
acvmWorkingDirectory,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Logger } from '@aztec/aztec.js/log';
|
|
2
2
|
import type { BBConfig } from '@aztec/bb-prover';
|
|
3
|
+
import { tryRmDir } from '@aztec/foundation/fs';
|
|
3
4
|
|
|
4
5
|
import fs from 'node:fs/promises';
|
|
5
6
|
import { tmpdir } from 'node:os';
|
|
6
7
|
import path from 'path';
|
|
8
|
+
import { fileURLToPath } from 'url';
|
|
7
9
|
|
|
8
10
|
const {
|
|
9
11
|
BB_RELEASE_DIR = 'barretenberg/cpp/build/bin',
|
|
@@ -11,6 +13,8 @@ const {
|
|
|
11
13
|
BB_SKIP_CLEANUP = '',
|
|
12
14
|
TEMP_DIR = tmpdir(),
|
|
13
15
|
BB_WORKING_DIRECTORY = '',
|
|
16
|
+
BB_NUM_IVC_VERIFIERS = '1',
|
|
17
|
+
BB_IVC_CONCURRENCY = '1',
|
|
14
18
|
} = process.env;
|
|
15
19
|
|
|
16
20
|
export const getBBConfig = async (
|
|
@@ -19,7 +23,7 @@ export const getBBConfig = async (
|
|
|
19
23
|
try {
|
|
20
24
|
const bbBinaryPath =
|
|
21
25
|
BB_BINARY_PATH ??
|
|
22
|
-
path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../../', BB_RELEASE_DIR, 'bb');
|
|
26
|
+
path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../../', BB_RELEASE_DIR, 'bb-avm');
|
|
23
27
|
await fs.access(bbBinaryPath, fs.constants.R_OK);
|
|
24
28
|
|
|
25
29
|
let bbWorkingDirectory: string;
|
|
@@ -35,18 +39,19 @@ export const getBBConfig = async (
|
|
|
35
39
|
await fs.mkdir(bbWorkingDirectory, { recursive: true });
|
|
36
40
|
|
|
37
41
|
const bbSkipCleanup = ['1', 'true'].includes(BB_SKIP_CLEANUP);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
const cleanup = bbSkipCleanup ? () => Promise.resolve() : () => tryRmDir(directoryToCleanup);
|
|
43
|
+
|
|
44
|
+
const numIvcVerifiers = Number(BB_NUM_IVC_VERIFIERS);
|
|
45
|
+
const ivcConcurrency = Number(BB_IVC_CONCURRENCY);
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
bbSkipCleanup,
|
|
49
|
+
bbBinaryPath,
|
|
50
|
+
bbWorkingDirectory,
|
|
51
|
+
cleanup,
|
|
52
|
+
numConcurrentIVCVerifiers: numIvcVerifiers,
|
|
53
|
+
bbIVCConcurrency: ivcConcurrency,
|
|
47
54
|
};
|
|
48
|
-
|
|
49
|
-
return { bbSkipCleanup, bbBinaryPath, bbWorkingDirectory, cleanup };
|
|
50
55
|
} catch (err) {
|
|
51
56
|
logger.error(`Native BB not available, error: ${err}`);
|
|
52
57
|
return undefined;
|
|
@@ -1,50 +1,80 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ExtendedViemWalletClient, type L1ContractAddresses, RollupContract } from '@aztec/ethereum';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
+
import { tryJsonStringify } from '@aztec/foundation/json-rpc';
|
|
3
4
|
import { InboxAbi } from '@aztec/l1-artifacts';
|
|
4
5
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
6
|
|
|
6
|
-
import { expect } from '@jest/globals';
|
|
7
7
|
import { decodeEventLog, getContract } from 'viem';
|
|
8
8
|
|
|
9
|
+
import { getLogger } from './utils.js';
|
|
10
|
+
|
|
9
11
|
export async function sendL1ToL2Message(
|
|
10
12
|
message: { recipient: AztecAddress; content: Fr; secretHash: Fr },
|
|
11
13
|
ctx: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
l1ContractAddresses: Pick<L1ContractAddresses, 'inboxAddress'>;
|
|
14
|
+
l1Client: ExtendedViemWalletClient;
|
|
15
|
+
l1ContractAddresses: Pick<L1ContractAddresses, 'inboxAddress' | 'rollupAddress'>;
|
|
15
16
|
},
|
|
16
17
|
) {
|
|
18
|
+
const logger = getLogger();
|
|
17
19
|
const inbox = getContract({
|
|
18
20
|
address: ctx.l1ContractAddresses.inboxAddress.toString(),
|
|
19
21
|
abi: InboxAbi,
|
|
20
|
-
client: ctx.
|
|
22
|
+
client: ctx.l1Client,
|
|
21
23
|
});
|
|
22
24
|
|
|
23
25
|
const { recipient, content, secretHash } = message;
|
|
24
|
-
|
|
26
|
+
|
|
27
|
+
const version = await new RollupContract(ctx.l1Client, ctx.l1ContractAddresses.rollupAddress.toString()).getVersion();
|
|
25
28
|
|
|
26
29
|
// We inject the message to Inbox
|
|
27
|
-
const txHash = await inbox.write.sendL2Message(
|
|
28
|
-
{ actor: recipient.toString(), version: BigInt(version) },
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
const txHash = await inbox.write.sendL2Message(
|
|
31
|
+
[{ actor: recipient.toString(), version: BigInt(version) }, content.toString(), secretHash.toString()],
|
|
32
|
+
{
|
|
33
|
+
gas: 1_000_000n,
|
|
34
|
+
},
|
|
35
|
+
);
|
|
36
|
+
logger.info(`L1 to L2 message sent in tx ${txHash}`);
|
|
32
37
|
|
|
33
38
|
// We check that the message was correctly injected by checking the emitted event
|
|
34
|
-
const txReceipt = await ctx.
|
|
39
|
+
const txReceipt = await ctx.l1Client.waitForTransactionReceipt({ hash: txHash });
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
if (txReceipt.status !== 'success') {
|
|
42
|
+
throw new Error(`L1 to L2 message failed to be sent in tx ${txHash}. Status: ${txReceipt.status}`);
|
|
43
|
+
}
|
|
38
44
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
logger.info(`L1 to L2 message receipt retrieved for tx ${txReceipt.transactionHash}`, txReceipt);
|
|
46
|
+
|
|
47
|
+
if (txReceipt.transactionHash !== txHash) {
|
|
48
|
+
throw new Error(`Receipt transaction hash mismatch: ${txReceipt.transactionHash} !== ${txHash}`);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Filter for MessageSent events from the Inbox contract by trying to decode each log
|
|
52
|
+
const messageSentLogs = txReceipt.logs
|
|
53
|
+
.filter(log => log.address.toLowerCase() === ctx.l1ContractAddresses.inboxAddress.toString().toLowerCase())
|
|
54
|
+
.map(log => {
|
|
55
|
+
try {
|
|
56
|
+
const decoded = decodeEventLog({
|
|
57
|
+
abi: InboxAbi,
|
|
58
|
+
data: log.data,
|
|
59
|
+
topics: log.topics,
|
|
60
|
+
});
|
|
61
|
+
return { log, decoded };
|
|
62
|
+
} catch {
|
|
63
|
+
return null; // Not a decodable event from this ABI
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
.filter((item): item is { log: any; decoded: any } => item !== null && item.decoded.eventName === 'MessageSent');
|
|
67
|
+
|
|
68
|
+
if (messageSentLogs.length !== 1) {
|
|
69
|
+
throw new Error(
|
|
70
|
+
`Wrong number of MessageSent logs found in ${txHash} transaction (got ${messageSentLogs.length} expected 1)\n${tryJsonStringify(messageSentLogs.map(item => item.log))}`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// We already have the decoded event
|
|
75
|
+
const topics = messageSentLogs[0].decoded;
|
|
46
76
|
const receivedMsgHash = topics.args.hash;
|
|
47
77
|
const receivedGlobalLeafIndex = topics.args.index;
|
|
48
78
|
|
|
49
|
-
return
|
|
79
|
+
return { msgHash: Fr.fromHexString(receivedMsgHash), globalLeafIndex: new Fr(receivedGlobalLeafIndex), txReceipt };
|
|
50
80
|
}
|