@parity/ppn 0.2.0-rc.1

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 (147) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +84 -0
  3. package/config/ports.env +128 -0
  4. package/config/versions.env +120 -0
  5. package/dist/bin.d.ts +2 -0
  6. package/dist/bin.js +30 -0
  7. package/dist/bin.js.map +1 -0
  8. package/dist/cli.d.ts +3 -0
  9. package/dist/cli.js +471 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/commands/bite.d.ts +27 -0
  12. package/dist/commands/bite.js +556 -0
  13. package/dist/commands/bite.js.map +1 -0
  14. package/dist/commands/dashboard.d.ts +2 -0
  15. package/dist/commands/dashboard.js +503 -0
  16. package/dist/commands/dashboard.js.map +1 -0
  17. package/dist/commands/dist.d.ts +7 -0
  18. package/dist/commands/dist.js +121 -0
  19. package/dist/commands/dist.js.map +1 -0
  20. package/dist/commands/fetch.d.ts +11 -0
  21. package/dist/commands/fetch.js +550 -0
  22. package/dist/commands/fetch.js.map +1 -0
  23. package/dist/commands/fork.d.ts +1 -0
  24. package/dist/commands/fork.js +164 -0
  25. package/dist/commands/fork.js.map +1 -0
  26. package/dist/commands/generate.d.ts +7 -0
  27. package/dist/commands/generate.js +201 -0
  28. package/dist/commands/generate.js.map +1 -0
  29. package/dist/commands/genesis-toml.d.ts +1 -0
  30. package/dist/commands/genesis-toml.js +26 -0
  31. package/dist/commands/genesis-toml.js.map +1 -0
  32. package/dist/commands/nginx-conf.d.ts +1 -0
  33. package/dist/commands/nginx-conf.js +32 -0
  34. package/dist/commands/nginx-conf.js.map +1 -0
  35. package/dist/commands/service-context.d.ts +13 -0
  36. package/dist/commands/service-context.js +5 -0
  37. package/dist/commands/service-context.js.map +1 -0
  38. package/dist/commands/service.d.ts +28 -0
  39. package/dist/commands/service.js +807 -0
  40. package/dist/commands/service.js.map +1 -0
  41. package/dist/commands/stamp-spawn.d.ts +7 -0
  42. package/dist/commands/stamp-spawn.js +43 -0
  43. package/dist/commands/stamp-spawn.js.map +1 -0
  44. package/dist/commands/start.d.ts +33 -0
  45. package/dist/commands/start.js +462 -0
  46. package/dist/commands/start.js.map +1 -0
  47. package/dist/commands/upgrade.d.ts +15 -0
  48. package/dist/commands/upgrade.js +101 -0
  49. package/dist/commands/upgrade.js.map +1 -0
  50. package/dist/fork/chains.d.ts +25 -0
  51. package/dist/fork/chains.js +36 -0
  52. package/dist/fork/chains.js.map +1 -0
  53. package/dist/fork/codec.d.ts +36 -0
  54. package/dist/fork/codec.js +122 -0
  55. package/dist/fork/codec.js.map +1 -0
  56. package/dist/fork/manifest.d.ts +13 -0
  57. package/dist/fork/manifest.js +77 -0
  58. package/dist/fork/manifest.js.map +1 -0
  59. package/dist/fork/overrides.d.ts +45 -0
  60. package/dist/fork/overrides.js +255 -0
  61. package/dist/fork/overrides.js.map +1 -0
  62. package/dist/fork/products.d.ts +68 -0
  63. package/dist/fork/products.js +265 -0
  64. package/dist/fork/products.js.map +1 -0
  65. package/dist/fork/rpc.d.ts +25 -0
  66. package/dist/fork/rpc.js +51 -0
  67. package/dist/fork/rpc.js.map +1 -0
  68. package/dist/fork/shared-relay.d.ts +99 -0
  69. package/dist/fork/shared-relay.js +162 -0
  70. package/dist/fork/shared-relay.js.map +1 -0
  71. package/dist/fork/sleep.d.ts +3 -0
  72. package/dist/fork/sleep.js +2 -0
  73. package/dist/fork/sleep.js.map +1 -0
  74. package/dist/fork/validators.d.ts +81 -0
  75. package/dist/fork/validators.js +170 -0
  76. package/dist/fork/validators.js.map +1 -0
  77. package/dist/fork/verify.d.ts +79 -0
  78. package/dist/fork/verify.js +192 -0
  79. package/dist/fork/verify.js.map +1 -0
  80. package/dist/lib/archive.d.ts +8 -0
  81. package/dist/lib/archive.js +40 -0
  82. package/dist/lib/archive.js.map +1 -0
  83. package/dist/lib/fork-bundle-name.d.ts +4 -0
  84. package/dist/lib/fork-bundle-name.js +20 -0
  85. package/dist/lib/fork-bundle-name.js.map +1 -0
  86. package/dist/lib/github.d.ts +48 -0
  87. package/dist/lib/github.js +192 -0
  88. package/dist/lib/github.js.map +1 -0
  89. package/dist/lib/provenance.d.ts +67 -0
  90. package/dist/lib/provenance.js +98 -0
  91. package/dist/lib/provenance.js.map +1 -0
  92. package/dist/lib/spawn-env.d.ts +33 -0
  93. package/dist/lib/spawn-env.js +71 -0
  94. package/dist/lib/spawn-env.js.map +1 -0
  95. package/dist/lib/spawn-stamp.d.ts +34 -0
  96. package/dist/lib/spawn-stamp.js +63 -0
  97. package/dist/lib/spawn-stamp.js.map +1 -0
  98. package/dist/upgrade/chains.d.ts +4 -0
  99. package/dist/upgrade/chains.js +17 -0
  100. package/dist/upgrade/chains.js.map +1 -0
  101. package/dist/upgrade/fund.d.ts +38 -0
  102. package/dist/upgrade/fund.js +119 -0
  103. package/dist/upgrade/fund.js.map +1 -0
  104. package/dist/upgrade/provider-node.d.ts +2 -0
  105. package/dist/upgrade/provider-node.js +7 -0
  106. package/dist/upgrade/provider-node.js.map +1 -0
  107. package/dist/upgrade/signer.d.ts +21 -0
  108. package/dist/upgrade/signer.js +48 -0
  109. package/dist/upgrade/signer.js.map +1 -0
  110. package/dist/upgrade/sudo.d.ts +2 -0
  111. package/dist/upgrade/sudo.js +26 -0
  112. package/dist/upgrade/sudo.js.map +1 -0
  113. package/dist/upgrade/upgrade.d.ts +128 -0
  114. package/dist/upgrade/upgrade.js +539 -0
  115. package/dist/upgrade/upgrade.js.map +1 -0
  116. package/networks/README.md +120 -0
  117. package/networks/devnet.json +113 -0
  118. package/networks/kusama.json +56 -0
  119. package/networks/paseo-next-v2.json +87 -0
  120. package/networks/polkadot.json +57 -0
  121. package/networks/previewnet.json +186 -0
  122. package/package.json +54 -0
  123. package/scripts/assign-cores.sh +12 -0
  124. package/scripts/dashboard.sh +11 -0
  125. package/scripts/docker-entrypoint.sh +52 -0
  126. package/scripts/dub/postgres.sh +116 -0
  127. package/scripts/dub/service.sh +202 -0
  128. package/scripts/ensure-dot-cli.sh +23 -0
  129. package/scripts/eth-rpc.sh +45 -0
  130. package/scripts/force-open-hrmp.sh +11 -0
  131. package/scripts/grant-invites.sh +11 -0
  132. package/scripts/increase-people-lite-attestation-allowance.sh +11 -0
  133. package/scripts/install.sh +12 -0
  134. package/scripts/ipfs-daemon.sh +48 -0
  135. package/scripts/ipfs-swarm.sh +48 -0
  136. package/scripts/kill-port.sh +11 -0
  137. package/scripts/lib/workspace.sh +47 -0
  138. package/scripts/omni-node.sh +112 -0
  139. package/scripts/patch-bootnodes.sh +11 -0
  140. package/scripts/pin-bulletin-products.sh +11 -0
  141. package/scripts/pin-design-families.sh +144 -0
  142. package/scripts/set-dispatcher-address.sh +11 -0
  143. package/scripts/storage-provider-node.sh +11 -0
  144. package/web/assets/index-BW4b1s2y.js +7 -0
  145. package/web/assets/index-X3pZpnYk.css +1 -0
  146. package/web/index.html +13 -0
  147. package/zombienet-configs/local-dev.toml +253 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # @parity/ppn
