mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-11 14:54:12 +00:00
release fixes (#1966)
This commit is contained in:
parent
d2476b643a
commit
bf58915500
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
@ -15,6 +15,8 @@ jobs:
|
|||||||
- name: Build project
|
- name: Build project
|
||||||
id: build_linux
|
id: build_linux
|
||||||
run: |
|
run: |
|
||||||
|
#echo "::set-output name=tag::"$(echo ${{ github.ref }} | sed 's%refs/tags/%%')
|
||||||
|
#curl -sSOL https://github.com/status-im/nimbus-eth2/archive/$(echo ${{ github.ref }} | sed 's%refs/tags/%%').tar.gz
|
||||||
make dist
|
make dist
|
||||||
cd dist
|
cd dist
|
||||||
echo "::set-output name=linux_amd64_archive::"$(echo nimbus-eth2_Linux_amd64_*.tar.gz)
|
echo "::set-output name=linux_amd64_archive::"$(echo nimbus-eth2_Linux_amd64_*.tar.gz)
|
||||||
@ -28,6 +30,15 @@ jobs:
|
|||||||
release_name: Release ${{ github.ref }}
|
release_name: Release ${{ github.ref }}
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
#- name: Upload Release Tarball
|
||||||
|
#uses: actions/upload-release-asset@v1
|
||||||
|
#env:
|
||||||
|
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
#with:
|
||||||
|
#upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
#asset_path: ${{ steps.build_linux.outputs.tag }}.tar.gz
|
||||||
|
#asset_name: nimbus-eth2-${{ steps.build_linux.outputs.tag }}.tar.gz
|
||||||
|
#asset_content_type: application/gzip
|
||||||
- name: Upload Release Asset
|
- name: Upload Release Asset
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
|
@ -16,7 +16,7 @@ const
|
|||||||
|
|
||||||
gitRevision* = staticExec("git rev-parse --short HEAD")
|
gitRevision* = staticExec("git rev-parse --short HEAD")
|
||||||
|
|
||||||
nimBanner* = staticExec("nim --version")
|
nimBanner* = staticExec("nim --version | grep -v Compiled")
|
||||||
|
|
||||||
versionAsStr* =
|
versionAsStr* =
|
||||||
$versionMajor & "." & $versionMinor & "." & $versionBuild
|
$versionMajor & "." & $versionMinor & "." & $versionBuild
|
||||||
|
19
docker/dist/README.md
vendored
19
docker/dist/README.md
vendored
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This binary distribution was created from https://github.com/status-im/nimbus-eth2
|
This binary distribution was created from https://github.com/status-im/nimbus-eth2
|
||||||
|
|
||||||
Tarball naming scheme: "nimbus-eth2\_Linux\_amd64\_<VERSION>\_<GIT COMMIT>\_<YYYYMMDDHHMMSS>.tar.gz" (the date is in UTC).
|
Tarball naming scheme: "nimbus-eth2\_Linux\_amd64\_<VERSION>\_<GIT COMMIT>.tar.gz".
|
||||||
|
|
||||||
## Reproducing the build
|
## Reproducing the build
|
||||||
|
|
||||||
@ -40,3 +40,20 @@ Add arbitrary `beacon_node` parameters (yes, you can combine this with env vars)
|
|||||||
./run_medalla_node.sh --log-level=DEBUG --rpc-port=9290
|
./run_medalla_node.sh --log-level=DEBUG --rpc-port=9290
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Use your own Infura endpoint, because the default one is probably throttled:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
GOERLI_WEB3_URL="wss://goerli.infura.io/ws/v3/<YOUR PROJECT ID>" ./run_medalla_node.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Running a mainnet node
|
||||||
|
|
||||||
|
Same conventions as the Medalla script described above, plus the requirement of specifying a Web3 URL:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# using a local Geth instance
|
||||||
|
WEB3_URL="ws://localhost:8545" ./run_mainnet_node.sh
|
||||||
|
# using Infura
|
||||||
|
WEB3_URL="wss://mainnet.infura.io/ws/v3/<YOUR PROJECT ID>" ./run_mainnet_node.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
12
docker/dist/entry_point.sh
vendored
12
docker/dist/entry_point.sh
vendored
@ -3,6 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd /home/user/nimbus-eth2
|
cd /home/user/nimbus-eth2
|
||||||
|
git config --global core.abbrev 8
|
||||||
|
|
||||||
BINARIES="beacon_node beacon_node_spec_0_12_3"
|
BINARIES="beacon_node beacon_node_spec_0_12_3"
|
||||||
|
|
||||||
@ -14,11 +15,14 @@ make -j$(nproc) LOG_LEVEL="TRACE" NIMFLAGS="-d:disableMarchNative" PARTIAL_STATI
|
|||||||
PREFIX="nimbus-eth2_Linux_amd64_"
|
PREFIX="nimbus-eth2_Linux_amd64_"
|
||||||
GIT_COMMIT="$(git rev-parse --short HEAD)"
|
GIT_COMMIT="$(git rev-parse --short HEAD)"
|
||||||
VERSION="$(./env.sh nim --verbosity:0 --hints:off --warnings:off scripts/print_version.nims)"
|
VERSION="$(./env.sh nim --verbosity:0 --hints:off --warnings:off scripts/print_version.nims)"
|
||||||
TIMESTAMP="$(date --utc +'%Y%m%d%H%M%S')"
|
#TIMESTAMP="$(date --utc +'%Y%m%d%H%M%S')"
|
||||||
DIR="${PREFIX}${VERSION}_${GIT_COMMIT}_${TIMESTAMP}"
|
DIR="${PREFIX}${VERSION}_${GIT_COMMIT}"
|
||||||
DIST_PATH="dist/${DIR}"
|
DIST_PATH="dist/${DIR}"
|
||||||
# delete old artefacts
|
# delete old artefacts
|
||||||
rm -rf "dist/${PREFIX}"*.tar.gz
|
rm -rf "dist/${PREFIX}"*.tar.gz
|
||||||
|
if [[ -d "${DIST_PATH}" ]]; then
|
||||||
|
rm -rf "${DIST_PATH}"
|
||||||
|
fi
|
||||||
mkdir -p "${DIST_PATH}"
|
mkdir -p "${DIST_PATH}"
|
||||||
|
|
||||||
# copy and checksum binaries, copy scripts and docs
|
# copy and checksum binaries, copy scripts and docs
|
||||||
@ -30,8 +34,8 @@ for BINARY in ${BINARIES}; do
|
|||||||
cd - >/dev/null
|
cd - >/dev/null
|
||||||
done
|
done
|
||||||
sed -e "s/GIT_COMMIT/${GIT_COMMIT}/" docker/dist/README.md > "${DIST_PATH}/README.md"
|
sed -e "s/GIT_COMMIT/${GIT_COMMIT}/" docker/dist/README.md > "${DIST_PATH}/README.md"
|
||||||
cp -a scripts/makedir.sh docker/dist/run_medalla_node.sh "${DIST_PATH}/"
|
cp -a scripts/makedir.sh docker/dist/run_*_node.sh "${DIST_PATH}/"
|
||||||
cp -a docs/the_nimbus_book "${DIST_PATH}/"
|
#cp -a docs/the_nimbus_book "${DIST_PATH}/"
|
||||||
|
|
||||||
# create the tarball
|
# create the tarball
|
||||||
cd dist
|
cd dist
|
||||||
|
42
docker/dist/run_mainnet_node.sh
vendored
Executable file
42
docker/dist/run_mainnet_node.sh
vendored
Executable file
@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright (c) 2020 Status Research & Development GmbH. Licensed under
|
||||||
|
# either of:
|
||||||
|
# - Apache License, version 2.0
|
||||||
|
# - MIT license
|
||||||
|
# at your option. This file may not be copied, modified, or distributed except
|
||||||
|
# according to those terms.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
REL_PATH="$(dirname $0)"
|
||||||
|
|
||||||
|
# Overridable from the environment.
|
||||||
|
: ${LOG_LEVEL:="INFO"}
|
||||||
|
: ${NODE_ID:=0}
|
||||||
|
: ${NETWORK:="mainnet"}
|
||||||
|
: ${DATA_DIR:="shared_${NETWORK}_${NODE_ID}"}
|
||||||
|
: ${BASE_PORT:=9000}
|
||||||
|
: ${BASE_RPC_PORT:=9190}
|
||||||
|
|
||||||
|
# Sanity checks.
|
||||||
|
if [[ -z "${WEB3_URL}" ]]; then
|
||||||
|
echo "WEB3_URL not set in the environment. Aborting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create the data directory with the proper permissions.
|
||||||
|
"${REL_PATH}"/makedir.sh "${DATA_DIR}"
|
||||||
|
|
||||||
|
# Run the beacon node.
|
||||||
|
"${REL_PATH}"/beacon_node \
|
||||||
|
--log-level="${LOG_LEVEL}" \
|
||||||
|
--log-file="${DATA_DIR}"/nbc_bn_$(date +"%Y%m%d%H%M%S").log \
|
||||||
|
--data-dir="${DATA_DIR}" \
|
||||||
|
--web3-url=${WEB3_URL} \
|
||||||
|
--tcp-port=$(( ${BASE_PORT} + ${NODE_ID} )) \
|
||||||
|
--udp-port=$(( ${BASE_PORT} + ${NODE_ID} )) \
|
||||||
|
--rpc \
|
||||||
|
--rpc-port=$(( ${BASE_RPC_PORT} +${NODE_ID} )) \
|
||||||
|
"$@"
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user