Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time

Sample Config






Information on all the config arguments used, their importance and how to derive them.


genesis-hash critical Optional
yes yes (but ocean defaults to test params)

Specifies the name of the chain. Chain name is important as based on this the client decides which chain parameters to use. Chain parameters differentiate in address/key prefixes and are thus crucial in generating multisig scripts for other config arguments and also when importing a private keys to full node wallets.

Currently the following hardcoded names exist (from chainparamsbase.h):

#define CHAINPARAMS_OCEAN_MAIN "ocean_main"
#define CHAINPARAMS_OCEAN_TEST "ocean_test"
#define CHAINPARAMS_GOLD_MAIN "gold_main"

Unlesss the --chain parameter is specified then the default ocean_test name is chosen.

Based on this parameter the chain params are chosen as (from chainparams.cpp):

std::unique_ptr<CChainParams> CreateChainParams(const std::string& chain)
    if (chain == CBaseChainParams::MAIN)
        return std::unique_ptr<CChainParams>(new CMainParams(chain));
    if (chain == CBaseChainParams::GOLD)
        return std::unique_ptr<CChainParams>(new CGoldParams(chain));
    return std::unique_ptr<CChainParams>(new CCustomParams(chain));

Example values:

  • for ocean main: chain=ocean_main
  • for gold mainnet: chain=gold_main
  • for gold test: chain=gold_test or any other value


Creating custom parameters requires corresponding changes to the electrum server. Configuration options for the electrum server live in cb-electrum-server/electrumx/lib/ The best practice is to override the class Ocean or OceanTestnet, depending on whether it's a mainnet chain or a testnet chain, and override the address/key prefixes (mainnet only) as well as the GENESIS_HASH.

Code change PRs:

terms and conditions

genesis-hash critical Optional
yes yes

The terms and conditions are required in the derivation of new ocean addresses, where the contract hash is used to tweak the corresponding priv/pub key (per BIP175). This hash is, for reference and validation, included in the genesis block of the chain, therefore any ocean node attempting to connect to a speficic chain that has this functionality enabled will need to have a copy of the terms and conditions in the datadir.

The terms and conditions are copied as part of building the Dockerfile but will need to be copied manually when running ocean independently. The latest contracts can be found in ocean/doc/$chain. The chain name specified above is also used as the directory name under doc to specify where the contract for each chain is stored.


For chain=ocean_main contract doc/ocean_main/latest.txt is used and so on...


The same terms and conditions will need to be used by the electrum wallet client. A public copy will be provided.

Code change PRs:


In order to generate multisig scripts and corresponding private keys a simple python script can be used.

This requires specifying number of keys, number of signatures and WIF (wallet private key format) prefix. The WIF can be found in the chosen chain parameters (named SECRET_KEY).

Current values:

  • Main Params (ocean main): 128
  • Gold Params (gold main): 180
  • Custom Params (any other chain / testnet): 239


genesis-hash critical Optional
yes yes

Script determining ownership of the issuance process.

$ ./scripts/ 2 3 180
['TdqZMPkmMEsaLyDvfxSabkr2bJTtLgGrZMNm2W86HH4qBjkFCtGy', 'TeKonFZRpCkUVxNaT8b4M3Ap3VFKgRYQTt2TjYn6mgHZZC6FaPGA', 'TmQVnMhAMHb5gzbbsV7x9rUcjZnjPJEtm9iNusFMQFDMetwLNPxK']


genesis-hash critical Optional
yes no

Script destination for free coins, required for issuance. Usually same target as issuecontrolscript. The number of free coins is specified by initialfreecoins.


genesis-hash critical Optional
yes yes

Script destination for freezelist coins, required if freezelist is enabled (option -freezelist=1).


genesis-hash critical Optional
yes yes

Script destination for burnlist coins, required if burnlist is enabled (option -burnlist=1).


genesis-hash critical Optional
yes yes

Script destination for public key hash whitlelist coins, required if whitelist is enabled (option -pkhwhitelist=1).


genesis-hash critical Optional
yes no

Script destination for all sidechain fees. Coinbase transaction of each new block pays all fees to this script.

$ ./scripts/ 1 1 180


genesis-hash critical Optional
yes no

The signblock script is responsible for block generation in the chain. On non-HSM chains a similar approach to the other scripts should be used.

For HSM chains the Dockerfile can be used to generate keys and provide the multisig script. This Dockerfile requires providing appropriate config/secrets for the HSM.

docker build --build-arg user_pin=$USER_PIN --build-arg key_label=$KEY_LABEL -f Dockerfile.hsm.init .
script: 532103041f9d9edc4e494b07eec7d3f36cedd4b2cfbb6fe038b6efaa5f56b9636abd7b21037c06b0c66c98468d64bb43aff91a65c0a576113d8d978c3af191e38845ae5dab21031bd16518d76451e7cf13f64087e4ae4816d08ae1d579fa6c172dcfe4476bd7da210226c839b56b99af781bbb4ce14365744253ae75ffe6f9182dd7b0df95c439537a21023cd2fc00c9cb185b4c0da16a45a1039e16709a61fb22340645790b7d1391b66055ae


genesis-hash critical Optional
yes yes

Wether to enforce whitelisting rules at this node. Set to pkhwhiteliist=1 for signing nodes is whitelisting is to be used.


genesis-hash critical Optional
no yes

Wether to scan the blockchain for whitelisted addresses and KYC public keys. pkhwhitelist-scan=1 is required for all client nodes for used to transact on the blockchain or whitelist new addresses if the signing nodes enforce whitelisting rules.


genesis-hash critical Optional
no yes

Rescan the blockchain for wallet addresses when restarting nodes, or adding new private keys to the wallet. Set rescan=1 for all nodes in the network using either pkhwhitelist=1 or pkhwhitelist-scan=1.


genesis-hash critical Optional
no yes

Rescan the UTXO set when restarting nodes. Set reindex=1 for all nodes in the network using either pkhwhitelist=1 or pkhwhitelist-scan=1.


genesis-hash critical Optional
yes no (if using Mainstay)

Reference to a transaction id hash in the mainstay staychain. Either first/latest staychain hash or the hash at which our chain genesis was committed.