Skip to content

kona|op-devstack: Revise Sequencer detection while test bootstrapping #18674

@pcw109550

Description

@pcw109550

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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions