Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
33108af
Initial attempt at building rlp
itsafuu Mar 12, 2026
35975e0
Gate off discover tests
itsafuu Mar 12, 2026
0b25209
These were missed
itsafuu Mar 12, 2026
61647f0
Do not install
itsafuu Mar 12, 2026
2f031db
This should make it where C++17 is maximum version used, all the test…
Super-Genius Mar 12, 2026
bd471eb
updating test example, more updates next push
Super-Genius Mar 12, 2026
499c6f4
Merge develop
itsafuu Mar 12, 2026
a2e3e5c
Fix syntax
itsafuu Mar 12, 2026
bb8e40c
Remove designated initializers
itsafuu Mar 13, 2026
4854834
Remove more designated initializers, updated claude.md to instruct no…
itsafuu Mar 13, 2026
6413953
Hopefully fix several ambiguous calls to gsl spans without default co…
itsafuu Mar 13, 2026
7ca3d28
Fix more designated initializers in example. Fix more ambiguous const…
itsafuu Mar 13, 2026
c397e72
Some msvc specific case where bool passes to thes constructors were a…
itsafuu Mar 13, 2026
8d5770c
fix: RlpxSession lifetime + ETH/68+69 dual Status decoder
Super-Genius Mar 13, 2026
29a5433
checkpoint with the dialer working pretty well, but we need filtering…
Super-Genius Mar 14, 2026
999302a
enr record request and response code to get what chain ID or fork ID …
Super-Genius Mar 14, 2026
c53ed71
The CHECKPOINT's full ENR implementation scope is now complete:
Super-Genius Mar 14, 2026
055680e
finished discv4, but it is too slow, need to implment discv5
Super-Genius Mar 15, 2026
b544f1c
Initial plan
Copilot Mar 15, 2026
158c4d8
feat(discv5): add discv5 peer discovery module with ENR parser, bootn…
Copilot Mar 15, 2026
4a2f9d8
feat(discv5): add discv5_crawl example binary and update Architecture.md
Copilot Mar 15, 2026
25ebf60
Initial plan
Copilot Mar 15, 2026
4c14c56
Merge enr_records into discv5-implementation: fix build errors and C+…
Copilot Mar 15, 2026
eec9dc3
revert: restore build submodule to bc5302b; document in AGENT_MISTAKE…
Copilot Mar 15, 2026
abf5ddb
fix: update build submodule to latest main (f09f0cb); correct AGENT_M…
Copilot Mar 15, 2026
810f875
fixing build problems
Super-Genius Mar 16, 2026
541ae65
Merge branch 'enr_records', remote-tracking branch 'origin' into copi…
Super-Genius Mar 16, 2026
7feb754
discv5: repair client build breakages and link dependencies
Super-Genius Mar 16, 2026
dca6ed1
test(discv5): align client tests with current WHOAREYOU gating
Super-Genius Mar 16, 2026
1c4eb33
discv5: fix encrypted packet header/AAD consistency and restore crawl…
Super-Genius Mar 16, 2026
7bb511a
Run tests on completion
itsafuu Mar 17, 2026
b9de129
Using random long long on msvc debug causes tests to fail, preserve t…
itsafuu Mar 17, 2026
2019b11
Test fix for discovery tests using ephemeral port
itsafuu Mar 17, 2026
c1c44d8
Explicitly bind to config bind_ip to avoid windows issue
itsafuu Mar 17, 2026
c0b6931
Maybe fix newly failing tests by fixing destruction order
itsafuu Mar 17, 2026
ff0c9e8
Change gtest discovery to try to fix i9 machine builds
itsafuu Mar 17, 2026
e7deb92
Merge pull request #38 from GeniusVentures/dev_workflow
itsafuu Mar 17, 2026
15dce98
Introduce the discv5 Sepolia connect harness, harden RLPx auth handsh…
Super-Genius Mar 17, 2026
fd23356
Fix transitive CMake target linkage and clean up test helpers
Super-Genius Mar 17, 2026
ca15948
Fixing c++20 code -> c++17 code
Super-Genius Mar 17, 2026
756ced1
docs(agentdocs): update checkpoint and discovery docs after Boost.Asi…
Super-Genius Mar 18, 2026
0097501
Fix windows compilation
itsafuu Mar 18, 2026
d8f2489
Fix install
itsafuu Mar 18, 2026
d8b28ef
fix install
itsafuu Mar 18, 2026
c18464e
root directory CMakeLists.txt for ExternProject_Add() functionality
Super-Genius Mar 18, 2026
c0c974a
Small changes to avoid absolute directory for zkllvm in the config
itsafuu Mar 18, 2026
1dceaf3
Needed cxx17.cmake for /CMakeLists.txt
Super-Genius Mar 18, 2026
aafbc71
Necessary for external proj
itsafuu Mar 18, 2026
0c2087a
For subdir adding
itsafuu Mar 18, 2026
f1edb47
Fix install for in-dir build. Fix examples logger.hpp inclusion
itsafuu Mar 18, 2026
7be84bd
Fix casing
itsafuu Mar 18, 2026
bbc9c74
Updated build system to move protobuf to right location
Super-Genius Mar 19, 2026
c9d3a42
fix: clean warnings and replace protocol magic numbers in rlp
Super-Genius Mar 23, 2026
872dc69
fix: harden discv4/discv5 pending reply handling
Super-Genius Mar 23, 2026
a3cf04f
fix(discv4): guard timer-cancelled paths against false success on shu…
Super-Genius Mar 23, 2026
8e0dd9d
Merge pull request #44 from GeniusVentures/discv5-implementation
Super-Genius Mar 23, 2026
3da1c72
Fixing explicit lambda parameter passing so MSVC won't error out
Super-Genius Mar 23, 2026
dd4be10
ix(discv4): handle fast reply race in request_enr and ping on Windows…
Super-Genius Mar 23, 2026
473efa3
Merge pull request #45 from GeniusVentures/warning-cleanup
Super-Genius Mar 23, 2026
35795d7
Update fuzz.yml to simplify workflow triggers
Super-Genius Mar 23, 2026
9a80c31
Update sanitizers.yml to remove event triggers
Super-Genius Mar 23, 2026
f5b6d3d
Update Valgrind workflow triggers
Super-Genius Mar 23, 2026
8207a26
Update benchmarks workflow to remove event triggers
Super-Genius Mar 23, 2026
1d7fa2e
fix(eth_watch): send Status using negotiated ETH subprotocol version
Super-Genius Mar 23, 2026
f8fccdc
fix(rlpx): advertise eth/66-69 and use legacy status for eth/66-68
Super-Genius Mar 23, 2026
84296b9
fix(discv4): reject IPv6 bind_ip until handlers are IPv6-safe
Super-Genius Mar 23, 2026
cb8c724
chore(eth): centralize ETH protocol version constants
Super-Genius Mar 23, 2026
963c08f
ci: add workflow_dispatch target selection checkboxes
Super-Genius Mar 23, 2026
77655e1
Merge remote-tracking branch 'origin' into develop
Super-Genius Mar 23, 2026
ca19c92
Updating to be able to use multiple self-hosted running, probably pic…
Super-Genius Mar 23, 2026
832a9c1
ci: fix manual target selection by generating matrix in prepare job
Super-Genius Mar 23, 2026
2f3c7b7
fix(discv4): validate pong pingHash before completing ping
Super-Genius Mar 23, 2026
ad03772
fix(cmake): use PROJECT_VERSION for package config version file
Super-Genius Mar 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
name: Performance Benchmarks

