Skip to content

Commit 1de688e

Browse files
authored
Merge branch 'main' into optimize-pubkey-unmarshal
2 parents e10cb75 + 91fcb07 commit 1de688e

882 files changed

Lines changed: 38957 additions & 22336 deletions

File tree

Some content is hidden

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

.claude/settings.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@
44
"Bash(make test-all:*)",
55
"Bash(go test:*)",
66
"Bash(go get:*)",
7-
"Bash(GOEXPERIMENT=synctest go vet:*)",
7+
"Bash(go vet:*)",
88
"Bash(make lint:*)",
99
"Bash(git fetch:*)",
10-
"Bash(go mod tidy:*)"
10+
"Bash(go mod tidy:*)",
11+
"WebFetch(domain:github.com)",
12+
"WebSearch",
13+
"WebFetch(domain:raw.githubusercontent.com)",
14+
"Bash(git status:*)",
15+
"Bash(gh pr edit:*)",
16+
"Bash(git lfs ls-files:*)",
17+
"Bash(grep:*)",
18+
"Bash(git add:*)",
19+
"WebFetch(domain:pypi.org)"
1120
]
1221
}
1322
}

.claude/skills/erigon-ci/SKILL.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
name: erigon-ci
3+
description: |
4+
Run Erigon CI checks locally and/or trigger them remotely on a branch via GitHub Actions workflow_dispatch.
5+
Use this when you need to verify a branch passes all CI before or after pushing — especially for branches
6+
like bal-devnet-2 that don't auto-trigger on push/PR events.
7+
---
8+
9+
# Erigon CI Skill
10+
11+
Orchestrates CI verification: run test groups locally and/or dispatch GitHub Actions on any branch.
12+
13+
Each test group has its own dedicated skill for drill-down on failures. Use those when a specific group fails and you need to re-run individual tests.
14+
15+
---
16+
17+
## Local Test Groups
18+
19+
| Group | Skill | Command | Speed | Use When |
20+
|-------|-------|---------|-------|----------|
21+
| lint | *(inline)* | `make lint` | ~1 min | Before every push |
22+
| unit | `erigon-test-unit` | `make test-short` | ~5 min | Pre-push gate |
23+
| all | `erigon-test-all` | `GOGC=80 make test-all` | ~30 min | Before PR review |
24+
| race | `erigon-test-race` | `make test-all-race` | ~60 min | Concurrency changes |
25+
| hive | `erigon-test-hive` | `make test-hive` | ~20 min | EL/CL interop changes |
26+
| rpc | `erigon-test-rpc` | *(requires synced DB)* | ~10 min | RPC API changes |
27+
| assertoor | *(remote only)* | dispatch only || Kurtosis network test |
28+
29+
### Lint (run first — non-deterministic, may need multiple runs)
30+
```bash
31+
make lint
32+
```
33+
34+
### Quick gate (before pushing a fix)
35+
```bash
36+
make lint && make test-short
37+
```
38+
39+
### Full gate (before marking PR ready for review)
40+
```bash
41+
make lint && make erigon integration && GOGC=80 make test-all
42+
```
43+
44+
### Race check (for concurrency-sensitive changes)
45+
```bash
46+
make lint && make test-all-race
47+
```
48+
49+
---
50+
51+
## Part 2: Remote Dispatch (trigger CI on any branch)
52+
53+
Use `gh workflow run` to trigger workflows on a branch. Required for branches not targeting main (e.g. `bal-devnet-2`).
54+
55+
### Dispatch all workflows on a branch
56+
57+
```bash
58+
BRANCH=$(git branch --show-current) # or set explicitly: BRANCH="bal-devnet-2"
59+
60+
for wf in \
61+
"Unit tests" \
62+
"All tests" \
63+
"Lint" \
64+
"Test Hive" \
65+
"Kurtosis Assertoor GitHub Action" \
66+
"QA - RPC Integration Tests" \
67+
"QA - RPC Integration Tests Remote" \
68+
"QA - RPC Integration Tests (Gnosis)" \
69+
"Windows downloader tests"; do
70+
echo "Dispatching: $wf"
71+
gh workflow run "$wf" --ref $BRANCH
72+
done
73+
```
74+
75+
### Workflow dispatch support
76+
77+
| Workflow name (GitHub) | dispatch? | Local skill | File |
78+
|-------------------------------------|-----------|-------------|------|
79+
| Unit tests | yes | `erigon-test-unit` | `ci.yml` |
80+
| All tests | yes | `erigon-test-all` | `test-all-erigon.yml` |
81+
| Lint | yes | *(make lint)* | `lint.yml` |
82+
| Test Hive | yes | `erigon-test-hive` | `test-hive.yml` |
83+
| Kurtosis Assertoor GitHub Action | yes | *(remote only)* | `test-kurtosis-assertoor.yml` |
84+
| QA - RPC Integration Tests | yes | `erigon-test-rpc` | `qa-rpc-integration-tests.yml` |
85+
| QA - RPC Integration Tests Remote | yes | `erigon-test-rpc` | `qa-rpc-integration-tests-remote.yml` |
86+
| QA - RPC Integration Tests (Gnosis) | yes | `erigon-test-rpc` | `qa-rpc-integration-tests-gnosis.yml` |
87+
| Windows downloader tests | yes | *(remote)* | `test-win-downloader.yml` |
88+
| Consensus spec | **no** | *(PR-only)* | `test-integration-caplin.yml` |
89+
90+
Note: **Consensus spec** has no `workflow_dispatch` — only fires on pull_request events targeting main/release.
91+
92+
### Monitor runs
93+
94+
```bash
95+
BRANCH=$(git branch --show-current)
96+
gh run list --branch $BRANCH --limit 15
97+
```
98+
99+
Check for failures:
100+
```bash
101+
gh run list --branch $BRANCH --limit 20 | grep -E "failure|cancelled"
102+
```
103+
104+
Watch a specific run:
105+
```bash
106+
gh run watch <run-id>
107+
```
108+
109+
---
110+
111+
## Part 3: Full CI Gate (local + remote)
112+
113+
When preparing a devnet/feature branch for review:
114+
115+
1. **Local gate** — fast feedback before pushing:
116+
```bash
117+
make lint && make erigon integration && make test-short
118+
```
119+
120+
2. **Push branch**:
121+
```bash
122+
git push origin <branch>
123+
```
124+
125+
3. **Dispatch all remote workflows** (use the loop from Part 2).
126+
127+
4. **Monitor** until all pass:
128+
```bash
129+
gh run list --branch $(git branch --show-current) --limit 15
130+
```
131+
132+
5. **Race check** (for concurrency-heavy changes):
133+
```bash
134+
make test-all-race
135+
```

