Become an Amplifier Verifier

πŸ’‘

The Axelar Virtual Machine (AVM) and Amplifier are currently under active development, so these instructions are likely to change. Please check back frequently for updates.

By running a verifier for a chain integration with Axelar’s Amplifier, you will be responsible for voting on the validity of transactions on the Axelar network and signing command batches for a given chain.

tofnd and ampd

A verifier uses ampd, an off-chain daemon responsible for voting and signing with the Amplifier protocol, and tofnd, a threshold cryptography library that ampd depends on.

There are three ways to set up and run a verifier:

  • Option 1: Source β€” Clone and build directly from the GitHub source code.
  • Option 2: Binaries β€” This method requires you to install and run the tofnd and ampd binaries on your local machine.
  • Option 3: Docker β€” Use Docker to set up tofnd and ampd.

Set up tofnd

ampd needs access to a locally running tofnd instance in order to onboard as a verifier or run the daemon. See the tofnd repository for more information.

Install tofnd from source by cloning and building the tofnd repository.

git clone git@github.com:axelarnetwork/tofnd.git --recursive
cd tofnd
cargo build --release --locked

This will create a binary in the target/release directory. You can move this binary to a location in your PATH or run it directly from the target/release directory.

Create a default mnemonic and configuration in ~/.tofnd/, then back it up and delete it.

tofnd -m create
mv ~/.tofnd/export ~/.tofnd/export-new-location

Now run tofnd.

tofnd

Download the tofnd binary depending on the type of machine you have:

Create a default mnemonic and configuration in ~/.tofnd/, then back it up and delete it.

~/Downloads/tofnd*-v1.0.1 -m create
mv ~/.tofnd/export ~/.tofnd/export-new-location

Now run tofnd.

tofnd

Pull and run the latest version of tofnd from 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

Leave this process running in the background, and perform additional commands in a new terminal window or shell.

Set up ampd

Install ampd from source by cloning and building the axelar-amplifier repository.

Download the ampd binary depending on the type of machine you have:

From Docker, pull and run the 1.2.0 version of ampd:

docker pull axelarnet/axelar-ampd:v1.2.0
docker run axelarnet/axelar-ampd:v1.2.0 verifier-address
πŸ’‘

The address for your verifier node will also be the address that rewards are sent to (this will change in the future). You should make sure to claim and move any available rewards regularly to mitigate any associated risks.

Add ampd to your PATH

This will allow you to begin commands with ampd. If you set up ampd through source or Docker, you can skip this step.

  1. Add a symbolic link named ampd in your binaries folder.:

    sudo ln -s ~/Downloads/ampd-*-v1.2.0 /usr/local/bin/ampd
    
  2. Make the binary executable:

    chmod a+x ~/Downloads/ampd-*-v*
    
  3. Restart your terminal.

  4. Run ampd --version to make sure that the right version of ampd is being used. It should be 1.2.0.

πŸ’‘

Replace ampd-darwin-arm64-v1.2.0 with the ampd binary you downloaded.

  1. Add an alias to ampd at the end of the .bashrc file on your machine:

    echo "ampd=~/Downloads/ampd-darwin-arm64-v1.2.0" >> ~/.bashrc
    
  2. Save and close the file.

  3. Reload the file to apply all changes:

    source ~/.bashrc
    
  4. Restart your terminal.

  5. Run ampd --version to make sure that the right version of ampd was installed on your machine. It should be 1.2.0.

πŸ’‘

Replace ampd-darwin-arm64-v1.2.0 with the ampd binary you downloaded.

  1. Add an alias to ampd at the end of the .zshrc file on your machine:

    echo "ampd=~/Downloads/ampd-darwin-arm64-v1.2.0" >> ~/.zshrc
    
  2. Save and close the file.

  3. Reload the file to apply all changes:

    source ~/.zshrc
    
  4. Restart your terminal.

  5. Run ampd --version to make sure that the right version of ampd was installed on your machine. It should be 1.2.0.

Configure the verifier

Create an ampd configuration file at ~/.ampd/config.toml.

This configuration file tells ampd how to connect to your local tofnd, how to talk to the devnet and the Amplifier smart contracts, and includes a default configuration for verifying transactions on the Avalanche testnet.

The following are an example config.toml files:

