-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
Found while attempting to run monorepo acceptance tests targeting kona-node.
op-devstack spins up preset network, and detect whether the L2 CL Node is sequencer via calling the admin_sequencerActive() API.
optimism/op-devstack/stack/match/sequencer.go
Lines 10 to 21 in 903584f
| func WithSequencerActive(ctx context.Context) stack.Matcher[stack.L2CLNodeID, stack.L2CLNode] { | |
| return MatchElemFn[stack.L2CLNodeID, stack.L2CLNode](func(elem stack.L2CLNode) bool { | |
| sequencing, err := retry.Do(ctx, 10, retry.Exponential(), func() (bool, error) { | |
| return elem.RollupAPI().SequencerActive(ctx) | |
| }) | |
| if err != nil { | |
| // Not available so can't be used by the test | |
| return false | |
| } | |
| return sequencing | |
| }) | |
| } |
This means kona node must be always admin API enabled. Need to patch op-devstack/sysgo/l2_cl_kona.go and add "KONA_NODE_RPC_ENABLE_ADMIN=true". Or we may patch the devstack to not use the admin API for sequencer detection.
Even after this fix, we may need kona-node patch at https://github.com/op-rs/kona/blob/fe6dfcf771059109f1d75043d5ecbbfa3b6ca1a5/crates/node/rpc/src/admin.rs#L95-L99.
This behavior is inconsistent with op-node. If admin API enabled but validator, we must not return ErrorCode::MethodNotFound