Giter Club home page Giter Club logo

genesis-launch's Introduction

We have launched!

  • ChainID: fetchhub-1
  • Seed: 9f9774d88bb6ff9f43b395baf0e7a4baba27dec6@connect-fetchhub.m-v2-london-c.fetch-ai.com:36856
  • Block explorer: https://explore-fetchhub.fetch.ai
  • RPC: https://rpc-fetchhub.fetch-ai.com

Fetch.ai Mainnet

In launching the Fetch.ai, there will be full token interoperability with the FET ERC-20 token. Initially, transfers between the two networks will be mediated by a custodial bridge, and the supply of FET tokens that can be transferred to the mainnet will be restricted to 60 million FET. This will be increased progressively over the first six months of the network's operation until there is free movement of FET between Ethereum and the native chain. This will coincide with the deployment of a non-custodial relayer based on the Gravity bridge.

The token rewards for the first two months of the network's operation will be more than 4% per month corresponding to an annual rate of around 63%. It is expected that all tokens that are moved to the main-net will be staked, so the reverse token swaps to Ethereum will not be enabled until Wednesday the 21st of April when the first unbonding period will have been completed.

Timeline

  • 18:00 UTC on Monday the 29th of March, 2021.
    • The Ethereum bridge contract will be opened and will collect FET ERC20-token transfers to the mainnet. The contract UI here will be opened to allow FET token holders specify a destination address on the mainnet.
    • This genesis launch repo will be released publicly. At this point, we will start collecting genesis signatures for the initial validator set for the network launch.
  • 12:00 UTC on Wednesday the 31st. The collection of genesis transactions will be closed and merged to create the genesis block.
  • 14:00 UTC on Wednesday the 31st. Mainnet launch.

Token Bridge

The UI will check that the destination address has the correct format, which follows the bech32 standard with a prefix of "fetch". ERC-20 tokens will be held in the bridge contract, which will serve as a hot wallet for transferring funds from the mainnet to Ethereum. A cold wallet will also be used to secure the ERC-20 token funds with a symmetric hot-cold wallet deployed on the mainnet to manage and secure transfers.

Install fetchd and fetchcli

Clone and install fetchd and fetchcli from https://github.com/fetchai/fetchd. Make sure to checkout the v0.7.2 release before installing

Once installed, verify you have the correct version with:

fetchcli version

This should output 0.7.2.

Create key pair

This will create your validator account, along with the private and public keys. Replace <account_name> with a name of your choice, and run:

fetchcli keys add <account_name>

Make sure to save the mnemonic phrase from the output, and keep it somewhere safe and private!

Create initial transaction

We'll now retrieve the genesis file from a git repository and generate your initial validator transaction. You'll have to update the genesis file for the network with your validator information and provide us your initial staking transaction by creating a pull request.

Start by forking this repository . If needed, have a look at the Github Quickstart - Fork a repo guide.

Retrieve the current genesis

git clone <your_genesis_repo_fork_url>
cd genesis-launch/

Create genesis account

fetchd --home $(pwd) add-genesis-account <account_name> 1000000000000000000afet

The 1000000000000000000afet amount above defines your initial account balance. It must match the amount of token you have transfered across the bridge.

Running the above command also have several side effects:

  • It generates a default fetchd configuration in config/config.toml. Make sure to review it and adjust its content. You can for example set the moniker key that will identify your node on the network, and can't be changed later.
  • It generates the keys node_key.json and priv_validator_key.json. You may want to replace them if you already have some prepared, and make sure to backup and secure them properly.

Now your account has been added to the genesis file. To ease inspecting the changes, you will probably need to sort the genesis file, as the json format does not preserve ordering:

cat <<< $(jq -S . <  ./config/genesis.json) > ./config/genesis.json
git diff ./config/genesis.json

This should output something similar to:

           }
+        },
+        {
+          "type": "cosmos-sdk/Account",
+          "value": {
+            "account_number": "0",
+            "address": "fetch<your_address>",
+            "coins": [
+              {
+                "amount": "1000000000000000000",
+                "denom": "afet"
+              }
+            ],
+            "public_key": null,
+            "sequence": "0"
+          }
         }
       ],

Make sure your address and amount are correct, then continue to the next step.

Create validator

fetchd --home $(pwd) gentx  --amount 1000000000000000000afet --name <account_name>

This command will create a validator and delegate 1000000000000000000afet tokens from <account_name>. This amount is limited by the amount provisioned on the account in the previous step.

Several other parameters can be adjusted here to configure your validator, such as --commission-max-change-rate, --commission-max-rate, --commission-rate, --ip... Use fetchd gentx -h for the full list of options.

This command will create the file ./config/gentx/gentx-<your_moniker>.json, containing a transaction for setting up your validator. Make sure to review it carefully.

This file is signed, and cannot be modified manually. If you want to change any parameters, delete it and issue the fetchd gentx command again, specifying the new parameter.

Commit and push

Once you're happy with your gentx and genesis account settings, you can commit and push the genesis.json and your gentx file:

git add .
git commit -m "<account_name> gentx"
git push origin main

Once pushed, you're ready to create your pull request. If needed, here's the Github documentation - creating a pull request from a fork.

Start your validator

We'll soon review and merge your pull request. Once we'll have collected all initial transactions from validators, we'll generate the final genesis and publish it on this repository. We'll notify you, so you can then update your fork by pulling the latest genesis file and start your validator providing it the seed identifier:

git remote add upstream https://github.com/fetchai/genesis-launch.git
git fetch upstream
git reset --hard upstream/main
fetchd --home $(pwd) start --p2p.seeds "9f9774d88bb6ff9f43b395baf0e7a4baba27dec6@connect-fetchhub.m-v2-london-c.fetch-ai.com:36856"

You can also set the <seed_id> by updating the seeds key in your ./config/config.toml to persist this change.

In the event your fetchd service isn't starting properly, or if you started it with the wrong seed, or any other problems, you can wipe its runtime database with. This won't affect any configuration made under the config/ folder.

fetchd --home $(pwd) unsafe-reset-all

Problems, questions?

Feel free to open an issue if you encounter any problems or have a question, we'll do our best to help you!

genesis-launch's People

Contributors

ardapda avatar aronvanammers avatar bartcrpt avatar daemon63 avatar ejfitzgerald avatar jonathan6620 avatar julianpscheid avatar kwunyeung avatar paddyson79 avatar sebaponti avatar sili-infstones avatar wlsaud619 avatar zzfunds avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  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.