tm_jsonrpc="http://devnet-amplifier.axelar.dev:26657"
tm_grpc="tcp://devnet-amplifier.axelar.dev:9090"
event_buffer_cap=10000

[service_registry]
cosmwasm_contract="axelar1c9fkszt5lq34vvvlat3fxj6yv7ejtqapz04e97vtc9m5z9cwnamq8zjlhz"

[broadcast]
batch_gas_limit="20000000"
broadcast_interval="1s"
chain_id="devnet-amplifier"
gas_adjustment="2"
gas_price="0.00005uamplifier"
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="axelar19jxy26z0qnnspa45y5nru0l5rmy9d637z5km2ndjxthfxf5qaswst9290r"
type="MultisigSigner"

[[handlers]]
chain_name="ethereum-sepolia"
chain_rpc_url="https://rpc.ankr.com/eth_sepolia"
cosmwasm_contract="axelar1e6jnuljng6aljk0tjct6f0hl9tye6l0n9p067pwx2374h82dmr0s9qcqy9"
type="EvmMsgVerifier"
chain_finalization="RPCFinalizedBlock"

[[handlers]]
chain_name="ethereum-sepolia"
chain_rpc_url="https://rpc.ankr.com/eth_sepolia"
cosmwasm_contract="axelar1e6jnuljng6aljk0tjct6f0hl9tye6l0n9p067pwx2374h82dmr0s9qcqy9"
type="EvmVerifierSetVerifier"

[[handlers]]
chain_name="avalanche"
chain_rpc_url="https://avalanche-fuji-c-chain-rpc.publicnode.com"
cosmwasm_contract="axelar1ty7mx0cllgz8xuvhn2j7e3qy8999ssgmjtktyqetl335em0g88lq6rjhl2"
type="EvmMsgVerifier"
chain_finalization="RPCFinalizedBlock"

[[handlers]]
chain_name="avalanche"
chain_rpc_url="https://avalanche-fuji-c-chain-rpc.publicnode.com"
cosmwasm_contract="axelar1ty7mx0cllgz8xuvhn2j7e3qy8999ssgmjtktyqetl335em0g88lq6rjhl2"
type="EvmVerifierSetVerifier"
# replace with your Axelar testnet 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-testnet-lisbon-3"
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"

[[handlers]]
chain_name="test-sepolia"
chain_rpc_url="https://rpc.ankr.com/eth_sepolia"
cosmwasm_contract="axelar1r4rmvn83vrfj4evy5l8cv2nat2v0whm36ds3crn2mhlq8ufmhvts9467zz"
chain_finalization="RPCFinalizedBlock"
type="EvmMsgVerifier"

[[handlers]]
chain_name="test-sepolia"
chain_rpc_url="https://rpc.ankr.com/eth_sepolia"
cosmwasm_contract="axelar1r4rmvn83vrfj4evy5l8cv2nat2v0whm36ds3crn2mhlq8ufmhvts9467zz"
chain_finalization="RPCFinalizedBlock"
type="EvmVerifierSetVerifier"

[[handlers]]
chain_name="test-avalanche"
chain_rpc_url="https://api.avax-test.network/ext/bc/C/rpc"
cosmwasm_contract="axelar1hupk5du59cgu4ps5s637rhakwsq0060ycdp57j2ccevna7wqqzrqnfrr0p"
chain_finalization="ConfirmationHeight"
type="EvmMsgVerifier"

[[handlers]]
chain_name="test-avalanche"
chain_rpc_url="https://api.avax-test.network/ext/bc/C/rpc"
cosmwasm_contract="axelar1hupk5du59cgu4ps5s637rhakwsq0060ycdp57j2ccevna7wqqzrqnfrr0p"
chain_finalization="ConfirmationHeight"
type="EvmVerifierSetVerifier"

[[handlers]]
chain_name="flow"
chain_rpc_url="[flow gateway rpc url]"
cosmwasm_contract="axelar1kkqdsqvwq9a7p9fj0w89wpx2m2t0vrxl782aslhq0kdw2xxd2aesv3un04"
chain_finalization="RPCFinalizedBlock"
type="EvmMsgVerifier"

