Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
7f369f0
integration: v2 migration to go
canepat Dec 2, 2025
bdec710
integration: v2 migration to go
canepat Dec 4, 2025
446e8b7
integration: v2 migration to go
canepat Dec 4, 2025
b1dac42
integration: v2 migration to go
canepat Dec 6, 2025
84af64a
integration: v2 migration to go
canepat Dec 8, 2025
02cd756
integration: v2 migration to go
canepat Dec 9, 2025
b00952d
integration: v2 migration to go
canepat Dec 9, 2025
2861c49
integration: proper HTTP error handling
canepat Dec 11, 2025
86a1ea8
integration: better JSONRPC parsing
canepat Dec 12, 2025
75e8de9
integration: improve response comparison
canepat Dec 12, 2025
bafc20e
integration: avoid concurrent cleanup of output dir
canepat Dec 12, 2025
d193119
integration: handle graceful termination
canepat Dec 13, 2025
94f03f3
integration: reorder result report
canepat Dec 13, 2025
2ae834e
integration: add profiling
canepat Dec 16, 2025
deb7008
integration: cleaner errors and http round-trip log
canepat Dec 17, 2025
36ea66c
integration: support metadata in json files
canepat Dec 17, 2025
9d6e29b
integration: command-line option for JSON diff tool
canepat Dec 18, 2025
d7c63ad
integration: small refactoring
canepat Dec 18, 2025
fd71b39
integration: small refactoring
canepat Dec 18, 2025
d375b1f
integration: extract ResultCollector type
canepat Dec 18, 2025
47ac594
integration: refactor and reduce marshal/unmarshal
canepat Dec 19, 2025
61d6de9
integration: avoid writing JSON file from archive
canepat Dec 19, 2025
c37352f
integration: refactoring in extractArchive
canepat Dec 19, 2025
e9c979a
integration: better num workers for parallel exec
canepat Dec 19, 2025
e7b1dd9
integration: avoid unnecessary bytes/string conversions
canepat Dec 19, 2025
945f408
integration: renaming
canepat Dec 19, 2025
96b5da2
integration: remove unused code
canepat Dec 19, 2025
94f16e3
integration: add metrics
canepat Dec 19, 2025
a28674b
avoid copy and replace
lupin012 Dec 20, 2025
1707d05
update test
lupin012 Dec 20, 2025
c2f7294
update test
lupin012 Dec 20, 2025
e3a4308
remove used struct and method
lupin012 Dec 20, 2025
a1d6280
remove unused
lupin012 Dec 20, 2025
58cf405
add metafata
lupin012 Dec 20, 2025
67d414a
use buffered I/O when reading JSON commands
canepat Dec 21, 2025
da4833f
align to go
lupin012 Dec 21, 2025
c9dc4ab
verify if servers works on same latest block
lupin012 Dec 21, 2025
aed3d9c
remove attempt in dumpJSON & gofmt
lupin012 Dec 21, 2025
9ec4279
add ident
lupin012 Dec 21, 2025
b0ef38a
run jd on gorounte
lupin012 Dec 21, 2025
559bcbd
remove reference to silk and few erigon remove option -m
lupin012 Dec 23, 2025
5fc7db2
remove reference as erigon
lupin012 Dec 23, 2025
ce1f82b
avoid reading response into buffer
canepat Dec 23, 2025
19e7c19
fix indentation using json-iterator
canepat Dec 23, 2025
c5f7105
refactoring retryDelay as Duration
canepat Dec 23, 2025
b86c9d6
few fix rename reference to Daemon to Client
lupin012 Dec 24, 2025
2f29643
add again comit version but optional
lupin012 Dec 24, 2025
82817cc
tests read all pattern
lupin012 Dec 24, 2025
bb38c0c
permit to disable http compression
lupin012 Dec 25, 2025
31b39c3
fix
lupin012 Jan 5, 2026
54a90a9
integration: add json-diff impl
canepat Jan 9, 2026
57c9c2f
add print on failed
lupin012 Jan 10, 2026
d010c9b
add print on failed
lupin012 Jan 10, 2026
a89814f
fix getLatest
lupin012 Jan 10, 2026
5b18f68
remove log
lupin012 Jan 10, 2026
d79464b
integration: add json-diff tests
canepat Jan 12, 2026
9cf8641
integration: refactor archive module
canepat Jan 12, 2026
bb7e82b
integration: refactor archive module
canepat Jan 13, 2026
c9cc354
complete refactoring + unit tests + benchmarks
canepat Feb 13, 2026
c74d0b6
add golangci-lint config and fix all lint issues in internal/
canepat Feb 13, 2026
57fe874
Fix all lint issues in cmd/ and remove cmd/ exclusions from golangci …
canepat Feb 13, 2026
86f798f
Move archive and jsondiff packages from cmd/integration/ to internal/
canepat Feb 13, 2026
ae31b09
Print test results in scheduling order instead of completion order
canepat Feb 13, 2026
353a1ca
Use dsnet/compress/bzip2 (CGo) instead of stdlib pure-Go bzip2
canepat Feb 13, 2026
46a0daf
Port 9 Python scripts to Go subcommands of rpc_int
canepat Feb 14, 2026
a396f98
Fix receipt RLP double-encoding, GraphQL content type, and subscripti…
canepat Feb 14, 2026
f473290
Update CLAUDE.md with subcommands, new packages, and gotchas
canepat Feb 14, 2026
01d92d9
Add --graphql flag to Erigon skill files
canepat Feb 14, 2026
b2d620a
Fix all lint issues in internal/tools and internal/eth
canepat Feb 14, 2026
35babe6
Enable errcheck for os.Remove/RemoveAll and fix all unhandled errors
canepat Feb 14, 2026
66a7eea
remove metadata section in response files
canepat Feb 16, 2026
cfdfb2f
fix after rebase
canepat Feb 16, 2026
06c690b
fix exp rsp
lupin012 Feb 16, 2026
dcd6aea
Remove JdLibrary diff mode and josephburnett/jd/v2 dependency
canepat Feb 17, 2026
cc0369c
fix after rebase
canepat Feb 17, 2026
999809d
json-diff is bool
lupin012 Feb 17, 2026
0a7ce7e
restore json diff kind argument
canepat Feb 18, 2026
e717550
fix usage
canepat Feb 18, 2026
db7eed7
fix -l option
lupin012 Feb 18, 2026
3698787
add option
lupin012 Feb 18, 2026
5379beb
fix after merge
lupin012 Feb 18, 2026
0db76b9
use default workers
lupin012 Feb 19, 2026
a79e9b5
configured also MaxConnsPerHost
lupin012 Feb 20, 2026
3020c3d
configured MaxIdleConns & report file equivalent to paython
lupin012 Feb 20, 2026
6c98afd
close connections
lupin012 Feb 20, 2026
e321f7c
re conf ConPErHost
lupin012 Feb 20, 2026
c97a133
confif maxBody
lupin012 Feb 20, 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
19 changes: 19 additions & 0 deletions .claude/hooks/lint-after-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# Runs golangci-lint after go build commands.

