Assumptions
This setup guide has the following assumptions:- 3 deployed sequencers (sequencer-0, sequencer-1, sequencer-2) that are all in sync and in the same vpc network
- sequencer-0 is currently the active sequencer
- You can execute a blue/green style sequencer deployment workflow that involves no downtime (described below)
- conductor and sequencers are running in k8s or some other container orchestrator (vm-based deployment may be slightly different and not covered here)
Spin up op-conductor
Deploy conductor
Deploy a conductor instance per sequencer with sequencer-1 as the raft cluster
bootstrap node:
-
suggested conductor configs:
-
sequencer-1 op-conductor extra config:
Pause two conductors
Pause
sequencer-0 & sequencer-2 conductors with conductor_pause RPC request.Update op-node configuration and switch the active sequencer
Deploy an
op-node config update to all sequencers that enables conductor. Use
a blue/green style deployment workflow that switches the active sequencer to
sequencer-1:-
all sequencer op-node configs:
Confirm sequencer switch was successful
Confirm
sequencer-1 is active and successfully producing unsafe blocks.
Because sequencer-1 was the raft cluster bootstrap node, it is now committing
unsafe payloads to the raft log.Add voting nodes
Add voting nodes to cluster using conductor_AddServerAsVoter
RPC request to the leader conductor (
sequencer-1)Confirm state
Confirm cluster membership and sequencer state:
-
sequencer-0andsequencer-2:- raft cluster follower
- sequencer is stopped
- conductor is paused
- conductor enabled in op-node config
-
sequencer-1- raft cluster leader
- sequencer is active
- conductor is paused
- conductor enabled in op-node config
Resume conductors
Resume all conductors with conductor_resume RPC request to
each conductor instance.
Confirm state
Confirm all conductors successfully resumed with conductor_paused
Transfer leadership
Trigger leadership transfer to
sequencer-0 using conductor_transferLeaderToServerConfirm state
Confirm cluster membership and sequencer state:
sequencer-1 and sequencer-2:- raft cluster follower
- sequencer is stopped
- conductor is active
- conductor enabled in op-node config
sequencer-0:- raft cluster leader
- sequencer is active
- conductor is active
- conductor enabled in op-node config
Blue/green deployment
In order to ensure there is no downtime when setting up conductor, you need to have a deployment script that can update sequencers without network downtime. An example of this workflow might look like:- Query current state of the network and determine which sequencer is currently active (referred to as “original” sequencer below). From the other available sequencers, choose a candidate sequencer.
- Deploy the change to the candidate sequencer and then wait for it to sync up to the original sequencer’s unsafe head. You may want to check peer counts and other important health metrics.
- Stop the original sequencer using
admin_stopSequencerwhich returns the last inserted unsafe block hash. Wait for candidate sequencer to sync with this returned hash in case there is a delta. - Start the candidate sequencer at the original’s last inserted unsafe block
hash.
- Here you can also execute additional check for unsafe head progression and decide to roll back the change (stop the candidate sequencer, start the original, rollback deployment of candidate, etc.)
- Deploy the change to the original sequencer, wait for it to sync to the chain head. Execute health checks.
Post-conductor launch deployments
After conductor is live, a similar canary style workflow is used to ensure minimal downtime in case there is an issue with deployment:- Choose a candidate sequencer from the raft-cluster followers
- Deploy to the candidate sequencer. Run health checks on the candidate.
- Transfer leadership to the candidate sequencer using
conductor_transferLeaderToServer. Run health checks on the candidate. - Test if candidate is still the leader using
conductor_leaderafter some grace period (ex: 30 seconds)- If not, then there is likely an issue with the deployment. Roll back.
- Upgrade the remaining sequencers, run healthchecks.