on:
push:
branches: [ "main", "dev_peer_discovery" ]
pull_request:
branches: [ "main", "dev_peer_discovery" ]
schedule:
# Run weekly on Sunday at 5 AM UTC
- cron: '0 5 * * 0'
workflow_dispatch:

jobs:
Expand Down
156 changes: 111 additions & 45 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@ name: Release Build CI

on:
push:
branches:
- develop
- main
paths-ignore:
- ".github/**"
- "Readme.md"
pull_request:
branches:
- develop
- main
paths-ignore:
- ".github/**"
- "Readme.md"
Expand All @@ -21,9 +11,113 @@ on:
description: "Release tag"
required: false
type: string
android:
description: "Build Android targets"
required: false
type: boolean
default: true
ios:
description: "Build iOS targets"
required: false
type: boolean
default: true
osx:
description: "Build OSX targets"
required: false
type: boolean
default: true
linux:
description: "Build Linux targets"
required: false
type: boolean
default: true
windows:
description: "Build Windows targets"
required: false
type: boolean
default: true

jobs:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Select build matrix
id: set-matrix
shell: bash
env:
SELECT_ANDROID: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.android == 'true' }}
SELECT_IOS: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.ios == 'true' }}
SELECT_OSX: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.osx == 'true' }}
SELECT_LINUX: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.linux == 'true' }}
SELECT_WINDOWS: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.windows == 'true' }}
run: |
python3 - <<'PY' >> "$GITHUB_OUTPUT"
import json
import os

entries = [
{
"target": "Linux",
"runner": ["self-hosted", "X64", "Linux"],
"abi": "x86_64",
"build-type": "Release",
"container": "ghcr.io/geniusventures/debian-bullseye:latest",
},
{
"target": "Linux",
"runner": "sg-arm-linux",
"abi": "aarch64",
"build-type": "Release",
"container": "ghcr.io/geniusventures/debian-bullseye:latest",
},
{
"target": "Windows",
"runner": ["self-hosted", "Windows"],
"abi": "",
"build-type": "Release",
},
{
"target": "OSX",
"runner": "gv-OSX-Large",
"abi": "",
"build-type": "Release",
},
{
"target": "Android",
"runner": "sg-ubuntu-linux",
"abi": "arm64-v8a",
"build-type": "Release",
},
{
"target": "Android",
"runner": ["self-hosted", "X64", "Linux"],
"abi": "armeabi-v7a",
"build-type": "Release",
},
{
"target": "iOS",
"runner": "macos-latest",
"abi": "",
"build-type": "Release",
},
]

selected = {
"android": os.environ["SELECT_ANDROID"].lower() == "true",
"ios": os.environ["SELECT_IOS"].lower() == "true",
"osx": os.environ["SELECT_OSX"].lower() == "true",
"linux": os.environ["SELECT_LINUX"].lower() == "true",
"windows": os.environ["SELECT_WINDOWS"].lower() == "true",
}

include = [entry for entry in entries if selected[entry["target"].lower()]]
print(f"matrix={json.dumps({'include': include}, separators=(',', ':'))}")
PY

build:
needs: prepare-matrix
env:
GRPC_BUILD_ENABLE_CCACHE: "ON"
GH_TOKEN: ${{ secrets.GNUS_TOKEN_1 }}
Expand All @@ -36,40 +130,7 @@ jobs:
password: ${{ secrets.GNUS_TOKEN_1 }}
strategy:
fail-fast: false
matrix:
target: [ Android, iOS, OSX, Linux, Windows ]
build-type: [ Release ]
abi: [ "" ]
include:
- target: Linux
runner: sg-ubuntu-linux
abi: "x86_64"
build-type: "Release"
container: ghcr.io/geniusventures/debian-bullseye:latest
- target: Linux
runner: sg-arm-linux
abi: "aarch64"
build-type: "Release"
container: ghcr.io/geniusventures/debian-bullseye:latest
- target: Windows
runner: [ self-hosted, Windows ]
- target: OSX
runner: gv-OSX-Large
- target: Android
runner: sg-ubuntu-linux
abi: arm64-v8a
build-type: "Release"
- target: Android
runner: sg-ubuntu-linux
abi: armeabi-v7a
build-type: "Release"
- target: iOS
runner: macos-latest
exclude:
- target: Android
abi: ""
- target: Linux
abi: ""
matrix: ${{ fromJSON(needs.prepare-matrix.outputs.matrix) }}
steps:
- name: Configure Git Bash on Windows
if: ${{ runner.environment == 'self-hosted' && matrix.target == 'Windows' }}
Expand Down Expand Up @@ -362,7 +423,12 @@ jobs:
- name: Build rlp
working-directory: ${{ github.workspace }}/rlp/${{ env.BUILD_DIRECTORY }}
run: cmake --build . --config ${{ matrix.build-type }} -j


- name: Test rlp (non-mobile)
if: ${{ matrix.target != 'Android' && matrix.target != 'iOS' }}
working-directory: ${{ github.workspace }}/rlp/${{ env.BUILD_DIRECTORY }}
run: ctest . -C ${{ matrix.build-type }} --output-on-failure -V

- name: Install rlp
working-directory: ${{ github.workspace }}/rlp/${{ env.BUILD_DIRECTORY }}
run: cmake --install . --config ${{ matrix.build-type }}
7 changes: 0 additions & 7 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
name: Fuzz Testing

on:
push:
branches: [ "main", "dev_peer_discovery" ]
pull_request:
branches: [ "main", "dev_peer_discovery" ]
schedule:
# Run nightly fuzzing for longer duration at 4 AM UTC
- cron: '0 4 * * *'
workflow_dispatch:
inputs:
duration:
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
name: Memory Safety - Sanitizers

