Official Repository for the Cyborg Network
💡 Built with Substrate.
To test the Cyborg Parachain, please refer to the instructions in this document: https://github.com/Cyborg-Network/cyborg-parachain/blob/master/Local%20Testing.md#local-setup
A Substrate-based project such as Cyborg Network consists of a number of components that are spread across a few directories.
A blockchain node is an application that allows users to participate in a blockchain network. Substrate-based blockchain nodes expose a number of capabilities:
libp2p networking stack to allow the
nodes in the network to communicate with one another.There are several files in the node directory.
Take special note of the following:
chain_spec.rs: A chain specification is a source code file that defines a Substrate chain's initial (genesis) state.
Chain specifications are useful for development and testing, and critical when architecting the launch of a production chain.
Take note of the development_config and testnet_genesis functions,.
These functions are used to define the genesis state for the local development chain configuration.
These functions identify some well-known accounts and use them to configure the blockchain's initial state.service.rs: This file defines the node implementation.
Take note of the libraries that this file imports and the names of the functions it invokes.
In particular, there are references to consensus-related topics, such as the block finalization and forks and other consensus mechanisms such as Aura for block authoring and GRANDPA for finality.cli.rs: This file defines the command-line interface that allows users to interact with the node.
Take note of the parameters that this file defines and how they are used to instantiate the node.main.rs: This file defines the main function that starts the node.
Take note of the parameters that this file passes to the service.rs file.In Substrate, the terms "runtime" and "state transition function" are analogous. Both terms refer to the core logic of the blockchain that is responsible for validating blocks and executing the state changes they define. The Substrate project in this repository uses FRAME to construct a blockchain runtime. FRAME allows runtime developers to declare domain-specific logic in modules called "pallets". At the heart of FRAME is a helpful macro language that makes it easy to create pallets and flexibly compose them to create blockchains that can address a variety of needs.
Review the FRAME runtime implementation included in this repository and note the following:
impl $PALLET_NAME::Config for Runtime.construct_runtime! macro, which is part of the core FRAME Support system library.The runtime in this project is constructed using many FRAME pallets that ship with the core Substrate repository and a template pallet that is defined in the pallets directory.
A FRAME pallet is compromised of a number of blockchain primitives:
Config configuration interface is used to define the types and parameters upon which a FRAME pallet depends.Instead of installing dependencies and building this source directly, consider the following alternatives.
Install nix, and optionally direnv and lorri for a fully plug-and-play experience for setting up the development environment.
To get all the correct dependencies, activate direnv direnv allow and lorri lorri shell.
$ claude mcp add cyborg-parachain \
-- python -m otcore.mcp_server <graph>