Skip to content

Commit 7368fdc

Browse files
committed
Merge branch 'main' into marko/exchange
2 parents 3233285 + aaae087 commit 7368fdc

193 files changed

Lines changed: 13832 additions & 7890 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/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
permissions:
6363
actions: read
6464
contents: read
65+
packages: read
6566
uses: ./.github/workflows/test.yml
6667
secrets: inherit
6768

.github/workflows/rust-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
repo-token: ${{ secrets.GITHUB_TOKEN }}
5151

5252
- name: Cache Rust dependencies
53-
uses: actions/cache@v4
53+
uses: actions/cache@v5
5454
with:
5555
path: |
5656
~/.cargo/bin/
@@ -94,7 +94,7 @@ jobs:
9494
repo-token: ${{ secrets.GITHUB_TOKEN }}
9595

9696
- name: Cache Rust dependencies
97-
uses: actions/cache@v4
97+
uses: actions/cache@v5
9898
with:
9999
path: |
100100
~/.cargo/bin/

.github/workflows/test.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535
unit_test:
3636
name: Run Unit Tests
3737
runs-on: ubuntu-latest
38+
permissions:
39+
contents: read
40+
packages: read
3841
steps:
3942
- uses: actions/checkout@v6
4043
- name: set up go
@@ -44,7 +47,7 @@ jobs:
4447
- name: Run unit test
4548
run: make test-cover
4649
- name: Upload unit test coverage report
47-
uses: actions/upload-artifact@v5
50+
uses: actions/upload-artifact@v6
4851
with:
4952
name: unit-test-coverage-report-${{ github.sha }}
5053
path: ./coverage.txt
@@ -61,7 +64,7 @@ jobs:
6164
- name: Run integration test
6265
run: make test-integration-cover
6366
- name: Upload integration test coverage report
64-
uses: actions/upload-artifact@v5
67+
uses: actions/upload-artifact@v6
6568
with:
6669
name: integration-test-coverage-report-${{ github.sha }}
6770
path: ./node/coverage.txt
@@ -70,12 +73,26 @@ jobs:
7073
name: Run E2E System Tests
7174
needs: build_all-apps
7275
runs-on: ubuntu-latest
76+
permissions:
77+
contents: read
78+
packages: read
7379
steps:
7480
- uses: actions/checkout@v6
7581
- name: set up go
7682
uses: actions/setup-go@v6
7783
with:
7884
go-version-file: ./go.mod
85+
- name: Set up Docker Buildx
86+
uses: docker/setup-buildx-action@v3
87+
- name: Build evstack:local-dev (cached)
88+
uses: docker/build-push-action@v6
89+
with:
90+
context: .
91+
file: apps/testapp/Dockerfile
92+
load: true
93+
tags: evstack:local-dev
94+
cache-from: type=gha
95+
cache-to: type=gha,mode=max
7996
- name: E2E Tests
8097
run: make test-e2e
8198

@@ -101,12 +118,12 @@ jobs:
101118
steps:
102119
- uses: actions/checkout@v6
103120
- name: Download unit test coverage report
104-
uses: actions/download-artifact@v6
121+
uses: actions/download-artifact@v7
105122
with:
106123
name: unit-test-coverage-report-${{ github.sha }}
107124
path: ./unit-coverage
108125
- name: Download integration test coverage report
109-
uses: actions/download-artifact@v6
126+
uses: actions/download-artifact@v7
110127
with:
111128
name: integration-test-coverage-report-${{ github.sha }}
112129
path: ./integration-coverage

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
coverage.txt
2+
*.out
23
proto/pb
34
proto/tendermint
45
types/pb/tendermint
@@ -30,3 +31,4 @@ docs/.vitepress/cache
3031
.claude
3132
.gocache
3233
.gomodcache
34+
/.cache