on:
push:
branches: [ "main", "dev_peer_discovery" ]
pull_request:
branches: [ "main", "dev_peer_discovery" ]
schedule:
# Run nightly at 2 AM UTC
- cron: '0 2 * * *'
workflow_dispatch:

jobs:
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
name: Memory Safety - Valgrind

on:
push:
branches: [ "main", "dev_peer_discovery" ]
pull_request:
branches: [ "main", "dev_peer_discovery" ]
schedule:
# Run nightly at 3 AM UTC
- cron: '0 3 * * *'
workflow_dispatch:

jobs:
Expand Down
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,48 @@ build/
# Test log files
/tmp/eth_watch_*.log
examples/*.log

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# github copilot
.idea/**/copilot*
# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# CMake
cmake-build-*/

# File-based project format
*.iws

# IntelliJ
out/

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### CLion+iml Patch ###
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023

*.iml
modules.xml
.idea/misc.xml
*.ipr

8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/editor.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion AgentDocs/AGENT_MISTAKES.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,19 @@ Live network testing cannot distinguish between "our crypto is wrong" and "the p
- When adding a new declaration, always look at the surrounding declarations in the same header and match their Doxygen style exactly.
- Never silently omit `@param` or `@return` for non-trivial declarations.

### M018 — Using `std::cout` / `std::cerr` for debug output instead of spdlog
### M019 — Using C++20 `boost::asio::awaitable` in code that must build on C++17 targets
**What happened**: Async network functions were written using C++20 native coroutines (`boost::asio::awaitable<T>`, `co_await`, `co_return`, `boost::asio::this_coro::executor`). This fails to compile on Debian 11 Bullseye with older Clang/GCC that only support C++17 (e.g. Clang 11/12 shipped with Bullseye).
**Root cause**: Wrote the first convenient async pattern without checking the minimum compiler/standard requirement for all build targets.
**Rule**: The project must compile under C++17 (Debian 11 Bullseye is a supported target). **Never use C++20 coroutine keywords** (`co_await`, `co_return`, `co_yield`) or `boost::asio::awaitable<T>` / `boost::asio::this_coro::executor`. Use the C++17-compatible **Boost stackful coroutine** API instead:
- Replace `boost::asio::awaitable<T>` return types with `T` (returning directly).
- Add `boost::asio::yield_context yield` as the last parameter to every async function.
- Replace `co_await op(asio::use_awaitable)` → `op(yield)`.
- Replace `co_return value` → `return value`.
- Replace `boost::asio::co_spawn(exec, coro, token)` → `boost::asio::spawn(exec, [](yield_context yield){...})`.
- Replace `co_await boost::asio::this_coro::executor` → `yield.get_executor()`.
- Link `Boost::coroutine` and `Boost::context` in CMake target_link_libraries.


**What happened**: When a debug print was needed, `std::cerr` was inserted directly into source code, requiring an `#include <iostream>` and a build cycle to observe behaviour.
**Root cause**: Reaching for the obvious C++ I/O stream instead of using the project's established logging system.
**Rule**: **Never use `std::cout` or `std::cerr` for debug output.** Use the project spdlog system exclusively:
Expand All @@ -154,3 +166,11 @@ Live network testing cannot distinguish between "our crypto is wrong" and "the p
3. The global spdlog level is already controlled by the `--log-level` CLI flag in `eth_watch` (and similar entry points). Setting `--log-level debug` will show all `DEBUG` output with zero code changes.
4. `std::cout` is only acceptable for **user-facing program output** (e.g., final results printed to the terminal by design). It is never acceptable for diagnostic or debug output.

---

## SUBMODULE MANAGEMENT

### M015 — Incorrectly reverting the `build` submodule pointer
**What happened**: When merging `enr_records` into `copilot/discv5-implementation`, the `build` submodule pointer was updated from `bc5302b` to `f09f0cb` (the latest `main` of cmaketemplate). This was mistakenly reverted to `bc5302b`, which is the *older* commit and lacks Android library support. `f09f0cb` is the correct commit — it adds the `android::log`/`android::android` interface targets and thirdparty directory updates.
**Rule**: When the `build` submodule pointer changes during a merge, verify whether the new commit is from the latest `main` of cmaketemplate. If it is, keep it (or update to it). The correct workflow to update the submodule is: go into `build/`, run `git pull && git checkout main`, then `cd ..` and `git add build`.

Loading