Skip to content

Commit 90db75d

Browse files
committed
Rebase Fulu onto unstable
1 parent f14f935 commit 90db75d

File tree

366 files changed

+32374
-21191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

366 files changed

+32374
-21191
lines changed

.github/dependabot.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# beacon_chain
2+
# Copyright (c) 2025 Status Research & Development GmbH
3+
# Licensed and distributed under either of
4+
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
5+
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
6+
# at your option. This file may not be copied, modified, or distributed except according to those terms.
7+
8+
version: 2
9+
updates:
10+
- package-ecosystem: gitsubmodule
11+
directory: /
12+
ignore:
13+
# Libraries that track the latest tag have to be managed manually,
14+
# as Dependabot otherwise suggests the latest unstable commit
15+
# https://github.com/dependabot/dependabot-core/pull/13052
16+
- dependency-name: vendor/nim-bearssl
17+
- dependency-name: vendor/nim-chronicles
18+
- dependency-name: vendor/nim-chronos
19+
- dependency-name: vendor/nim-eth
20+
- dependency-name: vendor/nim-faststreams
21+
- dependency-name: vendor/nim-json-rpc
22+
- dependency-name: vendor/nim-json-serialization
23+
- dependency-name: vendor/nim-libbacktrace
24+
- dependency-name: vendor/nim-libp2p
25+
- dependency-name: vendor/nim-metrics
26+
- dependency-name: vendor/nim-normalize
27+
- dependency-name: vendor/nim-presto
28+
- dependency-name: vendor/nim-results
29+
- dependency-name: vendor/nim-serialization
30+
- dependency-name: vendor/nim-stew
31+
- dependency-name: vendor/nim-stint
32+
- dependency-name: vendor/nim-taskpools
33+
- dependency-name: vendor/nim-testutils
34+
- dependency-name: vendor/nim-toml-serialization
35+
- dependency-name: vendor/nim-unicodedb
36+
- dependency-name: vendor/nim-unittest2
37+
- dependency-name: vendor/nim-web3
38+
- dependency-name: vendor/nim-websock
39+
- dependency-name: vendor/nimcrypto
40+
- dependency-name: vendor/NimYAML
41+
schedule:
42+
interval: daily
43+
target-branch: unstable

.github/workflows/ci.yml

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,33 @@ jobs:
5454
builder: ['self-hosted','ubuntu-22.04']
5555
- target:
5656
os: macos
57+
cpu: amd64
5758
builder: macos-13
59+
- target:
60+
os: macos
61+
cpu: arm64
62+
builder: macos-latest
5863
- target:
5964
os: windows
60-
builder: windows-2019
65+
builder: windows-2022
6166

6267
defaults:
6368
run:
6469
shell: bash
6570

