Skip to content

Commit d84c4d7

Browse files
committed
update work with poco nethermind
1 parent 3805bb7 commit d84c4d7

File tree

6 files changed

+90
-80
lines changed

6 files changed

+90
-80
lines changed

.drone.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,33 @@ pipeline:
88
- npm run autotest fast
99
- KYC=1 npm run autotest fast
1010

11-
docker_token_nethermind:
11+
docker_token_openethereum:
1212
image: plugins/docker
1313
repo: iexechub/poco-chaintest
1414
secrets: [docker_username, docker_password]
15-
dockerfile: testchains/nethermind.dockerfile
15+
dockerfile: testchains/openethereum.dockerfile
1616
build_args:
1717
- MNEMONIC=actual surround disorder swim upgrade devote digital misery truly verb slide final
1818
- CHAIN_TYPE=token
1919
- CHAIN_BLOCK_TIME=1
2020
- CHAIN_FORCE_SEALING=false
2121
auto_tag: true
22-
auto_tag_suffix: token-nethermind
22+
auto_tag_suffix: token-openethereum
2323
when:
2424
ref: [refs/tags/v*]
2525

26-
docker_native_nethermind:
26+
docker_native_openethereum:
2727
image: plugins/docker
2828
repo: iexechub/poco-chaintest
2929
secrets: [docker_username, docker_password]
30-
dockerfile: testchains/nethermind.dockerfile
30+
dockerfile: testchains/openethereum.dockerfile
3131
build_args:
3232
- MNEMONIC=actual surround disorder swim upgrade devote digital misery truly verb slide final
3333
- CHAIN_TYPE=native
3434
- CHAIN_BLOCK_TIME=1
3535
- CHAIN_FORCE_SEALING=false
3636
auto_tag: true
37-
auto_tag_suffix: native-nethermind
37+
auto_tag_suffix: native-openethereum
3838
when:
3939
ref: [refs/tags/v*]
4040

@@ -60,4 +60,4 @@ pipeline:
6060
auto_tag: true
6161
auto_tag_suffix: native
6262
when:
63-
ref: [refs/tags/v*]
63+
ref: [refs/tags/v*]

nethermind.drone.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
pipeline:
2+
3+
test:
4+
image: node:16
5+
pull: true
6+
commands:
7+
- npm ci --production=false
8+
- npm run autotest fast
9+
- KYC=1 npm run autotest fast
10+
11+
docker_token_nethermind:
12+
image: plugins/docker
13+
repo: iexechub/poco-chaintest
14+
secrets: [docker_username, docker_password]
15+
dockerfile: testchains/nethermind.dockerfile
16+
build_args:
17+
- MNEMONIC=actual surround disorder swim upgrade devote digital misery truly verb slide final
18+
- CHAIN_TYPE=token
19+
- CHAIN_BLOCK_TIME=1
20+
- CHAIN_FORCE_SEALING=false
21+
auto_tag: true
22+
auto_tag_suffix: token-nethermind
23+
when:
24+
ref: [refs/tags/v*]
25+
26+
docker_native_nethermind:
27+
image: plugins/docker
28+
repo: iexechub/poco-chaintest
29+
secrets: [docker_username, docker_password]
30+
dockerfile: testchains/nethermind.dockerfile
31+
build_args:
32+
- MNEMONIC=actual surround disorder swim upgrade devote digital misery truly verb slide final
33+
- CHAIN_TYPE=native
34+
- CHAIN_BLOCK_TIME=1
35+
- CHAIN_FORCE_SEALING=false
36+
auto_tag: true
37+
auto_tag_suffix: native-nethermind
38+
when:
39+
ref: [refs/tags/v*]
40+
41+
docker_token_ganache:
42+
image: plugins/docker
43+
repo: iexechub/poco-chaintest
44+
secrets: [docker_username, docker_password]
45+
dockerfile: testchains/Dockerfile_token_ganache
46+
build_args:
47+
- MNEMONIC=actual surround disorder swim upgrade devote digital misery truly verb slide final
48+
auto_tag: true
49+
auto_tag_suffix: token
50+
when:
51+
ref: [refs/tags/v*]
52+
53+
docker_native_ganache:
54+
image: plugins/docker
55+
repo: iexechub/poco-chaintest
56+
secrets: [docker_username, docker_password]
57+
dockerfile: testchains/Dockerfile_native_ganache
58+
build_args:
59+
- MNEMONIC=actual surround disorder swim upgrade devote digital misery truly verb slide final
60+
auto_tag: true
61+
auto_tag_suffix: native
62+
when:
63+
ref: [refs/tags/v*]

testchains/nethermind.dockerfile

