Giter VIP home page Giter VIP logo

samkenx-automata's Introduction

Rust Docker

Automata

Build

On Ubuntu/Debian (or similar distributions on WSL), install the following packages:

sudo apt-get update
sudo apt-get install -y build-essential pkg-config llvm-dev libclang-dev clang libssl-dev curl

Install Rust through rustup.rs:

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

Initialize your Wasm Build environment:

./scripts/init.sh

Build Wasm and native code:

cargo build --release --features finitestate

Run

Local Two-node Testnet

If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet. You'll need two terminals open. In one, run:

./target/release/automata --chain=local --alice -d /tmp/alice

And in the other, run:

./target/release/automata --chain=local --bob -d /tmp/bob --port 30334 --bootnodes '/ip4/127.0.0.1/tcp/30333/p2p/<ALICE_BOOTNODE_ID_HERE>'
Ensure you replace `ALICE_BOOTNODE_ID_HERE` with the node ID from the output of the first terminal.

You can muck around by heading to https://polkadot.js.org/apps and choose "Local Node" from the Settings menu. Make sure you have the following type definitions saved in the Settings->Developer page:

{
  "ResourceId": "[u8; 32]",
  "DepositNonce": "u64",
  "ProposalVotes": {
    "votes_for": "Vec<AccountId>",
    "votes_against": "Vec<AccountId>",
    "status": {
      "_enum": [
        "Initiated",
        "Approved",
        "Rejected"
      ]
    }
  },
  "BridgeTokenId": "U256",
  "BridgeChainId": "u8",
  "VestingPlan": {
    "start_time": "u64",
    "cliff_duration": "u64",
    "total_duration": "u64",
    "interval": "u64",
    "initial_amount": "Balance",
    "total_amount": "Balance",
    "pub vesting_during_cliff": "bool"
  }
}

License

Apache 2.0

samkenx-automata's People

Contributors

chanson-chan avatar chzyer avatar frankata avatar gnnng avatar kayryu avatar liao1 avatar ljiacheng avatar melynx avatar prz23 avatar ryuh1 avatar samkenxstream avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.