github.com/ethereum-optimism/optimism@v1.7.2/op-node/rollup/conductor/conductor.go (about) 1 package conductor 2 3 import ( 4 "context" 5 6 "github.com/ethereum-optimism/optimism/op-service/eth" 7 ) 8 9 // SequencerConductor is an interface for the driver to communicate with the sequencer conductor. 10 // It is used to determine if the current node is the active sequencer, and to commit unsafe payloads to the conductor log. 11 type SequencerConductor interface { 12 Leader(ctx context.Context) (bool, error) 13 CommitUnsafePayload(ctx context.Context, payload *eth.ExecutionPayloadEnvelope) error 14 Close() 15 } 16 17 // NoOpConductor is a no-op conductor that assumes this node is the leader sequencer. 18 type NoOpConductor struct{} 19 20 // Leader returns true if this node is the leader sequencer. NoOpConductor always returns true. 21 func (c *NoOpConductor) Leader(ctx context.Context) (bool, error) { 22 return true, nil 23 } 24 25 // CommitUnsafePayload commits an unsafe payload to the conductor log. 26 func (c *NoOpConductor) CommitUnsafePayload(ctx context.Context, payload *eth.ExecutionPayloadEnvelope) error { 27 return nil 28 } 29 30 // Close closes the conductor client. 31 func (c *NoOpConductor) Close() {}