Lines changed: 8 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
## --build-arg CHAIN_FORCE_SEALING=true \
88
## .
99
###
10-
FROM iexechub/nethermind:1.14.1-patch.0-test
11-
10+
# FROM iexechub/nethermind:1.14.1-patch.0-test
11+
#For intern testing
12+
FROM nethermind:1.14.1-patch.1
1213
USER root
1314
RUN apt-get update && apt-get install bash jq nodejs npm -y
1415
# Add git required to install ethereumjs-abi from github (https://github.com/MetaMask/web3-provider-engine/issues/345)
@@ -46,55 +47,13 @@ RUN echo -e ${MESSAGE}
4647
## Copy files and setup the chain config.
4748
###
4849
ENV BASE_DIR="/iexec-poco/testchains/nethermind"
49-
50-
ENV NETHERMIND_SYNCCONFIG_FASTSYNC=true
51-
ENV NETHERMIND_SYNCCONFIG_SNAPSYNC=true
52-
ENV NETHERMIND_SYNCCONFIG_USEGETHLIMITSINFASTBLOCKS=true
53-
ENV NETHERMIND_SYNCCONFIG_WITNESSPROTOCOLENABLED=true
54-
55-
56-
57-
# Init
58-
ENV NETHERMIND_INITCONFIG_CHAINSPECPATH=/iexec-poco/testchains/nethermind/spec.json
59-
ENV NETHERMIND_INITCONFIG_ISMINING=true
60-
ENV NETHERMIND_INITCONFIG_STORERECEIPTS=true
61-
ENV NETHERMIND_INITCONFIG_GENESISHASH=0x74fab4898a9ca96a5f2a1845d77850b4107057c7be2b8f1fc499775f7db20587
62-
63-
# Mining
64-
ENV NETHERMIND_MININGCONFIG_MINGASPRICE=0
65-
66-
# JsonRpc
67-
ENV NETHERMIND_JSONRPCCONFIG_ENABLED=true
68-
ENV NETHERMIND_JSONRPCCONFIG_ENABLEDMODULES=Eth,Subscribe,TxPool,Web3,Proof,Net,Parity,Health
69-
ENV NETHERMIND_JSONRPCCONFIG_HOST=0.0.0.0
70-
ENV NETHERMIND_JSONRPCCONFIG_PORT=8545
71-
72-
# Aura
73-
ENV NETHERMIND_AURACONFIG_FORCESEALING=true
74-
ENV NETHERMIND_AURACONFIG_ALLOWAURAPRIVATECHAINS=true
75-
76-
77-
# KeyStore
78-
ENV NETHERMIND_KEYSTORECONFIG_PASSWORDS=["cLYaO6/petgU0NqdvQo6i6bBWDM7SzZw"]
79-
ENV NETHERMIND_KEYSTORECONFIG_UNLOCKACCOUNTS=["0xc08c3def622af1476f2db0e3cc8ccaead07be3bb"]
80-
ENV NETHERMIND_KEYSTORECONFIG_BLOCKAUTHORACCOUNT=0xc08c3def622af1476f2db0e3cc8ccaead07be3bb
81-
ENV NETHERMIND_KEYSTORECONFIG_PASSWORDFILES=${BASE_DIR}/keystore/validator-wallet-password
82-
ENV NETHERMIND_KEYSTORECONFIG_ENODEACCOUNT=0xc08c3def622af1476f2db0e3cc8ccaead07be3bb
83-
ENV NETHERMIND_KEYSTORECONFIG_ENODEKEYFILE=${BASE_DIR}/keystore/validator-wallet-password
84-
85-
# Network
86-
ENV NETHERMIND_NETWORKCONFIG_ACTIVEPEERSMAXCOUNT=100
87-
ENV NETHERMIND_NETWORKCONFIG_DISCOVERYPORT=30303
88-
ENV NETHERMIND_NETWORKCONFIG_STATICPEERS=null
89-
ENV NETHERMIND_NETWORKCONFIG_DIAGTRACERENABLED=false
90-
9150
RUN mkdir /iexec-poco
9251
COPY . /iexec-poco
9352
COPY ./testchains/nethermind/keystore/key-c08c3def622af1476f2db0e3cc8ccaead07be3bb /nethermind/keystore/
9453
RUN mv /iexec-poco/config/config_${CHAIN_TYPE}.json /iexec-poco/config/config.json
9554
RUN sed -i "s/@stepDuration@/${CHAIN_BLOCK_TIME}/" ${BASE_DIR}/spec.json
9655
# remove eip1559 for sidechains
97-
RUN if [[ "${CHAIN_TYPE}" == "native" ]] ; \
56+
RUN if [ "${CHAIN_TYPE}" = "native" ] ; \
9857
then \
9958
sed -i "/eip1559/d" ${BASE_DIR}/spec.json; \
10059
fi
@@ -107,7 +66,7 @@ RUN echo "MNEMONIC: ${MNEMONIC}"
10766
# Choose migration file according to chain type.
10867
# native -> migrate.sh
10968
# token -> migrate-all.sh
110-
RUN if [[ "${CHAIN_TYPE}" == "native" ]] ; \
69+
RUN if [ "${CHAIN_TYPE}" = "native" ] ; \
11170
then \
11271
echo "Migration file: ${BASE_DIR}/migrate.sh"; \
11372
bash ${BASE_DIR}/migrate.sh; \
@@ -116,13 +75,8 @@ RUN if [[ "${CHAIN_TYPE}" == "native" ]] ; \
11675
bash ${BASE_DIR}/migrate-all.sh; \
11776
fi
11877

