Axelar Amplifier setup for MultiversX
Prerequisites
- have an Axelar Validator running (node, tofnd & vald)
Become an Amplifier Verifier
For more detailed information check out the Become a Verifier Axelar docs.
You can skip this if already having an Amplifier Verifier up and running.
Set up tofnd
If running on the same machine as the Axelar Validator, the existing tofnd
can be used.
If you want to setup on a new machine, then you can setup tofnd
using Docker:
docker pull axelarnet/tofnd:v1.0.1
docker run -p 50051:50051 --env MNEMONIC_CMD=auto --env NOPASSWORD=true --env ADDRESS=0.0.0.0 -v tofnd:/.tofnd axelarnet/tofnd:v1.0.1
Set up ampd
Setup the ampd
process using Docker:
docker pull axelarnet/axelar-ampd:v1.3.1
Make sure that the ampd
process can communicate with tofnd
.
To view your Verifier address you can run: docker run axelarnet/axelar-ampd:v1.3.1 verifier-address
Configure the verifier
You need to create a configuration file at ~/.ampd/config.toml
and add the required configuration depending on your environment.
For complete configuration files for different environments, check out the Configure the verifier section in the Axelar Amplifier docs.
Example basic config.toml
for mainnet:
# replace with your Axelar mainnet node
tm_jsonrpc="http://127.0.0.1:26657"
tm_grpc="tcp://127.0.0.1:9090"
event_buffer_cap=100000
[service_registry]
cosmwasm_contract="axelar1rpj2jjrv3vpugx9ake9kgk3s2kgwt0y60wtkmcgfml5m3et0mrls6nct9m"
[broadcast]
batch_gas_limit="20000000"
broadcast_interval="1s"
chain_id="axelar-dojo-1"
gas_adjustment="2"
gas_price="0.007uaxl"
queue_cap="1000"
tx_fetch_interval="1000ms"
tx_fetch_max_retries="15"
[tofnd_config]
batch_gas_limit="10000000"
key_uid="axelar"
party_uid="ampd"
url="http://127.0.0.1:50051"
[[handlers]]
cosmwasm_contract="axelar14a4ar5jh7ue4wg28jwsspf23r8k68j7g5d6d3fsttrhp42ajn4xq6zayy5"
type="MultisigSigner"
You need to configure additional handlers
for each chain you want to support. Check out the ampd README file for more information.
Find below an example for configuring handlers for MultiversX.
Activate and run the verifier
For more information check out the Axelar docs.
Find below basic instructions for mainnet:
-
Bond your verifier:
ampd bond-verifier amplifier 50000000000 uaxl
-
Register public key:
ampd register-public-key ecdsa
ampd register-public-key ed25519
- Register support for chains for which you have configured handlers:
ampd register-chain-support amplifier flow ethereum multiversx [MORE_CHAINS]
Run the ampd
process with docker run axelarnet/axelar-ampd:v1.3.1
Add support for MultiversX to Verifier
Running a MultiversX Observing Squad
For security reasons, you will need to run your own MultiversX Observing Squad, which is a collection of nodes, one node for each MultiversX shard + the Proxy API service. This API will be used by the Verifier to get transactions from the MultiversX network in order to be able to verify them.
You can find detailed steps in the MultiversX Observing Squad docs. There exist installation scripts that making setting up an Observing Squad easy.
Below you can find basic information on how to setup a squad for mainnet:
-
Clone the
mx-chain-scripts
repo:git clone https://github.com/multiversx/mx-chain-scripts
-
Edit the
config/variables.cfg
according, for example:
ENVIRONMENT="mainnet"
...
CUSTOM_HOME="/home/ubuntu"
CUSTOM_USER="ubuntu"
-
Setup the Observing Squad:
./script.sh observing_squad
-
Start the nodes & the Proxy:
./script.sh start
Updating Verifier config.toml
file
In order to support MultiversX, first you need to add the two required handlers at the end of your ~/.ampd/config.toml
file:
Devnet
[[handlers]]
type = 'MvxMsgVerifier'
cosmwasm_contract = 'axelar1sejw0v7gmw3fv56wqr2gy00v3t23l0hwa4p084ft66e8leap9cqq9qlw4t'
# replace with your MultiversX Proxy URL
proxy_url = 'http://127.0.0.1:8079'
[[handlers]]
type = 'MvxVerifierSetVerifier'
cosmwasm_contract = 'axelar1sejw0v7gmw3fv56wqr2gy00v3t23l0hwa4p084ft66e8leap9cqq9qlw4t'
# replace with your MultiversX Proxy URL
proxy_url = 'http://127.0.0.1:8079'
Testnet
[[handlers]]
type = 'MvxMsgVerifier'
cosmwasm_contract = 'TBD'
# replace with your MultiversX Proxy URL
proxy_url = 'http://127.0.0.1:8079'
[[handlers]]
type = 'MvxVerifierSetVerifier'
cosmwasm_contract = 'TBD'
# replace with your MultiversX Proxy URL
proxy_url = 'http://127.0.0.1:8079'
Mainnet
[[handlers]]
type = 'MvxMsgVerifier'
cosmwasm_contract = 'TBD'
# replace with your MultiversX Proxy URL
proxy_url = 'http://127.0.0.1:8079'
[[handlers]]
type = 'MvxVerifierSetVerifier'
cosmwasm_contract = 'TBD'
# replace with your MultiversX Proxy URL
proxy_url = 'http://127.0.0.1:8079'
Register MultiversX chain
-
(optional) If you have not done so already, first register the
ed25519
public key:ampd register-public-key ed25519
-
Then register support for the
multiversx
chain:ampd register-chain-support amplifier multiversx
At this point you can restart the ampd
process and you should be able to validate MultiversX messages.