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 Bundlr. 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:
- docker - https://docs.docker.com/engine/install/ubuntu/
- docker-compose - https://docs.docker.com/compose/install/
- nodejs - https://github.com/nodesource/distributions/blob/master/README.md
- psql
sudo apt-get install postgresql-client
docker-compose --version
docker-compose version 1.29.2
- Install full mainnet nodes
-
Update configs
- Make a copy of the default config:
cp ./config/chains_config_default.json ./config/chains_config.json
- Update HTTP RPC URL in /config/chains_config.json (solana config needs no change)
-
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) -
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
- Put the keystore file under
secrets/keystore.json
. - Paste the password from
keystore
file into KEYSTORE_PASSWORD field of .env file - Contact deBridge team to make your wallet address to be whitelisted by deBridge governance
- Run the command
docker-compose up --build -d
. - 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
- debridge_node allow to save signatures in the arweave. To enable this feature need to generate arweave wallet and fill balance. Generate arweave wallet
cd generate-arweave-wallet
npm i
node index.js
Copy private key to secrets/bundlr_wallet.json
# Get latest changes from git
git pull
# Run debridge node
docker-compose up -d --remove-orphans
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
- Basic monitoring of the server/virtual machine(CPU, memory, disk space).
- Availability check:
- each of the full nodes(heco, bsc, etc). It is also good to check the synchronization status
- database
- deBridge node
- It's recommended to check
docker-compose logs
for ERROR