How humanode-network/humanode works
Main components of the system
• Node/Peer Component: Represented by the “humanode-peer” crate. This is the entry point that launches the node process (via the CLI) and integrates with the consensus and networking layers.
• Blockchain Runtime: The “humanode-runtime” crate contains runtime logic, state transition functions, and the definitions of various on-chain modules (pallets). Also include the assorted pallets (for bioauth, currency swaps, vesting, token claims, bootnodes, etc.) as subcomponents.
• RPC/API Layer: The “humanode-rpc” crate provides an API layer exposing node functionalities to external clients. It covers standard RPC endpoints and custom endpoints related to bioauth, cryptography, and other blockchain operations.
• Supporting and Utility Crates: There are many crates providing cryptographic utilities (crypto-utils, eip191-crypto, eip712-*), key management, and precompiled contracts (precompile-bioauth, precompile-native-currency, etc.), which are essential for specialized operations such as interfacing with EVM or for bridging operations.
• External Tools & Scripts: Also include the CI/CD workflows (.github), containerization (docker subfolder), and test utilities (utils/e2e-tests, util bioauth-test-tools) which support continuous integration, deployment, and testing.
Relationships and interactions
• The Node/Peer component initializes the blockchain node using Substrate’s runtime framework and interacts with the networking and consensus layers.
• It calls into the Runtime, which is built from multiple pallets. Each pallet (for example, pallet-bioauth, pallet-currency-swap, pallet-token-claims, etc.) handles specific on-chain logic such as authentication, token operations, or validator interactions.
• The RPC layer acts as an external interface to the Node, handling queries and transactions by communicating with the underlying runtime.
• Supporting utility crates (crypto, precompiles, primitives) provide common functions and data structures used by both the RPC and runtime components.
• Development and deployment tools (Dockerfiles, GitHub workflows, tests) encapsulate the environment setup and execution flows.
Important architectural patterns/design principles
• Modularity: The system is separated into many Rust crates, each encapsulating a particular function. This supports independent development, clear interfaces, and reuse.
• Layering: There is a clear separation between the network/peer layer, the runtime (which itself is modular via pallets), and the API layer. Dependencies are clearly factored.
• Interoperability: Several components handle cross-chain or web3–style operations (EVM integration, EIP protocols) and should be depicted as interfacing with external systems or protocols.