INPUT=$(cat)

COMMAND=$(echo "$INPUT" | jq -r '.tool_input.command // empty')

if echo "$COMMAND" | grep -q 'go build'; then
cd "$CLAUDE_PROJECT_DIR" || exit 0
OUTPUT=$(golangci-lint run ./... 2>&1)
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
echo "golangci-lint found issues:" >&2
echo "$OUTPUT" >&2
exit 2
fi
fi

exit 0
17 changes: 17 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hooks": {
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/lint-after-build.sh",
"timeout": 120,
"statusMessage": "Running golangci-lint..."
}
]
}
]
}
}
81 changes: 81 additions & 0 deletions .claude/skills/erigon-rpcdaemon-run/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
name: erigon-rpcdaemon-run
description: Use to run standalone Erigon RpcDaemon on an existing datadir. Use when the user wants to exercise the `rpc-tests` binaries (`rpc_int`, `rpc_perf`) against real server.
allowed-tools: Bash, Read, Glob
---

# Erigon RpcDaemon Run

## Overview
The `rpcdaemon` command runs standalone RpcDaemon on an existing Erigon datadir.

## Command Syntax

```bash
cd <erigon_home> && ./build/bin/rpcdaemon --datadir=<path> --http.api admin,debug,eth,parity,erigon,trace,web3,txpool,ots,net --ws [other-flags]
```

## Required Flags

- `--datadir`: Path to the Erigon datadir (required)

## Usage Patterns

### Change HTTP port
```bash
cd <erigon_home_path> && ./build/bin/rpcdaemon --datadir=<datadir_path> --http.port=8546
```

### WebSocket support
```bash
cd <erigon_home_path> && ./build/bin/rpcdaemon --datadir=<datadir_path> --ws
```

### GraphQL support
```bash
cd <erigon_home_path> && ./build/bin/rpcdaemon --datadir=<datadir_path> --graphql
```

## Important Considerations

### Before Running
1. **Ask for Erigon home**: Ask the user which Erigon home folder to use if not already provided
2. **Stop Erigon and RpcDaemon**: Ensure Erigon and/or RpcDaemon are not running on the target datadir
3. **Ensure RpcDaemon binary is built**: run `make rpcdaemon` to build it

### After Running
1. Wait until the HTTP port (value provided with --http.port or default 8545) is reachable


## Workflow

When the user wants to run Erigon RpcDaemon:

1. **Confirm parameters**
- Ask for Erigon home path to use if not provided or know in context
- Ask for target datadir path

2. **Safety checks**
- Verify Erigon home <erigon_home_path> exists
- Verify datadir <datadir_path> exists
- Check if Erigon and/or RpcDaemon are running (should not be)