.mockery.yaml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@ template: testify
22
template-data:
33
unroll-variadic: true
44
packages:
5-
github.com/evstack/ev-node/core/da:
6-
interfaces:
7-
DA:
8-
config:
9-
pkgname: mocks
10-
filename: da.go
11-
configs:
12-
- dir: ./da/internal/mocks
13-
- dir: ./test/mocks
145
github.com/evstack/ev-node/core/execution:
156
interfaces:
167
Executor:
@@ -79,15 +70,32 @@ packages:
7970
filename: broadcaster_mock.go
8071
github.com/evstack/ev-node/block/internal/da:
8172
interfaces:
82-
BlobAPI:
73+
Client:
8374
config:
84-
dir: ./block/internal/da
85-
pkgname: da
86-
filename: blob_api_mock.go
75+
dir: ./test/mocks
76+
pkgname: mocks
77+
filename: da.go
78+
Verifier:
79+
config:
80+
dir: ./test/mocks
81+
pkgname: mocks
82+
filename: da.go
8783
github.com/evstack/ev-node/pkg/da/jsonrpc:
8884
interfaces:
8985
BlobModule:
9086
config:
9187
dir: ./pkg/da/jsonrpc/mocks
9288
pkgname: mocks
9389
filename: blob_module_mock.go
90+
HeaderModule:
91+
config:
92+
dir: ./pkg/da/jsonrpc/mocks
93+
pkgname: mocks
94+
filename: header_module_mock.go
95+
github.com/evstack/ev-node/block:
96+
interfaces:
97+
ForcedInclusionRetriever:
98+
config:
99+
dir: ./pkg/sequencers/common
100+
pkgname: common
101+
filename: forced_inclusion_retriever_mock.go

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2727
### Removed
2828

2929
- **BREAKING:** Removed unused and confusing metrics from sequencers and block processing, including sequencer-specific metrics (gas price, blob size, transaction status, pending blocks), channel buffer metrics, overly granular error metrics, block production categorization metrics, and sync lag metrics. Essential metrics for DA submission health, block production, and performance monitoring are retained. [#2904](https://github.com/evstack/ev-node/pull/2904)
30+
- **BREAKING**: Removed `core/da` package and replaced DAClient with internal implementation. The DA client is exposed as `block.FullDAClient`, `block.DAClient`, `block.DAVerifier` without leaking implementation details. [#2910](https://github.com/evstack/ev-node/pull/2910)
31+
32+
## v1.0.0-beta.11
33+
34+
### Improvements
35+
36+
- Loosen syncer validation for allowing swapping sequencer and full node state [#2925](https://github.com/evstack/ev-node/pull/2925)
3037

3138
## v1.0.0-beta.10
3239

CLAUDE.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ The project uses a zero-dependency core package pattern:
4444

4545
- **core/** - Contains only interfaces and types, no external dependencies
4646
- **block/** - Block management, creation, validation, and synchronization
47-
- **p2p/** - Networking layer built on libp2p
48-
- **sequencing/** - Modular sequencer implementations
49-
- **testapp/** - Reference implementation for testing
47+
- **pkg/p2p/** - Networking layer built on libp2p
48+
- **pkg/sequencers/** - Modular sequencer implementations
49+
- **apps/testapp/** - Reference implementation for testing
5050

5151
### Key Interfaces
5252

53-
- **Executor** (core/executor.go) - Handles state transitions
54-
- **Sequencer** (core/sequencer.go) - Orders transactions
55-
- **DA** (core/da.go) - Data availability layer abstraction
53+
- **Executor** (`core/executor.go`) - Handles state transitions
54+
- **Sequencer** (`core/sequencer.go`) - Orders transactions
55+
- **DA** (`pkg/da/types`) - Data availability layer abstraction
5656

5757
### Modular Design
5858

@@ -120,7 +120,7 @@ go test -race ./package/...
120120

121121
### Adding a New DA Layer
122122

123-
1. Implement the `DA` interface from `core/da.go`
123+
1. Implement the `DA` interface from `pkg/da/types`
124124
2. Add configuration in the appropriate config package
125125
3. Wire it up in the initialization code
126126
4. Add tests following existing patterns

RELEASE.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ Packages must be released in the following order:
9797

9898
These packages only depend on `core` and can be released in parallel after `core`:
9999

100-
1. **github.com/evstack/ev-node/da** - Path: `./da`
101100
2. **github.com/evstack/ev-node** - Path: `./` (root)
102101
3. **github.com/evstack/ev-node/execution/evm** - Path: `./execution/evm`
103102

@@ -157,7 +156,6 @@ git tag execution/evm/v0.3.0
157156
git push origin execution/evm/v0.3.0
158157

159158
# Verify all are available
160-
go list -m github.com/evstack/ev-node/da@v0.3.0
161159
go list -m github.com/evstack/ev-node@v0.3.0
162160
go list -m github.com/evstack/ev-node/execution/evm@v0.3.0
163161
```
@@ -170,7 +168,6 @@ After all dependencies are available:
170168

171169
# Update and release apps/evm
172170
go get github.com/evstack/ev-node/core@v0.3.0
173-
go get github.com/evstack/ev-node/da@v0.3.0
174171
go get github.com/evstack/ev-node/execution/evm@v0.3.0
175172
go get github.com/evstack/ev-node@v0.3.0
176173
go mod tidy

apps/evm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This directory contains the implementation of a single EVM sequencer using Ev-no
1111

1212
1. Both EVM and DA layers must be running before starting the sequencer
1313
1. For the EVM layer, Reth can be conveniently run using `docker compose` from <path_to>/execution/evm/docker.
14-
2. For the DA layer, local-da can be built and run from the `ev-node/da/cmd/local-da` directory.
14+
2. For the DA layer, local-da can be built and run from the `ev-node/tools/local-da` directory.
1515

1616
2. Build the sequencer:
1717

apps/evm/cmd/post_tx_cmd.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ import (
1111
"github.com/spf13/cobra"
1212

1313
evblock "github.com/evstack/ev-node/block"
14-
"github.com/evstack/ev-node/core/da"
15-
"github.com/evstack/ev-node/da/jsonrpc"
1614
rollcmd "github.com/evstack/ev-node/pkg/cmd"
1715
rollconf "github.com/evstack/ev-node/pkg/config"
16+
blobrpc "github.com/evstack/ev-node/pkg/da/jsonrpc"
17+
da "github.com/evstack/ev-node/pkg/da/types"
1818
genesispkg "github.com/evstack/ev-node/pkg/genesis"
19-
seqcommon "github.com/evstack/ev-node/sequencers/common"
2019
"github.com/evstack/ev-node/types"
2120
)
2221

@@ -117,12 +116,11 @@ func postTxRunE(cmd *cobra.Command, args []string) error {
117116

118117
logger.Info().Str("namespace", namespace).Float64("gas_price", gasPrice).Int("tx_size", len(txData)).Msg("posting transaction to DA layer")
119118

120-
daClient, err := jsonrpc.NewClient(
119+
daClient, err := blobrpc.NewClient(
121120
cmd.Context(),
122-
logger,
123121
nodeConfig.DA.Address,
124122
nodeConfig.DA.AuthToken,
125-
seqcommon.AbsoluteMaxBlobSize,
123+
"",
126124
)
127125
if err != nil {
128126
return fmt.Errorf("failed to create DA client: %w", err)
@@ -134,7 +132,7 @@ func postTxRunE(cmd *cobra.Command, args []string) error {
134132
blobs := [][]byte{txData}
135133
options := []byte(nodeConfig.DA.SubmitOptions)
136134

137-
dac := evblock.NewDAClient(&daClient.DA, nodeConfig, logger)
135+
dac := evblock.NewDAClient(daClient, nodeConfig, logger)
138136
result := dac.Submit(cmd.Context(), blobs, gasPrice, namespaceBz, options)
139137

140138
// Check result

0 commit comments

Comments
 (0)