mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
Merge branch 'develop'
This commit is contained in:
commit
187fc06fb5
1 changed files with 47 additions and 3 deletions
50
.github/workflows/linuxpackage.yml
vendored
50
.github/workflows/linuxpackage.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
gem install --no-document fpm
|
gem install --no-document fpm
|
||||||
fpm --version
|
fpm --version
|
||||||
|
|
||||||
make bor
|
make all
|
||||||
|
|
||||||
cat > bor.service <<- "EOF"
|
cat > bor.service <<- "EOF"
|
||||||
[Unit]
|
[Unit]
|
||||||
|
|
@ -39,7 +39,8 @@ jobs:
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/etc/bor/
|
WorkingDirectory=/etc/bor/
|
||||||
EnvironmentFile=/etc/bor/metadata
|
EnvironmentFile=/etc/bor/metadata
|
||||||
ExecStart=/bin/bash -c "/usr/bin/bor --datadir /etc/bor/dataDir --port '30303' --rpc --rpcaddr '0.0.0.0' --rpcvhosts '*' --rpccorsdomain '*' --rpcport '8545' --ipcpath /etc/bor/bor.ipc --rpcapi 'db,eth,net,web3,txpool,bor' --networkid ${NETWORK_ID} --miner.gaslimit '20000000' --txpool.nolocals --txpool.accountslots '128' --txpool.globalslots '20000' --txpool.lifetime '0h16m0s' --keystore /etc/bor/dataDir/keystore --unlock ${VALIDATOR_ADDRESS} --password /etc/bor/dataDir/password.txt --allow-insecure-unlock --maxpeers 150 --mine"
|
ExecStartPre=/bin/chmod +x /etc/bor/start.sh
|
||||||
|
ExecStart=/bin/bash /etc/bor/start.sh ${NETWORK_ID} ${VALIDATOR_ADDRESS} ${NODE_TYPE}
|
||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=root
|
||||||
EOF
|
EOF
|
||||||
|
|
@ -47,18 +48,61 @@ jobs:
|
||||||
cat > after_install.sh <<- "EOF"
|
cat > after_install.sh <<- "EOF"
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
touch /etc/bor/metadata
|
touch /etc/bor/metadata
|
||||||
|
touch /etc/bor/start.sh
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat > metadata <<- "EOF"
|
cat > metadata <<- "EOF"
|
||||||
NETWORK_ID=
|
NETWORK_ID=
|
||||||
VALIDATOR_ADDRESS=
|
VALIDATOR_ADDRESS=
|
||||||
|
NODE_TYPE=sentry
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat > start.sh <<- "EOF"
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
NETWORK_ID=$1
|
||||||
|
VALIDATOR_ADDRESS=$2
|
||||||
|
NODE_TYPE=$3
|
||||||
|
|
||||||
|
DATA_DIR=/etc/bor/dataDir
|
||||||
|
|
||||||
|
args="/usr/bin/bor --datadir $DATA_DIR --port '30303' --rpc --rpcaddr '0.0.0.0' --rpcvhosts '*' --rpccorsdomain '*' --rpcport '8545' --ipcpath /etc/bor/bor.ipc --rpcapi 'db,eth,net,web3,txpool,bor' --networkid $NETWORK_ID --miner.gaslimit '200000000' --miner.gastarget '20000000' --txpool.nolocals --txpool.accountslots '128' --txpool.globalslots '20000' --txpool.lifetime '0h16m0s' "
|
||||||
|
|
||||||
|
if [[ $NODE_TYPE == 'validator' ]]; then
|
||||||
|
args+="--keystore $DATA_DIR/keystore \
|
||||||
|
--unlock $VALIDATOR_ADDRESS \
|
||||||
|
--password $DATA_DIR/password.txt \
|
||||||
|
--allow-insecure-unlock \
|
||||||
|
--nodiscover --maxpeers 1 \
|
||||||
|
--mine
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $NODE_TYPE == 'sentry' ]]; then
|
||||||
|
args+="--maxpeers 200
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $NODE_TYPE == 'validator-without-sentry' ]]; then
|
||||||
|
args+="--keystore $DATA_DIR/keystore \
|
||||||
|
--unlock $VALIDATOR_ADDRESS \
|
||||||
|
--password $DATA_DIR/password.txt \
|
||||||
|
--allow-insecure-unlock \
|
||||||
|
--maxpeers 200 \
|
||||||
|
--mine
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
eval $args
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
fpm -s dir -t deb --deb-user root --deb-group root -n matic-bor -v ${{ env.RELEASE_VERSION }} \
|
fpm -s dir -t deb --deb-user root --deb-group root -n matic-bor -v ${{ env.RELEASE_VERSION }} \
|
||||||
--after-install after_install.sh \
|
--after-install after_install.sh \
|
||||||
bor.service=/etc/systemd/system/ \
|
bor.service=/etc/systemd/system/ \
|
||||||
build/bin/bor=/usr/bin/ \
|
build/bin/bor=/usr/bin/ \
|
||||||
metadata=/etc/bor/
|
build/bin/bootnode=/usr/bin/ \
|
||||||
|
metadata=/etc/bor/ \
|
||||||
|
start.sh=/etc/bor/
|
||||||
|
|
||||||
mkdir packages-v${{ env.RELEASE_VERSION }}
|
mkdir packages-v${{ env.RELEASE_VERSION }}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue