@effectstream/orchestrator 0.100.15 → 0.100.16
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/README.md +14 -7
- package/package.json +3 -2
- package/scripts/launch-celestia.ts +67 -0
package/README.md
CHANGED
|
@@ -7,6 +7,11 @@ Cardano-side services, Avail node + light client, NEAR sandbox,
|
|
|
7
7
|
Celestia, plus the EffectStream sync + runtime + batcher — in the right
|
|
8
8
|
order, with health checks.
|
|
9
9
|
|
|
10
|
+
- One CLI that starts every dependency a template needs: DB, chains, sync, runtime, batcher.
|
|
11
|
+
- Dependency-graph aware: runs in parallel where it can, sequential where it must.
|
|
12
|
+
- Disable any chain with `DISABLE_EVM=true`, `DISABLE_BITCOIN=true`, ...
|
|
13
|
+
- Used by every template in this repo and by the E2E runner.
|
|
14
|
+
|
|
10
15
|
## Install
|
|
11
16
|
|
|
12
17
|
```bash
|
|
@@ -64,8 +69,10 @@ export const config: OrchestratorConfig = {
|
|
|
64
69
|
|
|
65
70
|
Common chain launchers ship as subpath scripts you can compose: `./launch-pglite`,
|
|
66
71
|
`./launch-evm`, `./launch-bitcoin`, `./launch-cardano`, `./launch-midnight`,
|
|
67
|
-
`./launch-avail`, `./launch-near`. Each wraps a pinned binary from
|
|
68
|
-
|
|
72
|
+
`./launch-avail`, `./launch-near`. Each wraps a pinned binary from a
|
|
73
|
+
package under `packages/binaries/` (e.g. `@effectstream/npm-midnight-node`,
|
|
74
|
+
`@effectstream/bitcoin-core`, `@effectstream/near-sandbox`) with sensible
|
|
75
|
+
defaults.
|
|
69
76
|
|
|
70
77
|
> **Tip:** Disable chains you don't need with env vars: `DISABLE_EVM=true`,
|
|
71
78
|
> `DISABLE_BITCOIN=true`, `DISABLE_MIDNIGHT=true`, etc. Same flags work for
|
|
@@ -90,10 +97,10 @@ Global flags:
|
|
|
90
97
|
## Inside EffectStream
|
|
91
98
|
|
|
92
99
|
Every template under
|
|
93
|
-
[`templates/`](https://github.com/
|
|
100
|
+
[`templates/`](https://github.com/effectstream/effectstream/tree/main/templates)
|
|
94
101
|
defines an `orchestrator.config.ts` (or `.json`) and starts dev with one
|
|
95
102
|
command. The E2E runner at
|
|
96
|
-
[`e2e/runner.ts`](https://github.com/
|
|
103
|
+
[`e2e/runner.ts`](https://github.com/effectstream/effectstream/blob/main/e2e/runner.ts)
|
|
97
104
|
is the same machinery, serialised across nine chain suites.
|
|
98
105
|
|
|
99
106
|
## Key subpath exports
|
|
@@ -105,12 +112,12 @@ is the same machinery, serialised across nine chain suites.
|
|
|
105
112
|
|
|
106
113
|
## Examples
|
|
107
114
|
|
|
108
|
-
- Templates: every directory under [`templates/`](https://github.com/
|
|
109
|
-
- E2E: [`e2e/`](https://github.com/
|
|
115
|
+
- Templates: every directory under [`templates/`](https://github.com/effectstream/effectstream/tree/main/templates) ships a working orchestrator config.
|
|
116
|
+
- E2E: [`e2e/`](https://github.com/effectstream/effectstream/tree/main/e2e) drives the orchestrator under the hood.
|
|
110
117
|
|
|
111
118
|
Runnable: [`test/examples.test.ts`](./test/examples.test.ts).
|
|
112
119
|
|
|
113
120
|
## Links
|
|
114
121
|
|
|
115
122
|
- Docs: https://effectstream.github.io/docs/packages/tools/orchestrator
|
|
116
|
-
- Source: https://github.com/
|
|
123
|
+
- Source: https://github.com/effectstream/effectstream/tree/main/packages/build-tools/orchestrator
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effectstream/orchestrator",
|
|
3
|
-
"version": "0.100.
|
|
3
|
+
"version": "0.100.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://effectstream.github.io/docs/",
|
|
6
6
|
"repository": {
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"./launch-cardano": "./scripts/launch-cardano.ts",
|
|
21
21
|
"./launch-midnight": "./scripts/launch-midnight.ts",
|
|
22
22
|
"./launch-avail": "./scripts/launch-avail.ts",
|
|
23
|
+
"./launch-celestia": "./scripts/launch-celestia.ts",
|
|
23
24
|
"./launch-near": "./scripts/launch-near.ts",
|
|
24
25
|
"./wait-tcp": "./scripts/wait-tcp.ts",
|
|
25
26
|
"./wait-http": "./scripts/wait-http.ts"
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"start": "bun src/cli.ts start"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@effectstream/db": "0.100.
|
|
35
|
+
"@effectstream/db": "0.100.16"
|
|
35
36
|
},
|
|
36
37
|
"description": "Multi-chain local development environment for EffectStream"
|
|
37
38
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { ProcessConfig } from "../src/config.ts";
|
|
2
|
+
import { resolvePackageDir, type ResolveLocation } from "./resolve-package.ts";
|
|
3
|
+
|
|
4
|
+
export const CelestiaNames = {
|
|
5
|
+
CLEAN: "celestia-clean",
|
|
6
|
+
DEVNET: "celestia-devnet",
|
|
7
|
+
BRIDGE_WAIT: "celestia-bridge-wait",
|
|
8
|
+
FUND: "celestia-fund-bridge",
|
|
9
|
+
} as const;
|
|
10
|
+
|
|
11
|
+
const REQUIRED_SCRIPTS = {
|
|
12
|
+
"celestia-bridge:start": "Start the Celestia consensus node + bridge",
|
|
13
|
+
"celestia-bridge:wait": "Wait for the Celestia bridge RPC to be ready",
|
|
14
|
+
"celestia-fund:bridge": "Fund the bridge node wallet with tokens",
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
export function launchCelestia(
|
|
18
|
+
packageName: string,
|
|
19
|
+
location: ResolveLocation,
|
|
20
|
+
opts?: { ports?: number[]; home?: string },
|
|
21
|
+
): ProcessConfig[] {
|
|
22
|
+
const cwd = resolvePackageDir("launchCelestia", packageName, location, REQUIRED_SCRIPTS);
|
|
23
|
+
const ports = opts?.ports ?? [26657, 26658];
|
|
24
|
+
const home = opts?.home ?? "/tmp/celestia-home";
|
|
25
|
+
|
|
26
|
+
const cleanScript =
|
|
27
|
+
`await import('fs').then(fs => { try { fs.rmSync('${home}', { recursive: true, force: true }); } catch {} }); console.log('Celestia home cleaned');`;
|
|
28
|
+
|
|
29
|
+
return [
|
|
30
|
+
{
|
|
31
|
+
name: CelestiaNames.CLEAN,
|
|
32
|
+
description: "Remove stale Celestia devnet data",
|
|
33
|
+
args: ["-e", cleanScript],
|
|
34
|
+
waitToExit: true,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: CelestiaNames.DEVNET,
|
|
38
|
+
description: `Celestia consensus node + bridge (${packageName} celestia-bridge:start)`,
|
|
39
|
+
cwd,
|
|
40
|
+
stopProcessAtPort: ports,
|
|
41
|
+
args: ["run", "celestia-bridge:start"],
|
|
42
|
+
env: { CELESTIA_HOME: home, CELESTIA_FORCE_NO_BBR: "1" },
|
|
43
|
+
waitToExit: false,
|
|
44
|
+
critical: true,
|
|
45
|
+
silent: true,
|
|
46
|
+
dependsOn: [CelestiaNames.CLEAN],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: CelestiaNames.BRIDGE_WAIT,
|
|
50
|
+
description: `Wait for Celestia bridge RPC (${packageName} celestia-bridge:wait)`,
|
|
51
|
+
cwd,
|
|
52
|
+
args: ["run", "celestia-bridge:wait"],
|
|
53
|
+
waitToExit: true,
|
|
54
|
+
dependsOn: [CelestiaNames.DEVNET],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: CelestiaNames.FUND,
|
|
58
|
+
description: `Fund the Celestia bridge wallet (${packageName} celestia-fund:bridge)`,
|
|
59
|
+
cwd,
|
|
60
|
+
args: ["run", "celestia-fund:bridge"],
|
|
61
|
+
env: { CELESTIA_HOME: home },
|
|
62
|
+
waitToExit: true,
|
|
63
|
+
critical: true,
|
|
64
|
+
dependsOn: [CelestiaNames.BRIDGE_WAIT],
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
}
|