.claude/skills/erigon-ephemeral/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: erigon-ephemeral
3-
description: Run an ephemeral Erigon instance with a temporary datadir. Checks for port conflicts, applies port offsets, and supports safe cleanup. Use this when the user wants a temporary/throwaway Erigon instance.
3+
description: Run an ephemeral Erigon instance with a temporary datadir. Use this whenever the user wants to spin up a temporary, throwaway, or sandboxed Erigon node for quick testing, launch a second Erigon instance alongside an existing one, clone a datadir into a temp copy for safe experimentation, or find and clean up leftover ephemeral datadirs and processes from previous sessions. Handles port conflict detection and automatic port offsetting. Trigger on any mention of temporary/throwaway/ephemeral/disposable Erigon instances, running erigon briefly for testing or debugging, starting a second/additional erigon node, or cleaning up old temp erigon data.
44
allowed-tools: Bash, Read
55
allowed-prompts:
66
- tool: Bash
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
name: erigon-test-all
3+
description: Run the full Erigon test suite locally using GOGC=80 make test-all. Use this before marking a PR ready for review. Equivalent to the "All tests" CI workflow.
4+
---
5+
6+
# Erigon Full Test Suite
7+
8+
Runs the complete test suite with 60-minute timeout and coverage output. Takes ~30 minutes.
9+
10+
## Command
11+
12+
```bash
13+
GOGC=80 make test-all
14+
```
15+
16+
Equivalent to the **"All tests"** GitHub Actions workflow (`test-all-erigon.yml`).
17+
18+
## When Tests Fail — Drill Down
19+
20+
When `make test-all` fails, identify and re-run just the failing package/test:
21+
22+
```bash
23+
# Re-run just the failing package
24+
go test --timeout 60m ./execution/stagedsync/...
25+
26+
# Re-run a specific test by name
27+
go test --timeout 60m -run TestStagedSyncFoo ./execution/stagedsync/...
28+
29+
# Run with verbose output to see what's happening
30+
go test --timeout 60m -v -run TestName ./path/to/package/...
31+
32+
# Run with GOGC to match CI memory pressure
33+
GOGC=80 go test --timeout 60m ./path/to/package/...
34+
```
35+
36+
## Find Which Package Failed
37+
38+
The output shows the failing package path. Look for lines like:
39+
```
40+
FAIL github.com/erigontech/erigon/execution/stagedsync [build failed]
41+
--- FAIL: TestName (12.34s)
42+
```
43+
44+
Extract the import path after `github.com/erigontech/erigon/` and convert to a local path:
45+
```
46+
github.com/erigontech/erigon/execution/stagedsync → ./execution/stagedsync/
47+
```
48+
49+
## Common Skips
50+
51+
Tests skipped via `-short` in `test-short` run fully here. If a test passes in `test-short` but fails here, it likely tests a slow path (large dataset, timeout, DB heavy).
52+
53+
## When to Use
54+
55+
- Before marking a PR ready for review
56+
- After significant logic changes to verify no edge cases break
57+
- Full gate: `make lint && make erigon integration && GOGC=80 make test-all`
58+
59+
## CI Equivalent
60+
61+
| Local command | CI workflow | File |
62+
|---------------|-------------|------|
63+
| `GOGC=80 make test-all` | All tests | `test-all-erigon.yml` |
64+
65+
To dispatch remotely:
66+
```bash
67+
gh workflow run "All tests" --ref <branch>
68+
```

0 commit comments

Comments
 (0)