Skip to content

Commit b458a5a

Browse files
authored
Merge branch 'main' into marko/docs_rewrite
2 parents c1c7884 + 709d4db commit b458a5a

Some content is hidden

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

60 files changed

+3424
-1717
lines changed

.claude/skills/ev-node-explainer/block-architecture.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ type Component interface {
5151
```
5252

5353
Startup order:
54+
5455
1. Cache Manager (loads persisted state)
5556
2. Syncer (begins sync workers)
5657
3. Executor (begins production loop) - Aggregator only
@@ -476,10 +477,6 @@ var (
476477
DARetrievalFailures = prometheus.NewCounter(...)
477478
DAInclusionHeight = prometheus.NewGauge(...)
478479

479-
// Cache metrics
480-
PendingHeadersCount = prometheus.NewGauge(...)
481-
PendingDataCount = prometheus.NewGauge(...)
482-
483480
// Forced inclusion
484481
ForcedInclusionTxsInGracePeriod = prometheus.NewGauge(...)
485482
ForcedInclusionTxsMalicious = prometheus.NewCounter(...)

.github/workflows/goreleaser.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ name: Release
22
on:
33
push:
44
tags:
5-
- '**/v*.*.*' # Matches tags like evm/single/v0.2.0, testapp/v0.4.0, etc.
5+
- "**/v*.*.*" # Matches tags like apps/evm/single/v0.2.0, apps/testapp/v0.4.0, etc.
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: "Tag to release (e.g., apps/evm/single/v0.2.0, apps/testapp/v0.4.0) - Must match Go tag."
10+
required: true
11+
type: string
612

713
permissions: {}
814
jobs:
@@ -23,7 +29,12 @@ jobs:
2329
- name: Parse tag and validate app
2430
id: parse
2531
run: |
26-
TAG="${{ github.ref_name }}"
32+
# Use input tag for workflow_dispatch, otherwise use ref_name
33+
if [ -n "${{ inputs.tag }}" ]; then
34+
TAG="${{ inputs.tag }}"
35+
else
36+
TAG="${{ github.ref_name }}"
37+
fi
2738
echo "Processing tag: $TAG"
2839
2940
# Extract version (everything after the last /)
@@ -34,25 +45,26 @@ jobs:
3445
APP_PATH="${TAG%/*}"
3546
echo "app-path=$APP_PATH" >> $GITHUB_OUTPUT
3647
37-
# Check if the app directory exists in ./apps/
38-
if [ ! -d "apps/$APP_PATH" ]; then
39-
echo "::error::App directory 'apps/$APP_PATH' does not exist"
48+
# Check if the app directory exists
49+
if [ ! -d "$APP_PATH" ]; then
50+
echo "::error::App directory '$APP_PATH' does not exist"
4051
exit 1
4152
fi
4253
4354
# Check if Dockerfile exists
44-
if [ ! -f "apps/$APP_PATH/Dockerfile" ]; then
45-
echo "::error::Dockerfile not found in 'apps/$APP_PATH/'"
55+
if [ ! -f "$APP_PATH/Dockerfile" ]; then
56+
echo "::error::Dockerfile not found in '$APP_PATH/'"
4657
exit 1
4758
fi
4859
49-
echo "dockerfile=apps/$APP_PATH/Dockerfile" >> $GITHUB_OUTPUT
60+
echo "dockerfile=$APP_PATH/Dockerfile" >> $GITHUB_OUTPUT
5061
51-
# Generate image name from app path (replace / with -)
52-
IMAGE_NAME="ev-node-${APP_PATH//\//-}"
62+
# Generate image name from app path (strip apps/ prefix, replace / with -)
63+
IMAGE_PATH="${APP_PATH#apps/}"
64+
IMAGE_NAME="ev-node-${IMAGE_PATH//\//-}"
5365
echo "image-name=$IMAGE_NAME" >> $GITHUB_OUTPUT
5466
55-
echo "::notice::Building $IMAGE_NAME version $VERSION from apps/$APP_PATH"
67+
echo "::notice::Building $IMAGE_NAME version $VERSION from $APP_PATH"
5668
5769
build-and-push:
5870
name: Build and Push Docker Image

.mockery.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,11 @@ packages:
4444
filename: batch.go
4545
github.com/celestiaorg/go-header:
4646
interfaces:
47-
Exchange:
48-
config:
49-
dir: ./test/mocks
50-
pkgname: mocks
51-
filename: external/hexchange.go
5247
Store:
5348
config:
5449
dir: ./test/mocks
5550
pkgname: mocks
5651
filename: external/hstore.go
57-
github.com/evstack/ev-node/pkg/sync:
58-
interfaces:
59-
P2PExchange:
60-
config:
61-
dir: ./test/mocks
62-
pkgname: mocks
63-
filename: external/p2pexchange.go
6452
github.com/evstack/ev-node/block/internal/syncing:
6553
interfaces:
6654
DARetriever:

CHANGELOG.md

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

1010
## [Unreleased]
1111

12+
### Changes
13+
14+
- Improve cache handling when there is a significant backlog of pending headers and data. ([#3030](https://github.com/evstack/ev-node/pull/3030))
15+
- Decrease MaxBytesSize to `5MB` to increase compatibility with public nodes. ([#3030](https://github.com/evstack/ev-node/pull/3030))
16+
- Proper counting of `DASubmitterPendingBlobs` metrics. [#3038](https://github.com/evstack/ev-node/pull/3038)
17+
- Replace `go-header` store by `ev-node` store. This avoid duplication of all blocks in `go-header` and `ev-node` store. Thanks to the cached store from #3030, this should improve p2p performance as well.
18+
1219
## v1.0.0-rc.1
1320

1421
### Added
1522

16-
- Implement forced inclusion and based sequencing ([#2797](https://github.com/evstack/ev-node/pull/2797))
17-
**This change requires to add a `da_epoch_forced_inclusion` field in node's `genesis.json` file.**
18-
To enable this feature, set the force inclusion namespace in the `evnode.yaml` (enableable from rc.2).
19-
- Added `post-tx` command and force inclusion server to submit transaction directly to the DA layer. ([#2888](https://github.com/evstack/ev-node/pull/2888))
23+
- **BREAKING:** Implement forced inclusion and batch sequencing ([#2797](https://github.com/evstack/ev-node/pull/2797))
24+
**This change requires adding a `da_epoch_forced_inclusion` field to the node's `genesis.json` file.** The recommended value is `100`.
25+
Full support for this feature will be available in a future release.
26+
- Added `post-tx` command and force inclusion server to submit transactions directly to the DA layer. ([#2888](https://github.com/evstack/ev-node/pull/2888))
2027
Additionally, modified the core package to support marking transactions as forced included transactions.
2128
The execution client ought to perform basic validation on those transactions as they have skipped the execution client's mempool.
22-
- Add batching stategies (default stay time-based, unchanged with previous betas). Currently available strategies are `time`, `size`, `immediate` and `adaptive`.
29+
- Added batching strategies (default stay time-based, unchanged from previous betas). Currently available strategies are `time`, `size`, `immediate` and `adaptive`. [Full documentation can be found here](https://github.com/evstack/ev-node/blob/122486de98d09ecd37d792b88814dcf07238f28a/docs/learn/config.md?plain=1#L521-L597).
2330
- Added `FilterTxs` method to the execution interface. This method is meant to filter txs by size and if the execution clients allows it, by gas. This is useful for force included transactions, as those aren't filtered by the sequencer's mempool.
2431
- Added `GetExecutionInfo` method to the execution interface. This method returns some execution information, such as the maximum gas per block.
2532

2633
### Changed
2734

28-
- Rename `evm-single` to `evm` and `grpc-single` to `evgrpc` for clarity. [#2839](https://github.com/evstack/ev-node/pull/2839)
29-
- Split cache interface in `CacheManager` and `PendingManager` and create `da` client to easy DA handling. [#2878](https://github.com/evstack/ev-node/pull/2878)
30-
- Improve startup da retrieval height when cache cleared or empty. [#2880](https://github.com/evstack/ev-node/pull/2880)
35+
- **BREAKING:** Renamed `evm-single` to `evm` and `grpc-single` to `evgrpc` for clarity. [#2839](https://github.com/evstack/ev-node/pull/2839). You may need to manually modify your evnode.yaml `signer.signer_path` if your $HOME folder is changed.
36+
- Split cache interface into `CacheManager` and `PendingManager` and created `da` client to easy DA handling. [#2878](https://github.com/evstack/ev-node/pull/2878)
37+
- Improved startup DA retrieval height when cache is cleared or empty. [#2880](https://github.com/evstack/ev-node/pull/2880)
3138

3239
### Removed
3340

apps/evm/cmd/rollback.go

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,16 @@ package cmd
33
import (
44
"bytes"
55
"context"
6-
"errors"
76
"fmt"
87
"os"
98

109
"github.com/ethereum/go-ethereum/common"
1110
ds "github.com/ipfs/go-datastore"
1211
"github.com/spf13/cobra"
1312

14-
goheaderstore "github.com/celestiaorg/go-header/store"
1513
"github.com/evstack/ev-node/execution/evm"
1614
rollcmd "github.com/evstack/ev-node/pkg/cmd"
1715
"github.com/evstack/ev-node/pkg/store"
18-
"github.com/evstack/ev-node/types"
1916
)
2017

2118
// NewRollbackCmd creates a command to rollback ev-node state by one height.
@@ -64,6 +61,9 @@ func NewRollbackCmd() *cobra.Command {
6461
}
6562

6663
// rollback ev-node main state
64+
// Note: With the unified store approach, the ev-node store is the single source of truth.
65+
// The store adapters (HeaderStoreAdapter/DataStoreAdapter) read from this store,
66+
// so rolling back the ev-node store automatically affects P2P sync operations.
6767
if err := evolveStore.Rollback(goCtx, height, !syncNode); err != nil {
6868
return fmt.Errorf("failed to rollback ev-node state: %w", err)
6969
}
@@ -79,50 +79,12 @@ func NewRollbackCmd() *cobra.Command {
7979
cmd.Printf("Rolled back execution layer to height %d\n", height)
8080
}
8181

82-
// rollback ev-node goheader state
83-
headerStore, err := goheaderstore.NewStore[*types.SignedHeader](
84-
evolveDB,
85-
goheaderstore.WithStorePrefix("headerSync"),
86-
goheaderstore.WithMetrics(),
87-
)
88-
if err != nil {
89-
return err
90-
}
91-
92-
dataStore, err := goheaderstore.NewStore[*types.Data](
93-
evolveDB,
94-
goheaderstore.WithStorePrefix("dataSync"),
95-
goheaderstore.WithMetrics(),
96-
)
97-
if err != nil {
98-
return err
99-
}
100-
101-
if err := headerStore.Start(goCtx); err != nil {
102-
return fmt.Errorf("failed to start header store: %w", err)
103-
}
104-
defer headerStore.Stop(goCtx)
105-
106-
if err := dataStore.Start(goCtx); err != nil {
107-
return fmt.Errorf("failed to start data store: %w", err)
108-
}
109-
defer dataStore.Stop(goCtx)
110-
111-
var errs error
112-
if err := headerStore.DeleteRange(goCtx, height+1, headerStore.Height()); err != nil {
113-
errs = errors.Join(errs, fmt.Errorf("failed to rollback header sync service state: %w", err))
114-
}
115-
116-
if err := dataStore.DeleteRange(goCtx, height+1, dataStore.Height()); err != nil {
117-
errs = errors.Join(errs, fmt.Errorf("failed to rollback data sync service state: %w", err))
118-
}
119-
12082
cmd.Printf("Rolled back ev-node state to height %d\n", height)
12183
if syncNode {
12284
fmt.Println("Restart the node with the `--evnode.clear_cache` flag")
12385
}
12486

125-
return errs
87+
return nil
12688
},
12789
}
12890

apps/evm/go.mod

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ module github.com/evstack/ev-node/apps/evm
22

33
go 1.25.0
44

5+
replace (
6+
github.com/evstack/ev-node => ../../
7+
github.com/evstack/ev-node/execution/evm => ../../execution/evm
8+
)
9+
510
require (
6-
github.com/celestiaorg/go-header v0.8.1
711
github.com/ethereum/go-ethereum v1.16.8
812
github.com/evstack/ev-node v1.0.0-rc.1
913
github.com/evstack/ev-node/core v1.0.0-rc.1
@@ -25,6 +29,7 @@ require (
2529
github.com/beorn7/perks v1.0.1 // indirect
2630
github.com/bits-and-blooms/bitset v1.20.0 // indirect
2731
github.com/boltdb/bolt v1.3.1 // indirect
32+
github.com/celestiaorg/go-header v0.8.1 // indirect
2833
github.com/celestiaorg/go-libp2p-messenger v0.2.2 // indirect
2934
github.com/celestiaorg/go-square/merkle v0.0.0-20240627094109-7d01436067a3 // indirect
3035
github.com/celestiaorg/go-square/v3 v3.0.2 // indirect

apps/evm/go.sum

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,8 @@ github.com/ethereum/go-ethereum v1.16.8 h1:LLLfkZWijhR5m6yrAXbdlTeXoqontH+Ga2f9i
409409
github.com/ethereum/go-ethereum v1.16.8/go.mod h1:Fs6QebQbavneQTYcA39PEKv2+zIjX7rPUZ14DER46wk=
410410
github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8=
411411
github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk=
412-
github.com/evstack/ev-node v1.0.0-rc.1 h1:MO7DT3y1X4WK7pTgl/867NroqhXJ/oe2NbmvMr3jqq8=
413-
github.com/evstack/ev-node v1.0.0-rc.1/go.mod h1:JtbvY2r6k6ZhGYMeDNZk7cx6ALj3d0f6dVyyJmJHBd4=
414412
github.com/evstack/ev-node/core v1.0.0-rc.1 h1:Dic2PMUMAYUl5JW6DkDj6HXDEWYzorVJQuuUJOV0FjE=
415413
github.com/evstack/ev-node/core v1.0.0-rc.1/go.mod h1:n2w/LhYQTPsi48m6lMj16YiIqsaQw6gxwjyJvR+B3sY=
416-
github.com/evstack/ev-node/execution/evm v1.0.0-rc.1 h1:CrjlRI6hufue3KozvDuKP14gLwFvnOmXfGEJIszGEcQ=
417-
github.com/evstack/ev-node/execution/evm v1.0.0-rc.1/go.mod h1:GUxGZgS9F4w6DOcS5gEdW1h71IdAGdaY8C1urSOkpUQ=
418414
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
419415
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
420416
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=

apps/grpc/go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ module github.com/evstack/ev-node/apps/grpc
22

33
go 1.25.0
44

5+
replace (
6+
github.com/evstack/ev-node => ../../
7+
github.com/evstack/ev-node/execution/grpc => ../../execution/grpc
8+
)
9+
510
require (
611
github.com/evstack/ev-node v1.0.0-rc.1
712
github.com/evstack/ev-node/core v1.0.0-rc.1

apps/grpc/go.sum

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,8 @@ github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6Ni
365365
github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss=
366366
github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs=
367367
github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
368-
github.com/evstack/ev-node v1.0.0-rc.1 h1:MO7DT3y1X4WK7pTgl/867NroqhXJ/oe2NbmvMr3jqq8=
369-
github.com/evstack/ev-node v1.0.0-rc.1/go.mod h1:JtbvY2r6k6ZhGYMeDNZk7cx6ALj3d0f6dVyyJmJHBd4=
370368
github.com/evstack/ev-node/core v1.0.0-rc.1 h1:Dic2PMUMAYUl5JW6DkDj6HXDEWYzorVJQuuUJOV0FjE=
371369
github.com/evstack/ev-node/core v1.0.0-rc.1/go.mod h1:n2w/LhYQTPsi48m6lMj16YiIqsaQw6gxwjyJvR+B3sY=
372-
github.com/evstack/ev-node/execution/grpc v1.0.0-rc.1 h1:OzrWLDDY6/9+LWx0XmUqPzxs/CHZRJICOwQ0Me/i6dY=
373-
github.com/evstack/ev-node/execution/grpc v1.0.0-rc.1/go.mod h1:Pr/sF6Zx8am9ZeWFcoz1jYPs0kXmf+OmL8Tz2Gyq7E4=
374370
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
375371
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
376372
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=

0 commit comments

Comments
 (0)