@parity/ppn 0.18.2 → 0.19.0
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/config/ports.env +4 -1
- package/dist/commands/bite.js +1 -1
- package/dist/commands/bite.js.map +1 -1
- package/dist/commands/fork.js +1 -1
- package/dist/commands/fork.js.map +1 -1
- package/dist/commands/service.d.ts +13 -0
- package/dist/commands/service.js +67 -41
- package/dist/commands/service.js.map +1 -1
- package/dist/commands/start.js +2 -2
- package/dist/commands/start.js.map +1 -1
- package/dist/fork/overrides.js +5 -7
- package/dist/fork/overrides.js.map +1 -1
- package/dist/fork/shared-relay.d.ts +9 -8
- package/dist/fork/shared-relay.js +12 -10
- package/dist/fork/shared-relay.js.map +1 -1
- package/dist/fork/topology.d.ts +11 -6
- package/dist/fork/topology.js +20 -15
- package/dist/fork/topology.js.map +1 -1
- package/dist/fork/validators.d.ts +0 -2
- package/dist/fork/validators.js +4 -6
- package/dist/fork/validators.js.map +1 -1
- package/networks/README.md +4 -2
- package/networks/devnet.json +2 -0
- package/networks/kusama.json +1 -0
- package/networks/paseo-next-v2.json +2 -0
- package/networks/polkadot.json +2 -0
- package/networks/previewnet.json +2 -0
- package/networks/westend.json +2 -0
- package/package.json +2 -2
- package/scripts/lib/safe-rpc.sh +27 -0
- package/scripts/lib/workspace.sh +4 -0
- package/scripts/omni-node.sh +5 -6
- package/scripts/polkadot.sh +10 -0
- package/zombienet-configs/local-dev.toml +18 -4
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
{
|
|
40
40
|
"key": "asset-hub",
|
|
41
41
|
"paraId": 1500,
|
|
42
|
+
"cores": 3,
|
|
42
43
|
"spec": "asset-hub",
|
|
43
44
|
"rpc": "wss://paseo-asset-hub-next-rpc.polkadot.io",
|
|
44
45
|
"specSource": "https://raw.githubusercontent.com/paritytech/chainspecs/main/paseo/parachain/asset-hub-next/raw.json",
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
{
|
|
51
52
|
"key": "people",
|
|
52
53
|
"paraId": 1502,
|
|
54
|
+
"cores": 3,
|
|
53
55
|
"spec": "people",
|
|
54
56
|
"rpc": "wss://paseo-people-next-system-rpc.polkadot.io",
|
|
55
57
|
"specSource": "https://raw.githubusercontent.com/paritytech/chainspecs/main/paseo/parachain/people-next-system/raw.json",
|
package/networks/polkadot.json
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
{
|
|
36
36
|
"key": "asset-hub",
|
|
37
37
|
"paraId": 1000,
|
|
38
|
+
"cores": 3,
|
|
38
39
|
"spec": "asset-hub",
|
|
39
40
|
"rpc": "wss://polkadot-asset-hub-rpc.polkadot.io",
|
|
40
41
|
"specSource": "builtin:asset-hub-polkadot",
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
{
|
|
49
50
|
"key": "people",
|
|
50
51
|
"paraId": 1004,
|
|
52
|
+
"cores": 3,
|
|
51
53
|
"spec": "people",
|
|
52
54
|
"rpc": "wss://polkadot-people-rpc.polkadot.io",
|
|
53
55
|
"specSource": "builtin:people-polkadot",
|
package/networks/previewnet.json
CHANGED
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
{
|
|
76
76
|
"key": "asset-hub",
|
|
77
77
|
"paraId": 1500,
|
|
78
|
+
"cores": 3,
|
|
78
79
|
"spec": "asset-hub",
|
|
79
80
|
"rpc": "asset-hub",
|
|
80
81
|
"specSource": "chainspecs/asset-hub-local.json",
|
|
@@ -97,6 +98,7 @@
|
|
|
97
98
|
{
|
|
98
99
|
"key": "people",
|
|
99
100
|
"paraId": 1502,
|
|
101
|
+
"cores": 3,
|
|
100
102
|
"spec": "individuality",
|
|
101
103
|
"rpc": "people",
|
|
102
104
|
"specSource": "chainspecs/individuality-local.json",
|
package/networks/westend.json
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
{
|
|
35
35
|
"key": "asset-hub",
|
|
36
36
|
"paraId": 1000,
|
|
37
|
+
"cores": 3,
|
|
37
38
|
"spec": "asset-hub",
|
|
38
39
|
"rpc": "wss://westend-asset-hub-rpc.polkadot.io",
|
|
39
40
|
"specSource": "builtin:asset-hub-westend",
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
{
|
|
46
47
|
"key": "people",
|
|
47
48
|
"paraId": 1004,
|
|
49
|
+
"cores": 3,
|
|
48
50
|
"spec": "people",
|
|
49
51
|
"rpc": "wss://westend-people-rpc.polkadot.io",
|
|
50
52
|
"specSource": "builtin:people-westend",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parity/ppn",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Spin up a local Polkadot ecosystem: fetch, generate, fork and run a network",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"commander": "^15.0.0",
|
|
23
23
|
"polkadot-api": "^1.23.3",
|
|
24
24
|
"toml": "^5.0.1",
|
|
25
|
-
"@parity/ppn-network-config": "0.
|
|
25
|
+
"@parity/ppn-network-config": "0.19.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^24.0.0",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Node arguments under the network overlay's safeRpc (PPN_SAFE_RPC=1 on every node): RPC and
|
|
3
|
+
# Prometheus on localhost only, and only safe RPC methods. zombienet passes every node
|
|
4
|
+
# `--rpc-methods unsafe` and `--prometheus-external` and drops `--rpc-methods` from the node's own
|
|
5
|
+
# args, and the engine passes `--unsafe-rpc-external`, so the launcher rewrites the arguments
|
|
6
|
+
# itself: each side of a collator's `--` (the collator, then its relay-chain node) ends with
|
|
7
|
+
# `--rpc-methods safe`.
|
|
8
|
+
#
|
|
9
|
+
# Usage: source "$(dirname "${BASH_SOURCE[0]}")/lib/safe-rpc.sh"
|
|
10
|
+
# rewrite_node_args "$@"; exec <node> "${NODE_ARGS[@]}"
|
|
11
|
+
# Sets: NODE_ARGS the arguments to run the node with; unchanged without PPN_SAFE_RPC=1
|
|
12
|
+
|
|
13
|
+
rewrite_node_args() {
|
|
14
|
+
if [[ "${PPN_SAFE_RPC:-}" != 1 ]]; then NODE_ARGS=("$@"); return; fi
|
|
15
|
+
NODE_ARGS=()
|
|
16
|
+
local arg skip_value=false
|
|
17
|
+
for arg in "$@"; do
|
|
18
|
+
if [[ "$skip_value" == true ]]; then skip_value=false; continue; fi
|
|
19
|
+
case "$arg" in
|
|
20
|
+
--rpc-methods) skip_value=true ;;
|
|
21
|
+
--rpc-methods=* | --unsafe-rpc-external | --rpc-external | --prometheus-external) ;;
|
|
22
|
+
--) NODE_ARGS+=(--rpc-methods safe --) ;;
|
|
23
|
+
*) NODE_ARGS+=("$arg") ;;
|
|
24
|
+
esac
|
|
25
|
+
done
|
|
26
|
+
NODE_ARGS+=(--rpc-methods safe)
|
|
27
|
+
}
|
package/scripts/lib/workspace.sh
CHANGED
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
# Usage: source "$(dirname "${BASH_SOURCE[0]}")/lib/workspace.sh" (adjust depth)
|
|
13
13
|
# Sets: PPN_WS the workspace root
|
|
14
14
|
# PPN_WS_BIN its bin/ (callers append /<network> for non-previewnet binaries)
|
|
15
|
+
# PPN_NODE_BIN_DIR where a node launcher finds its binary: a node's PPN_BIN_DIR, else
|
|
16
|
+
# the BIN `ppn start` exports (which zombienet's argument probe inherits
|
|
17
|
+
# without the node-level env), else PPN_WS_BIN
|
|
15
18
|
|
|
16
19
|
ppn_workspace_root() {
|
|
17
20
|
if [[ -n "${PPN_HOME:-}" ]]; then
|
|
@@ -45,3 +48,4 @@ ppn_workspace_root() {
|
|
|
45
48
|
|
|
46
49
|
PPN_WS="$(ppn_workspace_root)"
|
|
47
50
|
PPN_WS_BIN="$PPN_WS/bin"
|
|
51
|
+
PPN_NODE_BIN_DIR="${PPN_BIN_DIR:-${BIN:-$PPN_WS_BIN}}"
|
package/scripts/omni-node.sh
CHANGED
|
@@ -36,11 +36,9 @@ set -euo pipefail
|
|
|
36
36
|
# So: the explicit env first, then the workspace, and only then this script's own tree, which is
|
|
37
37
|
# the right answer in a checkout and a harmless miss anywhere else.
|
|
38
38
|
source "$(dirname "${BASH_SOURCE[0]}")/lib/workspace.sh"
|
|
39
|
+
source "$(dirname "${BASH_SOURCE[0]}")/lib/safe-rpc.sh"
|
|
39
40
|
REPO_BIN="$PPN_WS_BIN"
|
|
40
|
-
|
|
41
|
-
# bin/<network> for everything else — and the probe below inherits it even though it gets
|
|
42
|
-
# none of the node-level env.
|
|
43
|
-
BIN_DIR="${PPN_BIN_DIR:-${BIN:-$REPO_BIN}}"
|
|
41
|
+
BIN_DIR="$PPN_NODE_BIN_DIR"
|
|
44
42
|
BINARY="${PPN_COLLATOR_BINARY:-polkadot-omni-node}"
|
|
45
43
|
BIN="$BIN_DIR/$BINARY"
|
|
46
44
|
|
|
@@ -103,10 +101,11 @@ if [[ "${PPN_COLLATOR_AURA:-}" == "ed25519" ]]; then
|
|
|
103
101
|
fi
|
|
104
102
|
fi
|
|
105
103
|
|
|
104
|
+
rewrite_node_args "$@"
|
|
106
105
|
for arg in "$@"; do
|
|
107
106
|
if [[ "$arg" == "--" ]]; then
|
|
108
|
-
exec "$BIN" "
|
|
107
|
+
exec "$BIN" "${NODE_ARGS[@]}" --network-backend=libp2p --discover-local --allow-private-ip
|
|
109
108
|
fi
|
|
110
109
|
done
|
|
111
110
|
|
|
112
|
-
exec "$BIN" "
|
|
111
|
+
exec "$BIN" "${NODE_ARGS[@]}"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# The relay's node command when the network overlay sets safeRpc: polkadot, with its arguments
|
|
3
|
+
# rewritten by lib/safe-rpc.sh. Without safeRpc the TOML runs the binary directly.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
source "$(dirname "${BASH_SOURCE[0]}")/lib/workspace.sh"
|
|
7
|
+
source "$(dirname "${BASH_SOURCE[0]}")/lib/safe-rpc.sh"
|
|
8
|
+
|
|
9
|
+
rewrite_node_args "$@"
|
|
10
|
+
exec "$PPN_NODE_BIN_DIR/polkadot" "${NODE_ARGS[@]}"
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
timeout = 600
|
|
6
6
|
node_spawn_timeout = 240
|
|
7
7
|
|
|
8
|
-
# Elastic scaling:
|
|
8
|
+
# Elastic scaling: the cores beyond each parachain's first, which assign-cores hands out
|
|
9
9
|
[relaychain.genesis.configuration.config.scheduler_params]
|
|
10
|
-
num_cores =
|
|
10
|
+
num_cores = 4
|
|
11
11
|
max_validators_per_core = 1
|
|
12
12
|
|
|
13
13
|
[relaychain]
|
|
@@ -59,7 +59,21 @@ rpc_port = 10005
|
|
|
59
59
|
prometheus_port = 20005
|
|
60
60
|
balance = 1000000000000000
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
[[relaychain.nodes]]
|
|
63
|
+
name = "one-paseo-validator"
|
|
64
|
+
validator = true
|
|
65
|
+
rpc_port = 10006
|
|
66
|
+
prometheus_port = 20006
|
|
67
|
+
balance = 1000000000000000
|
|
68
|
+
|
|
69
|
+
[[relaychain.nodes]]
|
|
70
|
+
name = "two-paseo-validator"
|
|
71
|
+
validator = true
|
|
72
|
+
rpc_port = 10007
|
|
73
|
+
prometheus_port = 20007
|
|
74
|
+
balance = 1000000000000000
|
|
75
|
+
|
|
76
|
+
## Asset Hub Paseo Next (Parachain 1500) - Elastic Scaling on 3 cores
|
|
63
77
|
[[parachains]]
|
|
64
78
|
id = 1500
|
|
65
79
|
cumulus_based = true
|
|
@@ -74,7 +88,7 @@ prometheus_port = 20020
|
|
|
74
88
|
command = "{{SCRIPTS}}/omni-node.sh"
|
|
75
89
|
args = ["-lxcm=trace", "--rpc-max-connections=500", "--force-authoring", "--authoring=slot-based", "--unsafe-rpc-external", "--rpc-max-response-size=50", "--listen-addr=/ip4/127.0.0.1/udp/30335/webrtc-direct"]
|
|
76
90
|
|
|
77
|
-
## People Chain (Parachain 1502)
|
|
91
|
+
## People Chain (Parachain 1502) - Elastic Scaling on 3 cores
|
|
78
92
|
[[parachains]]
|
|
79
93
|
id = 1502
|
|
80
94
|
cumulus_based = true
|