Skip to content

Commit 6a3fe65

Browse files
authored
Merge branch 'main' into marko/docs_rewrite
2 parents 4b23ffe + a5ef771 commit 6a3fe65

150 files changed

Lines changed: 4977 additions & 1683 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.

.github/workflows/benchmark.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
name: Benchmarks
3+
permissions: {}
4+
"on":
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
10+
jobs:
11+
evm-benchmark:
12+
name: EVM Contract Benchmark
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 30
15+
permissions:
16+
contents: write
17+
issues: write
18+
steps:
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
- name: Set up Go
21+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
22+
with:
23+
go-version-file: ./go.mod
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
26+
- name: Build binaries
27+
run: make build-evm build-da
28+
- name: Run EVM benchmarks
29+
run: |
30+
cd test/e2e && go test -tags evm -bench=. -benchmem -run='^$' \
31+
-timeout=10m --evm-binary=../../build/evm | tee output.txt
32+
- name: Store benchmark result
33+
uses: benchmark-action/github-action-benchmark@4bdcce38c94cec68da58d012ac24b7b1155efe8b # v1.20.7
34+
with:
35+
name: EVM Contract Roundtrip
36+
tool: 'go'
37+
output-file-path: test/e2e/output.txt
38+
auto-push: true
39+
github-token: ${{ secrets.GITHUB_TOKEN }}
40+
alert-threshold: '150%'
41+
fail-on-alert: true
42+
comment-on-alert: true
43+
44+
- name: Run Block Executor benchmarks
45+
run: |
46+
go test -bench=BenchmarkProduceBlock -benchmem -run='^$' \
47+
./block/internal/executing/... > block_executor_output.txt
48+
- name: Store Block Executor benchmark result
49+
uses: benchmark-action/github-action-benchmark@4bdcce38c94cec68da58d012ac24b7b1155efe8b # v1.20.7
50+
with:
51+
name: Block Executor Benchmark
52+
tool: 'go'
53+
output-file-path: block_executor_output.txt
54+
auto-push: true
55+
github-token: ${{ secrets.GITHUB_TOKEN }}
56+
alert-threshold: '150%'
57+
fail-on-alert: true
58+
comment-on-alert: true

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ linters:
3838
- examples$
3939
formatters:
4040
enable:
41+
- gci
4142
- gofmt
4243
settings:
4344
gci:

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12+
### Added
13+
14+
- Node pruning support. [#2984](https://github.com/evstack/ev-node/pull/2984)
15+
- Two different sort of pruning implemented:
16+
_Classic pruning_ (`all`): prunes given `HEAD-n` blocks from the databases, including store metadatas.
17+
_Auto Storage Optimization_ (`metadata`): prunes only the state metadatas, keeps all blocks.
18+
By using one or the other, you are losing the ability to rollback or replay transactions earlier than `HEAD-n`.
19+
When using _classic pruning_, you aren't able to fetch blocks prior to `HEAD-n`.
20+
21+
### Changes
22+
23+
- Store pending blocks separately from executed blocks key. [#3073](https://github.com/evstack/ev-node/pull/3073)
24+
25+
## v1.0.0-rc.4
26+
27+
### Changes
28+
29+
- Skip draining when exec client unavailable. [#3060](https://github.com/evstack/ev-node/pull/3060)
30+
1231
## v1.0.0-rc.3
1332

1433
### Added

apps/evm/cmd/rollback.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88

99
"github.com/ethereum/go-ethereum/common"
1010
ds "github.com/ipfs/go-datastore"
11+
"github.com/rs/zerolog"
1112
"github.com/spf13/cobra"
1213

1314
"github.com/evstack/ev-node/execution/evm"
@@ -30,6 +31,7 @@ func NewRollbackCmd() *cobra.Command {
3031
if err != nil {
3132
return err
3233
}
34+
logger := rollcmd.SetupLogger(nodeConfig.Log)
3335

3436
goCtx := cmd.Context()
3537
if goCtx == nil {
@@ -69,7 +71,7 @@ func NewRollbackCmd() *cobra.Command {
6971
}
7072

7173
// rollback execution layer via EngineClient
72-
engineClient, err := createRollbackEngineClient(cmd, rawEvolveDB)
74+
engineClient, err := createRollbackEngineClient(cmd, rawEvolveDB, logger)
7375
if err != nil {
7476
cmd.Printf("Warning: failed to create engine client, skipping EL rollback: %v\n", err)
7577
} else {
@@ -99,7 +101,7 @@ func NewRollbackCmd() *cobra.Command {
99101
return cmd
100102
}
101103

102-
func createRollbackEngineClient(cmd *cobra.Command, db ds.Batching) (*evm.EngineClient, error) {
104+
func createRollbackEngineClient(cmd *cobra.Command, db ds.Batching, logger zerolog.Logger) (*evm.EngineClient, error) {
103105
ethURL, err := cmd.Flags().GetString(evm.FlagEvmEthURL)
104106
if err != nil {
105107
return nil, fmt.Errorf("failed to get '%s' flag: %w", evm.FlagEvmEthURL, err)
@@ -128,5 +130,5 @@ func createRollbackEngineClient(cmd *cobra.Command, db ds.Batching) (*evm.Engine
128130
return nil, fmt.Errorf("JWT secret file '%s' is empty", jwtSecretFile)
129131
}
130132

131-
return evm.NewEngineExecutionClient(ethURL, engineURL, jwtSecret, common.Hash{}, common.Address{}, db, false)
133+
return evm.NewEngineExecutionClient(ethURL, engineURL, jwtSecret, common.Hash{}, common.Address{}, db, false, logger)
132134
}

apps/evm/cmd/run.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ var RunCmd = &cobra.Command{
5555
}
5656

5757
tracingEnabled := nodeConfig.Instrumentation.IsTracingEnabled()
58-
executor, err := createExecutionClient(cmd, datastore, tracingEnabled)
58+
executor, err := createExecutionClient(cmd, datastore, tracingEnabled, logger)
5959
if err != nil {
6060
return err
6161
}
@@ -67,11 +67,6 @@ var RunCmd = &cobra.Command{
6767

6868
daClient := block.NewDAClient(blobClient, nodeConfig, logger)
6969

70-
// Attach logger to the EVM engine client if available
71-
if ec, ok := executor.(*evm.EngineClient); ok {
72-
ec.SetLogger(logger.With().Str("module", "engine_client").Logger())
73-
}
74-
7570
headerNamespace := da.NamespaceFromString(nodeConfig.DA.GetNamespace())
7671
dataNamespace := da.NamespaceFromString(nodeConfig.DA.GetDataNamespace())
7772

@@ -192,7 +187,7 @@ func createSequencer(
192187
return sequencer, nil
193188
}
194189

195-
func createExecutionClient(cmd *cobra.Command, db datastore.Batching, tracingEnabled bool) (execution.Executor, error) {
190+
func createExecutionClient(cmd *cobra.Command, db datastore.Batching, tracingEnabled bool, logger zerolog.Logger) (execution.Executor, error) {
196191
// Read execution client parameters from flags
197192
ethURL, err := cmd.Flags().GetString(evm.FlagEvmEthURL)
198193
if err != nil {
@@ -237,7 +232,7 @@ func createExecutionClient(cmd *cobra.Command, db datastore.Batching, tracingEna
237232
genesisHash := common.HexToHash(genesisHashStr)
238233
feeRecipient := common.HexToAddress(feeRecipientStr)
239234

240-
return evm.NewEngineExecutionClient(ethURL, engineURL, jwtSecret, genesisHash, feeRecipient, db, tracingEnabled)
235+
return evm.NewEngineExecutionClient(ethURL, engineURL, jwtSecret, genesisHash, feeRecipient, db, tracingEnabled, logger)
241236
}
242237

243238
// addFlags adds flags related to the EVM execution client

apps/evm/go.mod

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ go 1.25.6
44

55
replace (
66
github.com/evstack/ev-node => ../../
7+
github.com/evstack/ev-node/core => ../../core
78
github.com/evstack/ev-node/execution/evm => ../../execution/evm
89
)
910

1011
require (
1112
github.com/ethereum/go-ethereum v1.16.8
12-
github.com/evstack/ev-node v1.0.0-rc.3
13+
github.com/evstack/ev-node v1.0.0-rc.4
1314
github.com/evstack/ev-node/core v1.0.0-rc.1
14-
github.com/evstack/ev-node/execution/evm v1.0.0-rc.2
15-
github.com/ipfs/go-datastore v0.9.0
15+
github.com/evstack/ev-node/execution/evm v1.0.0-rc.3
16+
github.com/ipfs/go-datastore v0.9.1
1617
github.com/rs/zerolog v1.34.0
1718
github.com/spf13/cobra v1.10.2
1819
gotest.tools/v3 v3.5.2
@@ -53,7 +54,7 @@ require (
5354
github.com/fatih/color v1.18.0 // indirect
5455
github.com/ferranbt/fastssz v0.1.4 // indirect
5556
github.com/filecoin-project/go-clock v0.1.0 // indirect
56-
github.com/filecoin-project/go-jsonrpc v0.10.0 // indirect
57+
github.com/filecoin-project/go-jsonrpc v0.10.1 // indirect
5758
github.com/flynn/noise v1.1.0 // indirect
5859
github.com/fsnotify/fsnotify v1.9.0 // indirect
5960
github.com/go-kit/kit v0.13.0 // indirect
@@ -85,7 +86,7 @@ require (
8586
github.com/holiman/uint256 v1.3.2 // indirect
8687
github.com/huin/goupnp v1.3.0 // indirect
8788
github.com/inconshreveable/mousetrap v1.1.0 // indirect
88-
github.com/ipfs/boxo v0.35.2 // indirect
89+
github.com/ipfs/boxo v0.36.0 // indirect
8990
github.com/ipfs/go-cid v0.6.0 // indirect
9091
github.com/ipfs/go-ds-badger4 v0.1.8 // indirect
9192
github.com/ipfs/go-log/v2 v2.9.1 // indirect
@@ -100,7 +101,7 @@ require (
100101
github.com/libp2p/go-flow-metrics v0.3.0 // indirect
101102
github.com/libp2p/go-libp2p v0.47.0 // indirect
102103
github.com/libp2p/go-libp2p-asn-util v0.4.1 // indirect
103-
github.com/libp2p/go-libp2p-kad-dht v0.37.1 // indirect
104+
github.com/libp2p/go-libp2p-kad-dht v0.38.0 // indirect
104105
github.com/libp2p/go-libp2p-kbucket v0.8.0 // indirect
105106
github.com/libp2p/go-libp2p-pubsub v0.15.0 // indirect
106107
github.com/libp2p/go-libp2p-record v0.3.1 // indirect
@@ -113,7 +114,7 @@ require (
113114
github.com/mattn/go-colorable v0.1.14 // indirect
114115
github.com/mattn/go-isatty v0.0.20 // indirect
115116
github.com/mattn/go-runewidth v0.0.15 // indirect
116-
github.com/miekg/dns v1.1.68 // indirect
117+
github.com/miekg/dns v1.1.72 // indirect
117118
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
118119
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
119120
github.com/minio/sha256-simd v1.0.1 // indirect
@@ -135,10 +136,10 @@ require (
135136
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
136137
github.com/pion/datachannel v1.5.10 // indirect
137138
github.com/pion/dtls/v2 v2.2.12 // indirect
138-
github.com/pion/dtls/v3 v3.0.6 // indirect
139+
github.com/pion/dtls/v3 v3.1.1 // indirect
139140
github.com/pion/ice/v4 v4.0.10 // indirect
140141
github.com/pion/interceptor v0.1.40 // indirect
141-
github.com/pion/logging v0.2.3 // indirect
142+
github.com/pion/logging v0.2.4 // indirect
142143
github.com/pion/mdns/v2 v2.0.7 // indirect
143144
github.com/pion/randutil v0.1.0 // indirect
144145
github.com/pion/rtcp v1.2.15 // indirect
@@ -150,6 +151,7 @@ require (
150151
github.com/pion/stun/v3 v3.0.0 // indirect
151152
github.com/pion/transport/v2 v2.2.10 // indirect
152153
github.com/pion/transport/v3 v3.0.7 // indirect
154+
github.com/pion/transport/v4 v4.0.1 // indirect
153155
github.com/pion/turn/v4 v4.0.2 // indirect
154156
github.com/pion/webrtc/v4 v4.1.2 // indirect
155157
github.com/pkg/errors v0.9.1 // indirect
@@ -195,14 +197,14 @@ require (
195197
go.uber.org/zap v1.27.1 // indirect
196198
go.yaml.in/yaml/v2 v2.4.3 // indirect
197199
go.yaml.in/yaml/v3 v3.0.4 // indirect
198-
golang.org/x/crypto v0.47.0 // indirect
200+
golang.org/x/crypto v0.48.0 // indirect
199201
golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect
200202
golang.org/x/mod v0.32.0 // indirect
201-
golang.org/x/net v0.49.0 // indirect
203+
golang.org/x/net v0.50.0 // indirect
202204
golang.org/x/sync v0.19.0 // indirect
203-
golang.org/x/sys v0.40.0 // indirect
205+
golang.org/x/sys v0.41.0 // indirect
204206
golang.org/x/telemetry v0.0.0-20260109210033-bd525da824e2 // indirect
205-
golang.org/x/text v0.33.0 // indirect
207+
golang.org/x/text v0.34.0 // indirect
206208
golang.org/x/time v0.12.0 // indirect
207209
golang.org/x/tools v0.41.0 // indirect
208210
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect

0 commit comments

Comments
 (0)