Skip to content

Commit aa445e6

Browse files
committed
Polygon heimdall v2
1 parent 2023481 commit aa445e6

File tree

4 files changed

+20
-36
lines changed

4 files changed

+20
-36
lines changed

build/templates/backend/scripts/polygon_archive_heimdall.sh

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,22 @@ INSTALL_DIR={{.Env.BackendInstallPath}}/{{.Coin.Alias}}
88
DATA_DIR={{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend
99

1010
HEIMDALL_BIN=$INSTALL_DIR/heimdalld
11-
HOME_DIR=$DATA_DIR/heimdalld
11+
HOME_DIR=$DATA_DIR
1212
CONFIG_DIR=$HOME_DIR/config
1313

1414
if [ ! -d "$CONFIG_DIR" ]; then
1515
# init chain
16-
$HEIMDALL_BIN init --home $HOME_DIR
17-
18-
# overwrite genesis file
19-
cp $INSTALL_DIR/genesis.json $CONFIG_DIR/genesis.json
16+
$HEIMDALL_BIN init $(hostname -s) --home $HOME_DIR --chain-id heimdallv2-137
2017
fi
2118

2219
# --bor_rpc_url: backend-polygon-bor-archive ports.backend_http
2320
# --eth_rpc_url: backend-ethereum-archive ports.backend_http
2421
$HEIMDALL_BIN start \
2522
--home $HOME_DIR \
26-
--chain=mainnet \
2723
--rpc.laddr tcp://127.0.0.1:{{.Ports.BackendRPC}} \
2824
--p2p.laddr tcp://0.0.0.0:{{.Ports.BackendP2P}} \
29-
--laddr tcp://127.0.0.1:{{.Ports.BackendHttp}} \
30-
--p2p.seeds "f4f605d60b8ffaaf15240564e58a81103510631c@159.203.9.164:26656,4fb1bc820088764a564d4f66bba1963d47d82329@44.232.55.71:26656,2eadba4be3ce47ac8db0a3538cb923b57b41c927@35.199.4.13:26656,3b23b20017a6f348d329c102ddc0088f0a10a444@35.221.13.28:26656,25f5f65a09c56e9f1d2d90618aa70cd358aa68da@35.230.116.151:26656,4cd60c1d76e44b05f7dfd8bab3f447b119e87042@54.147.31.250:26656,b18bbe1f3d8576f4b73d9b18976e71c65e839149@34.226.134.117:26656,1500161dd491b67fb1ac81868952be49e2509c9f@52.78.36.216:26656,dd4a3f1750af5765266231b9d8ac764599921736@3.36.224.80:26656,8ea4f592ad6cc38d7532aff418d1fb97052463af@34.240.245.39:26656,e772e1fb8c3492a9570a377a5eafdb1dc53cd778@54.194.245.5:26656,6726b826df45ac8e9afb4bdb2469c7771bd797f1@52.209.21.164:26656" \
31-
--node tcp://127.0.0.1:{{.Ports.BackendRPC}} \
25+
--grpc_server tcp://127.0.0.1:{{.Ports.BackendHttp}} \
26+
--p2p.seeds "e019e16d4e376723f3adc58eb1761809fea9bee0@35.234.150.253:26656,7f3049e88ac7f820fd86d9120506aaec0dc54b27@34.89.75.187:26656,1f5aff3b4f3193404423c3dd1797ce60cd9fea43@34.142.43.240:26656,2d5484feef4257e56ece025633a6ea132d8cadca@35.246.99.203:26656,17e9efcbd173e81a31579310c502e8cdd8b8ff2e@35.197.233.249:26656,72a83490309f9f63fdca3a0bef16c290e5cbb09c@35.246.95.65:26656,00677b1b2c6282fb060b7bb6e9cc7d2d05cdd599@34.105.180.11:26656,721dd4cebfc4b78760c7ee5d7b1b44d29a0aa854@34.147.169.102:26656,4760b3fc04648522a0bcb2d96a10aadee141ee89@34.89.55.74:26656" \
3227
--bor_rpc_url http://127.0.0.1:8172 \
33-
--eth_rpc_url http://127.0.0.1:8116 \
34-
--rest-server
35-
28+
--eth_rpc_url http://127.0.0.1:8116
3629
{{end}}

build/templates/backend/scripts/polygon_heimdall.sh

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,22 @@ INSTALL_DIR={{.Env.BackendInstallPath}}/{{.Coin.Alias}}
88
DATA_DIR={{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend
99

1010
HEIMDALL_BIN=$INSTALL_DIR/heimdalld
11-
HOME_DIR=$DATA_DIR/heimdalld
11+
HOME_DIR=$DATA_DIR
1212
CONFIG_DIR=$HOME_DIR/config
1313

1414
if [ ! -d "$CONFIG_DIR" ]; then
1515
# init chain
16-
$HEIMDALL_BIN init --home $HOME_DIR
17-
18-
# overwrite genesis file
19-
cp $INSTALL_DIR/genesis.json $CONFIG_DIR/genesis.json
16+
$HEIMDALL_BIN init $(hostname -s) --home $HOME_DIR --chain-id heimdallv2-137
2017
fi
2118

2219
# --bor_rpc_url: backend-polygon-bor ports.backend_http
2320
# --eth_rpc_url: backend-ethereum ports.backend_http
2421
$HEIMDALL_BIN start \
2522
--home $HOME_DIR \
26-
--chain=mainnet \
2723
--rpc.laddr tcp://127.0.0.1:{{.Ports.BackendRPC}} \
2824
--p2p.laddr tcp://0.0.0.0:{{.Ports.BackendP2P}} \
29-
--laddr tcp://127.0.0.1:{{.Ports.BackendHttp}} \
30-
--p2p.seeds "f4f605d60b8ffaaf15240564e58a81103510631c@159.203.9.164:26656,4fb1bc820088764a564d4f66bba1963d47d82329@44.232.55.71:26656,2eadba4be3ce47ac8db0a3538cb923b57b41c927@35.199.4.13:26656,3b23b20017a6f348d329c102ddc0088f0a10a444@35.221.13.28:26656,25f5f65a09c56e9f1d2d90618aa70cd358aa68da@35.230.116.151:26656,4cd60c1d76e44b05f7dfd8bab3f447b119e87042@54.147.31.250:26656,b18bbe1f3d8576f4b73d9b18976e71c65e839149@34.226.134.117:26656,1500161dd491b67fb1ac81868952be49e2509c9f@52.78.36.216:26656,dd4a3f1750af5765266231b9d8ac764599921736@3.36.224.80:26656,8ea4f592ad6cc38d7532aff418d1fb97052463af@34.240.245.39:26656,e772e1fb8c3492a9570a377a5eafdb1dc53cd778@54.194.245.5:26656,6726b826df45ac8e9afb4bdb2469c7771bd797f1@52.209.21.164:26656" \
31-
--node tcp://127.0.0.1:{{.Ports.BackendRPC}} \
25+
--grpc_server tcp://127.0.0.1:{{.Ports.BackendHttp}} \
26+
--p2p.seeds "e019e16d4e376723f3adc58eb1761809fea9bee0@35.234.150.253:26656,7f3049e88ac7f820fd86d9120506aaec0dc54b27@34.89.75.187:26656,1f5aff3b4f3193404423c3dd1797ce60cd9fea43@34.142.43.240:26656,2d5484feef4257e56ece025633a6ea132d8cadca@35.246.99.203:26656,17e9efcbd173e81a31579310c502e8cdd8b8ff2e@35.197.233.249:26656,72a83490309f9f63fdca3a0bef16c290e5cbb09c@35.246.95.65:26656,00677b1b2c6282fb060b7bb6e9cc7d2d05cdd599@34.105.180.11:26656,721dd4cebfc4b78760c7ee5d7b1b44d29a0aa854@34.147.169.102:26656,4760b3fc04648522a0bcb2d96a10aadee141ee89@34.89.55.74:26656" \
3227
--bor_rpc_url http://127.0.0.1:8170 \
33-
--eth_rpc_url http://127.0.0.1:8136 \
34-
--rest-server
35-
28+
--eth_rpc_url http://127.0.0.1:8136
3629
{{end}}

configs/coins/polygon_heimdall.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@
1616
"package_name": "backend-polygon-heimdall",
1717
"package_revision": "satoshilabs-1",
1818
"system_user": "polygon",
19-
"version": "1.6.0",
20-
"binary_url": "https://github.com/maticnetwork/heimdall/archive/refs/tags/v1.6.0.tar.gz",
19+
"version": "0.2.16",
20+
"binary_url": "https://github.com/0xPolygon/heimdall-v2/releases/download/v0.2.16/heimdall-v0.2.16-amd64.deb",
2121
"verification_type": "sha256",
22-
"verification_source": "8cf23d79724d29b38565ea0ca6574efb62ab6b929450ed38ae2ef785679adc39",
23-
"extract_command": "mkdir backend/source && tar -C backend/source --strip 1 -xf v1.6.0.tar.gz && cd backend/source && make build && mv build/heimdalld ../ && rm -rf ../source && echo",
22+
"verification_source": "1682bade3065065a4b660a162e06c843b4a3079af829cec300a05e9577c9389b",
23+
"extract_command": "mkdir -p backend && dpkg --fsys-tarfile ${ARCHIVE} | tar -xO ./usr/bin/heimdalld > backend/heimdalld && chmod +x backend/heimdalld && echo",
2424
"exclude_files": [],
2525
"exec_command_template": "/bin/sh -c '{{.Env.BackendInstallPath}}/{{.Coin.Alias}}/polygon_heimdall_exec.sh 2>&1 >> {{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log'",
2626
"exec_script": "polygon_heimdall.sh",
2727
"logrotate_files_template": "{{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log",
28-
"postinst_script_template": "wget https://raw.githubusercontent.com/maticnetwork/heimdall/v1.6.0/builder/files/genesis-mainnet-v1.json -O {{.Env.BackendInstallPath}}/{{.Coin.Alias}}/genesis.json",
2928
"service_type": "simple",
3029
"service_additional_params_template": "",
3130
"protect_memory": true,
@@ -37,4 +36,4 @@
3736
"package_maintainer": "IT",
3837
"package_maintainer_email": "it@satoshilabs.com"
3938
}
40-
}
39+
}

configs/coins/polygon_heimdall_archive.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@
1616
"package_name": "backend-polygon-archive-heimdall",
1717
"package_revision": "satoshilabs-1",
1818
"system_user": "polygon",
19-
"version": "1.6.0",
20-
"binary_url": "https://github.com/maticnetwork/heimdall/archive/refs/tags/v1.6.0.tar.gz",
19+
"version": "0.2.16",
20+
"binary_url": "https://github.com/0xPolygon/heimdall-v2/releases/download/v0.2.16/heimdall-v0.2.16-amd64.deb",
2121
"verification_type": "sha256",
22-
"verification_source": "8cf23d79724d29b38565ea0ca6574efb62ab6b929450ed38ae2ef785679adc39",
23-
"extract_command": "mkdir backend/source && tar -C backend/source --strip 1 -xf v1.6.0.tar.gz && cd backend/source && make build && mv build/heimdalld ../ && rm -rf ../source && echo",
22+
"verification_source": "1682bade3065065a4b660a162e06c843b4a3079af829cec300a05e9577c9389b",
23+
"extract_command": "mkdir -p backend && dpkg --fsys-tarfile ${ARCHIVE} | tar -xO ./usr/bin/heimdalld > backend/heimdalld && chmod +x backend/heimdalld && echo",
2424
"exclude_files": [],
2525
"exec_command_template": "/bin/sh -c '{{.Env.BackendInstallPath}}/{{.Coin.Alias}}/polygon_archive_heimdall_exec.sh 2>&1 >> {{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log'",
2626
"exec_script": "polygon_archive_heimdall.sh",
2727
"logrotate_files_template": "{{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log",
28-
"postinst_script_template": "wget https://raw.githubusercontent.com/maticnetwork/heimdall/v1.6.0/builder/files/genesis-mainnet-v1.json -O {{.Env.BackendInstallPath}}/{{.Coin.Alias}}/genesis.json",
2928
"service_type": "simple",
3029
"service_additional_params_template": "",
3130
"protect_memory": true,
@@ -37,4 +36,4 @@
3736
"package_maintainer": "IT",
3837
"package_maintainer_email": "it@satoshilabs.com"
3938
}
40-
}
39+
}

0 commit comments

Comments
 (0)