MCPcopy Index your code
hub / github.com/aleph-zero-foundation/aleph-node

github.com/aleph-zero-foundation/aleph-node @r-15.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release r-15.2.0 ↗ · + Follow
4,039 symbols 11,483 edges 284 files 551 documented · 14%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

LOGO

This repository contains the Rust implementation of Aleph Zero blockchain node based on the Substrate framework.

Aleph Zero is an open-source layer 1 blockchain focused on privacy, scalability and energy efficiency. It is based on a unique, peer-reviewed consensus algorithm, AlephBFT (as described in our paper and implemented here).

Aleph node is based on a Substrate node where the default finality gadget (GRANDPA) has been replaced with AlephBFT. Block authoring is realized with Substrate's Aura. The chain is run in periodic sesssions (900 blocks each) utilizing the Session pallet. The authorities in each session serve for both Aura and AlephBFT authorities, and on top of that are responsible for running the Aggregator protocol producing multisignatures of finalized blocks.

Building

Please consult the BUILD guide.

Running

Connect to Aleph Zero Testnet

You can connect to global Aleph Zero Testnet network by running aleph-node --chain=testnet.

Local Network

To experiment with Aleph Node you can locally run a small blockchain network using the scripts/run_nodes.sh script from the root of this repository. Please consult the script or the output of scripts/run_nodes.sh -help for additional parameters (like the number of nodes etc.). The script starts multiple instances of Aleph Node on your local machine, so please adjust the number of nodes carefully with performance of your system in mind. By default 4 nodes are started.

You can interact with your locally running nodes using their RPC servers. A more convenient alternative is to attach to it with a polkadot.js wallet app. We recommend using our fork of that app which can be found here.

Contributing

If you would like to contribute, please fork the repository, introduce your changes and submit a pull request. All pull requests are warmly welcome.

License

The code in this repository is licensed as follows:

  • all crates under bin directory are licensed under the terms of the GNU GPL version 3
  • all rest of the crates are licensed under the terms of Apache License 2.0.

Extension points exported contracts — how you extend this code

ConnectionInfo (Interface)
Reports address of the peer that we are connected to. [9 implementers]
clique/src/lib.rs
Sender (Interface)
For sending arbitrary messages. [5 implementers]
finality-aleph/src/network/data/component.rs
SleepUntil (Interface)
Implementation of a sleep mechanism that doesn't block an executor thread of an async runtime. Implementations should be [4 …
rate-limiter/src/token_bucket.rs
Config (Interface)
(no doc) [9 implementers]
pallets/committee-management/src/lib.rs
Config (Interface)
(no doc) [7 implementers]
pallets/operations/src/lib.rs
SessionInfoProvider (Interface)
Information provider from `pallet_session`. Loose pallet coupling via traits. [3 implementers]
primitives/src/lib.rs
Config (Interface)
(no doc) [5 implementers]
pallets/aleph/src/lib.rs
AsConnection (Interface)
Castability to a plain connection. [2 implementers]
aleph-client/src/connections.rs

Core symbols most depended-on inside this repo

clone
called by 442
finality-aleph/src/block/substrate/verification/mod.rs
map
called by 249
finality-aleph/src/network/data/component.rs
into
called by 225
finality-aleph/src/testing/data_store.rs
collect
called by 219
finality-aleph/src/sync/metrics.rs
iter
called by 172
finality-aleph/src/abft/mod.rs
clone
called by 143
aleph-client/src/lib.rs
into_iter
called by 132
finality-aleph/src/abft/mod.rs
id
called by 124
finality-aleph/src/sync/handler/request_handler.rs

Shape

Method 1,948
Function 906
Class 854
Enum 193
Interface 138

Languages

Rust97%
Python3%
TypeScript1%

Modules by API surface

aleph-client/src/aleph_zero.rs1,069 symbols
finality-aleph/src/sync/handler/mod.rs86 symbols
finality-aleph/src/sync/forest/mod.rs69 symbols
clique/src/mock.rs54 symbols
finality-aleph/src/sync/forest/vertex.rs52 symbols
rate-limiter/src/token_bucket.rs51 symbols
bin/runtime/src/lib.rs47 symbols
finality-aleph/src/session_map.rs41 symbols
primitives/src/lib.rs36 symbols
finality-aleph/src/block/substrate/verification/cache.rs36 symbols
finality-aleph/src/testing/data_store.rs35 symbols
aleph-client/src/pallets/multisig.rs35 symbols

For agents

$ claude mcp add aleph-node \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact