mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 02:10:46 +00:00
docker file pdated for bootnode
This commit is contained in:
parent
069d42a1c1
commit
1b725d89f5
3 changed files with 7 additions and 7 deletions
|
|
@ -50,7 +50,7 @@ const int CURVE_B = 4;
|
||||||
const secp256k1_ge secp256k1_ge_const_g = SECP256K1_GE_CONST(
|
const secp256k1_ge secp256k1_ge_const_g = SECP256K1_GE_CONST(
|
||||||
0xedc60018, 0xa51a786b, 0x2ea91f4d, 0x4c9416c0,
|
0xedc60018, 0xa51a786b, 0x2ea91f4d, 0x4c9416c0,
|
||||||
0x9de54c3b, 0xa1316554, 0x6cf4345c, 0x7277ef15,
|
0x9de54c3b, 0xa1316554, 0x6cf4345c, 0x7277ef15,
|
||||||
0x54cb1b6b, 0xdc8c1273, 0x087844ea, 0x43f4603e,
|
0x54cb1b6b, 0XDC8c1273, 0x087844ea, 0x43f4603e,
|
||||||
0x0eaf9a43, 0xf6effe55, 0x939f806d, 0x37adf8ac
|
0x0eaf9a43, 0xf6effe55, 0x939f806d, 0x37adf8ac
|
||||||
);
|
);
|
||||||
const int CURVE_B = 2;
|
const int CURVE_B = 2;
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ static void secp256k1_scalar_order_get_num(secp256k1_num *r) {
|
||||||
static const unsigned char order[32] = {
|
static const unsigned char order[32] = {
|
||||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
|
||||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
|
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
|
||||||
0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,
|
0xBA,0xAE,0XDC,0xE6,0xAF,0x48,0xA0,0x3B,
|
||||||
0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41
|
0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
10
docker/bootnode/entrypoint.sh
Normal file → Executable file
10
docker/bootnode/entrypoint.sh
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -x
|
#!/bin/sh -x
|
||||||
|
|
||||||
# file to env
|
# file to env
|
||||||
for env in PRIVATE_KEY; do
|
for env in PRIVATE_KEY; do
|
||||||
file=$(eval echo "\$${env}_FILE")
|
file=$(eval echo "\$${env}_FILE")
|
||||||
if [[ -f $file ]] && [[ ! -z $file ]]; then
|
if [[ -f $file ]] && [[ ! -z $file ]]; then
|
||||||
|
|
@ -9,16 +9,16 @@ for env in PRIVATE_KEY; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# private key
|
# private key
|
||||||
if [[ ! -z "$PRIVATE_KEY" ]]; then
|
if [[ ! -z "$PRIVATE_KEY" ]]; then
|
||||||
echo "$PRIVATE_KEY" > bootnode.key
|
echo "$PRIVATE_KEY" > bootnode.key
|
||||||
elif [[ ! -f ./bootnode.key ]]; then
|
elif [[ ! -f ./bootnode.key ]]; then
|
||||||
bootnode -genkey bootnode.key
|
bootnode -genkey bootnode.key
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# dump address
|
# dump address
|
||||||
address="enode://$(bootnode -nodekey bootnode.key -writeaddress)@[$(hostname -i)]:30301"
|
address="enode://$(bootnode -nodekey bootnode.key -writeaddress)@[$(hostname -i)]:30301"
|
||||||
|
|
||||||
echo "$address" > ./bootnodes/bootnodes
|
echo "$address" > ./bootnodes/bootnodes
|
||||||
|
|
||||||
exec bootnode "$@"
|
exec bootnode "$@"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue