All Projects → soramitsu → kagome

soramitsu / kagome

Licence: Apache-2.0 license
Kagome - C++17 implementation of Polkadot Host

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
c
50402 projects - #5 most used programming language
Dockerfile
14818 projects
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to kagome

mangata-node
Mangata ❤️ Substrate & Polkadot
Stars: ✭ 52 (-56.3%)
Mutual labels:  polkadot
polkastats-v2
Polkadot Kusama network statistics
Stars: ✭ 20 (-83.19%)
Mutual labels:  polkadot
txwrapper
Helper funtions for offline transaction generation.
Stars: ✭ 59 (-50.42%)
Mutual labels:  polkadot
go-libp2p-autonat
DEPRECATED: NAT Autodiscovery
Stars: ✭ 53 (-55.46%)
Mutual labels:  libp2p
polkascan-os
Polkascan Open Source
Stars: ✭ 52 (-56.3%)
Mutual labels:  polkadot
ares
Completely decentralized oracle protocol
Stars: ✭ 51 (-57.14%)
Mutual labels:  polkadot
Rust Libp2p
The Rust Implementation of the libp2p networking stack.
Stars: ✭ 2,062 (+1632.77%)
Mutual labels:  libp2p
web3.storage
⁂ The simple file storage service for IPFS & Filecoin
Stars: ✭ 417 (+250.42%)
Mutual labels:  libp2p
vscode-move-ide
📝 Diem's Move language in VSCode
Stars: ✭ 23 (-80.67%)
Mutual labels:  polkadot
go-libp2p-http
HTTP on top of libp2p
Stars: ✭ 49 (-58.82%)
Mutual labels:  libp2p
fearless-iOS
Fearless Wallet is a mobile wallet designed for the decentralized future on the Kusama and Polkadot networks.
Stars: ✭ 66 (-44.54%)
Mutual labels:  polkadot
subwasm
Subwasm is a cli utility to help you know more about WASM Runtimes. It help downloading, inspecting and comparing Substrate based chains such as Polkadot or Kusama.
Stars: ✭ 53 (-55.46%)
Mutual labels:  polkadot
edgevpn
⛵ The immutable, decentralized, statically built p2p VPN without any central server and automatic discovery! Create decentralized introspectable tunnels over p2p with shared tokens
Stars: ✭ 223 (+87.39%)
Mutual labels:  libp2p
gerbil-libp2p
Libp2p bindings for Gerbil
Stars: ✭ 13 (-89.08%)
Mutual labels:  libp2p
peer-id-generator
Vanity public key generator for use with IPFS and IPNS
Stars: ✭ 27 (-77.31%)
Mutual labels:  libp2p
polkadot-wiki-old
The Polkadot wiki.
Stars: ✭ 56 (-52.94%)
Mutual labels:  polkadot
Acria-Oracle-Node-Qt
Acria Oracle Node Client implemented in C++/Qt
Stars: ✭ 15 (-87.39%)
Mutual labels:  polkadot
digital-assets-association-poland
🐋 🐋 https://meetup.com/Silesia-Blockchain-Meetup 🐋 🐋
Stars: ✭ 14 (-88.24%)
Mutual labels:  polkadot
substrate-debug-kit
A collection of debug tools, scripts and libraries on top of substrate.
Stars: ✭ 96 (-19.33%)
Mutual labels:  polkadot
sprawl
Alpha implementation of the Sprawl distributed marketplace protocol.
Stars: ✭ 27 (-77.31%)
Mutual labels:  libp2p

logo

CodeFactor codecov Netlify Status

Intro

KAGOME is a Polkadot Host (former Polkadot Runtime Environment) developed by Soramitsu and funded by a Web3 Foundation grant.

Status

  • Syncing node
    • Polkadot, Kusama and Rococo compatibility
  • Validating node
  • Polkadot JS apps support
  • Parachains support
  • Telemetry support
  • Fast sync
  • Warp sync
  • Light client

More details of KAGOME development can be found within the supported features section and in projects board

Getting Started

Build

Prerequisites

For now, please refer to the Dockerfile to get a picture of what you need for a local build-environment.

git clone https://github.com/soramitsu/kagome
cd kagome

