> ## Documentation Index
> Fetch the complete documentation index at: https://docs.optimism.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration and RPCs

> Reference for op-conductor configuration flags, environment variables, and conductor namespace RPC methods.

This page catalogues op-conductor's configuration options and its admin RPC
methods. For how the service works, see
[OP Conductor](/chain-operators/tools/op-conductor); to add it to a running
network, follow the [setup guide](/chain-operators/tools/op-conductor/setup).

## Configuration options

It is configured via its [flags / environment variables](https://github.com/ethereum-optimism/optimism/blob/develop/op-conductor/flags/flags.go)

### --consensus.addr (`CONSENSUS_ADDR`)

* **Usage:** Address to listen for consensus connections
* **Default Value:** 127.0.0.1
* **Required:** yes

### --consensus.advertised (`CONSENSUS_ADVERTISED`)

* **Usage:** Address to advertise for consensus connections
* **Default Value:** 127.0.0.1
* **Required:** yes

### --consensus.port (`CONSENSUS_PORT`)

* **Usage:** Port to listen for consensus connections
* **Default Value:** 50050
* **Required:** yes

### --raft.bootstrap (`RAFT_BOOTSTRAP`)

<Info>
  For bootstrapping a new cluster. This should only be used on the sequencer
  that is currently active and can only be started once with this flag,
  otherwise the flag has to be removed or the raft log must be deleted before
  re-bootstrapping the cluster.
</Info>

* **Usage:** If this node should bootstrap a new raft cluster
* **Default Value:** false
* **Required:** no

### --raft.server.id (`RAFT_SERVER_ID`)

* **Usage:** Unique ID for this server used by raft consensus
* **Default Value:** None specified
* **Required:** yes

### --raft.storage.dir (`RAFT_STORAGE_DIR`)

* **Usage:** Directory to store raft data
* **Default Value:** None specified
* **Required:** yes

### --node.rpc (`NODE_RPC`)

* **Usage:** HTTP provider URL for op-node
* **Default Value:** None specified
* **Required:** yes

### --execution.rpc (`EXECUTION_RPC`)

* **Usage:** HTTP provider URL for execution layer
* **Default Value:** None specified
* **Required:** yes

### --healthcheck.interval (`HEALTHCHECK_INTERVAL`)

* **Usage:** Interval between health checks
* **Default Value:** None specified
* **Required:** yes

### --healthcheck.unsafe-interval (`HEALTHCHECK_UNSAFE_INTERVAL`)

* **Usage:** Interval allowed between unsafe head and now measured in seconds
* **Default Value:** None specified
* **Required:** yes

### --healthcheck.safe-enabled (`HEALTHCHECK_SAFE_ENABLED`)

* **Usage:** Whether to enable safe head progression checks
* **Default Value:** false
* **Required:** no

### --healthcheck.safe-interval (`HEALTHCHECK_SAFE_INTERVAL`)

* **Usage:** Interval between safe head progression measured in seconds
* **Default Value:** 1200
* **Required:** no

### --healthcheck.min-peer-count (`HEALTHCHECK_MIN_PEER_COUNT`)

* **Usage:** Minimum number of peers required to be considered healthy
* **Default Value:** None specified
* **Required:** yes

### --paused (`PAUSED`)

<Info>
  There is no configuration state, so if you unpause via RPC and then restart,
  it will start paused again.
</Info>

* **Usage:** Whether the conductor is paused
* **Default Value:** false
* **Required:** no

### --rpc.enable-proxy (`RPC_ENABLE_PROXY`)

* **Usage:** Enable the RPC proxy to underlying sequencer services
* **Default Value:** true
* **Required:** no

## RPCs

Conductor exposes [admin RPCs](https://github.com/ethereum-optimism/optimism/blob/develop/op-conductor/rpc/api.go#L17)
on the `conductor` namespace.

### conductor\_overrideLeader

`OverrideLeader` is used to override the leader status, this is only used to
return true for `Leader()` & `LeaderWithID()` calls. It does not impact the
actual raft consensus leadership status. It is supposed to be used when the
cluster is unhealthy and the node is the only one up, to allow batcher to
be able to connect to the node so that it could download blocks from the
manually started sequencer.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_overrideLeader","params":[],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_overrideLeader --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_pause

`Pause` pauses op-conductor.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_pause","params":[],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_pause --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_resume

`Resume` resumes op-conductor.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_resume","params":[],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_resume --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_paused

Paused returns true if the op-conductor is paused.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_paused","params":[],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_paused --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_stopped

Stopped returns true if the op-conductor is stopped.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_stopped","params":[],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_stopped --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_sequencerHealthy

SequencerHealthy returns true if the sequencer is healthy.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_sequencerHealthy","params":[],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_sequencerHealthy --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_leader

<Info>
  API related to consensus.
</Info>

Leader returns true if the server is the leader.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_leader","params":[],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_leader --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_leaderWithID

<Info>
  API related to consensus.
</Info>

LeaderWithID returns the current leader's server info.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_leaderWithID","params":[],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_leaderWithID --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_addServerAsVoter

<Info>
  API related to consensus.
</Info>

AddServerAsVoter adds a server as a voter to the cluster.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_addServerAsVoter","params":[<raft-server-id>, <raft-consensus-addr>, <raft-config-version>],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_addServerAsVoter <raft-server-id> <raft-consensus-addr> <raft-config-version> --rpc-url http://127.0.0.1:8547 
    ```
  </Tab>
</Tabs>

### conductor\_addServerAsNonvoter

<Info>
  API related to consensus.
</Info>

AddServerAsNonvoter adds a server as a non-voter to the cluster. non-voter
The non-voter will not participate in the leader election.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_addServerAsNonvoter","params":[<raft-server-id>, <raft-consensus-addr>, <raft-config-version>],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_addServerAsNonvoter <raft-server-id> <raft-consensus-addr> <raft-config-version> --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_removeServer

<Info>
  API related to consensus.
</Info>

RemoveServer removes a server from the cluster.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_removeServer","params":[<raft-server-id>, <raft-config-version>],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_removeServer <raft-server-id> <raft-config-version> --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_transferLeader

<Info>
  API related to consensus.
</Info>

TransferLeader transfers leadership to another server (resigns).

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_transferLeader","params":[],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_transferLeader --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_transferLeaderToServer

<Info>
  API related to consensus.
</Info>

TransferLeaderToServer transfers leadership to a specific server.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_transferLeaderToServer","params":[<raft-server-id>, <raft-consensus-addr>, <raft-config-version>],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_transferLeaderToServer <raft-server-id> <raft-consensus-addr> <raft-config-version> --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_clusterMembership

ClusterMembership returns the current cluster membership configuration.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_clusterMembership","params":[],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_clusterMembership --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_active

<Info>
  API called by `op-node`.
</Info>

Active returns true if the op-conductor is active (not paused or stopped).

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_active","params":[],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    cast rpc conductor_active --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>

### conductor\_commitUnsafePayload

<Info>
  API called by `op-node`.
</Info>

CommitUnsafePayload commits an unsafe payload (latest head) to the consensus
layer. This method is typically called by the op-node to commit execution payload envelopes.

<Tabs>
  <Tab title="curl">
    ```sh theme={null}
    curl -X POST -H "Content-Type: application/json" --data \
        '{"jsonrpc":"2.0","method":"conductor_commitUnsafePayload","params":[{
            "executionPayload": {
                "parentHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
                "feeRecipient": "0x4200000000000000000000000000000000000019",
                "stateRoot": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
                "receiptsRoot": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
                "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
                "prevRandao": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
                "blockNumber": "0x64",
                "gasLimit": "0x1c9c380",
                "gasUsed": "0x5208",
                "timestamp": "0x12345678",
                "extraData": "0x",
                "baseFeePerGas": "0x7",
                "blockHash": "0x9876543210fedcba9876543210fedcba9876543210fedcba9876543210fedcba",
                "transactions": []
            }
        }],"id":1}'  \
        http://127.0.0.1:8547
    ```
  </Tab>

  <Tab title="cast">
    ```sh theme={null}
    # Example with basic payload structure
    cast rpc conductor_commitUnsafePayload \
        '{"executionPayload":{"parentHash":"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","feeRecipient":"0x4200000000000000000000000000000000000019","stateRoot":"0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890","receiptsRoot":"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","prevRandao":"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","blockNumber":"0x64","gasLimit":"0x1c9c380","gasUsed":"0x5208","timestamp":"0x12345678","extraData":"0x","baseFeePerGas":"0x7","blockHash":"0x9876543210fedcba9876543210fedcba9876543210fedcba9876543210fedcba","transactions":[]}}' \
        --rpc-url http://127.0.0.1:8547
    ```
  </Tab>
</Tabs>
