Git Product home page Git Product logo

atlantis-testnet-2-source-code's Introduction

Atlantis Testnet Source Code

Pre-requisites:

Go version 1.18 Ubuntu 22.04 Make GCC

Pre-requisite step

Install Golang:

Install latest go version https://golang.org/doc/install

wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash -s -- --version 1.18
source ~/.profile

To verify that Golang installed

go version

It should return go version go1.18 linux/amd64

Install Make to compile the code

sudo apt install make

Install GCC in case GCC is not yet installed

sudo apt-get install gcc

Compile the code

make install

This will create a blockxd file in the /root/go/bin directory

Run a Node

To run a node, edit the init.sh file and change the Moniker name to whatever you want your node to be named.

chmod +x init.sh
./init.sh

How to add blockxd path for it to be accessible system-wide

In the example below, blockxd is in /root/go/bin

export PATH=/root/go/bin:$PATH
source ~/.bashrc

How to add a key

blockxd keys add <your key name> --keyring-backend file --algo eth_secp256k1
# e.g.  blockxd keys add mykey --keyring-backend file --algo eth_secp256k1

It will prompt you to create a keyring passphrase, make sure you remember it as you're going to need this for every transactions. After entering the passphrase, it will give you your address together with a recovery phrase, make sure to have a copy of it. You can use this passphrase to import your key/wallet to another wallet like Metamask.

How to become a validator using Ubuntu 22.04

Make sure to request for some BCX tokens first from the BCX Team. You will have a receiving address once you created a key from the previous instruction. Open the validator.sh file and change the values there depending on your preference

chmod +x validator.sh
./validator.sh

Notes if starting own chain

  1. Make sure that the voting power of 1 validator does not reach more than 30% to avoid potential too much dependency of the chain to a single node only.
  2. Dont use the genesis.json file in this repository and let it create its own genesis.json file
  3. persistent_peer is important in the config but it is safer to have some nodes in the seed cofiguration of the config file located in .blockxd/config/config.toml file

Submitted Proposals

Proposals were submitted for this Atlantis Testnet in order to improve the chain. For this testnet, we submitted the proposals below. The files slash.json and metadata.json is also located in this repo:

  1. Change Slashing Window The Slashing window dictates how many blocks can a validator miss before they get jailed which slashes their earnings. The previous setting was 100 blocks and with a block time of around 1 second, it only gives the validator around 2 minutes to upgrade their server or have a downtime. The submitted proposal increased the window to 40,000 blocks giving enough time for validators to perform maintenance in their servers. Below is the command used
./blockxd tx gov submit-proposal param-change slash.json --from node1 --chain-id blockx_50-1 --gas 1000000
  1. Register Coin for metadata This metadata proposal was submitted in order for Ping Explorer and may also include future dapps to be able to recognize the denominations of Atlantis Testnet which is abcx and bcx with BCX = 1e18 abcx. Below is the command used
./blockxd tx gov submit-proposal register-coin metadata.json --from node1 --chain-id blockx_50-1 --gas 2000000 --title "BCX Metadata proposal" --description "For Ping UI to be able to detect the number of decimals BCX has"

atlantis-testnet-2-source-code's People

Contributors

benj-defi avatar defi-ventures avatar

Stargazers

Binary Ninja avatar andreas avatar &utter ๐Ÿงˆ avatar Joe Li avatar Stanislav Kononiuk+Say Jun avatar SayJun avatar Stefanescu Andrei avatar  avatar  avatar bony000 avatar Nicolas Ortiz avatar Success!!! avatar

Watchers

 avatar  avatar

atlantis-testnet-2-source-code's Issues

Risky IBC `channel-id` Validation

Summary of Bug

This repo is an Evmos-based project, and Evmos uses a magic string to identify the opposing chain in IBC protocol to address this vulnerability.. But This practice is bad for their fork projects, as other projects can easily have differences in channel-id when building links with chains like ATOM, leading to incorrect implementations.

        //https://github.com/breavedev/Atlantis-testnet-2-source-code/blob/main/x/claims/types/params.go#L40-L46
	DefaultAuthorizedChannels = []string{
		"channel-0", // Osmosis
		"channel-3", // Cosmos Hub
	}
	DefaultEVMChannels = []string{
		"channel-2", // Injective
	}

Failure to properly handle these channel-ids and claim methods may result in the above vulnerability not being fixed and still presenting the risk. This is because a malicious user can hijack the relevant channel-id to masquerade as an ATOM and Osmosis chain.

Impact

This issue may leave the claim method still at risk of the above vulnerability when this project's IBC and Claim function is alive.

Additional context

https://github.com/breavedev/Atlantis-testnet-2-source-code/blob/main/x/claims/types/params.go#L146-L154
https://github.com/breavedev/Atlantis-testnet-2-source-code/blob/main/x/claims/types/params.go#L25-L31
https://github.com/breavedev/Atlantis-testnet-2-source-code/blob/main/x/claims/keeper/ibc_callbacks.go#L138-L140

Recommendations

We recommend removing the claim function when the claim method is not used or safeguard the consistency of chain-id to avoid potential risks resulting from future updates.


Please note that there are also issues related to the authentication of EVMchannels.

This means that IsEVMChannel() check are also at risk.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

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.