Git Product home page Git Product logo

nolus-core's Introduction

Nolus Core


nolus-core


Go Report Card License Lint Test Test Fuzz Test cosmos-sdk

Nolus is a blockchain built using Cosmos SDK and Tendermint.

Prerequisites

Install golang, tomlq and jq.

Get started

Build, configure and run a single-node locally deployed Nolus chain

Build

make install

Init, set up the DEX parameters and run

First generate the mnemonic you will use for Hermes:

nolusd keys mnemonic

Then recover osmosis key and use the UI to get some uosmo:

osmosisd keys add hermes_key --recover

Init and start:

./scripts/init-local-network.sh --reserve-tokens <reserve_account_init_tokens> --hermes-mnemonic <the_mnemonic_generated_by_the_previous_steps> --dex-network-addr-rpc <dex_network_addr_host_part_rpc> --dex-network-addr-grpc <dex_network_addr_host_part_grpc>

Set up the DEX parameter: Set up the DEX parameters manually

The make install command will compile and locally install nolusd on your machine. init-local-network.sh generates a node setup, including setting the dex parameter (run init-local-network.sh --help for more configuration options). For more details check the scripts README

*Notes:

  • Make sure "nolus-money-market" repo is checked out as a sibling to this repo.

  • The Osmosis binary is required: Follow the steps.

  • Before running the "./scripts/init-local-network.sh" again, make sure the nolusd and hermes processes are killed.

  • The "hermes" and "nolusd" logs are stored in ~/hermes and ~/.nolus respectively.

Run already configured single-node

nolusd start --home "networks/nolus/local-validator-1"

Install, configure and run a local Hermes relayer manually

Follow the steps here. Write down the connection and channel identifiers at Nolus and Osmosis for further usage.

Set up the DEX parameters manually

The goal is to let smart contracts know the details of the connectivity to Osmosis. Herebelow is a sample request. This should be done via sudo gov proposal:

nolusd tx gov submit-proposal sudo-contract nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f '{"setup_dex": {"connection_id": "connection-0", "transfer_channel": {"local_endpoint": "channel-0", "remote_endpoint": "channel-1499"}}}' --title "Set up the DEX parameter" --description "Thе proposal aims to set the DEX parameters in the Leaser contract" --deposit 10000000unls --fees 900unls --gas auto --gas-adjustment 1.1 --from wallet

*Notes: "channel-1499" should be replaced, so you can get the actual channel ID of the remote endpoint with:

nolusd q ibc channel connections connection-0 --output json | jq '.channels[0].counterparty.channel_id' | tr -d '"'

Check the transaction has passed:

nolusd q wasm contract-state smart nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f '{"config":{}}'

Build statically linked binary

By default, make build generates a dynamically linked binary. In case someone would like to reproduce the way the binary is built in the pipeline then the command to achieve it locally is:

docker run --rm -it -v "$(pwd)":/code public.ecr.aws/nolus/builder:<replace_with_the latest_tag> make build -C /code

Upgrade wasmvm

  • Update the Go modules
  • Update the wasmvm version in the builder Dockerfile at .github/images/builder.Dockerfile
  • Increment the IMAGE_TAG and use the same version in the build-binary step in .github/workflows/build.yaml

Run a full node with docker

https://github.com/Nolus-Protocol/nolus-networks

nolus-core's People

Contributors

dependabot[bot] avatar desislavva avatar feisty-nebo avatar galadrin avatar iamrusko avatar ivivanov avatar kirilmihaylov avatar kostovster avatar lockwarr avatar nickstoyanov avatar rdpnd avatar vadymmierzhev avatar vmierzhev 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.