[[handlers]]
chain_name="flow"
chain_rpc_url="[flow gateway rpc url]"
cosmwasm_contract="axelar1kkqdsqvwq9a7p9fj0w89wpx2m2t0vrxl782aslhq0kdw2xxd2aesv3un04"
chain_finalization="RPCFinalizedBlock"
type="EvmVerifierSetVerifier"

# For each supported chain
#[[handlers]]
#chain_name="[chain name]"
#chain_rpc_url="[node rpc url]"
#cosmwasm_contract="[voting verifier address]"
#chain_finalization="[RPCFinalizedBlock or ConfirmationHeight]"
#type="EvmMsgVerifier"

#[[handlers]]
#chain_name="[chain name]"
#chain_rpc_url="[node rpc url]"
#cosmwasm_contract="[voting verifier address]"
#chain_finalization=["RPCFinalizedBlock" or "ConfirmationHeight"]
#type="EvmVerifierSetVerifier"
# 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"

[[handlers]]
chain_name="flow"
chain_rpc_url="[flow gateway rpc url]"
cosmwasm_contract="axelar1kkqdsqvwq9a7p9fj0w89wpx2m2t0vrxl782aslhq0kdw2xxd2aesv3un04"
chain_finalization="RPCFinalizedBlock"
type="EvmMsgVerifier"

[[handlers]]
chain_name="flow"
chain_rpc_url="[flow gateway rpc url]"
cosmwasm_contract="axelar1kkqdsqvwq9a7p9fj0w89wpx2m2t0vrxl782aslhq0kdw2xxd2aesv3un04"
chain_finalization="RPCFinalizedBlock"
type="EvmVerifierSetVerifier"

# For each supported chain
#[[handlers]]
#chain_name="[chain name]"
#chain_rpc_url="[node rpc url]"
#cosmwasm_contract="[voting verifier address]"
#chain_finalization="[RPCFinalizedBlock or ConfirmationHeight]"
#type="EvmMsgVerifier"

#[[handlers]]
#chain_name="[chain name]"
#chain_rpc_url="[node rpc url]"
#cosmwasm_contract="[voting verifier address]"
#chain_finalization=["RPCFinalizedBlock" or "ConfirmationHeight"]
#type="EvmVerifierSetVerifier"

See the ampd README on GitHub for instructions on formatting a config file for your own projects. For chain_finalization, if the chain supports the finalized tag via the RPC API, choose RPCFinalizedBlock, otherwise choose ConfirmationHeight.

πŸ’‘

If you get a transport error with an ampd command, make sure that you have tofnd running in the background.

Fund your wallet

Prior to running the ampd daemon, you will need to set up your wallet with devnet funds.

  1. Determine your verifier address:

    ampd verifier-address
    
    πŸ’‘

    If you get a security warning while trying to run ampd on an Apple Silicon Mac, you can disable the gatekeeper for a single binary with sudo xattr -d com.apple.quarantine ~/Downloads/ampd-darwin-arm64-v1.2.0 or disable gatekeeper globally with sudo spctl --master-disable.

  2. Fund your verifier address.

    1. Fill out the Amplifier Verifier Onboarding Form for your address to be whitelisted or to receive funds.

Activate and run the verifier

  1. Bond your verifier:

    ampd bond-verifier amplifier 100000000000 uaxl
    

    Bonded verifiers will stay bonded until they unbond or are removed by governance. The bond for testnet is 100000000000uaxl (100k AXL). The bond for mainnet is 50000000000uaxl (50k AXL).

  2. Register your public key with ecdsa or ed25519:

    ampd register-public-key ecdsa
    
  3. Register support for desired chains, enabling ampd to participate in voting and signing for your supported chains.

    ampd register-chain-support amplifier flow
    

    Multiple chain names can be passed, separated by a space (ampd register-chain-support [service name] [chains]...). Note that any chain you want to support here must be configured in your ampd config.toml file.

  4. Authorize your verifier.

    This is dependent on the environment, and can be done via governance, or by the network operators.

  5. Run the ampd daemon.

    Running ampd without any command will run the daemon.

Productionizing

As you move towards testnet and mainnet, you should switch to running your own full Axelar node and your own full node or light client for any chains you are voting on.

Help

For more info about the available commands and options, run:

ampd --help

Feedback

If you have any feedback or would like to report a bug, please file an issue in the Axelar Developer Support repository.

Edit this page