How to Set Up and Contribute to Connext Monorepo

Dec 24, 2021 | Blockchain

Welcome to the Connext Monorepo guide! This article will walk you through the necessary steps to set up Connext on your local environment, provide insights into its architecture, and help you contribute to this exciting project.

About Connext

Connext is a public infrastructure that powers fast, trust-minimized communication between blockchains. It serves as a modular stack for generalized communication, aiming to enhance connectivity in the blockchain ecosystem.

Useful Links:

Understanding Connext Architecture

To understand Connext’s architecture, let’s imagine it as a well-organized library. In this library:

  • Application Layer: The section where all crosschain applications (xApps) and SDKs are located, just like the fiction section in a library where all the storybooks are kept.
  • Liquidity Layer: The routers and sequencers are akin to the librarians who help you find the right book (transaction) in the library.
  • Messaging – Execution Layer: Think of this as the reading room where books are transported and read (executed).
  • Messaging – Verification Layer: Just like reviewers who verify if the content of books is accurate.
  • Messaging – Transport Layer: The book transportation system that ensures the text reaches its destination – AMBs.

Getting Started

Prerequisites

Ensure that you have Node version 18.x installed and that you are using the latest version of Yarn:

yarn set version berry

Installation

To set up the necessary containers, make sure you have Docker installed on your system. You can install it by visiting Docker’s official site. Follow these steps to initialize:

yarn
yarn build:all

This setup will install dependencies, create symlinks, and build all packages automatically.

Running Services

To initiate RabbitMQ with the management plugin using Docker, run this command:

docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.10-management

For Redis, execute:

docker run -it --rm --name redis -p 6379:6379 redis

Running Tests

Once your environment is set, run the tests using:

yarn workspace @connext/smart-contracts test

Adding New Packages

To add a new package that can be shared throughout the repo, use the following command:

yarn tsp create @connext/test-lib --template node-lib

Publishing Packages

To publish your packages:

  1. Update the CHANGELOG.md
  2. Run yarn version:all X.X.X where X.X.X is the version you want.
  3. Commit your changes and tag the version:
    git commit -am version
    git tag -am version
  4. Push your changes:
    git push --follow-tags

Contributing to Connext

We welcome contributions! Here’s how you can contribute:

  1. Fork the Project
  2. Create your Feature Branch:
    git checkout -b feature/AmazingFeature
  3. Commit your Changes:
    git commit -m "Add some AmazingFeature"
  4. Push to the Branch:
    git push origin feature/AmazingFeature
  5. Open a Pull Request

Troubleshooting

If you encounter issues during setup, here are some troubleshooting tips:

  • Ensure your Node version is correct (18.x) and that Yarn is updated.
  • If you face problems after running Yarn, try deleting node_modules and yarn.lock. Follow it with:
  • touch yarn.lock
  • Check that Docker is installed and the container commands run successfully.

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

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