Skip to content

Commit 58ea3e8

Browse files
committed
fix: resolve CI lint and benchmark failures
1 parent 1e15672 commit 58ea3e8

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Check out our tutorials on our [website][docs].
5858

5959
## Onboarding with Claude Code
6060

61-
Use [Claude Code](https://claude.ai/code) to explore the codebase:
61+
Use [Claude Code](https://code.claude.com/docs/en/overview) to explore the codebase:
6262

6363
```bash
6464
cd ev-node && claude

block/internal/syncing/syncer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ func TestSyncer_TrySyncNextBlock_SelectiveCacheCleanup(t *testing.T) {
462462
}
463463

464464
tests := map[string]struct {
465-
event func(testing.TB) common.DAHeightEvent
465+
event func(testing.TB) common.DAHeightEvent
466466
wantHeaderInCache bool
467467
wantDataInCache bool
468468
}{

docs/adr/adr-023-execution-owned-proposer-rotation.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ The replacement design moves proposer selection into the execution environment.
2121
- `UpdatedStateRoot`: the state root after executing the block.
2222
- `NextProposerAddress`: the address expected to sign the next block.
2323

24-
`GetExecutionInfo` also exposes `NextProposerAddress` for startup. If execution returns an empty proposer at startup, ev-node falls back to `genesis.proposer_address`.
25-
2624
An empty `NextProposerAddress` from `ExecuteTxs` means the proposer is unchanged. ev-node must not write a redundant header field in that case, preserving compatibility with existing headers and hash chains.
2725

2826
When execution returns a non-empty next proposer:
2927

3028
- `State.NextProposerAddress` is updated and used as the expected signer for `LastBlockHeight + 1`.
3129
- Full nodes validate the next block signer against the previous state's `NextProposerAddress`.
30+
- Nodes recover the expected signer after restart from the persisted state. If legacy state has no stored proposer, ev-node falls back to `genesis.proposer_address`.
3231
- Header encoding remains unchanged. `Header.ProposerAddress` continues to identify the signer of the current block only.
3332

3433
The execution result is the authority for proposer rotation. Header-only paths cannot derive proposer transitions without either replaying execution or using a future proof/certificate mechanism. This preserves header compatibility while keeping the rotation rule deterministic for full nodes.
@@ -49,7 +48,7 @@ The system contract must restrict writes to the configured authority. Unauthoriz
4948

5049
ev-node validates each block's signer against the proposer address stored in the previous state. A malicious proposer cannot rotate the next signer through node-local configuration; the rotation must be derived from execution.
5150

52-
If the execution interface returns an empty proposer, ev-node treats the proposer as unchanged. At startup, empty execution info falls back to genesis so existing execution implementations remain usable.
51+
If the execution interface returns an empty proposer from `ExecuteTxs`, ev-node treats the proposer as unchanged. At startup, missing proposer data in legacy state falls back to genesis so existing execution implementations remain usable.
5352

5453
Compromise of the security council can still rotate the proposer to an attacker. This ADR reduces node configuration risk; it does not eliminate governance-key risk.
5554

test/e2e/evm_test_common.go

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -545,18 +545,6 @@ func SetupCommonEVMEnv(t testing.TB, sut *SystemUnderTest, client tastoratypes.T
545545
// Reset global nonce for each test to ensure clean state
546546
globalNonce = 0
547547

548-
// Construct dynamic test ports (rollkit + DA)
549-
dynEndpoints, err := generateTestEndpoints()
550-
require.NoError(t, err, "failed to generate dynamic test endpoints")
551-
552-
// Start local DA explicitly on the chosen port
553-
localDABinary := "local-da"
554-
if evmSingleBinaryPath != "evm" {
555-
localDABinary = filepath.Join(filepath.Dir(evmSingleBinaryPath), "local-da")
556-
}
557-
sut.ExecCmd(localDABinary, "-port", dynEndpoints.DAPort, "-block-time", "1s")
558-
t.Logf("Started local DA on port %s", dynEndpoints.DAPort)
559-
560548
require.NotNil(t, client, "docker client is required")
561549
require.NotEmpty(t, networkID, "docker networkID is required")
562550
rethNode := evmtest.SetupTestRethNode(t, client, networkID, cfg.rethOpts...)
@@ -577,6 +565,19 @@ func SetupCommonEVMEnv(t testing.TB, sut *SystemUnderTest, client tastoratypes.T
577565
genesisHash, err := rethNode.GenesisHash(context.Background())
578566
require.NoError(t, err, "failed to get genesis hash")
579567

568+
// Reserve local ports after Docker has allocated reth host ports so Docker
569+
// cannot later claim a port selected for local DA or ev-node listeners.
570+
dynEndpoints, err := generateTestEndpoints()
571+
require.NoError(t, err, "failed to generate dynamic test endpoints")
572+
573+
// Start local DA explicitly on the chosen port
574+
localDABinary := "local-da"
575+
if evmSingleBinaryPath != "evm" {
576+
localDABinary = filepath.Join(filepath.Dir(evmSingleBinaryPath), "local-da")
577+
}
578+
sut.ExecCmd(localDABinary, "-port", dynEndpoints.DAPort, "-block-time", "1s")
579+
t.Logf("Started local DA on port %s", dynEndpoints.DAPort)
580+
580581
// Populate endpoints with both dynamic rollkit ports and dynamic engine ports
581582
dynEndpoints.SequencerEthPort = networkInfo.External.Ports.RPC
582583
dynEndpoints.SequencerEnginePort = networkInfo.External.Ports.Engine

0 commit comments

Comments
 (0)