6671
name: ${{ matrix.target.os }}-${{ matrix.target.cpu }}${{ matrix.branch != '' && ' (Nim ' || '' }}${{ matrix.branch-short }}${{ matrix.branch != '' && ')' || '' }}
6772
runs-on: ${{ matrix.builder }}
73+
6874
steps:
75+
- name: Fix nim cache conflicts
76+
run: |
77+
echo "XDG_CACHE_HOME=${{ runner.temp }}/.nim-cache" >> $GITHUB_ENV
78+
echo "CI_CACHE=${{ runner.temp }}/.nbs-cache" >> $GITHUB_ENV
79+
80+
- name: Clean workspace (very aggressive)
81+
if: contains(matrix.builder, 'self-hosted')
82+
run: rm -rf "$GITHUB_WORKSPACE"/*
83+
6984
- name: Checkout
7085
uses: actions/checkout@v4
7186

@@ -89,23 +104,6 @@ jobs:
89104
7z x -y "external/mingw-${{ matrix.target.cpu }}.zip" -oexternal/mingw-${{ matrix.target.cpu }}/
90105
mv external/mingw-${{ matrix.target.cpu }}/**/* ./external/mingw-${{ matrix.target.cpu }}
91106
92-
- name: Restore Nim DLLs dependencies (Windows) from cache
93-
if: runner.os == 'Windows'
94-
id: windows-dlls-cache
95-
uses: actions/cache@v4
96-
with:
97-
path: external/dlls-${{ matrix.target.cpu }}
98-
key: 'dlls-${{ matrix.target.cpu }}'
99-
100-
- name: Install DLLs dependencies (Windows)
101-
if: >
102-
steps.windows-dlls-cache.outputs.cache-hit != 'true' &&
103-
runner.os == 'Windows'
104-
run: |
105-
mkdir -p external
106-
curl -L "https://nim-lang.org/download/windeps.zip" -o external/windeps.zip
107-
7z x -y external/windeps.zip -oexternal/dlls-${{ matrix.target.cpu }}
108-
109107
- name: Path to cached dependencies (Windows)
110108
if: >
111109
runner.os == 'Windows'
@@ -219,32 +217,40 @@ jobs:
219217
name: "Developer builds"
220218
runs-on: ['self-hosted','ubuntu-22.04']
221219
steps:
220+
- name: Fix nim cache conflicts
221+
run: |
222+
echo "XDG_CACHE_HOME=${{ runner.temp }}/.nim-cache" >> $GITHUB_ENV
223+
echo "CI_CACHE=${{ runner.temp }}/.nbs-cache" >> $GITHUB_ENV
224+
225+
- name: Clean workspace (very aggressive)
226+
run: rm -rf "$GITHUB_WORKSPACE"/*
227+
222228
- name: Checkout
223229
uses: actions/checkout@v4
224230
with:
225231
fetch-depth: 1
226232

227-
- name: Build with developer flags
228-
run: |
229-
make -j nimbus_beacon_node LOG_LEVEL=TRACE NIMFLAGS="-d:has_deposit_root_checks=1"
230-
231233
- name: Build files with isMainModule
232234
run: |
233-
executables=(
234-
"beacon_chain/el/deposit_contract"
235-
"beacon_chain/fork_choice/fork_choice"
236-
"beacon_chain/fork_choice/proto_array"
237-
"beacon_chain/networking/network_metadata_downloads"
238-
"beacon_chain/era_db"
239-
"beacon_chain/trusted_node_sync"
240-
"benchmarks/rest_api_benchmark"
241-
"tests/mocking/mock_genesis"
242-
)
235+
makefile_content=$(<./Makefile)
236+
executables=()
237+
while IFS= read -r file; do
238+
base=$(basename "$file" ".nim")
239+
if ! grep -qw "$base" <<< "$makefile_content"; then
240+
executables+=("$file")
241+
fi
242+
done < <(grep -Rl --include="*.nim" --exclude-dir=vendor "when isMainModule:" .)
243+
make -j update
243244
source env.sh
244245
for executable in "${executables[@]}"; do
245246
nim c --passC:-fsyntax-only --noLinking:on -d:chronicles_log_level=TRACE "${executable}"
246247
done
247248
249+
- name: Build with custom SECONDS_PER_SLOT
250+
run: |
251+
source env.sh
252+
nim c --passC:-fsyntax-only --noLinking:on -d:chronicles_log_level=TRACE -d:SECONDS_PER_SLOT=1 beacon_chain/nimbus_beacon_node
253+
248254
lint:
249255
name: "Lint"
250256
runs-on: ubuntu-latest
@@ -259,7 +265,7 @@ jobs:
259265
if: ${{ !cancelled() }} && github.event_name == 'pull_request'
260266
run: |
261267
excluded_files="config.yaml|config.nims|beacon_chain.nimble"
262-
excluded_extensions="ans|bin|cfg|yml|json|json\\.template|md|png|service|ssz|tpl|txt|lock|nix|gitignore|envrc"
268+
excluded_extensions="ans|bin|cfg|yml|json|json\\.template|md|png|service|ssz|tpl|txt|lock|nix|gitignore|envrc|sh"
263269
264270
current_year=$(date +"%Y")
265271
problematic_files=()
@@ -282,13 +288,13 @@ jobs:
282288
run: |
283289
problematic_files=()
284290
while read -r file; do
285-
if ! grep -qE '^{\.push raises: \[\]\.}$' "$file"; then
291+
if ! grep -qE '^{\.push raises: \[\](, gcsafe)?\.}$' "$file"; then
286292
problematic_files+=("$file")
287293
fi
288294
done < <(git diff --name-only --diff-filter=AM --ignore-submodules HEAD^ HEAD | grep -E '\.nim$' || true)
289295
290296
if (( ${#problematic_files[@]} )); then
291-
echo "The following files do not have '{.push raises: [].}':"
297+
echo "The following files do not have '{.push raises: [], gcsafe.}' (gcsafe optional):"
292298
for file in "${problematic_files[@]}"; do
293299
echo "- $file"
294300
done

0 commit comments

Comments
 (0)