Set Up an EVM Sidechain

Attention

The XRPL EVM compatible sidechain implementation is a proof of concept extension to the XRP Ledger protocol and is for development purposes only. There is no official amendment currently and it is not available on the production Mainnet. The EVM compatible sidechain bridge is connected to the XRP Ledger Devnet. Do not send transactions in Mainnet.

You can set up an EVM sidechain using the blockchain create command.

Create a Config File

Create a JSON config file in this format:

{
    "chainId": "1440002",
    "nodes": 3,
    "extraAccounts": [],
    "safe": {
        "owners": [
            "0x96329A50d10a3F69311E4f4E108672926c51c474"
        ],
        "quorum": 1
    }
}
KeyValue TypeRequiredDescriptionExample
chainIdstringYesThe chain ID of the EVM sidechain.1440001
nodesnumber
array
YesThe amount and configuration of nodes.3
[{name: "node-0", host: "node-0.peersyst.tech"}]
nodes[].namestringYesThe public name of the node."node-0"
nodes[].hoststringYesThe node host IP or DNS."node-0.peersyst.tech"
extraAccountsarrayYesA set of accounts with reserve balances in the genesis.[{ address: "0x0000000000000000000000000000000000000000", balance: 500 }]
extraAccounts[].addressstringYesAddresses of the reserve accounts."0x0000000000000000000000000000000000000000"
extraAccounts[].balancenumberYesThe amount reserved.500
genesisConfigobjectNoGeneral genesis paramater configuration.
genesisConfig.bondingTimeInSecondsnumberNoThe number of seconds needed to unbound PoA power.172800
genesisConfig.minDepositstringNoThe minimum deposit for a governance proposal."1000000000000000000axrp"
safeobjectYesConfiguration of the safe contract that holds all the issuing XRP.
safe.ownersarrayYesThe safe owner addresses.["0x0000000000000000000000000000000000000000"]
safe.quorumnumberYesThe number of signatures required to run an operation in the safe.1

Create the Blockchain

Note: By default, all node keys are created using the test keyring. If you want to deploy the network, you need to use the file keyring with a password to encrypt the node keys. Specify the PASSWORD env variable:

export PASSWORD=mysupersecurepassword

Run the blockchain create command and specify where to export all the blockchain data.

evmcli blockchain create -c create-config.json -e $PWD/data

Run the Network Locally

The blockchain create command creates a docker-compose.yml file that you can use to run the network locally. Run this command inside your exported data folder:

docker-compose up -d