make build

You will get KAGOME binary in the build/node/ folder

Other make commands are:

make docker
make command args="gcc --version"
make release
make release_docker
make debug_docker
make clear

Executing KAGOME node

Obtaining database snapshot (optional)

In order to avoid syncing from scratch we are maintaining the most recent snapshot of Polkadot network for KAGOME node available for anyone here: https://drive.google.com/drive/folders/1pAZ1ongWB3_zVPKXvgOo-4aBB7ybmKy5?usp=sharing

After downloading the snapshot you can extract it in the folder where the node will be running:

unzip polkadot-node-1.zip

Execute KAGOME Polkadot full syncing node

You can synchronize with Polkadot using KAGOME and obtain an archive node that can be used to query the Polkadot network at any state.

To launch KAGOME Polkadot syncing node execute:

cd examples/polkadot/
PATH=$PATH:../../build/node/
kagome --chain polkadot.json --base-path polkadot-node-1

After this command KAGOME will connect with other nodes in the network and start importing blocks. You may play with your local node using polkadot js apps: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer

You will also be able to see your node on https://telemetry.polkadot.io/. If you need to identify it more easily you can add --name <node-name> flag to node's execution command and find your node in telemetry by typing its name.

Run kagome --help to explore other CLI flags.

Execute KAGOME validating node in development mode

The easiest way to get started with KAGOME is to execute in development mode which is a single node network:

kagome --dev

That executes node with default accounts Alice and Bob. You can read about these accounts here.

To launch with wiping existing data you can do:

kagome --dev-with-wipe

Execute KAGOME node with validator mode

To launch KAGOME validator execute:

cd examples/first_kagome_chain
PATH=$PATH:../../build/node/
kagome --validator --chain localchain.json --base-path base_path

This command executes a KAGOME full node with an authority role.

Configuration Details

To run a KAGOME node, you need to provide to it a genesis config, cryptographic keys and a place to store db files.

  • Example of a genesis config file can be found in examples/first_kagome_chain/localchain.json
  • Example of a base path dir can be found in examples/first_kagome_chain/base_path
  • To create database files, just provide any base path into kagome executable (mind that start with authority role requires keys to start).

Contributing Guides

Please refer to the Contributor Documentation.

Supported Features

  • Extrinsic Api
    • Receives extrinsics submitted over JSON-RPC, validates them and stores in transaction pool
  • Transaction pool
    • Stores submitted transactions
    • Provides ready transactions, i.e. transaction which pre-conditions defined by tags are satisfied
  • Authorship
    • Creates a block from provided inherents and digest
    • Interacts with Polkadot Runtime to initialize and finalize block
  • Runtime
    • Uses Binaryen (default) or WAVM (experimental) WASM executors to invoke Polkadot Runtime entries
    • Current runtime entries include:
      • BlockBuilder – checks inherents, applies extrinsics, derives inherent extrinsics, initializes and finalizes blocks
      • Core – gets version of runtime, executes blocks, gets authorities
      • Grandpa – gets grandpa authorities
      • Metadata
      • OffchainWorker (not used)
      • ParachainHost (not used)
      • TaggedTransactionQueue – validates transactions
  • Host Api (aka Extensions)
    • Exposes a set functions that Runtime needs for:
      • Management of the content
      • Memory allocation
      • Cryptography
  • SCALE (polkadot-codec)
    • Implements SCALE codec for data types serialization according to spec.
  • Storage
    • Contains key-value storage interfaces with persistent and in-memory implementations
    • Merkle-Patricia trie implementation, described in spec
  • Clock
    • Gets current time for the peer
  • Consensus
    • Babe block production
    • Grandpa finalization
  • Crypto
    • blake2
    • ed25519
    • keccak
    • sha
    • Schnorr's vrf and sr25519 (bindings over Web3’s schnorrkel library)
    • twox
  • Networking
    • KAGOME uses cpp-libp2p for peer-to-peer interactions and peer discovery
    • Gossiper and Gossiper observer
    • SyncClient and SyncServer

You can find more information about the components by checking reference documentation. Check out tutorials and more examples in official documentation: https://kagome.readthedocs.io/

KAGOME in media

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].