Statemint Node Implementation

Overview

Statemint

Implementation of Statemint, a blockchain to support generic assets in the Polkadot and Kusama networks.

Statemint will allow users to:

  • Deploy promise-backed assets with a DOT/KSM deposit.
  • Set admin roles for an AssetId to mint, freeze, thaw, and burn tokens.
  • Register assets as "self-sufficient" if the Relay Chain agrees, i.e. the ability for an account to exist without DOT/KSM so long as it maintains a minimum token balance.
  • Pay fees using asset balances.
  • Transfer (and approve transfer) assets.

Statemint must stay fully aligned with the Relay Chain it is connected to. As such, it will accept the Relay Chain's governance origins as its own.

Contributing

License

Statemint is licensed under Apache 2.

Temp

  • Pointed the repo towards rococo-v1 to get the latest version of assets and make it easy to track as the pallet changes

  • latest known working commit https://github.com/paritytech/substrate/commit/401c24e8a62cdf058882b0e92815faef966d9fa1

  • polkadot needs to be built off of branch = 'rococo-v1'

  • Polkadot launch can be run by dropping the proper polkadot binary in bin

    • Run Globally
      • polkadot-launch config.json
    • Run locally, navigate into polkadot-launch,
      • yarn
      • yarn start
Comments
  • pallet-simple-staking

    pallet-simple-staking

    TODO

    • [x] weights
    • [x] test events
    • [x] add split pooling function (aura)
    • [ ] add authorities to aura list (aura)
    • [x] Properly protect functions with relay chain calls
    opened by JesseAbram 13
  • KickThreshold is too short so new candidates got kicked before they are able to author blocks

    KickThreshold is too short so new candidates got kicked before they are able to author blocks

    https://github.com/paritytech/statemint/blob/9664809ad5de6ce43b6b78a6b3d12fbfece7f147/runtime/statemine/src/lib.rs#L610-L611

    New candidates can only be author blocks after 2 sessions, but threshold is just 1 period.

    And why KickThreshold needs to be a multiple of session?

    Should really only track last authored blocks & kick inactive one only for current collator.

    opened by xlc 10
  • Will Statemint be registered in BIP-0044 coin types?

    Will Statemint be registered in BIP-0044 coin types?

    Should parachains like statemint be registered in BIP-0044 coin types?

    This question can be applied to any parachain, once non-standalone parachains/parathreads are ephemeral as it can lose an auction and consequently be "kicked" from polkadot shared security. Should parachains like Statemint be registered in BIP-0044? If they don't, how users will store assets in their third-part wallets and do transfers?

    Links

    Z1-question 
    opened by Lohann 5
  • Basic Runtime Requirements

    Basic Runtime Requirements

    The majority of the functionality will come from the Assets pallet in FRAME.

    Pallets

    • Assets
    • Multisig
    • Proxy (#8)
    • Transaction Payment (#5)
    • Utility
    • Democracy (? -> #4)

    Block Production

    • Collator set selection: Simple Staking
    • Author selection: Aura
    F9-meta S1-Design 
    opened by joepetrowski 5
  • Support NFTs

    Support NFTs

    The Assets pallet is designed for fungible assets. At some point in the future (probably after initial launch), add logic to support non-fungible assets.

    F8-enhancement S2-Implement 
    opened by joepetrowski 4
  • Add Westmint Runtime

    Add Westmint Runtime

    Follow on to https://github.com/paritytech/statemint/pull/62. Runtime with sudo in it to use on Westend.

    Closes https://github.com/paritytech/statemint/issues/63

    Weight files copied from Statemint.

    A0-pleasereview B1-releasenotes C1-low 
    opened by joepetrowski 3
  • Revamp parachain-selection part 2

    Revamp parachain-selection part 2

    • [x] Make tests work again
    • [x] TODOs in the code. fixes parts of https://github.com/paritytech/statemint/issues/9 related to https://github.com/paritytech/statemint/issues/23
    opened by kianenigma 3
  • Decide how to handle tx fees

    Decide how to handle tx fees

    Two decisions to make about transaction fees:

    1. How much to charge? I have configured the runtime to charge 1/10 the tx fees as the Relay Chain would charge. I think transactions on parachains should be cheaper as the execution does not affect other parachains. Note that I left the target block fullness at 25%, but the target block weight is 500ms, as opposed to 2s on the Relay Chain, so blocks will be relatively more full for a given number of transactions. Is 1/10 OK or are there arguments for another value?
    2. What to do with them? a. Burn some portion and give the rest to the collator (or burn 0 and give all to the collator, but I believe this has some economic issues). b. Give to a Relay Chain validator and let them handle the validator/treasury split. c. Add an account to Statemint over which the Relay Chain Council has control and send fees (or some portion) there.
    F5-task S1-Design 
    opened by joepetrowski 3
  • Design and Implement Governance System

    Design and Implement Governance System

    Statemint should be fully aligned with the Relay Chain to which it is connected. This will require the ability to define Origins as coming from another chain (i.e. an implementation of EnsureOneOf that allows declaring another chain's origin).

    Edit: Decisions based on comments:

    • Statemint Root = Relay Chain Root
    • Statemint ForceOrigin = More than half of Relay Chain Council
    • Statemint Transaction Payment Origin = More than half of Relay Chain Council

    We also need to make some concrete decisions about these origins (i.e. Relay Chain root? Some fraction of Council/Technical Committee?):

    • Root origin (ability to perform runtime upgrades)
    • ForceOrigin origin (ability to perform force_* actions in pallet-assets)
    • Origin to set transaction payment DOT to asset ratio (#5 )

    In addition, should this have the Democracy pallet to allow users to make Statemint-specific proposals for the Relay Chain to decide on? Or should those proposals be made through the Relay Chain's governance?

    F8-enhancement P2-asap S2-Implement 
    opened by joepetrowski 3
  • Parameter Review

    Parameter Review

    Parameters to Review Before Launch

    • MAXIMUM_BLOCK_WEIGHT - 500 ms
    • Assets
      • [ ] AssetDeposit - 1 KSM, 100 DOT
      • [ ] MetadataDepositBase
      • [ ] MetadataDepositPerByte
      • [ ] ApprovalDeposit
      • [ ] StringLimit
    • Balances
      • [ ] ExistentialDeposit - 1/10 of parent chain
      • [ ] MaxLocks - shouldn't be so relevant for this chain, same as parent.
      • [ ] Align transaction_payment with Relay Chain.
    • Multisig
      • [ ] DepositBase - parent chain / (factor)
      • [ ] DepositFactor - parent chain / (factor)
      • [ ] MaxSignatories - same as parent chain
    • Proxy
      • [ ] ProxyDepositBase - parent chain / (factor)
      • [ ] ProxyDepositFactor - parent chain / (factor)
      • [ ] MaxProxies - I would like to bump this up higher here to allow issuer groups
      • [ ] AnnouncementDepositBase - parent chain / (factor)
      • [ ] AnnouncementDepositFactor - parent chain / (factor)
      • [ ] MaxPending - same as parent chain
    F5-task F9-release 
    opened by joepetrowski 2
  • Shell -> Statemine Upgrade

    Shell -> Statemine Upgrade

    • [x] Statemine chain spec #82
    • [x] add consensus support for transitioning from Shell to Statemine https://github.com/paritytech/statemint/pull/80
    • [x] test Shell -> Statemine upgrade process on a local Rococo
    opened by apopiak 1
  • Launch Checklist

    Launch Checklist

    Final steps to deploy Statemine on Kusama:

    • [x] Ability to upgrade from Shell
    • [x] Call filter https://github.com/paritytech/statemint/issues/64
    • [x] Statemine config https://github.com/paritytech/statemint/issues/14 (using shell chainspec)
    • [x] Shell -> Statemine runtime upgrade #81
    • [x] Merge and include https://github.com/paritytech/substrate/pull/8935 (freezer can be in an upgrade)
    • [x] Update Substrate/Cumulus/Polkadot dependencies https://github.com/paritytech/statemint/pull/83
    • [x] Final weights https://github.com/paritytech/statemint/pull/56
    F9-meta 
    opened by joepetrowski 3
  • Implement Benchmark flow

    Implement Benchmark flow

    currently benchmarks are taken from the substrate repo. Both I and @kianenigma feel this is not optimal going forward. We should run all benchmarks for used pallets that need them as well as create an optimal flow to run them before releases

    opened by JesseAbram 1
  • Accept Transaction Fees in Assets

    Accept Transaction Fees in Assets

    Some assets, as allowed by the Relay Chain, will be accepted for the payment of transaction fees. The abstract logic should be handled in pallet-transaction-payment. This parachain will need the following:

    • [ ] Functions to allow/forbid the payment of transaction fees with a given AssetId
    • [ ] Function to set the DOT/KSM to Asset ratio with which to convert native fees
    • [ ] Privileged origins for these functions. Ideally setting the ratio has a unique origin that could be passed off to an oracle at some point in the future.
    F8-enhancement S1-Design S2-Implement 
    opened by joepetrowski 3
Owner
Parity Technologies
Solutions for a trust-free world
Parity Technologies
Simple node and rust script to achieve an easy to use bridge between rust and node.js

Node-Rust Bridge Simple rust and node.js script to achieve a bridge between them. Only 1 bridge can be initialized per rust program. But node.js can h

Pure 5 Apr 30, 2023
Sample lightning node command-line app built on top of Ldk Node (similar to ldk-sample).

ldk-node-sample Sample lightning node command-line app built on top of Ldk Node (similar to ldk-sample ). Installation git clone https://github.com/op

optout 3 Nov 21, 2023
Polkadot Node Implementation

Polkadot Implementation of a https://polkadot.network node in Rust based on the Substrate framework. NOTE: In 2018, we split our implementation of "Po

Parity Technologies 6.5k Jan 6, 2023
Node implementation for aleph blockchain built with Substrate framework

This repository contains the Rust implementation of Aleph Zero blockchain node based on the Substrate framework. Aleph Zero is an open-source layer 1

Aleph Zero Foundation 55 Dec 15, 2022
Ecoball Node is the Official Rust implementation of the Ecoball protocol.

Ecoball Node is the Official Rust implementation of the Ecoball protocol. It is a fork of OpenEthereum - https://github.com/openethereum/

Ecoball Chain 2 Jun 9, 2022
An ongoing Rust implementation of a Zcash node. 🦓

Contents Contents About Beta Releases Getting Started Known Issues Future Work Documentation Security License About Zebra is the Zcash Foundation's in

Zcash Foundation 311 Dec 28, 2022
Open source Rust implementation of the Witnet decentralized oracle protocol, including full node and wallet backend 👁️🦀

witnet-rust is an open source implementation of the Witnet Decentralized Oracle Network protocol written in Rust. Components witnet-rust implements ma

The Witnet Project 155 Nov 21, 2022
This is a node implementation of Thippy, a Substrate parachain for smart contracts

Thippy ‒- A Smart Contracts Parachain This is a node implementation of Thippy, a Substrate parachain for smart contracts. Developing Smart Contracts f

Arthur·Thomas 15 Mar 16, 2022
Blazing fast Pedersen hash implementation for Node.JS

pedersen-fast Blazing fast Pedersen hash implementation for Node.JS Exposes starknet-crypto's implementation written in Rust as WASM package. Usage np

L2BEAT 7 Mar 10, 2023
Clean implementation of TompHTTPs' Bare-server-node in rust!

bare-server-rust bare-server-rust is a fully compliant Rust implementation of TompHTTPs' Bare Server specifications. This is a server that will receiv

Nebula Developer Labs 15 May 27, 2023
⋰·⋰ Feeless is a Nano cryptocurrency node, wallet, tools, and Rust crate.

⋰·⋰ Feeless What is Feeless? Feeless is a Nano cryptocurrency node, wallet, tools, and Rust crate. This is not the official project for Nano, only an

null 127 Dec 5, 2022
Basilisk node - cross-chain liquidity protocol built on Substrate

Basilisk node Local Development Follow these steps to prepare a local Substrate development environment ??️ Simple Setup Install all the required depe

Galactic Council 52 Dec 27, 2022
A node API for the dprint TypeScript and JavaScript code formatter

dprint-node A node API for the dprint TypeScript and JavaScript code formatter. It's written in Rust for blazing fast speed. Usage Pass a file path an

Devon Govett 431 Dec 24, 2022
Substrate Node for Anmol Network

Anmol Substrate Node ?? ??️ ?? Anmol is the First Cross-Chain NFT Toolkit, on Polkadot. Introducing: Moulds NFT Breeding Multi-Chain NFT Migration ink

Anmol Network 12 Aug 28, 2022
Manager for single node Rancher clusters

Bovine Manage single node Rancher clusters with a single binary, bovine. % bovine run Pulling [rancher/rancher:latest], this may take awhile... Ranche

Nick Gerace 51 Feb 17, 2022
Minimal Substrate node configured for smart contracts via pallet-contracts.

substrate-contracts-node This repository contains Substrate's node-template configured to include Substrate's pallet-contracts ‒ a smart contract modu

Parity Technologies 73 Dec 30, 2022
Trinci blockchain node

TRINCI TRINCI Blockchain Node. Requirements The required dependencies to build correctly the project are the following: clang libclang-dev (ver. 11 su

Affidaty S.p.A. 5 Sep 26, 2022
Substrate Node Template Generator

Substrate Node Template Generator A tool to generate stand-alone node templates of a customized Substrate clients used in "Substrate Library Extension

Parity Technologies 2 Feb 11, 2022
Subsocial full node with Substrate/Polkadot pallets for decentralized communities: blogs, posts, comments, likes, reputation.

Subsocial Node by DappForce Subsocial is a set of Substrate pallets with web UI that allows anyone to launch their own decentralized censorship-resist

DappForce 74 Nov 24, 2022