Skip to content

Latest commit

 

History

History
107 lines (83 loc) · 5.15 KB

README.md

File metadata and controls

107 lines (83 loc) · 5.15 KB

logo


deBridge — cross-chain interoperability and liquidity transfer protocol that allows the truly decentralized transfer of data and assets between various blockchains. deBridge protocol is an infrastructure platform and a hooking service which aims to become a standard for:

  • cross-chain composability of smart contracts
  • cross-chain swaps
  • bridging of any arbitrary asset
  • interoperability and bridging of NFTs

More information about the project can be also found in the documentation portal

deBridge node is a software that is run by deBridge validators who were elected by the protocol governance and perform validation of all cross-chain transactions passed through the protocol. All active validators are listening for events emitted by transactions that pass through deBridge smart contract and once an event achieves its finality validator signs the unique id of the event by private key and stores signature to Orbitdb - public IPFS database. In order to have transaction executed in the target chain user or arbitrary keeper needs to collect minimal required signatures of deBridge validators from IPFS and pass them alongside all transaction parameters to the deBridge smart contract in the target chain. The smart contract will validate all signatures and execute message/data passed in the transaction

In order to set up the validation node, the following steps should be performed:

Install prerequisite packages on your server:

  1. docker - https://docs.docker.com/engine/install/ubuntu/
  2. docker-compose - https://docs.docker.com/compose/install/
  3. nodejs - https://github.com/nodesource/distributions/blob/master/README.md
  4. psql sudo apt-get install postgresql-client

Check that your version of docker-compose not older than

docker-compose --version
docker-compose version 1.29.2

Set up the blockchain infrastructure:

  1. Install full mainnet nodes
  1. Update configs

    1. Make a copy of the default config:
    cp ./config/chains_config_default.json ./config/chains_config.json
    1. Update HTTP RPC URL in /config/chains_config.json (solana config needs no change)
  2. Copy .default.env file and rename it to .env. Change default POSTGRES_PASSWORD, POSTGRES_USER credentials in .env file. During the first run (point 9) Postgres database will be automatically created with these credentials. deBridge node has an embedded API through which node operator can authorize, query last scanned blocks, or rescan blockchain from the specific block. By default deBridge node is deployed on DEBRIDGE_NODE_PORT from .env file. Update JWT_SECRET, API_LOGIN, API_PASSWORD to randomly generated ones. If you use sentry to track any errors of the node, please update SENTRY_DSN/SOLANA_DATA_READER_API_SENTRY_DSN at .env file. Set DEBRIDGE_PK, SETTINGS_PK in .env (ask deBridge team to get mainnet programs addresses) Set SOLANA_RPC in .env to your solana RPC Set API_BASE_URL (ask deBridge team to get mainnet URL)

  3. Create a keystore file for the validation node. Script from generate-keystore folder can be used. To start generating new keystore info:

  • npm i
  • node index.js

The script will show the newly generated Ethereum address, private key, password for keystore, and keystore info. Copy password to .env KEYSTORE_PASSWORD, keystore info to /secrets/keystore.json

  1. Put the keystore file under secrets/keystore.json.
  2. Paste the password from keystore file into KEYSTORE_PASSWORD field of .env file
  3. Contact deBridge team to make your wallet address to be whitelisted by deBridge governance
  4. Run the command docker-compose up --build -d.
  5. If there is a need to start multiple instances of the node (e.g. one for testnet and one for mainnet) on one server you can:
  • checkout or copy repo to the new directory
  • change DOCKER_ID variable in .env
  • start as described above

Update debridge node to the latest version

# Get latest changes from git
git pull

# Run debridge node
docker-compose up -d --remove-orphans

Miscellaneous

Connect to the database(if you use docker-compose):

docker exec -it $(docker-compose ps | grep postgres | awk '{print $1}') psql -v ON_ERROR_STOP=1 --username postgres -d $DATABASE_NAME

Mandatory monitorings

  1. Basic monitoring of the server/virtual machine(CPU, memory, disk space).
  2. Availability check:
  • each of the full nodes(heco, bsc, etc). It is also good to check the synchronization status
  • database
  • deBridge node
  1. It's recommended to check docker-compose logs for ERROR