Giter Club home page Giter Club logo

private-testnet's Introduction

Current node version: 1.35.3

Run an Babbage private testnet, with or without Docker.

How it works

  • We run 3 nodes to facilitate protocol bootstrapping. They are run in the same parent process for scripting simplicity. Of course you can run them in 3 different processes/containers/hosts to make it more realistic.
  • The Test...HardFork parameters in config.json help us fork directly to Babbage era right from the start.
  • Once the nodes are ready, mint-tokens.sh will run automatically and mint some test tokens to the genesis address. You can modify this script to mint more tokens or distribute to other addresses. The genesis keys are located in utxo-keys.

How to run

With Docker

Note: We will mount the node sockets in sockets directory, however these sockets don't work with Docker for Mac. If you're using MacOS, you need to docker exec into node container to use cardano-cli. Please note that cardano-node and cardano-cli behave quite differently in MacOS, so you might want to run them in Docker or Linux to be close to production environment.

  1. Run docker-compose up to start a new private testnet in Docker.
  2. Run ./scripts/install.sh to install cardano-cli.
  3. Run export CARDANO_NODE_SOCKET_PATH=$PWD/sockets/node-spo1.sock for cardano-cli to work.
  4. (Optional) Run export PATH=$PATH:$PWD/bin so you can use cardano-cli instead of ./bin/cardano-cli.
  5. Check the network: ./bin/cardano-cli query tip --testnet-magic 42

Without Docker

Tested on Linux.

  1. Run ./scripts/install.sh to install necessary binaries.
  2. Run ./scripts/reset.sh to run a new private testnet.
  3. Run export CARDANO_NODE_SOCKET_PATH=$PWD/sockets/node-spo1.sock for cardano-cli to work.
  4. (Optional) Run export PATH=$PATH:$PWD/bin so you can use cardano-cli instead of ./bin/cardano-cli.
  5. Check the network: ./bin/cardano-cli query tip --testnet-magic 42

Important configs for DApp developers

  1. genesis/shelley/genesis.json
  • maxTxSize: Maximum transaction size (default 16kB).
  • initialFunds: How initial ADA is distributed.
  1. genesis/shelley/genesis.alonzo.json
  • maxTxExUnits: Maximum ExUnits per transaction.
  • maxBlockExUnits: Maximum ExUnits per block.

private-testnet's People

Contributors

longngn avatar h2physics avatar m1n999999 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.