Skip to content

Commit 1db5d4f

Browse files
committed
update to add syncing networks
1 parent 339dbbf commit 1db5d4f

4 files changed

Lines changed: 51 additions & 11 deletions

File tree

pkg/coordinator/tasks/check_eth_config/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ The `check_eth_config` task verifies that all execution clients in the network r
1414
- **`failOnMismatch`**:
1515
Determines whether the task should fail if any execution client returns a different `eth_config` response. If set to `true` (default), the task fails on configuration mismatches. If set to `false`, mismatches are logged but the task continues without failure.
1616

17+
- **`excludeSyncingClients`**:
18+
When set to `true`, the task excludes execution clients that are currently syncing. If set to `false` (default), syncing clients are included in the check. This is useful for testing configuration consistency even before clients are fully synced, as `eth_config` returns configuration data that doesn't depend on sync status.
19+
1720
### Outputs
1821

1922
- **`ethConfig`**:
@@ -29,6 +32,7 @@ Default settings for the `check_eth_config` task:
2932
clientPattern: ""
3033
excludeClientPattern: ""
3134
failOnMismatch: true
35+
excludeSyncingClients: false
3236
```
3337
3438
### Example Usage
@@ -61,6 +65,16 @@ Non-blocking check that logs mismatches but doesn't fail:
6165
failOnMismatch: false
6266
```
6367
68+
Only check fully synced clients:
69+
70+
```yaml
71+
- name: check_eth_config
72+
title: "Verify eth_config for synced clients only"
73+
config:
74+
excludeSyncingClients: true
75+
failOnMismatch: true
76+
```
77+
6478
### Implementation Details
6579
6680
The task queries the `eth_config` RPC method (EIP-7910) from all matching execution clients and performs a JSON-level comparison of the responses. When configurations match, the task succeeds and outputs the reference configuration. When mismatches are detected, the task provides a detailed error log showing:

pkg/coordinator/tasks/check_eth_config/config.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
package checkethconfig
22

33
type Config struct {
4-
ClientPattern string `yaml:"clientPattern" json:"clientPattern"`
5-
ExcludeClientPattern string `yaml:"excludeClientPattern" json:"excludeClientPattern"`
6-
FailOnMismatch bool `yaml:"failOnMismatch" json:"failOnMismatch"`
4+
ClientPattern string `yaml:"clientPattern" json:"clientPattern"`
5+
ExcludeClientPattern string `yaml:"excludeClientPattern" json:"excludeClientPattern"`
6+
FailOnMismatch bool `yaml:"failOnMismatch" json:"failOnMismatch"`
7+
ExcludeSyncingClients bool `yaml:"excludeSyncingClients" json:"excludeSyncingClients"`
78
}
89

910
func DefaultConfig() Config {
1011
return Config{
11-
FailOnMismatch: true,
12+
FailOnMismatch: true,
13+
ExcludeSyncingClients: false,
1214
}
1315
}
1416

pkg/coordinator/tasks/check_eth_config/task.go

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,35 @@ func (t *Task) Execute(ctx context.Context) error {
7979
var clients []*execution.Client
8080

8181
if t.config.ClientPattern == "" && t.config.ExcludeClientPattern == "" {
82-
clients = clientPool.GetExecutionPool().GetReadyEndpoints(true)
82+
executionPool := clientPool.GetExecutionPool()
83+
allClients := executionPool.GetAllEndpoints()
84+
85+
if t.config.ExcludeSyncingClients {
86+
clients = executionPool.GetReadyEndpoints(true)
87+
} else {
88+
// Include all clients regardless of sync status
89+
clients = allClients
90+
}
91+
92+
t.logger.Infof("execution pool has %d total clients, %d clients selected (excludeSyncing=%v)", len(allClients), len(clients), t.config.ExcludeSyncingClients)
93+
94+
// Log details about each client
95+
for i, client := range allClients {
96+
statusStr := "unknown"
97+
98+
status := client.GetStatus()
99+
switch status {
100+
case execution.ClientStatusOnline:
101+
statusStr = "online"
102+
case execution.ClientStatusOffline:
103+
statusStr = "offline"
104+
case execution.ClientStatusSynchronizing:
105+
statusStr = "synchronizing"
106+
}
107+
108+
t.logger.Debugf("client %d: name=%s, status=%s", i, client.GetName(), statusStr)
109+
}
110+
83111
if len(clients) == 0 {
84112
t.logger.Error("check failed: no matching clients found")
85113
t.ctx.SetResult(types.TaskResultFailure)

playbooks/fusaka-dev/kurtosis/ethconfig-test-with-rpc-call.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@ config:
66
#walletPrivkey: ""
77
tasks:
88
- name: check_clients_are_healthy
9-
title: "Check if at least one client is ready"
9+
title: "Wait for at least one client to be responding"
1010
timeout: 5m
1111
config:
1212
minClientCount: 1
13-
- name: check_consensus_slot_range
14-
title: "Wait for slot >= 10"
15-
timeout: 10m
16-
config:
17-
minSlotNumber: 10
1813
- name: check_eth_config
1914
title: "Check eth_config consistency across all execution clients"
2015
timeout: 5m
2116
config:
2217
failOnMismatch: true
18+
excludeSyncingClients: false

0 commit comments

Comments
 (0)