## Error Handling

Common issues:
- **"datadir not found"**: Verify the path is correct
- **"database locked"**: Stop Erigon process first


## Examples

### Example 1: All API namespaces and WebSocket enabled
```bash
cd ../erigon_devel && ./build/bin/rpcdaemon --datadir=~/Library/erigon-eth-mainnet --http.api admin,debug,eth,parity,erigon,trace,web3,txpool,ots,net --ws
```


## Tips

- If building from source, use `make rpcdaemon` within <erigon_home_path> to build the binary at `build/bin/rpcdaemon`
81 changes: 81 additions & 0 deletions .claude/skills/erigon-run/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
name: erigon-run
description: Use to run Erigon on an existing datadir. Use when the user wants to exercise the `rpc-tests` binaries (`rpc_int`, `rpc_perf`) against real server.
allowed-tools: Bash, Read, Glob
---

# Erigon Run

## Overview
The `erigon` command runs Erigon on an existing Erigon datadir.

## Command Syntax

```bash
cd <erigon_home> && ./build/bin/erigon --datadir=<path> --http.api admin,debug,eth,parity,erigon,trace,web3,txpool,ots,net --ws [other-flags]
```

## Required Flags

- `--datadir`: Path to the Erigon datadir (required)

## Usage Patterns

### Change HTTP port
```bash
cd <erigon_home_path> && ./build/bin/erigon --datadir=<datadir_path> --http.port=8546
```

### WebSocket support
```bash
cd <erigon_home_path> && ./build/bin/erigon --datadir=<datadir_path> --ws
```

### GraphQL support
```bash
cd <erigon_home_path> && ./build/bin/erigon --datadir=<datadir_path> --graphql
```

## Important Considerations

### Before Running
1. **Ask for Erigon home**: Ask the user which Erigon home folder to use if not already provided
2. **Stop Erigon and RpcDaemon**: Ensure Erigon and/or RpcDaemon are not running on the target datadir
3. **Ensure Erigon binary is built**: run `make erigon` to build it

### After Running
1. Wait until the HTTP port (value provided with --http.port or default 8545) is reachable


## Workflow

When the user wants to run Erigon:

1. **Confirm parameters**
- Ask for Erigon home path to use if not provided or know in context
- Ask for target datadir path

2. **Safety checks**
- Verify Erigon home <erigon_home_path> exists
- Verify datadir <datadir_path> exists
- Check if Erigon and/or RpcDaemon are running (should not be)


## Error Handling

Common issues:
- **"datadir not found"**: Verify the path is correct
- **"database locked"**: Stop Erigon process first


## Examples

### Example 1: All API namespaces and WebSocket enabled
```bash
cd ../erigon_devel && ./build/bin/erigon --datadir=~/Library/erigon-eth-mainnet --http.api admin,debug,eth,parity,erigon,trace,web3,txpool,ots,net --ws
```


## Tips

- If building from source, use `make erigon` within <erigon_home_path> to build the binary at `build/bin/erigon`
92 changes: 92 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
version: "2"

linters:
default: none
enable:
# Bugs & correctness
- errcheck
- govet
- staticcheck
- ineffassign
- unused
- bodyclose
- durationcheck
- errorlint
- nilerr

# Code simplification
- intrange
- copyloopvar
- modernize

# Performance
- prealloc

# Style consistency
- misspell
- unconvert
- wastedassign

settings:
errcheck:
exclude-functions:
- fmt.Fprintf
- fmt.Fprintln
- fmt.Fprint
- fmt.Printf
- fmt.Println
- fmt.Print
- (io.Closer).Close
- (*os.File).Close
- (*bufio.Writer).Flush
- (*bufio.Writer).Write
- (net/http.ResponseWriter).Write
- (*encoding/json.Encoder).Encode
govet:
enable-all: true
disable:
- fieldalignment
- shadow # Too noisy, many false positives with err shadowing
staticcheck:
checks:
- "all"
- "-QF*" # Disable quickfix suggestions
- "-ST1003" # Naming conventions: renaming exports is a breaking change
errorlint:
asserts: false

exclusions:
presets:
- comments
rules:
# Test files: relax errcheck
- linters: [errcheck]
path: _test\.go
# defer Close/Flush: universally safe to ignore
- linters: [errcheck]
text: "Error return value of .*(Close|Flush).* is not checked"
# bodyclose false positives on websocket dial and raw HTTP handler
- path: internal/rpc/websocket\.go
linters: [bodyclose]
- path: internal/rpc/wsconn\.go
linters: [bodyclose]
- path: internal/rpc/http\.go
text: "response body must be closed"
linters: [bodyclose]

formatters:
enable:
- gofmt
- goimports

issues:
max-same-issues: 0
max-issues-per-linter: 0

output:
sort-results: true
sort-order:
- file

run:
timeout: 5m
Loading