All Projects → paritytech → substrate-debug-kit

paritytech / substrate-debug-kit

Licence: GPL-3.0 license
A collection of debug tools, scripts and libraries on top of substrate.

Programming Languages

rust
11053 projects
javascript
184084 projects - #8 most used programming language
typescript
32286 projects
shell
77523 projects

Projects that are alternatives of or similar to substrate-debug-kit

polkaswap-web
Polkaswap is a non-custodial, cross-chain AMM DEX protocol for swapping tokens based on Polkadot and Kusama relay chains, Polkadot and Kusama parachains, and blockchains directly connected via bridges. Polkaswap removes trusted intermediaries and provides the opportunity for faster trading.
Stars: ✭ 43 (-55.21%)
Mutual labels:  substrate, polkadot, kusama
crunch
Crunch is a command-line interface (CLI) and Matrix Bot to claim staking rewards every Era for Substrate-based chains
Stars: ✭ 34 (-64.58%)
Mutual labels:  substrate, polkadot, kusama
Astar
The dApp hub for blockchains of the future
Stars: ✭ 533 (+455.21%)
Mutual labels:  substrate, polkadot, kusama
interbtc
interBTC: Trustless Bitcoin on Polkadot | kBTC: Trustless Bitcoin on Kusama
Stars: ✭ 136 (+41.67%)
Mutual labels:  substrate, polkadot, kusama
datdot-node-rust
datdot blockchain node in rust
Stars: ✭ 43 (-55.21%)
Mutual labels:  substrate, polkadot
fearless-iOS
Fearless Wallet is a mobile wallet designed for the decentralized future on the Kusama and Polkadot networks.
Stars: ✭ 66 (-31.25%)
Mutual labels:  polkadot, kusama
mangata-node
Mangata ❤️ Substrate & Polkadot
Stars: ✭ 52 (-45.83%)
Mutual labels:  substrate, polkadot
ares
Completely decentralized oracle protocol
Stars: ✭ 51 (-46.87%)
Mutual labels:  substrate, polkadot
bittensor
Internet-scale Neural Networks
Stars: ✭ 97 (+1.04%)
Mutual labels:  substrate, polkadot
subsocial-offchain
Off-chain storage for Subsocial blockchain. This app builds user feeds and notifications by subscribing to Substrate events.
Stars: ✭ 24 (-75%)
Mutual labels:  substrate, polkadot
polkascan-os
Polkascan Open Source
Stars: ✭ 52 (-45.83%)
Mutual labels:  substrate, polkadot
polkastats-v2
Polkadot Kusama network statistics
Stars: ✭ 20 (-79.17%)
Mutual labels:  polkadot, kusama
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 (-44.79%)
Mutual labels:  substrate, polkadot
trustbase
Smart Contract parachain interoperate with Polkadot and Ethereum
Stars: ✭ 22 (-77.08%)
Mutual labels:  substrate, polkadot
tools
Various cli tools for Polkadot and Substrate chains, including basic node monitoring, making API queries via a cli app and other command-line tools
Stars: ✭ 173 (+80.21%)
Mutual labels:  substrate, polkadot
py-substrate-interface
Python Substrate Interface
Stars: ✭ 125 (+30.21%)
Mutual labels:  substrate, polkadot
ts
Misc. TypeScript definitions that are not yet available on DefinitelyTyped but required by other projects in this repo. Should be merged with upstream projects or the DT project.
Stars: ✭ 13 (-86.46%)
Mutual labels:  substrate, polkadot
nft-gallery
NFT Explorer 🗺 🧭 running on Kusama and Polkadot
Stars: ✭ 281 (+192.71%)
Mutual labels:  substrate, polkadot
jupiter
Wasm smart contract networks powered by Substrate FRAME Contracts pallet in Polkadot ecosystem.
Stars: ✭ 49 (-48.96%)
Mutual labels:  substrate, polkadot
polkascan-pre-harvester
Polkascan PRE Harvester
Stars: ✭ 23 (-76.04%)
Mutual labels:  substrate, polkadot

Substrate debug-kit 🛠⚙️

A collection of debug tools and libraries around substrate chains.

This project has evolved from the historical name offline-phragmen. I first created this repo prior to Kusama's NPoS enabling as a tool to predict the outcome. Henceforth, it has evolved into this repo. This functionality is still provided in the offline-elections crate.

DEPRECATED 🚨

Almost all of the tools in this repository are no longer maintained. Some are moved to substrate (e.g. remote-externalities. Some are being re-worked in Typescript, and some are scheduled to be re-done with Frame's new Metadata.

Overview

  • sub-storage: This is the backbone of all of the crates in this repo. It provides a minimal wrapper around substrate's storage rpc call for easier use. It provides all you need to read any module's storage items, constants, and metadata. All of this is independent of any chain or pallet and should work in any substrate chain. Additionally, it provide some pallet-dependent helpers as well under the helpers feature (such as reading identity of an account).
  • sub-du: a disk-usage-like tool that prints the storage usage of a chain. It reads all the info it needs from metadata, so independent chain or runtime. Arguably not super useful, but I find it cool.
  • offline-elections: The historical main purpose of this repo. It can scrape the staking module's info and run election algorithms of sp-npos-elections offline. Given the correct parameters, it can be used to predict the next validator set. It also provide other election related functionalities. See the sub-commands for more info.
  • remote-externalities: It provides the ability to write simple rust unit tests over a specific state of a chain. It can be very useful to debug breaking changes and storage migrations.
  • tokens: Quite a dumb and small crate that provides wrappers for easy pretty-printing tokens like DOT. Somewhat similar to the toHuman() interface of the javascript API.
  • laboratory: This is where I try new stuff.

Build Substrate Debug Kit

  • git clone https://github.com/paritytech/substrate-debug-kit/
  • cd substrate-debug-kit
  • cargo build --release

Example commands for the debug tools

Note: Run local Polkadot or Kusama node, or start local development node e.g. polkadot --dev --tmp
  • The sub-du command to read all of the chain storage usage ./target/release/sub-du
  • The offline-election tool for staking ./target/release/offline-election staking -i 10 -r
  • The offline-election tool to review a validator ./target/release/offline-election validator-check --who CpYNXnYC1mPPRSXMHvm9EUuhEqHjvj6kCN4kshqMdEpPYSF

Brain Dump 🧠

  • Substrate module sidecar: A wrapper around remote-externalities that allows you to run a substrate module in a TextExternalities environment and constantly feed the new block data into it. Would need to listen to new blocks, upon each block:
    1. call Module::on_initialize().
    2. scan for any transaction in that block that might be targeted to this module (how? call matching), call them directly
    3. call Module::on_finalize().
    4. Wipe the state and update it to the new state of the newly imported block.

Notes: will probably be a pain to do because of rust dependency clashes. Using wasm would make this easier, but then debugging will become harder.

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].