Skip to content

JacobCZ/mangata-node

 
 

Repository files navigation

Mangata brand

Mangata Node

Application-specific blockchain for decentralized exchange, a parachain in Polkadot ecosystem. Implementation includes MEV solution, Proof of Liquidity and no gas economy.

Themis

Issues Pull Request GitHub last commit Build Status Language

Description

Reliable decentralized exchange (DEX) blockchain - interoperable with other blockchains using Polkadot. The exchange is using a consensus algorithm that solves MEV/frontrunning problems and makes all participants' access to trading opportunities equal.

The design of the blockchain guarantees fixed-fees that provides greater control of trading costs and higher arbitrage opportunity. Assets on the exchange will serve multiple purposes- at the first iteration, they are the block producer’s stake and exchange liquidity at the same time, and more comes later.

Local Development

Follow these steps to prepare a local Substrate development environment 🛠️

Simple Setup

Install all the required dependencies with a single command (be patient, this can take up to 30 minutes).

curl https://getsubstrate.io -sSf | bash -s -- --fast

Manual Setup

Find manual setup instructions at the Substrate Developer Hub.

Build

Local target

Recommended rustc version for the build is nightly-2021-10-19

Environment variables for ethereum apps should be set up before the build:

ETH_APP_ID=0xdd514baa317bf095ddba2c0a847765feb389c6a0
ERC20_APP_ID=0x00e392c04743359e39f00cd268a5390d27ef6b44

build node:

rustup target add wasm32-unknown-unknown
cargo build --release

Docker container

./scripts/build-mangata-node-docker-image.sh

Run

Single Node Development Chain

Purge any existing dev chain state:

./target/release/mangata-node purge-chain --dev

Start a dev chain:

./target/release/mangata-node --dev

Two-Nodes Dockerized Testnet

cd ./devops
docker-compose up

Two-Nodes Multi-Validator Dockerized Testnet

sh scripts/build-multi-validator-mangata-node-docker-image.sh
docker-compose  -f devops/multi-validator-docker-compose.yml up

Debug Single Node

VS code

Export RUSTFLAGS

export RUSTFLAGS="-g"

Build node:

cargo build --release

Run node:

RUSTFLAGS="-g" cargo run -j12 --release -- --tmp --dev

Go to VS code and attach the process!

Mangata Substrate Cumulus Parachain

About

mangata substrate node and runtime

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 98.2%
  • Other 1.8%