forked from web3/web3.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eth2.sh
30 lines (21 loc) · 801 Bytes
/
eth2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
# --------------------------------------------------------------------
#
# --------------------------------------------------------------------
# Exit immediately on error
set -o errexit
# Run cleanup on exit
trap cleanup EXIT
cleanup(){
docker stop $(docker ps -a -q)
}
echo " "
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo "ETH2: Lighthouse Node (requires docker) "
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo " "
nohup docker run -p 9000:9000 -p 127.0.0.1:5052:5052 -v ${HOME}/.lighthouse:/root/.lighthouse1 sigp/lighthouse:v2.1.5 lighthouse --network mainnet beacon --http --http-address 0.0.0.0 > /dev/null 2>&1 &
npm run build
# Test
npm --prefix ./packages/web3-eth2-core run test
npm --prefix ./packages/web3-eth2-beaconchain run test