@aztec/aztec 0.0.1-commit.3fd054f6 → 0.0.1-commit.431c48d
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/bin/index.js +3 -1
- package/dest/cli/aztec_start_action.d.ts +1 -1
- package/dest/cli/aztec_start_action.d.ts.map +1 -1
- package/dest/cli/aztec_start_action.js +33 -33
- package/dest/cli/aztec_start_options.d.ts +2 -2
- package/dest/cli/aztec_start_options.d.ts.map +1 -1
- package/dest/cli/aztec_start_options.js +21 -16
- package/dest/cli/cmds/compile.d.ts +1 -1
- package/dest/cli/cmds/compile.d.ts.map +1 -1
- package/dest/cli/cmds/compile.js +32 -24
- package/dest/cli/cmds/profile.d.ts +1 -1
- package/dest/cli/cmds/profile.d.ts.map +1 -1
- package/dest/cli/cmds/profile.js +1 -1
- package/dest/cli/cmds/profile_gates.d.ts +2 -2
- package/dest/cli/cmds/profile_gates.d.ts.map +1 -1
- package/dest/cli/cmds/profile_gates.js +21 -3
- package/dest/cli/cmds/prover.d.ts +4 -0
- package/dest/cli/cmds/prover.d.ts.map +1 -0
- package/dest/cli/cmds/prover.js +24 -0
- package/dest/cli/cmds/standby.d.ts +30 -6
- package/dest/cli/cmds/standby.d.ts.map +1 -1
- package/dest/cli/cmds/standby.js +48 -5
- package/dest/cli/cmds/start_bot.d.ts +1 -1
- package/dest/cli/cmds/start_bot.d.ts.map +1 -1
- package/dest/cli/cmds/start_bot.js +8 -4
- package/dest/cli/cmds/start_node.d.ts +1 -1
- package/dest/cli/cmds/start_node.d.ts.map +1 -1
- package/dest/cli/cmds/start_node.js +23 -47
- package/dest/cli/cmds/start_prover_agent.d.ts +1 -1
- package/dest/cli/cmds/start_prover_agent.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_agent.js +5 -17
- package/dest/cli/cmds/start_prover_broker.d.ts +1 -1
- package/dest/cli/cmds/start_prover_broker.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_broker.js +11 -8
- package/dest/cli/cmds/start_txe.d.ts +2 -2
- package/dest/cli/cmds/start_txe.d.ts.map +1 -1
- package/dest/cli/cmds/start_txe.js +6 -5
- package/dest/cli/cmds/utils/artifacts.d.ts +6 -1
- package/dest/cli/cmds/utils/artifacts.d.ts.map +1 -1
- package/dest/cli/cmds/utils/collect_crate_dirs.d.ts +21 -0
- package/dest/cli/cmds/utils/collect_crate_dirs.d.ts.map +1 -0
- package/dest/cli/cmds/utils/collect_crate_dirs.js +114 -0
- package/dest/cli/cmds/utils/needs_recompile.d.ts +1 -1
- package/dest/cli/cmds/utils/needs_recompile.d.ts.map +1 -1
- package/dest/cli/cmds/utils/needs_recompile.js +9 -53
- package/dest/cli/cmds/utils/warn_if_aztec_version_mismatch.d.ts +4 -0
- package/dest/cli/cmds/utils/warn_if_aztec_version_mismatch.d.ts.map +1 -0
- package/dest/cli/cmds/utils/warn_if_aztec_version_mismatch.js +61 -0
- package/dest/cli/util.d.ts +10 -5
- package/dest/cli/util.d.ts.map +1 -1
- package/dest/cli/util.js +26 -53
- package/dest/deploy/bridging.d.ts +84 -0
- package/dest/deploy/bridging.d.ts.map +1 -0
- package/dest/deploy/bridging.js +121 -0
- package/dest/deploy/fees.d.ts +120 -0
- package/dest/deploy/fees.d.ts.map +1 -0
- package/dest/deploy/fees.js +278 -0
- package/dest/deploy/graph.d.ts +40 -0
- package/dest/deploy/graph.d.ts.map +1 -0
- package/dest/deploy/graph.js +120 -0
- package/dest/deploy/index.d.ts +19 -0
- package/dest/deploy/index.d.ts.map +1 -0
- package/dest/deploy/index.js +15 -0
- package/dest/deploy/reporter.d.ts +106 -0
- package/dest/deploy/reporter.d.ts.map +1 -0
- package/dest/deploy/reporter.js +76 -0
- package/dest/deploy/runner.d.ts +8 -0
- package/dest/deploy/runner.d.ts.map +1 -0
- package/dest/deploy/runner.js +886 -0
- package/dest/deploy/state.d.ts +19 -0
- package/dest/deploy/state.d.ts.map +1 -0
- package/dest/deploy/state.js +59 -0
- package/dest/deploy/types.d.ts +233 -0
- package/dest/deploy/types.d.ts.map +1 -0
- package/dest/deploy/types.js +9 -0
- package/dest/examples/token.js +3 -3
- package/dest/local-network/auth_registry.d.ts +5 -0
- package/dest/local-network/auth_registry.d.ts.map +1 -0
- package/dest/local-network/auth_registry.js +17 -0
- package/dest/local-network/banana_fpc.d.ts +3 -2
- package/dest/local-network/banana_fpc.d.ts.map +1 -1
- package/dest/local-network/banana_fpc.js +11 -7
- package/dest/local-network/local-network.d.ts +10 -32
- package/dest/local-network/local-network.d.ts.map +1 -1
- package/dest/local-network/local-network.js +52 -73
- package/dest/testing/cheat_codes.d.ts +17 -23
- package/dest/testing/cheat_codes.d.ts.map +1 -1
- package/dest/testing/cheat_codes.js +17 -43
- package/dest/testing/epoch_test_settler.d.ts +2 -2
- package/dest/testing/epoch_test_settler.d.ts.map +1 -1
- package/dest/testing/epoch_test_settler.js +6 -25
- package/dest/testing/index.d.ts +2 -2
- package/dest/testing/index.d.ts.map +1 -1
- package/dest/testing/index.js +1 -1
- package/dest/testing/local-network.d.ts +51 -0
- package/dest/testing/local-network.d.ts.map +1 -0
- package/dest/testing/local-network.js +60 -0
- package/dest/testing/token_allowed_setup.d.ts +9 -4
- package/dest/testing/token_allowed_setup.d.ts.map +1 -1
- package/dest/testing/token_allowed_setup.js +12 -8
- package/package.json +37 -34
- package/scripts/add_crate.sh +11 -60
- package/scripts/aztec.sh +6 -2
- package/scripts/init.sh +5 -5
- package/scripts/new.sh +2 -2
- package/scripts/setup_workspace.sh +3 -2
- package/scripts/templates/blank/contract/Nargo.toml +6 -0
- package/scripts/templates/blank/contract/src/main.nr +10 -0
- package/scripts/templates/blank/test/Nargo.toml +7 -0
- package/scripts/templates/blank/test/src/lib.nr +11 -0
- package/scripts/templates/counter/contract/Nargo.toml +7 -0
- package/scripts/templates/counter/contract/src/main.nr +48 -0
- package/scripts/templates/counter/test/Nargo.toml +7 -0
- package/scripts/templates/counter/test/src/lib.nr +32 -0
- package/src/bin/index.ts +3 -1
- package/src/cli/aztec_start_action.ts +38 -25
- package/src/cli/aztec_start_options.ts +27 -23
- package/src/cli/cmds/compile.ts +37 -23
- package/src/cli/cmds/profile.ts +2 -1
- package/src/cli/cmds/profile_gates.ts +20 -4
- package/src/cli/cmds/prover.ts +42 -0
- package/src/cli/cmds/standby.ts +59 -7
- package/src/cli/cmds/start_bot.ts +9 -6
- package/src/cli/cmds/start_node.ts +32 -39
- package/src/cli/cmds/start_prover_agent.ts +5 -8
- package/src/cli/cmds/start_prover_broker.ts +10 -11
- package/src/cli/cmds/start_txe.ts +7 -5
- package/src/cli/cmds/utils/artifacts.ts +5 -0
- package/src/cli/cmds/utils/collect_crate_dirs.ts +118 -0
- package/src/cli/cmds/utils/needs_recompile.ts +8 -61
- package/src/cli/cmds/utils/warn_if_aztec_version_mismatch.ts +76 -0
- package/src/cli/util.ts +27 -68
- package/src/deploy/bridging.ts +191 -0
- package/src/deploy/fees.ts +322 -0
- package/src/deploy/graph.ts +137 -0
- package/src/deploy/index.ts +41 -0
- package/src/deploy/reporter.ts +184 -0
- package/src/deploy/runner.ts +936 -0
- package/src/deploy/state.ts +66 -0
- package/src/deploy/types.ts +244 -0
- package/src/examples/token.ts +11 -3
- package/src/local-network/auth_registry.ts +19 -0
- package/src/local-network/banana_fpc.ts +12 -8
- package/src/local-network/local-network.ts +61 -83
- package/src/testing/cheat_codes.ts +18 -49
- package/src/testing/epoch_test_settler.ts +8 -31
- package/src/testing/index.ts +1 -1
- package/src/testing/local-network.ts +97 -0
- package/src/testing/token_allowed_setup.ts +15 -8
- package/dest/cli/cmds/start_archiver.d.ts +0 -9
- package/dest/cli/cmds/start_archiver.d.ts.map +0 -1
- package/dest/cli/cmds/start_archiver.js +0 -48
- package/dest/testing/anvil_test_watcher.d.ts +0 -42
- package/dest/testing/anvil_test_watcher.d.ts.map +0 -1
- package/dest/testing/anvil_test_watcher.js +0 -181
- package/src/cli/cmds/start_archiver.ts +0 -50
- package/src/testing/anvil_test_watcher.ts +0 -210
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { readdir, stat } from 'fs/promises';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
import { collectCrateDirs } from './collect_crate_dirs.js';
|
|
4
4
|
/**
|
|
5
5
|
* Returns true if recompilation is needed: either no artifacts exist in target/ or any .nr or Nargo.toml source file
|
|
6
6
|
* (including path-based dependencies) is newer than the oldest artifact. We compare against the oldest artifact so
|
|
@@ -13,7 +13,12 @@ import { join, resolve } from 'path';
|
|
|
13
13
|
if (oldestArtifactMs === undefined) {
|
|
14
14
|
return true;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
// Git deps are pinned to a specific tag in Nargo.toml and nargo always fetches an exact tag, so their contents never
|
|
17
|
+
// change without Nargo.toml itself changing — and Nargo.toml is already tracked as a source file. Hence we can
|
|
18
|
+
// safely ignore checking source files of git deps.
|
|
19
|
+
const crateDirs = await collectCrateDirs('.', {
|
|
20
|
+
skipGitDeps: true
|
|
21
|
+
});
|
|
17
22
|
return hasNewerSourceFile(crateDirs, oldestArtifactMs);
|
|
18
23
|
}
|
|
19
24
|
/**
|
|
@@ -41,55 +46,6 @@ import { join, resolve } from 'path';
|
|
|
41
46
|
}
|
|
42
47
|
return oldest;
|
|
43
48
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Recursively collects crate directories starting from startCrateDir by following path-based dependencies declared in
|
|
46
|
-
* Nargo.toml files. Git-based deps are ignored (they only change when Nargo.toml itself is modified since the deps are
|
|
47
|
-
* tagged).
|
|
48
|
-
*/ async function collectCrateDirs(startCrateDir) {
|
|
49
|
-
// We have a set of visited dirs we check against when entering a new dir because we could stumble upon a directory
|
|
50
|
-
// multiple times in case multiple deps shared a dep (e.g. dep A and dep B both sharing dep C).
|
|
51
|
-
const visited = new Set();
|
|
52
|
-
async function visit(crateDir) {
|
|
53
|
-
const absDir = resolve(crateDir);
|
|
54
|
-
if (visited.has(absDir)) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
visited.add(absDir);
|
|
58
|
-
// Every dep is its own crate and every crate needs to have Nargo.toml defined in the root so we try to load it and
|
|
59
|
-
// error out if it's not the case.
|
|
60
|
-
const tomlPath = join(absDir, 'Nargo.toml');
|
|
61
|
-
const content = await readFile(tomlPath, 'utf-8').catch(()=>{
|
|
62
|
-
throw new Error(`Incorrectly defined dependency. Nargo.toml not found in ${absDir}`);
|
|
63
|
-
});
|
|
64
|
-
const parsed = TOML.parse(content);
|
|
65
|
-
const members = parsed.workspace?.members;
|
|
66
|
-
// A Nargo.toml is either a workspace root (has workspace.members) or a single crate (has dependencies).
|
|
67
|
-
if (Array.isArray(members)) {
|
|
68
|
-
// The crate is a workspace root and has members defined so we visit the members
|
|
69
|
-
for (const member of members){
|
|
70
|
-
const memberPath = resolve(absDir, member);
|
|
71
|
-
await visit(memberPath);
|
|
72
|
-
}
|
|
73
|
-
} else {
|
|
74
|
-
// The crate is not a workspace root so we check for dependencies
|
|
75
|
-
const deps = parsed.dependencies ?? {};
|
|
76
|
-
for (const dep of Object.values(deps)){
|
|
77
|
-
if (dep && typeof dep === 'object' && typeof dep.path === 'string') {
|
|
78
|
-
const depPath = resolve(absDir, dep.path);
|
|
79
|
-
const s = await stat(depPath);
|
|
80
|
-
if (!s.isDirectory()) {
|
|
81
|
-
throw new Error(`Dependency path "${dep.path}" in ${tomlPath} resolves to ${depPath} which is not a directory`);
|
|
82
|
-
}
|
|
83
|
-
await visit(depPath);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
await visit(startCrateDir);
|
|
89
|
-
return [
|
|
90
|
-
...visited
|
|
91
|
-
];
|
|
92
|
-
}
|
|
93
49
|
/**
|
|
94
50
|
* Walks crate dirs looking for .nr and Nargo.toml files newer than thresholdMs. Short-circuits on the first match.
|
|
95
51
|
*/ async function hasNewerSourceFile(crateDirs, thresholdMs) {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
2
|
+
/** Warns if any aztec-nr git dependency in a crate's Nargo.toml has a tag that doesn't match the CLI version. */
|
|
3
|
+
export declare function warnIfAztecVersionMismatch(log: LogFn, cliVersion?: string): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2Fybl9pZl9henRlY192ZXJzaW9uX21pc21hdGNoLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY2xpL2NtZHMvdXRpbHMvd2Fybl9pZl9henRlY192ZXJzaW9uX21pc21hdGNoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLEtBQUssRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBMkJuRCxpSEFBaUg7QUFDakgsd0JBQXNCLDBCQUEwQixDQUFDLEdBQUcsRUFBRSxLQUFLLEVBQUUsVUFBVSxDQUFDLEVBQUUsTUFBTSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0ErQy9GIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warn_if_aztec_version_mismatch.d.ts","sourceRoot":"","sources":["../../../../src/cli/cmds/utils/warn_if_aztec_version_mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AA2BnD,iHAAiH;AACjH,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,KAAK,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+C/F"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { DEV_VERSION, getPackageVersion } from '@aztec/stdlib/update-checker';
|
|
2
|
+
import TOML from '@iarna/toml';
|
|
3
|
+
import { readFile } from 'fs/promises';
|
|
4
|
+
import { join } from 'path';
|
|
5
|
+
import { collectCrateDirs } from './collect_crate_dirs.js';
|
|
6
|
+
/** Returns true if the given git URL points to the AztecProtocol/aztec-nr repository. */ function isAztecNrGitUrl(gitUrl) {
|
|
7
|
+
let url;
|
|
8
|
+
try {
|
|
9
|
+
url = new URL(gitUrl);
|
|
10
|
+
} catch {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
if (url.hostname !== 'github.com') {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
const repoPath = url.pathname.replace(/^\//, '').replace(/\.git$/, '').replace(/\/$/, '');
|
|
17
|
+
return repoPath === 'AztecProtocol/aztec-nr';
|
|
18
|
+
}
|
|
19
|
+
/** Warns if any aztec-nr git dependency in a crate's Nargo.toml has a tag that doesn't match the CLI version. */ export async function warnIfAztecVersionMismatch(log, cliVersion) {
|
|
20
|
+
const version = cliVersion ?? getPackageVersion();
|
|
21
|
+
if (version === DEV_VERSION) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const expectedTag = `v${version}`;
|
|
25
|
+
const mismatches = [];
|
|
26
|
+
const crateDirs = await collectCrateDirs('.', {
|
|
27
|
+
skipGitDeps: true
|
|
28
|
+
});
|
|
29
|
+
for (const dir of crateDirs){
|
|
30
|
+
const tomlPath = join(dir, 'Nargo.toml');
|
|
31
|
+
let content;
|
|
32
|
+
try {
|
|
33
|
+
content = await readFile(tomlPath, 'utf-8');
|
|
34
|
+
} catch {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
const parsed = TOML.parse(content);
|
|
38
|
+
const deps = parsed.dependencies ?? {};
|
|
39
|
+
for (const [depName, dep] of Object.entries(deps)){
|
|
40
|
+
// Skip non-object deps (e.g. malformed entries) and anything that isn't a tagged git dep.
|
|
41
|
+
if (!dep || typeof dep !== 'object' || typeof dep.git !== 'string' || typeof dep.tag !== 'string') {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
// Only flag deps that are sourced from the aztec-nr repo.
|
|
45
|
+
if (!isAztecNrGitUrl(dep.git)) {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
if (dep.tag !== expectedTag) {
|
|
49
|
+
mismatches.push({
|
|
50
|
+
file: tomlPath,
|
|
51
|
+
depName,
|
|
52
|
+
tag: dep.tag
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (mismatches.length > 0) {
|
|
58
|
+
const details = mismatches.map((m)=>` ${m.file} — ${m.depName} (${m.tag})`).join('\n');
|
|
59
|
+
log(`WARNING: Aztec dependency version mismatch detected.\n` + `The following aztec-nr dependencies do not match the CLI version (${expectedTag}):\n` + `${details}\n\n` + `See https://docs.aztec.network/errors/9 for how to update your dependencies.`);
|
|
60
|
+
}
|
|
61
|
+
}
|
package/dest/cli/util.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { AztecNodeConfig } from '@aztec/aztec-node';
|
|
2
2
|
import type { AccountManager } from '@aztec/aztec.js/wallet';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import { type LogFn } from '@aztec/foundation/log';
|
|
3
|
+
import type { ConfigMappingsType } from '@aztec/foundation/config';
|
|
4
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
6
5
|
import type { ProverConfig } from '@aztec/stdlib/interfaces/server';
|
|
7
6
|
import type { EmbeddedWallet } from '@aztec/wallets/embedded';
|
|
8
7
|
import type { Command } from 'commander';
|
|
@@ -19,6 +18,13 @@ export declare const enum ExitCode {
|
|
|
19
18
|
}
|
|
20
19
|
export declare function shutdown(logFn: LogFn, exitCode: ExitCode, cb?: Array<() => Promise<void>>): Promise<never>;
|
|
21
20
|
export declare function isShuttingDown(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Stops the node's subsystems (via the registered signal handlers) without exiting the process, leaving
|
|
23
|
+
* the HTTP health server listening so K8s liveness/readiness probes keep passing. Unlike {@link shutdown}
|
|
24
|
+
* this deliberately does not latch `shutdownPromise` or call `process.exit`; instead it re-arms
|
|
25
|
+
* SIGTERM/SIGINT so a later K8s pod deletion still terminates the wound-down pod with a clean exit.
|
|
26
|
+
*/
|
|
27
|
+
export declare function softShutdown(logFn: LogFn, signalHandlers: Array<() => Promise<void>>): Promise<void>;
|
|
22
28
|
export declare const installSignalHandlers: (logFn: LogFn, cb?: (() => Promise<void>)[] | undefined) => void;
|
|
23
29
|
/**
|
|
24
30
|
* Creates logs for the initial accounts
|
|
@@ -61,6 +67,5 @@ export declare function preloadCrsDataForVerifying({ realProofs }: Pick<AztecNod
|
|
|
61
67
|
* @param log - Logging function
|
|
62
68
|
*/
|
|
63
69
|
export declare function preloadCrsDataForServerSideProving({ realProofs }: Pick<ProverConfig, 'realProofs'>, log: LogFn): Promise<void>;
|
|
64
|
-
export declare function setupVersionChecker(network: NetworkNames, followsCanonicalRollup: boolean, publicClient: ViemClient, signalHandlers: Array<() => Promise<void>>, cacheDir?: string): Promise<void>;
|
|
65
70
|
export declare function stringifyConfig(config: object): string;
|
|
66
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NsaS91dGlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGVBQWUsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ3pELE9BQU8sS0FBSyxFQUFFLGNBQWMsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQzdELE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFFbkUsT0FBTyxLQUFLLEVBQUUsS0FBSyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDbkQsT0FBTyxLQUFLLEVBQU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|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/cli/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/cli/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,KAAK,gBAAgB,EAAqB,MAAM,0BAA0B,CAAC;AAEpF,0BAAkB,QAAQ;IACxB,OAAO,IAAI;IACX,KAAK,IAAI;IACT,cAAc,KAAK;IACnB,eAAe,KAAK;IAEpB,MAAM,MAAM;IACZ,MAAM,MAAM;IACZ,OAAO,MAAM;IACb,OAAO,MAAM;CACd;AAGD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAgB1G;AAED,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAU1G;AAED,eAAO,MAAM,qBAAqB,kEAajC,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,eAAe,EAAE,cAAc,EAAE,EAAE,MAAM,EAAE,cAAc,qBAyBhG;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;CAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAiB/F;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,EACvB,gBAAgB,EAAE,MAAM,GACvB,MAAM,CAKR;AAiCD,eAAO,MAAM,UAAU,qDAStB,CAAC;AAEF,eAAO,MAAM,uBAAuB,cAyBnC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,0EASpC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GAAI,CAAC,wFAkCvC,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,0BAA0B,CAC9C,EAAE,UAAU,EAAE,EAAE,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,EACnD,GAAG,EAAE,KAAK,GACT,OAAO,CAAC,IAAI,CAAC,CAKf;AAED;;;;GAIG;AACH,wBAAsB,kCAAkC,CACtD,EAAE,UAAU,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,EAChD,GAAG,EAAE,KAAK,GACT,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAItD"}
|
package/dest/cli/util.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { getNetworkConfig } from '@aztec/cli/config';
|
|
2
|
-
import { RegistryContract } from '@aztec/ethereum/contracts';
|
|
3
1
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
4
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
-
import { getPackageVersion } from '@aztec/stdlib/update-checker';
|
|
6
2
|
import chalk from 'chalk';
|
|
7
3
|
import { aztecStartOptions } from './aztec_start_options.js';
|
|
8
4
|
export var ExitCode = /*#__PURE__*/ function(ExitCode) {
|
|
@@ -38,6 +34,25 @@ export function shutdown(logFn, exitCode, cb) {
|
|
|
38
34
|
export function isShuttingDown() {
|
|
39
35
|
return shutdownPromise !== undefined;
|
|
40
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Stops the node's subsystems (via the registered signal handlers) without exiting the process, leaving
|
|
39
|
+
* the HTTP health server listening so K8s liveness/readiness probes keep passing. Unlike {@link shutdown}
|
|
40
|
+
* this deliberately does not latch `shutdownPromise` or call `process.exit`; instead it re-arms
|
|
41
|
+
* SIGTERM/SIGINT so a later K8s pod deletion still terminates the wound-down pod with a clean exit.
|
|
42
|
+
*/ export async function softShutdown(logFn, signalHandlers) {
|
|
43
|
+
logFn('Canonical rollup upgrade detected: stopping subsystems, health server stays up.', {
|
|
44
|
+
exitCode: 78
|
|
45
|
+
});
|
|
46
|
+
await Promise.allSettled(signalHandlers.map((fn)=>fn()));
|
|
47
|
+
for (const sig of [
|
|
48
|
+
'SIGTERM',
|
|
49
|
+
'SIGINT'
|
|
50
|
+
]){
|
|
51
|
+
process.removeAllListeners(sig);
|
|
52
|
+
process.once(sig, ()=>process.exit(78));
|
|
53
|
+
}
|
|
54
|
+
logFn('Subsystems stopped due to rollup upgrade. Health server remains active.');
|
|
55
|
+
}
|
|
41
56
|
export const installSignalHandlers = (logFn, cb)=>{
|
|
42
57
|
const signals = [
|
|
43
58
|
[
|
|
@@ -79,11 +94,13 @@ export const installSignalHandlers = (logFn, cb)=>{
|
|
|
79
94
|
if (registeredAccounts.find((a)=>a.item.equals(completeAddress.address))) {
|
|
80
95
|
accountLogStrings.push(` Address: ${completeAddress.address.toString()}\n`);
|
|
81
96
|
accountLogStrings.push(` Partial Address: ${completeAddress.partialAddress.toString()}\n`);
|
|
82
|
-
accountLogStrings.push(` Secret Key: ${
|
|
83
|
-
accountLogStrings.push(` Master nullifier public key: ${completeAddress.publicKeys.
|
|
84
|
-
accountLogStrings.push(` Master incoming viewing public key: ${completeAddress.publicKeys.
|
|
85
|
-
accountLogStrings.push(` Master outgoing viewing public key: ${completeAddress.publicKeys.
|
|
86
|
-
accountLogStrings.push(` Master tagging public key: ${completeAddress.publicKeys.
|
|
97
|
+
accountLogStrings.push(` Secret Key: ${accountManager.getSecretKey().toString()}\n`);
|
|
98
|
+
accountLogStrings.push(` Master nullifier public key hash: ${completeAddress.publicKeys.npkMHash.toString()}\n`);
|
|
99
|
+
accountLogStrings.push(` Master incoming viewing public key: ${completeAddress.publicKeys.ivpkM.toString()}\n\n`);
|
|
100
|
+
accountLogStrings.push(` Master outgoing viewing public key hash: ${completeAddress.publicKeys.ovpkMHash.toString()}\n\n`);
|
|
101
|
+
accountLogStrings.push(` Master tagging public key hash: ${completeAddress.publicKeys.tpkMHash.toString()}\n\n`);
|
|
102
|
+
accountLogStrings.push(` Master message-signing public key hash: ${completeAddress.publicKeys.mspkMHash.toString()}\n\n`);
|
|
103
|
+
accountLogStrings.push(` Master fallback public key hash: ${completeAddress.publicKeys.fbpkMHash.toString()}\n\n`);
|
|
87
104
|
}
|
|
88
105
|
}
|
|
89
106
|
return accountLogStrings;
|
|
@@ -239,50 +256,6 @@ export const printAztecStartHelpText = ()=>{
|
|
|
239
256
|
]);
|
|
240
257
|
}
|
|
241
258
|
}
|
|
242
|
-
export async function setupVersionChecker(network, followsCanonicalRollup, publicClient, signalHandlers, cacheDir) {
|
|
243
|
-
const networkConfig = await getNetworkConfig(network, cacheDir);
|
|
244
|
-
if (!networkConfig) {
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
const { VersionChecker } = await import('@aztec/stdlib/update-checker');
|
|
248
|
-
const logger = createLogger('version_check');
|
|
249
|
-
const registry = new RegistryContract(publicClient, networkConfig.registryAddress);
|
|
250
|
-
const checks = [];
|
|
251
|
-
checks.push({
|
|
252
|
-
name: 'node',
|
|
253
|
-
currentVersion: getPackageVersion() ?? 'unknown',
|
|
254
|
-
getLatestVersion: async ()=>{
|
|
255
|
-
const cfg = await getNetworkConfig(network, cacheDir);
|
|
256
|
-
return cfg?.nodeVersion;
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
if (followsCanonicalRollup) {
|
|
260
|
-
const getLatestVersion = async ()=>{
|
|
261
|
-
const version = (await registry.getRollupVersions()).at(-1);
|
|
262
|
-
return version !== undefined ? String(version) : undefined;
|
|
263
|
-
};
|
|
264
|
-
const currentVersion = await getLatestVersion();
|
|
265
|
-
if (currentVersion !== undefined) {
|
|
266
|
-
checks.push({
|
|
267
|
-
name: 'rollup',
|
|
268
|
-
currentVersion,
|
|
269
|
-
getLatestVersion
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
const checker = new VersionChecker(checks, 600_000, logger);
|
|
274
|
-
checker.on('newVersion', ({ name, latestVersion, currentVersion })=>{
|
|
275
|
-
if (isShuttingDown()) {
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
logger.warn(`New ${name} version available`, {
|
|
279
|
-
latestVersion,
|
|
280
|
-
currentVersion
|
|
281
|
-
});
|
|
282
|
-
});
|
|
283
|
-
checker.start();
|
|
284
|
-
signalHandlers.push(()=>checker.stop());
|
|
285
|
-
}
|
|
286
259
|
export function stringifyConfig(config) {
|
|
287
260
|
return Object.entries(config).map(([key, value])=>`${key}=${jsonStringify(value)}`).join(' ');
|
|
288
261
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fee-juice bridging for the `fee-juice` deploy policy: bridge Fee Juice from L1
|
|
3
|
+
* ({@link bridgeFeeJuice}) and wait for the L1→L2 message to become available
|
|
4
|
+
* ({@link waitForL1ToL2Message}). Fee Juice only — this is not a generic L1→L2 asset bridge.
|
|
5
|
+
* Node-only (pulls in `@aztec/aztec.js/ethereum` + viem).
|
|
6
|
+
*
|
|
7
|
+
* Nothing here sends the L2 claim tx — the caller feeds the returned claim into
|
|
8
|
+
* `FeeJuicePaymentMethodWithClaim` so the claim lands inside whatever tx the recipient is already
|
|
9
|
+
* sending.
|
|
10
|
+
*/
|
|
11
|
+
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
12
|
+
import { L1FeeJuicePortalManager } from '@aztec/aztec.js/ethereum';
|
|
13
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
14
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
15
|
+
import type { Hex } from 'viem';
|
|
16
|
+
/** Local vs. remote L1→L2 message advancement: warp cheats time forward, poll just waits. */
|
|
17
|
+
export type BridgeTimingMode = 'warp' | 'poll';
|
|
18
|
+
/** The claim produced by bridging: exactly the shape `FeeJuicePaymentMethodWithClaim` expects. */
|
|
19
|
+
export type FeeJuiceClaim = Awaited<ReturnType<L1FeeJuicePortalManager['bridgeTokensPublic']>>;
|
|
20
|
+
/**
|
|
21
|
+
* Decides how the L1 signer funds a bridge: mint from the fee-asset faucet handler, or transfer
|
|
22
|
+
* its existing Fee Juice. Pure — exercised directly by unit tests.
|
|
23
|
+
*
|
|
24
|
+
* - Balance covers the requested amount → transfer it (no mint, even when a faucet exists).
|
|
25
|
+
* - Balance short of the amount + faucet available → mint (the faucet path bridges the handler's
|
|
26
|
+
* own mint amount and ignores `amount`).
|
|
27
|
+
* - Balance short + no faucet → throw, reporting the shortfall.
|
|
28
|
+
* - No `amount` requested → the faucet is required (there is nothing to size a transfer by).
|
|
29
|
+
*/
|
|
30
|
+
export declare function pickBridgeRoute(opts: {
|
|
31
|
+
hasFaucet: boolean;
|
|
32
|
+
l1Balance: bigint;
|
|
33
|
+
amount?: bigint;
|
|
34
|
+
}): {
|
|
35
|
+
useFaucet: boolean;
|
|
36
|
+
amount?: bigint;
|
|
37
|
+
};
|
|
38
|
+
export interface BridgeFeeJuiceParams {
|
|
39
|
+
node: AztecNode;
|
|
40
|
+
l1RpcUrl: string;
|
|
41
|
+
l1ChainId: number;
|
|
42
|
+
recipient: AztecAddress;
|
|
43
|
+
/** Desired amount in wei. Optional only when a faucet exists (whose `mintAmount()` then wins). */
|
|
44
|
+
amount?: bigint;
|
|
45
|
+
/** L1 private key signing the bridge tx. When omitted, a fresh ephemeral key is generated. */
|
|
46
|
+
l1PrivateKey?: Hex;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Bridges fee juice to an L2 recipient, minting from the faucet handler or transferring the
|
|
50
|
+
* signer's balance per {@link pickBridgeRoute}. Returns the claim; the L1→L2 message it references
|
|
51
|
+
* becomes available later — see {@link waitForL1ToL2Message}.
|
|
52
|
+
*/
|
|
53
|
+
export declare function bridgeFeeJuice(params: BridgeFeeJuiceParams): Promise<FeeJuiceClaim>;
|
|
54
|
+
export interface WaitForClaimParams {
|
|
55
|
+
node: AztecNode;
|
|
56
|
+
messageHash: Fr;
|
|
57
|
+
/**
|
|
58
|
+
* On `warp` (local) we cheat L1+L2 time forward via the node debug API until the message shows as
|
|
59
|
+
* available; on `poll` (every other network) we just check periodically.
|
|
60
|
+
*/
|
|
61
|
+
mode: BridgeTimingMode;
|
|
62
|
+
/** Timeout before giving up (default 30 min for poll, 2 min for warp). */
|
|
63
|
+
timeoutMs?: number;
|
|
64
|
+
/** Warp-only: options for reaching the node's debug API. */
|
|
65
|
+
warpOpts?: {
|
|
66
|
+
nodeUrl?: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** Waits until an L1→L2 message is available on the node (warping time forward in `warp` mode). */
|
|
70
|
+
export declare function waitForL1ToL2Message(params: WaitForClaimParams): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Local-network helper: advances L1 + L2 time via the node debug API until the given L1→L2 message
|
|
73
|
+
* shows up as available, warping by one L2 slot (read from the node's rollup constants) per check.
|
|
74
|
+
* An in-process node (e.g. a test fixture's `AztecNodeService`) implements the debug interface
|
|
75
|
+
* directly; a remote node is reached via its debug RPC at `nodeUrl` — `warpL2TimeAtLeastBy` needs
|
|
76
|
+
* `AztecNode & AztecNodeDebug` (it reads the current L1 timestamp via the regular API before
|
|
77
|
+
* warping), and both clients target the same URL and expose their methods as own properties on the
|
|
78
|
+
* rpc proxy, so a shallow merge is safe.
|
|
79
|
+
*/
|
|
80
|
+
export declare function warpToL1ToL2Message(node: AztecNode, messageHash: Fr, opts?: {
|
|
81
|
+
nodeUrl?: string;
|
|
82
|
+
timeoutMs?: number;
|
|
83
|
+
}): Promise<void>;
|
|
84
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJpZGdpbmcuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZXBsb3kvYnJpZGdpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7OztHQVNHO0FBQ0gsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDOUQsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFFbkUsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFHdEQsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBS3BELE9BQU8sS0FBSyxFQUFFLEdBQUcsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQVloQywrRkFBNkY7QUFDN0YsTUFBTSxNQUFNLGdCQUFnQixHQUFHLE1BQU0sR0FBRyxNQUFNLENBQUM7QUFFL0Msa0dBQWtHO0FBQ2xHLE1BQU0sTUFBTSxhQUFhLEdBQUcsT0FBTyxDQUFDLFVBQVUsQ0FBQyx1QkFBdUIsQ0FBQyxv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;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAkBA;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,YAAY,CAAC;IACxB,kGAAkG;IAClG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8FAA8F;IAC9F,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC,CAezF;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,EAAE,CAAC;IAChB;;;OAGG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACjC;AAED,qGAAmG;AACnG,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiCpF;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,EAAE,EACf,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAClD,OAAO,CAAC,IAAI,CAAC,CAsBf"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fee-juice bridging for the `fee-juice` deploy policy: bridge Fee Juice from L1
|
|
3
|
+
* ({@link bridgeFeeJuice}) and wait for the L1→L2 message to become available
|
|
4
|
+
* ({@link waitForL1ToL2Message}). Fee Juice only — this is not a generic L1→L2 asset bridge.
|
|
5
|
+
* Node-only (pulls in `@aztec/aztec.js/ethereum` + viem).
|
|
6
|
+
*
|
|
7
|
+
* Nothing here sends the L2 claim tx — the caller feeds the returned claim into
|
|
8
|
+
* `FeeJuicePaymentMethodWithClaim` so the claim lands inside whatever tx the recipient is already
|
|
9
|
+
* sending.
|
|
10
|
+
*/ import { L1FeeJuicePortalManager } from '@aztec/aztec.js/ethereum';
|
|
11
|
+
import { isL1ToL2MessageReady } from '@aztec/aztec.js/messaging';
|
|
12
|
+
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
13
|
+
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
14
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
15
|
+
import { retryUntil } from '@aztec/foundation/retry';
|
|
16
|
+
import { createAztecNodeDebugClient } from '@aztec/stdlib/interfaces/client';
|
|
17
|
+
import { generatePrivateKey } from 'viem/accounts';
|
|
18
|
+
const logger = createLogger('deploy:bridging');
|
|
19
|
+
/** Wait between availability checks in `warp` mode — each iteration also warps the clock forward. */ const WARP_POLL_INTERVAL_MS = 1000;
|
|
20
|
+
/** Wait between availability checks in `poll` mode (a real network; nothing to do but wait). */ const POLL_INTERVAL_MS = 5_000;
|
|
21
|
+
/** Throttle for the "still waiting" progress log in the poll loop. */ const POLL_LOG_INTERVAL_MS = 30_000;
|
|
22
|
+
/**
|
|
23
|
+
* Decides how the L1 signer funds a bridge: mint from the fee-asset faucet handler, or transfer
|
|
24
|
+
* its existing Fee Juice. Pure — exercised directly by unit tests.
|
|
25
|
+
*
|
|
26
|
+
* - Balance covers the requested amount → transfer it (no mint, even when a faucet exists).
|
|
27
|
+
* - Balance short of the amount + faucet available → mint (the faucet path bridges the handler's
|
|
28
|
+
* own mint amount and ignores `amount`).
|
|
29
|
+
* - Balance short + no faucet → throw, reporting the shortfall.
|
|
30
|
+
* - No `amount` requested → the faucet is required (there is nothing to size a transfer by).
|
|
31
|
+
*/ export function pickBridgeRoute(opts) {
|
|
32
|
+
const { hasFaucet, l1Balance, amount } = opts;
|
|
33
|
+
if (amount === undefined) {
|
|
34
|
+
if (!hasFaucet) {
|
|
35
|
+
throw new Error('bridgeFeeJuice: `amount` is required when no fee-asset faucet is available.');
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
useFaucet: true
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (l1Balance >= amount) {
|
|
42
|
+
return {
|
|
43
|
+
useFaucet: false,
|
|
44
|
+
amount
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
if (hasFaucet) {
|
|
48
|
+
return {
|
|
49
|
+
useFaucet: true
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
throw new Error(`L1 signer holds ${l1Balance} wei of Fee Juice but ${amount} was requested, and no fee-asset faucet is ` + `available to mint the difference.`);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Bridges fee juice to an L2 recipient, minting from the faucet handler or transferring the
|
|
56
|
+
* signer's balance per {@link pickBridgeRoute}. Returns the claim; the L1→L2 message it references
|
|
57
|
+
* becomes available later — see {@link waitForL1ToL2Message}.
|
|
58
|
+
*/ export async function bridgeFeeJuice(params) {
|
|
59
|
+
const { node, l1RpcUrl, l1ChainId, recipient } = params;
|
|
60
|
+
const l1PrivateKey = params.l1PrivateKey ?? generatePrivateKey();
|
|
61
|
+
const chain = createEthereumChain([
|
|
62
|
+
l1RpcUrl
|
|
63
|
+
], l1ChainId);
|
|
64
|
+
const l1Client = createExtendedL1Client(chain.rpcUrls, l1PrivateKey, chain.chainInfo);
|
|
65
|
+
const portalManager = await L1FeeJuicePortalManager.new(node, l1Client, logger);
|
|
66
|
+
const tokenManager = portalManager.getTokenManager();
|
|
67
|
+
const route = pickBridgeRoute({
|
|
68
|
+
hasFaucet: tokenManager.handlerAddress !== undefined,
|
|
69
|
+
l1Balance: await tokenManager.getL1TokenBalance(l1Client.account.address),
|
|
70
|
+
amount: params.amount
|
|
71
|
+
});
|
|
72
|
+
return await portalManager.bridgeTokensPublic(recipient, route.amount, route.useFaucet);
|
|
73
|
+
}
|
|
74
|
+
/** Waits until an L1→L2 message is available on the node (warping time forward in `warp` mode). */ export async function waitForL1ToL2Message(params) {
|
|
75
|
+
const { node, messageHash, mode } = params;
|
|
76
|
+
if (mode === 'warp') {
|
|
77
|
+
await warpToL1ToL2Message(node, messageHash, {
|
|
78
|
+
...params.warpOpts,
|
|
79
|
+
timeoutMs: params.timeoutMs ?? 120_000
|
|
80
|
+
});
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const timeoutMs = params.timeoutMs ?? 30 * 60_000;
|
|
84
|
+
const startedAt = Date.now();
|
|
85
|
+
let lastLog = startedAt;
|
|
86
|
+
await retryUntil(async ()=>{
|
|
87
|
+
if (await isL1ToL2MessageReady(node, messageHash)) {
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
if (Date.now() - lastLog > POLL_LOG_INTERVAL_MS) {
|
|
91
|
+
lastLog = Date.now();
|
|
92
|
+
logger.info('Still waiting for L1→L2 message to become available', {
|
|
93
|
+
messageHash: messageHash.toString(),
|
|
94
|
+
elapsedMs: Date.now() - startedAt,
|
|
95
|
+
timeoutMs
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return undefined;
|
|
99
|
+
}, `L1→L2 message ${messageHash.toString()}`, timeoutMs / 1000, POLL_INTERVAL_MS / 1000);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Local-network helper: advances L1 + L2 time via the node debug API until the given L1→L2 message
|
|
103
|
+
* shows up as available, warping by one L2 slot (read from the node's rollup constants) per check.
|
|
104
|
+
* An in-process node (e.g. a test fixture's `AztecNodeService`) implements the debug interface
|
|
105
|
+
* directly; a remote node is reached via its debug RPC at `nodeUrl` — `warpL2TimeAtLeastBy` needs
|
|
106
|
+
* `AztecNode & AztecNodeDebug` (it reads the current L1 timestamp via the regular API before
|
|
107
|
+
* warping), and both clients target the same URL and expose their methods as own properties on the
|
|
108
|
+
* rpc proxy, so a shallow merge is safe.
|
|
109
|
+
*/ export async function warpToL1ToL2Message(node, messageHash, opts = {}) {
|
|
110
|
+
const nodeUrl = opts.nodeUrl ?? 'http://localhost:8080';
|
|
111
|
+
const timeoutMs = opts.timeoutMs ?? 120_000;
|
|
112
|
+
const fullNode = typeof node.warpL2TimeAtLeastBy === 'function' ? node : Object.assign({}, node, createAztecNodeDebugClient(nodeUrl));
|
|
113
|
+
const { slotDuration } = await node.getL1Constants();
|
|
114
|
+
await retryUntil(async ()=>{
|
|
115
|
+
if (await isL1ToL2MessageReady(node, messageHash)) {
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
await fullNode.warpL2TimeAtLeastBy(slotDuration);
|
|
119
|
+
return undefined;
|
|
120
|
+
}, `L1→L2 message ${messageHash.toString()} (warping)`, timeoutMs / 1000, WARP_POLL_INTERVAL_MS / 1000);
|
|
121
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fee handling for the deploy framework. Each account pays per its own {@link FeePolicy} — which
|
|
3
|
+
* may override the spec-wide default:
|
|
4
|
+
*
|
|
5
|
+
* - `sponsored` → a SponsoredFPC pays (the local-network default). All sponsored accounts share
|
|
6
|
+
* one payment method.
|
|
7
|
+
* - `fee-juice` → the account pays from its own Fee Juice; if below `threshold` with work to do,
|
|
8
|
+
* bridge `fundAmount` from L1. The bridge claim is single-use: the first paying tx claims it
|
|
9
|
+
* (`FeeJuicePaymentMethodWithClaim`) and the rest spend the balance. Pending claims are persisted
|
|
10
|
+
* (see ./state.ts) so a crash between bridge and claim resumes.
|
|
11
|
+
*/
|
|
12
|
+
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
13
|
+
import { type FeePaymentMethod } from '@aztec/aztec.js/fee';
|
|
14
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
15
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
16
|
+
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
17
|
+
import type { GasFees } from '@aztec/stdlib/gas';
|
|
18
|
+
import type { Hex } from 'viem';
|
|
19
|
+
import type { AccountFunding, DeployReporter } from './reporter.js';
|
|
20
|
+
import type { DeployState } from './state.js';
|
|
21
|
+
import type { FeePolicy } from './types.js';
|
|
22
|
+
/** The `fee` field of a send-options object. */
|
|
23
|
+
export interface SendFee {
|
|
24
|
+
paymentMethod?: FeePaymentMethod;
|
|
25
|
+
gasSettings?: {
|
|
26
|
+
maxFeesPerGas: GasFees;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Sane fee defaults: local pays via SponsoredFPC; every other network pays from bridged Fee Juice.
|
|
31
|
+
* The threshold/fundAmount pair trades off L1 round-trips (too low → frequent re-bridges) against
|
|
32
|
+
* stranding Fee Juice, which is non-transferable, on the account (too high).
|
|
33
|
+
*/
|
|
34
|
+
export declare function defaultFeePolicy(local: boolean): FeePolicy;
|
|
35
|
+
/** The public Fee Juice balance of `address` (any address — contract or account), read via `from`. */
|
|
36
|
+
export declare function publicFeeJuiceBalance(wallet: Wallet, address: AztecAddress, from: AztecAddress): Promise<bigint>;
|
|
37
|
+
/**
|
|
38
|
+
* Resolves an account's funding posture under `policy` — what the plan reports and what
|
|
39
|
+
* {@link prepareFeeSession} acts on. `idle` accounts (no pending work) are never funded; sponsored
|
|
40
|
+
* accounts never read a balance; fee-juice accounts are `funded` iff their balance clears the
|
|
41
|
+
* threshold, else `not-funded` (a bridge will top them up).
|
|
42
|
+
*/
|
|
43
|
+
export declare function accountFunding(policy: FeePolicy, wallet: Wallet, account: AztecAddress, hasWork: boolean): Promise<AccountFunding>;
|
|
44
|
+
/** What {@link obtainFeeJuiceClaim} needs to produce a consumable claim for a recipient. */
|
|
45
|
+
export interface ObtainFeeJuiceClaimOpts {
|
|
46
|
+
/** Whether the target is a local (anvil) network — drives warp-vs-poll + L1 defaults. */
|
|
47
|
+
local: boolean;
|
|
48
|
+
node: AztecNode;
|
|
49
|
+
/** The node's URL — reaches its debug API for local time-warping while the bridge settles. */
|
|
50
|
+
nodeUrl?: string;
|
|
51
|
+
recipient: AztecAddress;
|
|
52
|
+
/** Amount to bridge (wei). */
|
|
53
|
+
amount: bigint;
|
|
54
|
+
/** L1 connection + funder, defaulted per {@link resolveL1Config}. */
|
|
55
|
+
l1: {
|
|
56
|
+
l1FunderKey?: Hex;
|
|
57
|
+
l1RpcUrl?: string;
|
|
58
|
+
l1ChainId?: number;
|
|
59
|
+
};
|
|
60
|
+
state: DeployState;
|
|
61
|
+
persist: () => void;
|
|
62
|
+
reporter: DeployReporter;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A single-use Fee Juice claim for `recipient` (used by `fund` steps): resumes the persisted claim
|
|
66
|
+
* when present, else bridges `amount` from L1 and waits for the L1→L2 message. The claim persists
|
|
67
|
+
* before the wait, so a crash mid-wait resumes it instead of stranding the bridged funds. The
|
|
68
|
+
* caller consumes it (e.g. via `FeeJuice.claim`) and calls `onConsumed` once that tx mines.
|
|
69
|
+
*/
|
|
70
|
+
export declare function obtainFeeJuiceClaim(opts: ObtainFeeJuiceClaimOpts): Promise<{
|
|
71
|
+
claimAmount: bigint;
|
|
72
|
+
claimSecret: Fr;
|
|
73
|
+
messageLeafIndex: bigint;
|
|
74
|
+
/** Drops the persisted resume entry — call once the consuming tx mines. */
|
|
75
|
+
onConsumed: () => void;
|
|
76
|
+
}>;
|
|
77
|
+
/** Per-account fee dispensing for one run, prepared by {@link prepareFeeSession}. */
|
|
78
|
+
export interface FeeSession {
|
|
79
|
+
/**
|
|
80
|
+
* Fee options for the next tx from `account`, plus `onConsumed` to call after it lands (clears a
|
|
81
|
+
* one-time bridge claim from persisted state). Subsequent calls pay from balance.
|
|
82
|
+
*/
|
|
83
|
+
next(account: AztecAddress): {
|
|
84
|
+
fee: SendFee;
|
|
85
|
+
onConsumed: () => void;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Whether `account`'s next tx will carry its one-time bridge claim. The runner serializes such an
|
|
89
|
+
* account's first tx: the claim must mine before its balance-paying txs fan out.
|
|
90
|
+
*/
|
|
91
|
+
hasPendingClaim(account: AztecAddress): boolean;
|
|
92
|
+
}
|
|
93
|
+
/** What {@link prepareFeeSession} needs to fund a run's working accounts. */
|
|
94
|
+
export interface PrepareFeeSessionOpts {
|
|
95
|
+
/** Whether the target is a local (anvil) network — drives warp-vs-poll + L1 defaults. */
|
|
96
|
+
local: boolean;
|
|
97
|
+
node: AztecNode;
|
|
98
|
+
/** The node's URL — reaches its debug API for local time-warping while a bridge settles. */
|
|
99
|
+
nodeUrl?: string;
|
|
100
|
+
wallet: Wallet;
|
|
101
|
+
/**
|
|
102
|
+
* Working accounts (those with pending work) with their resolved {@link FeePolicy} + funding (from
|
|
103
|
+
* {@link accountFunding}) — so this function doesn't re-read balances.
|
|
104
|
+
*/
|
|
105
|
+
accounts: {
|
|
106
|
+
address: AztecAddress;
|
|
107
|
+
policy: FeePolicy;
|
|
108
|
+
funding: AccountFunding;
|
|
109
|
+
}[];
|
|
110
|
+
state: DeployState;
|
|
111
|
+
persist: () => void;
|
|
112
|
+
reporter: DeployReporter;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Resolves fees ahead of execution, per account: registers the shared SponsoredFPC (for sponsored
|
|
116
|
+
* accounts), or tops up a fee-juice account via a bridge (reusing a persisted pending claim when
|
|
117
|
+
* present). Returns a {@link FeeSession} that dispenses the right fee per tx, by sending account.
|
|
118
|
+
*/
|
|
119
|
+
export declare function prepareFeeSession(opts: PrepareFeeSessionOpts): Promise<FeeSession>;
|
|
120
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RlcGxveS9mZWVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7O0dBVUc7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