119-
###
78+
# ###
12079
## Configure entrypoint
12180
###
122-
ENTRYPOINT ["sh"]
123-
CMD [ \
124-
"-c", \
125-
"echo $${VALIDATOR_ADDRESS} | awk '{print tolower($$0)}' | xargs -I {address} \
126-
./Nethermind.Runner", \
127-
"--config ${BASE_DIR}/authority.cfg " \
128-
]
81+
ENTRYPOINT [ "../../nethermind/Nethermind.Runner" ]
82+
CMD [ "--config=/iexec-poco/testchains/nethermind/authority.cfg" ]

testchains/nethermind/authority.cfg

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"ChainSpecPath": "/iexec-poco/testchains/nethermind/spec.json",
44
"IsMining": true,
55
"StoreReceipts": true,
6-
"WebSocketsEnabled": false
6+
"BaseDbPath":"/iexec-poco/testchains/nethermind/chain-data"
77
},
88
"Mining": {
99
"MinGasPrice": 0
@@ -14,6 +14,7 @@
1414
"StaticPeers": null,
1515
"DiagTracerEnabled": false
1616
},
17+
1718
"JsonRpc": {
1819
"Enabled": true,
1920
"EnabledModules": [
@@ -33,7 +34,8 @@
3334
"WebSocketsPort": 8546
3435
},
3536
"Aura": {
36-
"ForceSealing": true
37+
"ForceSealing": true,
38+
"AllowAuraPrivateChains":true
3739
},
3840
"KeyStore": {
3941
"Passwords": [
@@ -42,6 +44,9 @@
4244
"UnlockAccounts": [
4345
"0xc08c3def622af1476f2db0e3cc8ccaead07be3bb"
4446
],
47+
"PasswordFiles":"/iexec-poco/testchains/nethermind/keystore/validator-wallet-password",
48+
"EnodeAccount":"0xc08c3def622af1476f2db0e3cc8ccaead07be3bb",
49+
"EnodeKeyFile":"/iexec-poco/testchains/nethermind/keystore/validator-wallet-password",
4550
"BlockAuthorAccount": "0xc08c3def622af1476f2db0e3cc8ccaead07be3bb",
4651
},
4752
"Sync": {

testchains/nethermind/migrate-all.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
#!/usr/bin/env bash
33
echo "========== STARTING BLOCKCHAIN =========="
44

5+
./Nethermind.Runner --config=${BASE_DIR}/authority.cfg \
6+
-d /iexec-poco/testchains/nethermind/chain-data > deployed.txt 2>&1 &
57

6-
BASE_DIR="/iexec-poco/testchains/nethermind"
7-
8-
echo $${VALIDATOR_ADDRESS} | awk '{print tolower($$0)}' | xargs -I {address}
9-
./Nethermind.Runner --config ${BASE_DIR}/authority.cfg &
108
sleep 4
119

1210
cd /iexec-poco && \

testchains/nethermind/migrate.sh

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
#!/usr/bin/env bash
22

3-
4-
5-
BASE_DIR="/iexec-poco/testchains/nethermind"
6-
7-
VALIDATOR_ADDRESS="0xc08c3def622af1476f2db0e3cc8ccaead07be3bb"
8-
# NETHERMIND_KEYSTORECONFIG_BLOCKAUTHORACCOUNT="${VALIDATOR_ADDRESS}"
9-
# NETHERMIND_KEYSTORECONFIG_UNLOCKACCOUNTS=["${VALIDATOR_ADDRESS}"]
10-
# NETHERMIND_MININGCONFIG_MINGASPRICE=0
11-
# NETHERMIND_KEYSTORECONFIG_PASSWORDFILES=${BASE_DIR}/keystore/validator-wallet-password
12-
# NETHERMIND_INITCONFIG_ISMINING=true
13-
14-
echo $${VALIDATOR_ADDRESS} | awk '{print tolower($$0)}' | xargs -I {address}
15-
./Nethermind.Runner --config ${BASE_DIR}/authority.cfg &
3+
./Nethermind.Runner \
4+
--config=${BASE_DIR}/authority.cfg \
5+
-d /iexec-poco/testchains/nethermind/chain-data > deployed.txt 2>&1 &
166

177
# Wait for the chain to start
188
sleep 4

0 commit comments

Comments
 (0)