Skip to content

Commit eace015

Browse files
committed
rename execmetapruner to execpruner
1 parent 8747ce9 commit eace015

File tree

6 files changed

+18
-25
lines changed

6 files changed

+18
-25
lines changed

block/internal/submitting/submitter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ func (s *Submitter) processDAInclusionLoop() {
385385
s.logger.Error().Err(err).Uint64("target_height", targetHeight).Msg("failed to prune old block data")
386386
}
387387

388-
if pruner, ok := s.exec.(coreexecutor.ExecMetaPruner); ok {
389-
if err := pruner.PruneExecMeta(s.ctx, targetHeight); err != nil {
388+
if pruner, ok := s.exec.(coreexecutor.ExecPruner); ok {
389+
if err := pruner.PruneExec(s.ctx, targetHeight); err != nil {
390390
s.logger.Error().Err(err).Uint64("target_height", targetHeight).Msg("failed to prune execution metadata")
391391
}
392392
}

core/execution/execution.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,15 @@ type Rollbackable interface {
162162
Rollback(ctx context.Context, targetHeight uint64) error
163163
}
164164

165-
// ExecMetaPruner is an optional interface that execution clients can implement
165+
// ExecPruner is an optional interface that execution clients can implement
166166
// to support height-based pruning of their execution metadata. This is used by
167167
// EVM-based execution clients to keep ExecMeta consistent with ev-node's
168168
// pruning window while remaining a no-op for execution environments that
169169
// don't persist per-height metadata in ev-node's datastore.
170-
type ExecMetaPruner interface {
171-
// PruneExecMeta should delete execution metadata for all heights up to and
170+
type ExecPruner interface {
171+
// PruneExec should delete execution metadata for all heights up to and
172172
// including the given height. Implementations should be idempotent and track
173173
// their own progress so that repeated calls with the same or decreasing
174174
// heights are cheap no-ops.
175-
PruneExecMeta(ctx context.Context, height uint64) error
175+
PruneExec(ctx context.Context, height uint64) error
176176
}

execution/evm/execution.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ var _ execution.Rollbackable = (*EngineClient)(nil)
6969
// ev-node's height-based pruning. This enables coordinated pruning of EVM
7070
// ExecMeta alongside ev-node's own block data pruning, while remaining a
7171
// no-op for non-EVM execution environments.
72-
var _ execution.ExecMetaPruner = (*EngineClient)(nil)
72+
var _ execution.ExecPruner = (*EngineClient)(nil)
7373

7474
// validatePayloadStatus checks the payload status and returns appropriate errors.
7575
// It implements the Engine API specification's status handling:
@@ -271,11 +271,11 @@ func NewEngineExecutionClient(
271271
}, nil
272272
}
273273

274-
// PruneExecMeta implements execution.ExecMetaPruner by delegating to the
274+
// PruneExec implements execution.ExecPruner by delegating to the
275275
// underlying EVMStore. It is safe to call this multiple times with the same
276276
// or increasing heights; the store tracks its own last-pruned height.
277-
func (c *EngineClient) PruneExecMeta(ctx context.Context, height uint64) error {
278-
return c.store.PruneExecMeta(ctx, height)
277+
func (c *EngineClient) PruneExec(ctx context.Context, height uint64) error {
278+
return c.store.PruneExec(ctx, height)
279279
}
280280

281281
// SetLogger allows callers to attach a structured logger.

execution/evm/go.sum

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,6 @@ github.com/ethereum/go-ethereum v1.16.8 h1:LLLfkZWijhR5m6yrAXbdlTeXoqontH+Ga2f9i
7676
github.com/ethereum/go-ethereum v1.16.8/go.mod h1:Fs6QebQbavneQTYcA39PEKv2+zIjX7rPUZ14DER46wk=
7777
github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8=
7878
github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk=
79-
<<<<<<< HEAD
80-
github.com/evstack/ev-node v1.0.0-rc.2 h1:gUQzLTkCj6D751exm/FIR/yw2aXWiW2aEREEwtxMvw0=
81-
github.com/evstack/ev-node v1.0.0-rc.2/go.mod h1:Qa2nN1D6PJQRU2tiarv6X5Der5OZg/+2QGY/K2mA760=
82-
github.com/evstack/ev-node/core v1.0.0-rc.1 h1:Dic2PMUMAYUl5JW6DkDj6HXDEWYzorVJQuuUJOV0FjE=
83-
github.com/evstack/ev-node/core v1.0.0-rc.1/go.mod h1:n2w/LhYQTPsi48m6lMj16YiIqsaQw6gxwjyJvR+B3sY=
84-
=======
85-
>>>>>>> faac1fd1 ( add replace statement for local packages)
8679
github.com/ferranbt/fastssz v0.1.4 h1:OCDB+dYDEQDvAgtAGnTSidK1Pe2tW3nFV40XyMkTeDY=
8780
github.com/ferranbt/fastssz v0.1.4/go.mod h1:Ea3+oeoRGGLGm5shYAeDgu6PGUlcvQhE2fILyD9+tGg=
8881
github.com/filecoin-project/go-clock v0.1.0 h1:SFbYIM75M8NnFm1yMHhN9Ahy3W5bEZV9gd6MPfXbKVU=

execution/evm/store.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ func (s *EVMStore) SaveExecMeta(ctx context.Context, meta *ExecMeta) error {
145145
return nil
146146
}
147147

148-
// PruneExecMeta removes ExecMeta entries up to and including the given height.
148+
// PruneExec removes ExecMeta entries up to and including the given height.
149149
// It is safe to call this multiple times with the same or increasing heights;
150150
// previously pruned ranges will be skipped based on the last-pruned marker.
151-
func (s *EVMStore) PruneExecMeta(ctx context.Context, height uint64) error {
151+
func (s *EVMStore) PruneExec(ctx context.Context, height uint64) error {
152152
// Load last pruned height, if any.
153153
var lastPruned uint64
154154
data, err := s.db.Get(ctx, ds.NewKey(lastPrunedExecMetaKey))

execution/evm/store_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func newTestDatastore(t *testing.T) ds.Batching {
1717
return dssync.MutexWrap(ds.NewMapDatastore())
1818
}
1919

20-
func TestPruneExecMeta_PrunesUpToTargetHeight(t *testing.T) {
20+
func TestPruneExec_PrunesUpToTargetHeight(t *testing.T) {
2121
t.Parallel()
2222

2323
ctx := context.Background()
@@ -39,7 +39,7 @@ func TestPruneExecMeta_PrunesUpToTargetHeight(t *testing.T) {
3939
}
4040

4141
// Prune up to height 3
42-
require.NoError(t, store.PruneExecMeta(ctx, 3))
42+
require.NoError(t, store.PruneExec(ctx, 3))
4343

4444
// Heights 1..3 should be gone
4545
for h := uint64(1); h <= 3; h++ {
@@ -56,10 +56,10 @@ func TestPruneExecMeta_PrunesUpToTargetHeight(t *testing.T) {
5656
}
5757

5858
// Re-pruning with the same height should be a no-op
59-
require.NoError(t, store.PruneExecMeta(ctx, 3))
59+
require.NoError(t, store.PruneExec(ctx, 3))
6060
}
6161

62-
func TestPruneExecMeta_TracksLastPrunedHeight(t *testing.T) {
62+
func TestPruneExec_TracksLastPrunedHeight(t *testing.T) {
6363
t.Parallel()
6464

6565
ctx := context.Background()
@@ -73,10 +73,10 @@ func TestPruneExecMeta_TracksLastPrunedHeight(t *testing.T) {
7373
}
7474

7575
// First prune up to 2
76-
require.NoError(t, store.PruneExecMeta(ctx, 2))
76+
require.NoError(t, store.PruneExec(ctx, 2))
7777

7878
// Then prune up to 4; heights 3..4 should be deleted in this run
79-
require.NoError(t, store.PruneExecMeta(ctx, 4))
79+
require.NoError(t, store.PruneExec(ctx, 4))
8080

8181
// Verify all heights 1..4 are gone, 5 remains
8282
for h := uint64(1); h <= 4; h++ {

0 commit comments

Comments
 (0)