In order to setup op-conductor, you need to configure the following env vars for both op-conductor and op-node service:
OP_NODE_CONDUCTOR_ENABLED=true
OP_NODE_CONDUCTOR_RPC=<conductor-rpc-endpoint> # for example http://conductor:8545
# prefix for the server id, used to identify the server in the raft cluster
RAFT_SERVER_ID_PREFIX=<prefix-for-server-id> # for example, sequencer-1, sequencer-2, etc
OP_CONDUCTOR_RAFT_STORAGE_DIR=<raft-storage-dir>
OP_CONDUCTOR_RPC_ADDR=<rpc-address> # for example, 0.0.0.0
OP_CONDUCTOR_RPC_PORT=<rpc-port> # for example, 8545
OP_CONDUCTOR_METRICS_ENABLED=true/false
OP_CONDUCTOR_METRICS_ADDR=<metrics-address> # for example 0.0.0.0
OP_CONDUCTOR_METRICS_PORT=<metrics-port> # for example 7300
OP_CONDUCTOR_CONSENSUS_PORT=<consensus-port> # for example 50050
OP_CONDUCTOR_PAUSED=true # set to true to start conductor in paused state
OP_CONDUCTOR_NODE_RPC=<node-rpc-endpoint> # for example, http://op-node:8545
OP_CONDUCTOR_EXECUTION_RPC=<execution-rpc-endpoint> # for example, http://op-geth:8545
OP_CONDUCTOR_NETWORK=<network-name> # for example, base-mainnet, op-mainnet, etc, should be same as OP_NODE_NETWORK
OP_CONDUCTOR_HEALTHCHECK_INTERVAL=<healthcheck-interval> # in seconds
OP_CONDUCTOR_HEALTHCHECK_UNSAFE_INTERVAL=<unsafe-interval> # Interval allowed between unsafe head and now measured in seconds
OP_CONDUCTOR_HEALTHCHECK_MIN_PEER_COUNT=<min-peer-count> # minimum number of peers required to be considered healthy
OP_CONDUCTOR_RAFT_BOOTSTRAP=true/false # set to true if you want to bootstrap the raft cluster
In normal situations, you probably have a running sequencer already and you want to turn it into a HA cluster. What you need to do in this situation is to:
OP_CONDUCTOR_RAFT_BOOTSTRAP=true set on op-conductorOP_CONDUCTOR_PAUSED=true set on op-conductorOP_NODE_SEQUENCER_ENABLED=true set on op-nodeconductor_resume json rpc method on op-conductorOP_CONDUCTOR_RAFT_BOOTSTRAP=false on the sequencer so that it doesn’t attempt to bootstrap the cluster during redeployNow you have a single HA sequencer which treats itself as the cluster leader! Next steps would be to add more sequencers to the cluster depending on your needs. For example, we want a 3-node cluster, you can follow the same process to add 2 more sequencers.
OP_CONDUCTOR_RAFT_BOOTSTRAP=false set on op-conductorOP_CONDUCTOR_PAUSED=true set on op-conductorconductor_addServerAsVoter json rpc method on the leader sequencerconductor_clusterMembership json rpc method on the leader sequencer to get the updated cluster membershipconductor_resume json rpc method on op-conductorOnce finished, you should have a 3-node HA sequencer cluster!
For every redeploy, depending on your underlying infrastructure, you need to make sure to:
OP_CONDUCTOR_PAUSED=true set on op-conductor so that conductor doesn’t attempt to control sequencer while it’s still syncing / redeployingWhenever there are a disaster situation that you see no route to have 2 healthy conductor in the cluster communicating with each other, you need to manually intervene to resume sequencing. The steps are as follows:
conductor_pause json rpc method on the all conductors so that they don’t attempt to start / stop sequencerconductor_overrideLeader json rpc method on the conductor to force it to treat itself as the leaderadmin_overrideLeader json rpc method on the op-node to force it to treat itself as the leader