This reverts commit 6e1ad080e8
.
This commit is contained in:
parent
5eecb9a21f
commit
87e98b9e54
|
@ -2,48 +2,81 @@ name: CI
|
|||
on:
|
||||
push:
|
||||
paths-ignore: ['media/**', 'docs/**', '**/*.md']
|
||||
branches:
|
||||
- stable
|
||||
- testing
|
||||
- unstable
|
||||
pull_request:
|
||||
paths-ignore: ['media/**', 'docs/**', '**/*.md']
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 20
|
||||
matrix:
|
||||
target:
|
||||
# Unit tests
|
||||
- os: linux
|
||||
cpu: amd64
|
||||
TEST_KIND: unit-tests
|
||||
- os: linux
|
||||
cpu: i386
|
||||
TEST_KIND: unit-tests
|
||||
- os: macos
|
||||
cpu: amd64
|
||||
TEST_KIND: unit-tests
|
||||
- os: windows
|
||||
cpu: amd64
|
||||
branch: [version-1-2, version-1-6]
|
||||
TEST_KIND: unit-tests
|
||||
# Devel cache corrupted for mingw? missing propidl.h on PR but not push CI
|
||||
# - os: windows
|
||||
# cpu: i386
|
||||
# TEST_KIND: unit-tests
|
||||
|
||||
# # Minimal integration tests
|
||||
# - os: linux
|
||||
# cpu: amd64
|
||||
# TEST_KIND: finalization-minimal
|
||||
# - os: linux
|
||||
# cpu: i386
|
||||
# TEST_KIND: finalization-minimal
|
||||
# # Requires GNU getopt
|
||||
# - os: macos
|
||||
# cpu: amd64
|
||||
# TEST_KIND: finalization-minimal
|
||||
# - os: windows
|
||||
# cpu: amd64
|
||||
# TEST_KIND: finalization-minimal
|
||||
# # TODO - Bootstrap issue: https://github.com/status-im/nimbus-eth2/issues/1725
|
||||
# # - os: windows
|
||||
# # cpu: i386
|
||||
# # TEST_KIND: finalization-minimal
|
||||
|
||||
# Mainnet integration tests
|
||||
# - os: linux
|
||||
# cpu: amd64
|
||||
# TEST_KIND: finalization-mainnet
|
||||
# # - os: linux
|
||||
# # cpu: i386
|
||||
# # TEST_KIND: finalization-mainnet
|
||||
# # - os: macos
|
||||
# # cpu: amd64
|
||||
# # TEST_KIND: finalization-mainnet
|
||||
# - os: windows
|
||||
# cpu: amd64
|
||||
# TEST_KIND: finalization-mainnet
|
||||
# # TODO - Bootstrap issue: https://github.com/status-im/nimbus-eth2/issues/1725
|
||||
# # - os: windows
|
||||
# # cpu: i386
|
||||
# # TEST_KIND: finalization-mainnet
|
||||
include:
|
||||
- target:
|
||||
os: linux
|
||||
builder: ubuntu-18.04
|
||||
shell: bash
|
||||
- target:
|
||||
os: macos
|
||||
builder: macos-10.15
|
||||
shell: bash
|
||||
- target:
|
||||
os: windows
|
||||
builder: windows-2019
|
||||
shell: msys2 {0}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.shell }}
|
||||
|
||||
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (Nim ${{ matrix.branch }})'
|
||||
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (${{ matrix.target.TEST_KIND }})'
|
||||
runs-on: ${{ matrix.builder }}
|
||||
steps:
|
||||
- name: Get branch name
|
||||
|
@ -58,17 +91,65 @@ jobs:
|
|||
fi
|
||||
id: get_branch
|
||||
|
||||
- name: Cancel Previous Runs (except main branches)
|
||||
- name: Cancel Previous Runs (except master/devel)
|
||||
if: >
|
||||
steps.get_branch.outputs.branch_name != 'master' &&
|
||||
steps.get_branch.outputs.branch_name != 'devel' &&
|
||||
steps.get_branch.outputs.branch_name != 'stable' &&
|
||||
steps.get_branch.outputs.branch_name != 'unstable' &&
|
||||
steps.get_branch.outputs.branch_name != 'testing'
|
||||
uses: styfle/cancel-workflow-action@0.9.1
|
||||
uses: styfle/cancel-workflow-action@0.5.0
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
- name: Checkout
|
||||
- name: Support longpaths (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: git config --system core.longpaths true
|
||||
|
||||
- name: Checkout nimbus-eth2
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: nimbus-eth2
|
||||
|
||||
- name: Derive environment variables
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ '${{ matrix.target.cpu }}' == 'amd64' ]]; then
|
||||
ARCH=64
|
||||
PLATFORM=x64
|
||||
else
|
||||
ARCH=32
|
||||
PLATFORM=x86
|
||||
fi
|
||||
echo "ARCH=$ARCH" >> $GITHUB_ENV
|
||||
echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV
|
||||
|
||||
# Stack usage test on recent enough gcc:
|
||||
if [[ '${{ runner.os }}' == 'Linux' && '${{ matrix.target.cpu }}' == 'amd64' ]]; then
|
||||
export NIMFLAGS="${NIMFLAGS} -d:limitStackUsage"
|
||||
echo "NIMFLAGS=$NIMFLAGS" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
# libminiupnp / natpmp
|
||||
if [[ '${{ runner.os }}' == 'Linux' && '${{ matrix.target.cpu }}' == 'i386' ]]; then
|
||||
export CFLAGS="${CFLAGS} -m32 -mno-adx"
|
||||
echo "CFLAGS=$CFLAGS" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
ncpu=
|
||||
case '${{ runner.os }}' in
|
||||
'Linux')
|
||||
ncpu=$(nproc)
|
||||
;;
|
||||
'macOS')
|
||||
ncpu=$(sysctl -n hw.ncpu)
|
||||
;;
|
||||
'Windows')
|
||||
ncpu=$NUMBER_OF_PROCESSORS
|
||||
;;
|
||||
esac
|
||||
[[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1
|
||||
echo "ncpu=$ncpu" >> $GITHUB_ENV
|
||||
|
||||
- name: Install build dependencies (Linux i386)
|
||||
if: runner.os == 'Linux' && matrix.target.cpu == 'i386'
|
||||
|
@ -89,142 +170,154 @@ jobs:
|
|||
chmod 755 external/bin/gcc external/bin/g++
|
||||
echo "${{ github.workspace }}/external/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: MSYS2 (Windows i386)
|
||||
if: runner.os == 'Windows' && matrix.target.cpu == 'i386'
|
||||
uses: msys2/setup-msys2@v2
|
||||
- name: Restore MinGW-W64 (Windows) from cache
|
||||
if: runner.os == 'Windows'
|
||||
id: windows-mingw-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path-type: inherit
|
||||
msystem: MINGW32
|
||||
install: >-
|
||||
base-devel
|
||||
git
|
||||
mingw-w64-i686-toolchain
|
||||
|
||||
- name: MSYS2 (Windows amd64)
|
||||
if: runner.os == 'Windows' && matrix.target.cpu == 'amd64'
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
path-type: inherit
|
||||
install: >-
|
||||
base-devel
|
||||
git
|
||||
mingw-w64-x86_64-toolchain
|
||||
path: external/mingw-${{ matrix.target.cpu }}
|
||||
key: 'mingw-${{ matrix.target.cpu }}-cachekey_v2'
|
||||
|
||||
- name: Restore Nim DLLs dependencies (Windows) from cache
|
||||
if: runner.os == 'Windows'
|
||||
id: windows-dlls-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: external/dlls
|
||||
path: external/dlls-${{ matrix.target.cpu }}
|
||||
key: 'dlls-${{ matrix.target.cpu }}'
|
||||
|
||||
- name: Install MinGW64 dependency (Windows)
|
||||
if: >
|
||||
steps.windows-mingw-cache.outputs.cache-hit != 'true' &&
|
||||
runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p external
|
||||
curl -L "https://nim-lang.org/download/mingw$ARCH.7z" -o "external/mingw-${{ matrix.target.cpu }}.7z"
|
||||
7z x -y "external/mingw-${{ matrix.target.cpu }}.7z" -oexternal/
|
||||
mv external/mingw$ARCH external/mingw-${{ matrix.target.cpu }}
|
||||
|
||||
- name: Install DLLs dependencies (Windows)
|
||||
if: >
|
||||
steps.windows-dlls-cache.outputs.cache-hit != 'true' &&
|
||||
runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p external
|
||||
curl -L "https://nim-lang.org/download/windeps.zip" -o external/windeps.zip
|
||||
7z x -y external/windeps.zip -oexternal/dlls
|
||||
7z x -y external/windeps.zip -oexternal/dlls-${{ matrix.target.cpu }}
|
||||
|
||||
- name: Path to cached dependencies (Windows)
|
||||
if: >
|
||||
runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "${{ github.workspace }}/external/dlls" >> $GITHUB_PATH
|
||||
# for miniupnp that runs "wingenminiupnpcstrings.exe" from the current dir
|
||||
echo "." >> $GITHUB_PATH
|
||||
echo "${{ github.workspace }}/external/mingw-${{ matrix.target.cpu }}/bin" >> $GITHUB_PATH
|
||||
echo "${{ github.workspace }}/external/dlls-${{ matrix.target.cpu }}" >> $GITHUB_PATH
|
||||
|
||||
- name: Install build dependencies (macOS)
|
||||
- name: Install build dependencies (MacOS)
|
||||
if: runner.os == 'macOS'
|
||||
shell: bash
|
||||
run: |
|
||||
brew install gnu-getopt
|
||||
brew link --force gnu-getopt
|
||||
|
||||
- name: Derive environment variables
|
||||
- name: Get latest nimbus-build-system commit hash
|
||||
id: versions
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ '${{ matrix.target.cpu }}' == 'amd64' ]]; then
|
||||
PLATFORM=x64
|
||||
else
|
||||
PLATFORM=x86
|
||||
fi
|
||||
echo "PLATFORM=${PLATFORM}" >> $GITHUB_ENV
|
||||
getHash() {
|
||||
git ls-remote "https://github.com/$1" "${2:-HEAD}" | cut -f 1
|
||||
}
|
||||
nbsHash=$(getHash status-im/nimbus-build-system)
|
||||
echo "::set-output name=nimbus_build_system::$nbsHash"
|
||||
|
||||
# Stack usage test on recent enough gcc:
|
||||
if [[ '${{ runner.os }}' == 'Linux' && '${{ matrix.target.cpu }}' == 'amd64' ]]; then
|
||||
export NIMFLAGS="${NIMFLAGS} -d:limitStackUsage"
|
||||
echo "NIMFLAGS=${NIMFLAGS}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
# libminiupnp / natpmp
|
||||
if [[ '${{ runner.os }}' == 'Linux' && '${{ matrix.target.cpu }}' == 'i386' ]]; then
|
||||
export CFLAGS="${CFLAGS} -m32 -mno-adx"
|
||||
echo "CFLAGS=${CFLAGS}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
ncpu=""
|
||||
case '${{ runner.os }}' in
|
||||
'Linux')
|
||||
ncpu=$(nproc)
|
||||
;;
|
||||
'macOS')
|
||||
ncpu=$(sysctl -n hw.ncpu)
|
||||
;;
|
||||
'Windows')
|
||||
ncpu=${NUMBER_OF_PROCESSORS}
|
||||
;;
|
||||
esac
|
||||
[[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1
|
||||
echo "ncpu=${ncpu}" >> $GITHUB_ENV
|
||||
- name: Restore prebuilt Nim binaries from cache
|
||||
id: nim-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: nimbus-eth2/NimBinaries
|
||||
key: 'nim-${{ matrix.target.os }}-${{ matrix.target.cpu }}-${{ steps.versions.outputs.nimbus_build_system }}'
|
||||
|
||||
- name: Build Nim and Nimbus dependencies
|
||||
shell: bash
|
||||
working-directory: nimbus-eth2
|
||||
run: |
|
||||
make -j ${ncpu} NIM_COMMIT=${{ matrix.branch }} ARCH_OVERRIDE=${PLATFORM} QUICK_AND_DIRTY_COMPILER=1 update
|
||||
./env.sh nim --version
|
||||
if [[ "${{ runner.os }}" == "macOS" ]]; then
|
||||
ulimit -n 1024
|
||||
fi
|
||||
make -j$ncpu ARCH_OVERRIDE=$PLATFORM CI_CACHE=NimBinaries QUICK_AND_DIRTY_COMPILER=1 update
|
||||
|
||||
- name: Get latest fixtures commit hash
|
||||
if: matrix.target.TEST_KIND == 'unit-tests'
|
||||
id: fixtures_version
|
||||
shell: bash
|
||||
run: |
|
||||
getHash() {
|
||||
git ls-remote "https://github.com/$1" "${2:-HEAD}" | cut -f 1
|
||||
}
|
||||
fixturesHash=$(getHash status-im/nim-eth2-scenarios)
|
||||
echo "::set-output name=fixtures::${fixturesHash}"
|
||||
echo "::set-output name=fixtures::$fixturesHash"
|
||||
|
||||
- name: Restore Ethereum Foundation fixtures from cache
|
||||
if: matrix.target.TEST_KIND == 'unit-tests'
|
||||
id: fixtures-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: fixturesCache
|
||||
path: nimbus-eth2/fixturesCache
|
||||
key: 'eth2-scenarios-${{ steps.fixtures_version.outputs.fixtures }}'
|
||||
|
||||
# Important: even with a cache hit, this should be run
|
||||
# as it symlinks the cached items in their proper place
|
||||
- name: Get the Ethereum Foundation fixtures
|
||||
if: matrix.target.TEST_KIND == 'unit-tests'
|
||||
shell: bash
|
||||
working-directory: nimbus-eth2
|
||||
run: |
|
||||
scripts/setup_scenarios.sh fixturesCache
|
||||
|
||||
- name: Smoke test the Beacon Node and Validator Client with all tracing enabled
|
||||
if: matrix.target.TEST_KIND == 'unit-tests'
|
||||
shell: bash
|
||||
working-directory: nimbus-eth2
|
||||
run: |
|
||||
make -j ${ncpu} NIM_COMMIT=${{ matrix.branch }} LOG_LEVEL=TRACE nimbus_beacon_node nimbus_validator_client
|
||||
if [[ "${{ runner.os }}" == "macOS" ]]; then
|
||||
ulimit -n 1024
|
||||
fi
|
||||
make -j$ncpu ARCH_OVERRIDE=$PLATFORM LOG_LEVEL=TRACE nimbus_beacon_node nimbus_validator_client
|
||||
|
||||
- name: Build all tools
|
||||
- name: Run nimbus-eth2 tests
|
||||
if: matrix.target.TEST_KIND == 'unit-tests'
|
||||
shell: bash
|
||||
working-directory: nimbus-eth2
|
||||
run: |
|
||||
make -j ${ncpu} NIM_COMMIT=${{ matrix.branch }}
|
||||
# The Windows image runs out of disk space, so make some room
|
||||
rm -rf nimcache
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
make -j ${ncpu} NIM_COMMIT=${{ matrix.branch }} DISABLE_TEST_FIXTURES_SCRIPT=1 test
|
||||
if [[ "${{ runner.os }}" == "macOS" ]]; then
|
||||
ulimit -n 1024
|
||||
fi
|
||||
make -j$ncpu ARCH_OVERRIDE=$PLATFORM DISABLE_TEST_FIXTURES_SCRIPT=1 test
|
||||
|
||||
# The upload creates a combined report that gets posted as a comment on the PR
|
||||
# https://github.com/EnricoMi/publish-unit-test-result-action
|
||||
- name: Upload combined results
|
||||
if: matrix.target.TEST_KIND == 'unit-tests'
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Unit Test Results ${{ matrix.target.os }}-${{ matrix.target.cpu }}
|
||||
path: build/*.xml
|
||||
path: nimbus-eth2/build/*.xml
|
||||
|
||||
- name: Run nimbus-eth2 testnet0 (minimal)
|
||||
if: matrix.target.TEST_KIND == 'finalization-minimal'
|
||||
shell: bash
|
||||
working-directory: nimbus-eth2
|
||||
run: |
|
||||
./scripts/launch_local_testnet.sh --preset minimal --nodes 4 --stop-at-epoch 5 --log-level DEBUG --disable-htop --enable-logtrace --data-dir local_testnet0_data --base-port 9000 --base-rpc-port 7000 --base-metrics-port 8008 --timeout 600 -- --verify-finalization --discv5:no
|
||||
|
||||
- name: Run nimbus-eth2 testnet1 (mainnet)
|
||||
if: matrix.target.TEST_KIND == 'finalization-mainnet'
|
||||
shell: bash
|
||||
working-directory: nimbus-eth2
|
||||
run: |
|
||||
./scripts/launch_local_testnet.sh --nodes 4 --stop-at-epoch 5 --log-level DEBUG --disable-htop --enable-logtrace --data-dir local_testnet0_data --base-port 9000 --base-rpc-port 7000 --base-metrics-port 8008 --timeout 2400 -- --verify-finalization --discv5:no
|
||||
|
||||
# https://github.com/EnricoMi/publish-unit-test-result-action
|
||||
event_file:
|
||||
|
|
|
@ -9,6 +9,7 @@ jobs:
|
|||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 20
|
||||
matrix:
|
||||
target:
|
||||
- os: linux
|
||||
|
@ -44,13 +45,13 @@ jobs:
|
|||
runs-on: ${{ matrix.builder }}
|
||||
continue-on-error: ${{ matrix.branch == 'version-1-6' || matrix.branch == 'devel' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout nimbus-eth2
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: unstable
|
||||
|
||||
- name: Checkout (pull request)
|
||||
- name: Checkout nimbus-eth2 (pull request)
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
uses: actions/checkout@v2
|
||||
|
||||
|
@ -99,7 +100,7 @@ jobs:
|
|||
id: windows-dlls-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: external/dlls
|
||||
path: external/dlls-${{ matrix.target.cpu }}
|
||||
key: 'dlls-${{ matrix.target.cpu }}'
|
||||
|
||||
- name: Install DLLs dependencies (Windows)
|
||||
|
@ -109,13 +110,13 @@ jobs:
|
|||
run: |
|
||||
mkdir -p external
|
||||
curl -L "https://nim-lang.org/download/windeps.zip" -o external/windeps.zip
|
||||
7z x -y external/windeps.zip -oexternal/dlls
|
||||
7z x -y external/windeps.zip -oexternal/dlls-${{ matrix.target.cpu }}
|
||||
|
||||
- name: Path to cached dependencies (Windows)
|
||||
if: >
|
||||
runner.os == 'Windows'
|
||||
run: |
|
||||
echo "${{ github.workspace }}/external/dlls" >> $GITHUB_PATH
|
||||
echo "${{ github.workspace }}/external/dlls-${{ matrix.target.cpu }}" >> $GITHUB_PATH
|
||||
# for miniupnp that runs "wingenminiupnpcstrings.exe" from the current dir
|
||||
echo "." >> $GITHUB_PATH
|
||||
|
||||
|
@ -134,12 +135,6 @@ jobs:
|
|||
fi
|
||||
echo "PLATFORM=${PLATFORM}" >> $GITHUB_ENV
|
||||
|
||||
# Stack usage test on recent enough gcc:
|
||||
if [[ '${{ runner.os }}' == 'Linux' && '${{ matrix.target.cpu }}' == 'amd64' ]]; then
|
||||
export NIMFLAGS="${NIMFLAGS} -d:limitStackUsage"
|
||||
echo "NIMFLAGS=${NIMFLAGS}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
# libminiupnp / natpmp
|
||||
if [[ '${{ runner.os }}' == 'Linux' && '${{ matrix.target.cpu }}' == 'i386' ]]; then
|
||||
export CFLAGS="${CFLAGS} -m32 -mno-adx"
|
||||
|
@ -192,6 +187,7 @@ jobs:
|
|||
# The Windows image runs out of disk space, so make some room
|
||||
rm -rf nimcache
|
||||
|
||||
- name: Run tests
|
||||
- name: Run nimbus-eth2 tests
|
||||
run: |
|
||||
make -j ${ncpu} V=1 NIM_COMMIT=${{ matrix.branch }} DISABLE_TEST_FIXTURES_SCRIPT=1 test
|
||||
|
||||
|
|
|
@ -206,13 +206,9 @@
|
|||
[submodule "vendor/eth2-networks"]
|
||||
path = vendor/eth2-networks
|
||||
url = https://github.com/eth-clients/eth2-networks.git
|
||||
ignore = untracked
|
||||
branch = master
|
||||
[submodule "vendor/nim-taskpools"]
|
||||
path = vendor/nim-taskpools
|
||||
url = https://github.com/status-im/nim-taskpools
|
||||
ignore = untracked
|
||||
branch = stable
|
||||
[submodule "vendor/nim-ssz-serialization"]
|
||||
path = vendor/nim-ssz-serialization
|
||||
url = https://github.com/status-im/nim-ssz-serialization.git
|
||||
|
|
|
@ -1333,15 +1333,19 @@ proc startEth1Syncing(m: Eth1Monitor, delayBeforeStart: Duration) {.async.} =
|
|||
eth1SyncedTo = targetBlock
|
||||
eth1_synced_head.set eth1SyncedTo.toGaugeValue
|
||||
|
||||
proc start(m: Eth1Monitor, delayBeforeStart: Duration) {.gcsafe.} =
|
||||
proc start(m: Eth1Monitor, delayBeforeStart: Duration) =
|
||||
if m.runFut.isNil:
|
||||
let runFut = m.startEth1Syncing(delayBeforeStart)
|
||||
m.runFut = runFut
|
||||
runFut.addCallback do (p: pointer) {.gcsafe.}:
|
||||
runFut.addCallback do (p: pointer):
|
||||
if runFut.failed:
|
||||
if runFut.error[] of CatchableError:
|
||||
if runFut == m.runFut:
|
||||
warn "Eth1 chain monitoring failure, restarting", err = runFut.error.msg
|
||||
m.state = Failed
|
||||
else:
|
||||
fatal "Fatal exception reached", err = runFut.error.msg
|
||||
quit 1
|
||||
|
||||
safeCancel m.runFut
|
||||
m.start(5.seconds)
|
||||
|
|
|
@ -32,8 +32,8 @@ import
|
|||
|
||||
export base, sets
|
||||
|
||||
from ssz_serialization/proofs import GeneralizedIndex
|
||||
export proofs.GeneralizedIndex
|
||||
from ssz_serialization/merkleization import GeneralizedIndex
|
||||
export merkleization.GeneralizedIndex
|
||||
|
||||
const
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.9/specs/altair/beacon-chain.md#incentivization-weights
|
||||
|
|
|
@ -12,17 +12,9 @@ shift 2
|
|||
# verbosity level
|
||||
[[ -z "$V" ]] && V=0
|
||||
|
||||
# Nim version (formatted as "{MAJOR}{MINOR}").
|
||||
# This weird "sed" invocation is because of macOS.
|
||||
NIM_VERSION=$(nim --version | head -n1 | sed -E 's/^.* ([0-9])\.([0-9]+).*$/\1\2/')
|
||||
|
||||
# According to old Nim compiler versions, the project name comes from the main
|
||||
# source file, not the output binary.
|
||||
if [[ "${NIM_VERSION}" -ge "16" ]]; then
|
||||
PROJECT_NAME="$(basename ${BINARY%.nim})"
|
||||
else
|
||||
PROJECT_NAME="$(basename ${SOURCE%.nim})"
|
||||
fi
|
||||
# According to the Nim compiler, the project name comes from the main source
|
||||
# file, not the output binary.
|
||||
PROJECT_NAME="$(basename ${SOURCE%.nim})"
|
||||
|
||||
# The default nimcache dir is "nimcache/release/${PROJECT_NAME}" which doesn't
|
||||
# allow building different binaries from the same main source file, in
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 27642432ca66c97b07730b5a84e9565f5b69be13
|
||||
Subproject commit ca82b5e88431a53a982dc786c412ee2d15f28743
|
|
@ -1 +1 @@
|
|||
Subproject commit 84ced6d002789567f2396c75800ffd6dff2866f7
|
||||
Subproject commit c478bb74268c65e7400e81f49d26f82d20f1f57a
|
|
@ -1 +1 @@
|
|||
Subproject commit fa4a2dc35e403d19baae480fd65938c87eca3bc3
|
||||
Subproject commit 32de202845762607a55332c2d138aca1327bf37b
|
|
@ -1 +1 @@
|
|||
Subproject commit ba80e2a0d7ae8aab666cee013e38ff8d33a3e5e7
|
||||
Subproject commit dc62f4fccd2d40c884009ae8f2b14bb6a86a55cf
|
|
@ -1 +1 @@
|
|||
Subproject commit 1682096306ddba8185dcfac360a8c3f952d721e4
|
||||
Subproject commit 884e870048698a7dd17ee961f8f53b3c6f56c80a
|
|
@ -1 +1 @@
|
|||
Subproject commit 2139c6c3d6820997a8dd1ea9af7c175efdef5401
|
||||
Subproject commit 858e4ea2edf090980b070d668f0d92ad801d099e
|
|
@ -1 +1 @@
|
|||
Subproject commit 0435e67832b6bb8dfdf0ddb102903e9d820206d2
|
||||
Subproject commit 6a56d01381f434d5fbcc61b6e497b9409155bcbc
|
|
@ -1 +1 @@
|
|||
Subproject commit 779d767b024175a51cf74c79ec7513301ebe2f46
|
||||
Subproject commit 49d1d29fdf4ce090d0e2aa3d6037f0ded324b114
|
|
@ -1 +1 @@
|
|||
Subproject commit 37a183153c071539ab870f427c09a1376ba311b9
|
||||
Subproject commit 3a0ab42573e566ce52625760f6bbf7e0bbb6ebc4
|
|
@ -1 +1 @@
|
|||
Subproject commit 733a05b00c01f90e805225a8c65396fbf0374403
|
||||
Subproject commit 97ba55bbf6246ce798f44871ca84a4e96c59167c
|
|
@ -1 +1 @@
|
|||
Subproject commit 4b8f487d2dfdd941df7408ceaa70b174cce02180
|
||||
Subproject commit 4f3775ddf48d9abee30c51a53862cea84a09fa78
|
|
@ -1 +1 @@
|
|||
Subproject commit 284b3aac05a9d96c27044c389a5d27a84d8e8f4b
|
||||
Subproject commit 63196b0628fd6742a9467842f771d3b1ed1fb803
|
|
@ -1 +1 @@
|
|||
Subproject commit 58f383e661521314df314e7096c24db5a7490372
|
||||
Subproject commit dffe4bed4541dee2645629729a245e7607d716ad
|
|
@ -1 +1 @@
|
|||
Subproject commit 30948551be113d809b28bf6131c925caff3af515
|
||||
Subproject commit db9a74ad6a301f991c477fc2d90894957f640654
|
|
@ -1 +1 @@
|
|||
Subproject commit ae13ff450b9e578d611fea2609aee46fdbd6ca99
|
||||
Subproject commit f7d671f877e01213494aac7903421ccdbe70616f
|
|
@ -1 +1 @@
|
|||
Subproject commit c565aa88b963ae1e6ca8bf1296d2ff9ce2847295
|
||||
Subproject commit 6aab1e0dd674b262f538d12b0458f3e7eb835b19
|
|
@ -1 +1 @@
|
|||
Subproject commit e092373a5cbe1fa25abfc62e0f2a5f138dc3fb13
|
||||
Subproject commit d790c42206fab4b8008eaa91181ca8c8c68a0105
|
|
@ -1 +1 @@
|
|||
Subproject commit 37bc0db558d85711967acb16e9bb822b06911d46
|
||||
Subproject commit fcd0eadadde0ee000a63df8ab21dc4e9f015a790
|
|
@ -1 +1 @@
|
|||
Subproject commit 3d39a6228af6204af21ad6eaa693f1661716ae2a
|
||||
Subproject commit 2256d6efb266dd1f65fc24077fb148377edb5b8c
|
|
@ -1 +1 @@
|
|||
Subproject commit cd500484e054ead951f2d07aeb81c1c8c695db26
|
||||
Subproject commit 66745f23b5d64c79f0f24af95eb63c47a71f8dbf
|
|
@ -1 +1 @@
|
|||
Subproject commit bb705bf17b46d2c8f9bfb106d9cc7437009a2501
|
||||
Subproject commit b464505b4dcbe2ef52d19b2cfca8f2be4ebf2c7e
|
|
@ -1 +1 @@
|
|||
Subproject commit ddfa6c608a6c2a843d7b405f377a22703947267a
|
||||
Subproject commit 49d11d61b824c1aa6ef16d4092fb3c27b21b0748
|
|
@ -1 +1 @@
|
|||
Subproject commit c3c9ae079ab2eed33ffe5ca27ec4013beed7647f
|
||||
Subproject commit 7c6ee4bfc184d7121896a098d68b639a96df7af1
|
|
@ -1 +1 @@
|
|||
Subproject commit 24eb5e829ed07e71e3a5d09786d5f80aa988874f
|
||||
Subproject commit f1d70dbb8c7b5e2474b0bd5ac52f42c8c4318fd2
|
|
@ -1 +1 @@
|
|||
Subproject commit 73edde4417f7b45003113b7a34212c3ccd95b9fd
|
||||
Subproject commit a697e3585d583ab6b91a159ea7d023461002c927
|
|
@ -1 +1 @@
|
|||
Subproject commit 74cdeb54b21bededb5a515d36f608bc1850555a2
|
||||
Subproject commit 6bbc67d09e624d69052d62b2353878f491186942
|
|
@ -1 +1 @@
|
|||
Subproject commit 4794baca09cd971d9723e0371cb3de27a5f3722b
|
||||
Subproject commit ea6de3427d532a77eb83b63f431d5ddb850d5a17
|
Loading…
Reference in New Issue