2
+
3
+ Spawn a local Polkadot ecosystem — a relay chain and its parachains — either from genesis or forked
4
+ from a live network's state, and drive everything around it: fetching binaries and runtimes,
5
+ generating chain specs, running the services a network needs, and upgrading a running chain.
6
+
7
+ ```bash
8
+ npm install -g @parity/ppn # puts `ppn` on your PATH
9
+ ppn --help
10
+ ```
11
+
12
+ Or without installing: `npx @parity/ppn --help`. Requires Node.js 22+.
13
+
14
+ ## Point it at a network
15
+
16
+ **This package is the engine, not a network.** What to run is a *descriptor*:
17
+ `networks/<name>.json`, stating which binary every chain runs, which release it comes from, which
18
+ runtime it starts from, and what services and tools it needs. Descriptors are yours — they name your
19
+ sources — so none ship here.
20
+
21
+ `ppn` finds them in this order:
22
+
23
+ 1. `$PPN_HOME`, if set — a directory containing a `networks/` folder;
24
+ 2. otherwise the nearest ancestor of your working directory that has one.
25
+
26
+ That same directory holds the state: `bin/` for downloaded binaries (~500 MB), `data/` for chain
27
+ state, `fork-bundle*/` for bitten networks.
28
+
29
+ ```bash
30
+ export PPN_HOME=~/my-network # contains networks/my-net.json
31
+ ppn show # what resolves: binaries, runtimes, releases, services
32
+ ppn start # fetch what is missing, build specs, spawn
33
+ ppn kill # stop it, including the auxiliary services
34
+ ```
35
+
36
+ ## Commands
37
+
38
+ | | |
39
+ | --- | --- |
40
+ | `ppn show [network] [--json]` | everything a network resolves to; `--json` is the machine-readable form |
41
+ | `ppn fetch [--if-needed]` | download exactly the binaries and runtimes the descriptor names |
42
+ | `ppn generate` | build the chain specs a genesis network starts from |
43
+ | `ppn start [--fork] [--clean]` | spawn, fetching and generating whatever is missing |
44
+ | `ppn kill` | stop the network and free its ports |
45
+ | `ppn bite` / `ppn fork …` | capture a live network's state, and spawn from that capture |
46
+ | `ppn upgrade <chain> <wasm>` | authorize and apply a runtime upgrade on a running chain |
47
+ | `ppn service <name>` | the processes the spawner starts alongside the nodes |
48
+
49
+ ## Overriding versions
50
+
51
+ Any release or binary can be repointed without editing a descriptor, which is what makes this useful
52
+ in a release gate — run the same network against a candidate build:
53
+
54
+ ```bash
55
+ ppn fetch --binary polkadot-omni-node=paritytech/release-automation@polkadot-weekly2026w33-rc2
56
+ ppn fetch --release polkadot-sdk=paritytech/polkadot-sdk@polkadot-stable2606-1
57
+ ppn fetch --binary polkadot-omni-node=file:/path/to/your/build
58
+
59
+ # or through the environment, for anything that cannot take flags
60
+ PPN_BINARIES="polkadot-omni-node=paritytech/release-automation@latest" ppn start
61
+ ```
62
+
63
+ Overrides are applied inside the loader, so `fetch`, `generate`, `bite` and `show` cannot disagree
64
+ about what is running. An unknown binary or release name is refused rather than ignored, and
65
+ `ppn show --json` marks every overridden slot — so a gate can report what actually executed instead
66
+ of what it asked for.
67
+
68
+ ## Authentication
69
+
70
+ `ppn fetch` reads GitHub releases, some of which may be private. It uses `GITHUB_TOKEN` if set,
71
+ otherwise the credentials `gh auth login` writes for git. When a token cannot see something, the
72
+ fetch fails naming the artifact and the repository rather than leaving `bin/` half-populated.
73
+
74
+ ## Reading a network from code
75
+
76
+ `@parity/ppn-network-config` exposes the same descriptor loading as a library, for tools that want
77
+ the facts without shelling out:
78
+
79
+ ```ts
80
+ import { loadNetwork, networkChains, networkBinaries } from '@parity/ppn-network-config';
81
+
82
+ const net = loadNetwork('my-net');
83
+ networkChains(net).map((c) => [c.key, c.binary.name]);
84
+ ```
@@ -0,0 +1,128 @@
1
+ # config/ports.env - Port configuration for PPN
2
+ # Update this file when adding/removing validators or chains
3
+ # Run scripts/validate-ports.sh to verify consistency with toml-generator
4
+
5
+ # Relay chain validator RPC ports
6
+ RELAY_ALICE_PORT=10000
7
+ RELAY_BOB_PORT=10001
8
+ RELAY_CHARLIE_PORT=10002
9
+ RELAY_DAVE_PORT=10003
10
+ RELAY_EVE_PORT=10004
11
+ RELAY_FERDIE_PORT=10005
12
+
13
+ # Parachain collator RPC ports
14
+ PEOPLE_PORT=10010
15
+ ASSET_HUB_PORT=10020
16
+ BULLETIN_PORT=10030
17
+ WEB3_STORAGE_PORT=10040
18
+
19
+ # Parachain IDs are NOT here: they belong to the network, not the machine, and two
20
+ # networks use different ones (previewnet 1500+, devnet 1000+). Each chain declares
21
+ # its own in networks/<name>.json — see networks/README.md. This file holds only what
22
+ # is local: which port each chain listens on.
23
+
24
+ # P2P ports (must be reachable for external nodes to connect)
25
+ RELAY_ALICE_P2P_PORT=30334
26
+ ASSET_HUB_P2P_PORT=30335
27
+ PEOPLE_P2P_PORT=30336
28
+ BULLETIN_P2P_PORT=30333
29
+ WEB3_STORAGE_P2P_PORT=30337
30
+
31
+ # P2P WSS ports (must be reachable for in-browser light clients to connect)
32
+ #
33
+ # nginx terminates TLS on these and proxies to the P2P WS ports above.
34
+ # Each is the matching P2P WS port + 1000.
35
+ RELAY_ALICE_P2P_WSS_PORT=31334
36
+ ASSET_HUB_P2P_WSS_PORT=31335
37
+ PEOPLE_P2P_WSS_PORT=31336
38
+ BULLETIN_P2P_WSS_PORT=31333
39
+ WEB3_STORAGE_P2P_WSS_PORT=31337
40
+
41
+ # Bootnode hostname (127.0.0.1 for local, override in ppn.service for server)
42
+ BOOTNODE_HOSTNAME=127.0.0.1
43
+
44
+ # Storage-provider data dir (disk mode). Empty locally so the wrapper derives it
45
+ # from DATA_DIR; server/redeploy.sh patches this to an absolute path under the
46
+ # persistent DATA_DIR, because zombie-cli does not forward env vars to
47
+ # custom_processes (same reason BOOTNODE_HOSTNAME is patched here).
48
+ WEB3_STORAGE_PROVIDER_DATA_DIR=
49
+
50
+ # Storage-provider storage mode: "disk" (persistent) or "inmemory" (ephemeral).
51
+ # Defaults to disk. zombie-cli does not forward env vars to custom_processes, so
52
+ # EPHEMERAL cannot reach the wrapper directly; for native runs `make start`
53
+ # regenerates config/ports.local.env (sourced after this file) to flip the mode
54
+ # to inmemory under EPHEMERAL=1. The server stays on the disk default.
55
+ WEB3_STORAGE_PROVIDER_STORAGE_MODE=disk
56
+
57
+ # Auxiliary service ports (defaults from binaries)
58
+ ETH_RPC_PORT=8545
59
+
60
+ # eth-rpc's receipt/index cache. Empty locally so the wrapper derives it from
61
+ # DATA_DIR (as $DATA_DIR/eth-rpc-db — NOT eth-rpc, which is where zombienet
62
+ # writes that process's log); server/redeploy.sh patches this to an absolute
63
+ # path under the persistent DATA_DIR, for the same reason
64
+ # WEB3_STORAGE_PROVIDER_DATA_DIR above is patched (zombie-cli does not forward
65
+ # env vars to custom_processes). The cache must share the chain data's lifetime:
66
+ # a cache left over from a wiped chain makes eth-rpc exit with ChainMismatch.
67
+ ETH_RPC_DATA_DIR=
68
+ IPFS_GATEWAY_PORT=8080
69
+ IPFS_API_PORT=5001
70
+ IPFS_SWARM_PORT=4001
71
+ WEB3_STORAGE_PROVIDER_PORT=3333
72
+
73
+ # Identity backend ports (see docs/DEVICE-UNIQUENESS-BACKEND.md)
74
+ #
75
+ # Kept out of the 10000-10040 band on purpose: that band is node RPC ports, one
76
+ # per chain, and anything adjacent to it reads as "the next parachain". These
77
+ # sit with the other auxiliary HTTP services instead, and Postgres keeps its own
78
+ # well-known number (offset by one so it does not fight a developer's system
79
+ # Postgres on 5432).
80
+ #
81
+ # Deliberately absent from ALL_PORTS below: that list is compared against the
82
+ # TOML's rpc_port entries by scripts/validate-ports.sh, and these are plain
83
+ # services, not nodes.
84
+ DUB_POSTGRES_PORT=5433
85
+
86
+ # The device-uniqueness backend's single origin: every HTTP surface, on one port. Backend v0.2.0
87
+ # ships one binary whose `all-in-one` role merges the six HTTP services behind the route
88
+ # table it compiles in, which is why there is one port here and not one per service — and
89
+ # why PPN no longer runs a gateway of its own to reassemble them.
90
+ DUB_PORT=8092
91
+ # The dashboard: the network's own status UI and API (docs/DASHBOARD.md)
92
+ DASHBOARD_PORT=8090
93
+
94
+ # What the dashboard advertises as the public address of every chain and service. Empty
95
+ # locally, so it falls back to http://127.0.0.1:$DASHBOARD_PORT; server/redeploy.sh patches
96
+ # it to https://$PPN_DOMAIN. It lives here and not only in /etc/ppn/deploy.env because
97
+ # deploy.env reaches ppn.service and stops there — zombienet hands the dashboard, which is a
98
+ # custom process, no environment at all. Without it a server tells every browser behind nginx
99
+ # to connect to 127.0.0.1.
100
+ PPN_PUBLIC_URL=
101
+
102
+ # Where this run's chain state and per-process logs live. Empty locally: `ppn start`
103
+ # resolves it per mode (data/ vs data-fork/) and writes the answer to
104
+ # config/ports.local.env, which is sourced after this file. A server never runs
105
+ # `ppn start` — ppn.service spawns zombie-cli directly — so nothing wrote it there
106
+ # and the dashboard fell back to <release>/data, an empty directory: no logs, no
107
+ # spawn stamp, no chain-spec downloads. server/redeploy.sh patches this to the
108
+ # persistent DATA_DIR, for the same reason the three paths above are patched
109
+ # (zombie-cli does not forward env vars to custom_processes).
110
+ PPN_DATA_DIR=
111
+
112
+ # Postgres cluster directory. Empty locally so the wrapper derives it from
113
+ # DATA_DIR (as $DATA_DIR/identity-pgdata — NOT $DATA_DIR/dub-postgres, which is
114
+ # where zombienet writes that process's log, and initdb refuses a non-empty dir).
115
+ #
116
+ # The directory keeps the name identity-pgdata deliberately: renaming a state path
117
+ # orphans the cluster already on a deployed server, which would silently reinitialise
118
+ # an empty one. A name is not worth someone's data.
119
+ # server/redeploy.sh patches this to an absolute path under the persistent
120
+ # DATA_DIR, for the same reason WEB3_STORAGE_PROVIDER_DATA_DIR above is patched
121
+ # (zombie-cli does not forward env vars to custom_processes).
122
+ DUB_POSTGRES_DATA_DIR=
123
+
124
+
125
+ # Aggregate lists (used by server-redeploy.sh)
126
+ RELAY_PORTS="$RELAY_ALICE_PORT $RELAY_BOB_PORT $RELAY_CHARLIE_PORT $RELAY_DAVE_PORT $RELAY_EVE_PORT $RELAY_FERDIE_PORT"
127
+ PARACHAIN_PORTS="$PEOPLE_PORT $ASSET_HUB_PORT $BULLETIN_PORT $WEB3_STORAGE_PORT"
128
+ ALL_PORTS="$RELAY_PORTS $PARACHAIN_PORTS"
@@ -0,0 +1,120 @@
1
+ # config/versions.env - Versions of the shared local toolchain
2
+ #
3
+ # What is NOT here: anything a network is made of. Node binaries, runtimes, the
4
+ # service binaries and the bite tool are declared per network — with their release
5
+ # and version — in networks/<name>.json, because two networks legitimately run
6
+ # different builds of the same component. See networks/README.md.
7
+ #
8
+ # What is here: tools that are the same whichever network is running.
9
+
10
+ # =============================================================================
11
+ # The engine's own release channels
12
+ # =============================================================================
13
+ # The engine builds no binaries or runtimes — every one is pinned below and fetched from
14
+ # the release of the repo that owns it. Two channels are its own:
15
+ #
16
+ # PPN_TAG stable semver releases: the deployable dist tarball, its changelog and
17
+ # the Docker image. These own GitHub `latest`.
18
+ # PPN_BITE_TAG one rolling pre-release carrying the fork bundles (one per pre-bitten
19
+ # network), refreshed by the nightly bite. Pre-releases never become
20
+ # `latest`, so bundles can churn nightly without moving what deploys resolve.
21
+ #
22
+ # Bundles come only from PPN_BITE_TAG: a stable release carries none, and there is nothing
23
+ # to walk back through — the rolling tag is either current or the nightly failed, in which
24
+ # case FRESH_BITE=1 bites the source directly.
25
+ PPN_REPO="${PPN_REPO:-paritytech/previewnet-engine}"
26
+ PPN_TAG="${PPN_TAG:-latest}"
27
+ PPN_BITE_TAG="${PPN_BITE_TAG:-bites}"
28
+
29
+ # =============================================================================
30
+ # Node binaries, runtimes, service binaries → networks/<name>.json
31
+ # =============================================================================
32
+ # Each chain declares the binary it runs and the release it comes from; genesis
33
+ # networks also declare each chain's runtime WASM. `make fetch` downloads exactly
34
+ # that set, into bin/ (previewnet) or bin/<network>/.
35
+ #
36
+ # Only genesis (previewnet) fetches runtimes at all. Every source they come from is public
37
+ # now — previewnet's Asset Hub and People runtimes moved to paritytech/individuality-community
38
+ # — so the only thing a fetch still needs a token for is PPN's *own* release assets (the DotNS
39
+ # genesis artifacts), which live in this private repo.
40
+
41
+ # =============================================================================
42
+ # Zombienet CLI
43
+ # =============================================================================
44
+ ZOMBIENET_REPO="paritytech/zombienet-sdk"
45
+ ZOMBIENET_VERSION="v0.4.15"
46
+
47
+ # =============================================================================
48
+ # Doppelganger — only needed to CREATE a fork bundle → networks/<name>.json
49
+ # =============================================================================
50
+ # Pinned per network as bite.doppelganger, since the build has to be able to
51
+ # execute the runtimes of the network being bitten. Restoring a published bundle
52
+ # (`make start FORK=1`) needs none of it: the forked network runs on the regular
53
+ # node binaries.
54
+
55
+ # =============================================================================
56
+ # Kubo IPFS
57
+ # =============================================================================
58
+ KUBO_REPO="ipfs/kubo"
59
+ KUBO_VERSION="v0.39.0"
60
+
61
+ # =============================================================================
62
+ # Identity Backend (see docs/DEVICE-UNIQUENESS-BACKEND.md)
63
+ # =============================================================================
64
+ # PPN used to compile this itself, because the repo published container images only. As of
65
+ # v0.2.0 it publishes per-target binary tarballs — one binary per triple, with every service a
66
+ # `--role` of it — so `ppn fetch` takes the binary from upstream and `build-identity-backend`
67
+ # is gone from release.yml. With it went the failure mode where a broken backend build
68
+ # published a PPN release whose backend services were simply absent.
69
+ #
70
+ # Public, as of the -community repo below, so no token is needed to read it — which is why
71
+ # the deploy's GitHub App no longer lists it and PPN_GITHUB_TOKEN no longer has to see it.
72
+ # The API reference `/docs` serves comes from the same tag, out of the tree
73
+ # (docs/api-reference/) — the release carries the tarballs and SHA256SUMS, and nothing else.
74
+ #
75
+ # Moving this pin is not only a version change. v0.3.0 renamed the binary `ibv2` -> `dub` and
76
+ # its assets with it, renamed the identity service (and its roles and config keys) to
77
+ # device-attestation, and deleted the dim-tickets service — a role a deployment still lists is
78
+ # a boot failure, not a warning. `ppn fetch` and packages/network-config/src/dub.ts read this
79
+ # tag but not its release notes, so a bump needs both changed together.
80
+ #
81
+ # v0.4.0 is that repo's first public release, and its version does not continue the private
82
+ # 0.1-0.3 series: upstream skipped to 0.4.0 so these binaries cannot be confused with the
83
+ # public `docker.io/paritytech/device-uniqueness-backend` images tagged 0.1-0.3, which were
84
+ # built from older source. It kept the asset naming (dub-<version>-<triple>.tar.gz), the roles
85
+ # PPN spawns (all-in-one plus the three single-instance workers) and every config key in
86
+ # dub.ts — checked by booting each role against this env, not read off the release notes.
87
+ # `INVITE_INVITER_*` in upstream's .env.example is compose's host-side naming; the key the
88
+ # binary reads is still INVITER_ADDRESS.
89
+ DUB_REPO="paritytech/device-uniqueness-backend-community"
90
+ DUB_TAG="${DUB_TAG:-v0.4.0}"
91
+
92
+ # Portable PostgreSQL for the backend services. Fetched straight from upstream
93
+ # (public repo, no auth) because it is not a PPN build product. This is the
94
+ # distribution the postgresql_embedded crate uses; 16.x matches the Postgres
95
+ # version device-uniqueness-backend's own compose file pins.
96
+ POSTGRES_REPO="theseus-rs/postgresql-binaries"
97
+ POSTGRES_VERSION="16.14.0"
98
+
99
+ # =============================================================================
100
+ # DotNS - Naming Service Genesis Contracts (deployed on Asset Hub from genesis)
101
+ # =============================================================================
102
+ # Since dotns v0.5.6-rc1 the release itself carries the pallet-revive genesis
103
+ # (dotns-genesis-<tld>.json), built and address-parity-checked in dotns CI, so PPN
104
+ # fetches it instead of cloning dotns and running the deploy pipeline locally.
105
+ # Pinned to the first release that has it; move to "latest" once a full (non-rc)
106
+ # release carries the asset.
107
+ DOTNS_REPO="paritytech/dotns"
108
+ DOTNS_TAG="v0.5.7-rc1"
109
+ # Which TLD's genesis to fetch is NOT pinned here: the network descriptor's
110
+ # genesisConfig.networkSuffix is the namespace, and the DotNS TLD is the same value —
111
+ # one knob, so the two cannot drift. The artifact stamps its own TLD and injection
112
+ # asserts it against the descriptor.
113
+
114
+ # =============================================================================
115
+ # Proof of Ink Design Families (tattoo data for IPFS pinning)
116
+ # =============================================================================
117
+ # Fetched from the upstream repo, which is public now. Its v0.1.0 zip is
118
+ # byte-identical to the copy PPN used to re-publish, so the pinned CIDs hold.
119
+ DESIGN_FAMILIES_REPO="${DESIGN_FAMILIES_REPO:-paritytech/proof-of-ink-design-families}"
120
+ DESIGN_FAMILIES_VERSION="${DESIGN_FAMILIES_VERSION:-v0.1.0}"
package/dist/bin.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/bin.js ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ // The `ppn` executable. Everything it can do lives in ./cli.ts; this only hands off argv.
3
+ //
4
+ // One thing has to happen first. The launchers and the neutral defaults ship in *this* package,
5
+ // while the code that reads them ships in @parity/ppn-network-config — so that library cannot
6
+ // find them by looking outward from itself: once installed, it only ever reaches node_modules.
7
+ // This file is inside the package that carries the data, so it is the one place that can say
8
+ // where the data is. In a checkout it resolves to the repo root and changes nothing.
9
+ //
10
+ // argv[1] is not a substitute: npm installs the bin as a symlink under node_modules/.bin, so
11
+ // walking up from it lands in the consumer's project, not in this package.
12
+ import fs from 'node:fs';
13
+ import path from 'node:path';
14
+ if (!process.env.PPN_PACKAGE_ROOT) {
15
+ let dir = import.meta.dirname;
16
+ for (let i = 0; i < 8; i++) {
17
+ if (fs.existsSync(path.join(dir, 'config', 'ports.env')) &&
18
+ fs.existsSync(path.join(dir, 'scripts'))) {
19
+ process.env.PPN_PACKAGE_ROOT = dir;
20
+ break;
21
+ }
22
+ const parent = path.dirname(dir);
23
+ if (parent === dir)
24
+ break;
25
+ dir = parent;
26
+ }
27
+ }
28
+ const { main } = await import('./cli.js');
29
+ await main(process.argv.slice(2));
30
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,0FAA0F;AAC1F,EAAE;AACF,gGAAgG;AAChG,8FAA8F;AAC9F,+FAA+F;AAC/F,6FAA6F;AAC7F,qFAAqF;AACrF,EAAE;AACF,6FAA6F;AAC7F,2EAA2E;AAE3E,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAClC,IAAI,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;IAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,IACE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;YACpD,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,EACxC,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,GAAG,CAAC;YACnC,MAAM;QACR,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,MAAM,KAAK,GAAG;YAAE,MAAM;QAC1B,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;AACH,CAAC;AAED,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;AAC1C,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function buildProgram(): Command;
3
+ export declare function main(argv: string[]): Promise<void>;