mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-03 07:45:18 +00:00
update hive client script
add enode.sh use HIVE_BOOTNODES flag in nimbus.sh
This commit is contained in:
parent
ec1af91370
commit
2fd2665026
@ -34,6 +34,7 @@ RUN usr/bin/nimbus -v > /version.txt
|
||||
# Inject the startup script and helper files
|
||||
COPY *.sh *.jq *.json /
|
||||
RUN chmod +x /nimbus.sh
|
||||
RUN chmod +x /enode.sh
|
||||
|
||||
# Export the usual networking ports to allow outside access to the node
|
||||
EXPOSE 8545 8546 8547 30303 30303/udp
|
||||
|
15
hive_integration/nimbus/enode.sh
Normal file
15
hive_integration/nimbus/enode.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script to retrieve the enode
|
||||
#
|
||||
# This is copied into the validator container by Hive
|
||||
# and used to provide a client-specific enode id retriever
|
||||
#
|
||||
|
||||
# Immediately abort the script on any error encountered
|
||||
set -e
|
||||
|
||||
TARGET_RESPONSE=$(curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"net_nodeInfo","params":[],"id":1}' "localhost:8545" )
|
||||
|
||||
TARGET_ENODE=$(echo ${TARGET_RESPONSE}| jq -r '.result.enode')
|
||||
echo "$TARGET_ENODE"
|
@ -11,7 +11,7 @@
|
||||
#
|
||||
# This script assumes the following environment variables:
|
||||
#
|
||||
# - [ ] HIVE_BOOTNODE enode URL of the remote bootstrap node
|
||||
# - [x] HIVE_BOOTNODE enode URL of the remote bootstrap node
|
||||
# - [x] HIVE_NETWORK_ID network ID number to use for the eth protocol
|
||||
# - [ ] HIVE_TESTNET whether testnet nonces (2^20) are needed
|
||||
# - [ ] HIVE_NODETYPE sync and pruning selector (archive, full, light)
|
||||
@ -53,6 +53,11 @@ if [ "$HIVE_LOGLEVEL" != "" ]; then
|
||||
FLAGS="$FLAGS --log-level:DEBUG"
|
||||
fi
|
||||
|
||||
# It doesn't make sense to dial out, use only a pre-set bootnode.
|
||||
if [ "$HIVE_BOOTNODE" != "" ]; then
|
||||
FLAGS="$FLAGS --bootnodes:$HIVE_BOOTNODE"
|
||||
fi
|
||||
|
||||
# Configure the genesis chain and use it as start block and dump it to stdout
|
||||
echo "Supplied genesis state:"
|
||||
jq -f /mapper.jq /genesis.json | tee /genesis-start.json
|
||||
|
Loading…
x
Reference in New Issue
Block a user