-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #949 from galacticcouncil/zombienet-support
feat: fork to zombienet
- Loading branch information
Showing
10 changed files
with
2,841 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
state.json | ||
forked-chainspec.json | ||
data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FROM node:18-bookworm | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
wget \ | ||
nodejs \ | ||
npm \ | ||
ca-certificates \ | ||
&& update-ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /zombienet/hydration-node/launch-configs/fork | ||
|
||
RUN wget -q https://github.com/paritytech/zombienet/releases/latest/download/zombienet-linux-x64 -O /usr/local/bin/zombienet && \ | ||
chmod +x /usr/local/bin/zombienet | ||
RUN zombienet version | ||
|
||
RUN mkdir -p /zombienet/polkadot-sdk/target/release | ||
RUN for binary in polkadot polkadot-execute-worker polkadot-prepare-worker; do \ | ||
wget -q https://github.com/paritytech/polkadot-sdk/releases/latest/download/$binary \ | ||
-O /zombienet/polkadot-sdk/target/release/$binary \ | ||
&& chmod +x /zombienet/polkadot-sdk/target/release/$binary \ | ||
&& /zombienet/polkadot-sdk/target/release/$binary --version; \ | ||
done | ||
|
||
RUN mkdir -p /zombienet/hydration-node/target/release | ||
RUN wget -q https://github.com/galacticcouncil/hydration-node/releases/latest/download/hydradx -O /zombienet/hydration-node/target/release/hydradx && \ | ||
chmod +x /zombienet/hydration-node/target/release/hydradx | ||
RUN /zombienet/hydration-node/target/release/hydradx --version | ||
|
||
COPY . . | ||
|
||
RUN npm i | ||
|
||
VOLUME /zombienet/hydration-node/launch-configs/fork/data | ||
EXPOSE 9988 | ||
|
||
ENV STATE_SOURCE=https://snapshots.play.hydration.cloud/state.json | ||
|
||
CMD npm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
starts zombienet instance with forked state downloaded from `STATE_SOURCE` (by default loaded from latest snapshot available) | ||
|
||
### run with docker | ||
``` | ||
docker run -d -p 9988:9988 galacticcouncil/fork | ||
``` | ||
|
||
### run locally | ||
- node >18 required | ||
- you have to have all binaries present on correct paths in `config.json` | ||
``` | ||
npm i && npm start | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"settings": { | ||
"provider": "native" | ||
}, | ||
"relaychain": { | ||
"default_command": "../../../polkadot-sdk/target/release/polkadot", | ||
"chain": "rococo-local", | ||
"nodes": [ | ||
{ | ||
"name": "alice", | ||
"command": "../../../polkadot-sdk/target/release/polkadot", | ||
"args": [ | ||
"--pruning=archive" | ||
], | ||
"ws_port": 9944, | ||
"invulnerable": true | ||
}, | ||
{ | ||
"name": "bob", | ||
"ws_port": 9955, | ||
"invulnerable": true | ||
}, | ||
{ | ||
"name": "charlie", | ||
"ws_port": 9966, | ||
"invulnerable": true | ||
}, | ||
{ | ||
"name": "dave", | ||
"ws_port": 9977, | ||
"invulnerable": true | ||
} | ||
] | ||
}, | ||
"types": {}, | ||
"hrmp_channels": [], | ||
"parachains": [ | ||
{ | ||
"id": 2034, | ||
"cumulus_based": true, | ||
"chain": "local", | ||
"chain_spec_path": "forked-chainspec.json", | ||
"collators": [ | ||
{ | ||
"name": "alice", | ||
"command": "../../target/release/hydradx", | ||
"args": [ | ||
"--pruning=archive", | ||
"--log=info" | ||
], | ||
"ws_port": 9988, | ||
"rpc_port": 9999 | ||
}, | ||
{ | ||
"name": "bob", | ||
"command": "../../target/release/hydradx", | ||
"args": [ | ||
"--pruning=archive", | ||
"--log=info" | ||
], | ||
"ws_port": 9989 | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.