How to Build and Run the Axelar-Core Application

Mar 21, 2024 | Blockchain

Welcome to our step-by-step guide on how to build and run the Axelar-Core application based on the Cosmos SDK. This article will help you set up the necessary binaries and Docker images to run a core node in the Axelar network. So, let’s dive right in!

Step 1: Building the Axelard Binary

To get started with building the Axelard binary, follow these simple steps:

  1. Checkout the Release Tag: For a release build, begin by checking out the release tag. Use the following command:
  2. git checkout vX.Y.Z
  3. Build the Binary: Once in the correct version, execute the build command:
  4. make build
  5. The above command will create the Axelard binary which will be placed in the .bin folder.

Step 2: Creating Docker Images

To create Docker images for the node, follow these steps:

  • Regular Docker Image: Execute the following command to create the regular Docker image:
  • make docker-image
  • This will generate an image named axelarcore:latest.
  • Debug Docker Image: If you need a debugging image, run:
  • make docker-image-debug
  • This command will create the axelarcore-debug:latest image using delve as the debugger.

Step 3: Handling Smart Contract Dependencies

To run or build the project locally, you must manage smart contract bytecodes:

  1. Identify the required version of the bytecode from contract-version.json.
  2. Download that version from the Axelar CGP Solidity releases.
  3. Unzip the JSON files found under contract-artifacts.
  4. Execute:
  5. make generate
  6. This will generate the xevmtypescontracts.go file.

Step 4: Downloading and Verifying the Binary

Before you interact with the Axelar network, you need to make sure you have the correct axelard binary:

  1. Download the Binary and Signature File: Navigate to the Axelar Core releases page and download both the axelard binary and the corresponding .asc signature file.
  2. Import Axelar’s Public Key: Run the following command to import the public key:
  3. curl https://keybase.io/axelardev/pgp_keys.asc | gpg --import
  4. Trust the Imported Key: Enter GPG interactive mode using:
  5. gpg --edit-key 5D9FFADEED11FA5D
  6. Type trust and select option 5 to trust ultimately.
  7. Verify the Binary: Execute the following command, replacing the version as needed:
  8. gpg --verify axelard-darwin-amd64-v0.34.3.asc axelard-darwin-amd64-v0.34.3
  9. You should see a message indicating a good signature like: Good signature from Axelar Network Devs eng@axelar.network [ultimate].

Step 5: Interacting with Your Local Node

With a local node running, you can now interact using the axelard binary:

./bin/axelard

Or for help on available commands, use:

./bin/axelard --help

Step 6: Show API Documentation

To host a local godoc server, ensure you have installed it:

GO111MODULE=off go install -u golang.org/x/tools/cmd/godoc

To run the server:

godoc -http :8080 -index

The documentation will be hosted at http://localhost:8080/pkg/github.com/axelarnetwork/axelar-core.

Step 7: Checking CLI Command Documentation

For a detailed list of available CLI commands for axelard, you can find it here.

Step 8: Installing Developer Tools

To set up development tool dependencies such as moq and goimports, run:

make prereqs

Make sure these tools are available on your PATH.

Troubleshooting

If you encounter issues during any of these steps:

  • Missing Commands: Ensure that all necessary tools are installed and available in your PATH.
  • Signature Verification Failure: Double-check that you’re using the correct public key and docker images.
  • Docker Issues: If the Docker images fail to build, ensure your Docker installation is healthy and up-to-date.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

Building the axelar-core app empowers you to engage more effectively with the Axelar network, paving the way for innovative development in smart contracts. At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox