Git Product home page Git Product logo

sonic's Introduction

Sonic

EVM-compatible chain secured by the Lachesis consensus algorithm.

Building the source

Building Sonic requires both a Go (version 1.21 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run:

make all

The build output are build/sonicd and build/sonictool executables.

Initialization of the Sonic Database

You will need a genesis file to join a network. Please check the following site for details how to get one: https://github.com/Fantom-foundation/lachesis_launch Once you obtain the most recent genesis file available, you need to use the sonictool create a starting DB.

sonictool --datadir=<target DB path> genesis <path to the genesis file>

Running sonicd

Going through all the possible command line flags is out of scope here, but we've enumerated a few common parameter combos to get you up to speed quickly on how you can run your own sonicd instance.

Launching a network

Launching sonicd readonly (non-validator) node for network specified by the genesis file:

sonicd --datadir=<DB path>

Configuration

As an alternative to passing the numerous flags to the sonicd binary, you can also pass a configuration file via:

sonicd --datadir=<DB path> --config /path/to/your/config.toml

To get an idea how the file should look like you can use the dumpconfig subcommand to export the default configuration:

sonictool --datadir=<DB path> dumpconfig

Validator

New validator private key may be created with sonictool --datadir=<DB path> validator new command.

To launch a validator, you have to use --validator.id and --validator.pubkey flags to enable events emitter. Check the Fantom Documentation for the detailed process of obtaining the validator ID and registering your initial stake.

sonicd --datadir=<DB path> --validator.id=YOUR_ID --validator.pubkey=0xYOUR_PUBKEY

sonicd will prompt you for a password to decrypt your validator private key. Optionally, you can specify password with a file using --validator.password flag.

Participation in discovery

Optionally you can specify your public IP to straighten connectivity of the network. Ensure your TCP/UDP p2p port (5050 by default) isn't blocked by your firewall.

sonicd --datadir=<DB path> --nat=extip:1.2.3.4

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.