Skip to content

Commit 66b491b

Browse files
authored
chore!: move sequencers to pkg (#2931)
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. NOTE: PR titles should follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Overview This pr moves sequencers to pkg, its a nit, we should probably hold off on merging to avoid lots merge conflicts with da removal
1 parent af5d6b1 commit 66b491b

File tree

18 files changed

+21
-21
lines changed

18 files changed

+21
-21
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ docs/.vitepress/cache
3030
.claude
3131
.gocache
3232
.gomodcache
33+
/.cache

CLAUDE.md

Lines changed: 6 additions & 6 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** (pkg/da/types) - 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

apps/evm/cmd/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ import (
2626
genesispkg "github.com/evstack/ev-node/pkg/genesis"
2727
"github.com/evstack/ev-node/pkg/p2p"
2828
"github.com/evstack/ev-node/pkg/p2p/key"
29+
"github.com/evstack/ev-node/pkg/sequencers/based"
30+
"github.com/evstack/ev-node/pkg/sequencers/single"
2931
"github.com/evstack/ev-node/pkg/store"
30-
"github.com/evstack/ev-node/sequencers/based"
31-
"github.com/evstack/ev-node/sequencers/single"
3232

3333
"github.com/evstack/ev-node/apps/evm/server"
3434
)

apps/grpc/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ COPY go.mod go.sum ./
1212
COPY apps/grpc/go.mod apps/grpc/go.sum ./apps/grpc/
1313
COPY core/go.mod ./core/
1414
COPY execution/grpc/go.mod execution/grpc/go.sum ./execution/grpc/
15-
COPY sequencers/single/go.mod sequencers/single/go.sum ./sequencers/single/
1615

1716
# Download dependencies
1817
RUN go mod download

apps/grpc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,4 @@ If you have issues connecting to the DA layer:
151151

152152
- [Evolve Documentation](https://ev.xyz)
153153
- [gRPC Execution Interface](../../execution/grpc/README.md)
154-
- [Single Sequencer Documentation](../../sequencers/single/README.md)
154+
- [Single Sequencer Documentation](../../pkg/sequencers/single/README.md)

apps/grpc/cmd/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import (
2222
rollgenesis "github.com/evstack/ev-node/pkg/genesis"
2323
"github.com/evstack/ev-node/pkg/p2p"
2424
"github.com/evstack/ev-node/pkg/p2p/key"
25+
"github.com/evstack/ev-node/pkg/sequencers/based"
26+
"github.com/evstack/ev-node/pkg/sequencers/single"
2527
"github.com/evstack/ev-node/pkg/store"
26-
"github.com/evstack/ev-node/sequencers/based"
27-
"github.com/evstack/ev-node/sequencers/single"
2828
)
2929

3030
const (

apps/testapp/cmd/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import (
2020
"github.com/evstack/ev-node/pkg/genesis"
2121
"github.com/evstack/ev-node/pkg/p2p"
2222
"github.com/evstack/ev-node/pkg/p2p/key"
23+
"github.com/evstack/ev-node/pkg/sequencers/based"
24+
"github.com/evstack/ev-node/pkg/sequencers/single"
2325
"github.com/evstack/ev-node/pkg/store"
24-
"github.com/evstack/ev-node/sequencers/based"
25-
"github.com/evstack/ev-node/sequencers/single"
2626
)
2727

2828
const testDbName = "testapp"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This design ensures that all transactions are force-included from DA, making the
1616

1717
### Key Interfaces
1818

19-
The Based Sequencer implements the `Sequencer` interface from `core/sequencer.go`:
19+
The Based Sequencer implements the `Sequencer` interface from `core/sequencer/sequencing.go`:
2020

2121
- `SubmitBatchTxs()` - No-op for based sequencer (transactions are not accepted)
2222
- `GetNextBatch()` - Retrieves the next batch from DA via forced inclusion
@@ -89,7 +89,7 @@ type Checkpoint struct {
8989

9090
#### 1. Initial State
9191

92-
```
92+
```bash
9393
Checkpoint: (DAHeight: 100, TxIndex: 0)
9494
- Ready to fetch epoch starting at DA height 100
9595
```
@@ -98,7 +98,7 @@ Checkpoint: (DAHeight: 100, TxIndex: 0)
9898

9999
When `GetNextBatch()` is called and we're at an epoch end:
100100

101-
```
101+
```bash
102102
Request: GetNextBatch(maxBytes: 1MB)
103103
Action: Fetch all transactions from epoch (DA heights 100-109)
104104
Result: currentBatchTxs = [tx1, tx2, tx3, ..., txN] (from entire epoch)
@@ -108,7 +108,7 @@ Result: currentBatchTxs = [tx1, tx2, tx3, ..., txN] (from entire epoch)
108108

109109
Transactions are processed incrementally, respecting `maxBytes`:
110110

111-
```
111+
```bash
112112
Batch 1: [tx1, tx2] (fits in maxBytes)
113113
Checkpoint: (DAHeight: 100, TxIndex: 2)
114114

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
coresequencer "github.com/evstack/ev-node/core/sequencer"
1515
datypes "github.com/evstack/ev-node/pkg/da/types"
1616
"github.com/evstack/ev-node/pkg/genesis"
17-
seqcommon "github.com/evstack/ev-node/sequencers/common"
17+
seqcommon "github.com/evstack/ev-node/pkg/sequencers/common"
1818
)
1919

2020
var _ coresequencer.Sequencer = (*BasedSequencer)(nil)

0 commit comments

Comments
 (0)