Giter VIP home page Giter VIP logo

chain-main's People

Contributors

allthatjazzleo avatar calvinaco avatar calvinlauyh avatar damoncro avatar dependabot[bot] avatar devashishdxt avatar jayt106 avatar julienrbrt avatar kaz-cdc avatar landanhu avatar leejw51crypto avatar lezzokafka avatar linfeng-crypto avatar macong-cdc avatar mmsqe avatar omahs avatar thanhnhann avatar todaymoon avatar tomtau avatar y-luis-rojo avatar yihuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chain-main's Issues

Problem: no tool to run multi-node integration tests

we need something to run multi-node integration tests:

  • starport like: prepare and start testnet non-interactively
  • support multi-node
  • the whole testnet runs in single docker container, so can run in cloud CI.

Problem: chain-maind validate-genesis error

although this genesis file is valid, above command fails

validating genesis file at /home/user/.chainmaind/config/genesis.json
File at /home/user/.chainmaind/config/genesis.json is a valid genesis file

added two validators
init testnode --chain-id test -o

Porblem: Staking delegate command does not support denom conversion

chain-maincli --home ./.chainmaincli tx staking delegate crocncl152gc4l936x4xpcf7nasat4ldfmpmg29s4mt45p 1000cro --from validator

will result in error

{
  "jsonrpc": "2.0",
  "id": -1,
  "result": {
    "height": "112",
    "txs_results": [
      {
        "code": 20,
        "data": null,
        "log": "invalid coin denomination: failed to execute message; message index: 0",
        "info": "",
        "gasWanted": "200000",
        "gasUsed": "37224",
        "events": [],
        "codespace": "staking"
      }
    ],
    "begin_block_events": null,
    "end_block_events": null,
    "validator_updates": null,
    "consensus_param_updates": null
  }
}

Problem:large cro unit

current genesis CRO is very large,
change to base cro
it can be 10^8 (carson) or 10^9

Problem: cannot build non-64 bit binary

   • building binaries
      • building                  binary=/home/runner/work/chain-main/chain-main/dist/chain-maincli_windows_386/chain-maincli.exe
      • building                  binary=/home/runner/work/chain-main/chain-main/dist/chain-maincli_darwin_amd64/chain-maincli
      • building                  binary=/home/runner/work/chain-main/chain-main/dist/chain-maincli_linux_amd64/chain-maincli
      • building                  binary=/home/runner/work/chain-main/chain-main/dist/chain-maincli_linux_386/chain-maincli
      • building                  binary=/home/runner/work/chain-main/chain-main/dist/chain-maincli_windows_amd64/chain-maincli.exe
   ⨯ release failed after 201.92s error=failed to build for windows_386: # github.com/tendermint/iavl
##[error]../../../go/pkg/mod/github.com/tendermint/[email protected]/nodedb.go:232:65: constant 9223372036854775807 overflows int
##[error]../../../go/pkg/mod/github.com/tendermint/[email protected]/repair.go:44:69: constant 9223372036854775807 overflows int

Need to remove 386 from .goreleaser.yml

Problem: no genesis data for chain-main module

// GenesisState - all chainmain state that must be provided at genesis
type GenesisState struct {
// TODO: Fill out what is needed by the module for genesis
}

currently it's empty
we can include basic information for the genesis

starting with protobuf3, so that proto file can be used in other backend

Problem: vesting not configured

at genesis, 20,000,000,000 should still be locked until November 7th 2022

+ with #7 there should also be estimation on LTI (which is assumed to be in "mint")

@calvinaco looked into it and can share details about the command

Problem: import-export simulation tests fails with different global account numbers

the test can be executed with runsim -Jobs=4 -SimAppPkg=github.com/crypto-com/chain-main/app 25 5 TestAppImportExport (runsim can be installed with GO111MODULE="on" go get github.com/cosmos/tools/cmd/[email protected])

it runs a randomised simulation and then tries to re-play it and check if the end-state is the same.

when it fails, it also shows how it can be reproduced:

go test github.com/crypto-com/chain-main/app -run TestAppImportExport -Enabled=true -NumBlocks=25 -Genesis= -Verbose=true -Commit=true -Seed=2 -Period=5 -ExportParamsPath ... -ExportStatePath ... -v -timeout 24h

The end "state" seems to be correct, except all account numbers and "global account number" are off by two:

...
                                address: cosmos1lakqt34l4244pph3jh2t0v96h5rd8d26g77kp0
                                coins:
                                - denom: stake
                                  amount: "366772073"
                                public_key: cosmospub1addwnpepqf487zy0e3fw7gtjayxpl2h3ffkgyyq2dmvc69ttq2h22ukhs05m55akjtc
                                account_number: 448
                                sequence: 8
                                original_vesting:
                                - denom: stake
                                  amount: "90270376125"
                                delegated_free:
                                - denom: stake
                                  amount: "473658128"
                                delegated_vesting: []
                                end_time: 6118429836
                                start_time: 6118410877
                            
                                address: cosmos1lakqt34l4244pph3jh2t0v96h5rd8d26g77kp0
                                coins:
                                - denom: stake
                                  amount: "366772073"
                                public_key: cosmospub1addwnpepqf487zy0e3fw7gtjayxpl2h3ffkgyyq2dmvc69ttq2h22ukhs05m55akjtc
                                account_number: 450
                                sequence: 8
                                original_vesting:
                                - denom: stake
                                  amount: "90270376125"
                                delegated_free:
                                - denom: stake
                                  amount: "473658128"
                                delegated_vesting: []
                                end_time: 6118429836
                                start_time: 6118410877
                                GlobalAccNumberA: 516
                                GlobalAccNumberB: 518
--- FAIL: TestAppImportExport (34.02s)

Problem: dependency with known vulnerabilities

2020-09-07T07:34:10.7430497Z Vulnerable Packages
2020-09-07T07:34:10.7430568Z 
2020-09-07T07:34:10.7431325Z [1/1]	�[1;31mpkg:golang/github.com/coreos/[email protected]�[0m
2020-09-07T07:34:10.7431657Z �[31m3 known vulnerabilities affecting installed version�[0m 
2020-09-07T07:34:10.7432197Z ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2020-09-07T07:34:10.7432657Z ┃ �[31m[CVE-2020-15114] In etcd before versions 3.3.23 and 3.4.10, the etcd gateway is a simple TCP prox...�[0m                                                         ┃
2020-09-07T07:34:10.7433277Z ┣━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7433752Z ┃ Description        ┃ In etcd before versions 3.3.23 and 3.4.10, the etcd gateway is a simple TCP                                                             ┃
2020-09-07T07:34:10.7434193Z ┃                    ┃ proxy to allow for basic service discovery and access. However, it is                                                                   ┃
2020-09-07T07:34:10.7434631Z ┃                    ┃ possible to include the gateway address as an endpoint. This results in a                                                               ┃
2020-09-07T07:34:10.7435069Z ┃                    ┃ denial of service, since the endpoint can become stuck in a loop of                                                                     ┃
2020-09-07T07:34:10.7435513Z ┃                    ┃ requesting itself until there are no more available file descriptors to                                                                 ┃
2020-09-07T07:34:10.7435948Z ┃                    ┃ accept connections on the gateway.                                                                                                      ┃
2020-09-07T07:34:10.7436492Z ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7436923Z ┃ OSS Index ID       ┃ bba60acb-c7b5-4621-af69-f4085a8301d0                                                                                                    ┃
2020-09-07T07:34:10.7437450Z ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7437868Z ┃ CVSS Score         ┃ 7.7/10 (High)                                                                                                                           ┃
2020-09-07T07:34:10.7438638Z ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7439258Z ┃ CVSS Vector        ┃ CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H                                                                                            ┃
2020-09-07T07:34:10.7439788Z ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7440275Z ┃ Link for more info ┃ https://ossindex.sonatype.org/vuln/bba60acb-c7b5-4621-af69-f4085a8301d0?component-type=golang&component-name=github.com%2Fcoreos%2Fetcd ┃
2020-09-07T07:34:10.7440848Z ┗━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
2020-09-07T07:34:10.7441718Z ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2020-09-07T07:34:10.7442217Z ┃ �[33m[CVE-2020-15136] In ectd before versions 3.4.10 and 3.3.23, gateway TLS authentication is only ap...�[0m                                                         ┃
2020-09-07T07:34:10.7442759Z ┣━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7443191Z ┃ Description        ┃ In ectd before versions 3.4.10 and 3.3.23, gateway TLS authentication is                                                                ┃
2020-09-07T07:34:10.7443630Z ┃                    ┃ only applied to endpoints detected in DNS SRV records. When starting a                                                                  ┃
2020-09-07T07:34:10.7444209Z ┃                    ┃ gateway, TLS authentication will only be attempted on endpoints identified                                                              ┃
2020-09-07T07:34:10.7444694Z ┃                    ┃ in DNS SRV records for a given domain, which occurs in the                                                                              ┃
2020-09-07T07:34:10.7445259Z ┃                    ┃ discoverEndpoints function. No authentication is performed against                                                                      ┃
2020-09-07T07:34:10.7445850Z ┃                    ┃ endpoints provided in the --endpoints flag. This has been fixed in versions                                                             ┃
2020-09-07T07:34:10.7446290Z ┃                    ┃ 3.4.10 and 3.3.23 with improved documentation and deprecation of the                                                                    ┃
2020-09-07T07:34:10.7446897Z ┃                    ┃ functionality.                                                                                                                          ┃
2020-09-07T07:34:10.7447437Z ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7447894Z ┃ OSS Index ID       ┃ d373dc3f-aa88-483b-b501-20fe5382cc80                                                                                                    ┃
2020-09-07T07:34:10.7448426Z ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7448839Z ┃ CVSS Score         ┃ 6.5/10 (Medium)                                                                                                                         ┃
2020-09-07T07:34:10.7449366Z ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7449803Z ┃ CVSS Vector        ┃ CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N                                                                                            ┃
2020-09-07T07:34:10.7450332Z ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7450825Z ┃ Link for more info ┃ https://ossindex.sonatype.org/vuln/d373dc3f-aa88-483b-b501-20fe5382cc80?component-type=golang&component-name=github.com%2Fcoreos%2Fetcd ┃
2020-09-07T07:34:10.7451391Z ┗━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
2020-09-07T07:34:10.7451909Z ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2020-09-07T07:34:10.7452335Z ┃ �[33m[CVE-2020-15115] etcd before versions 3.3.23 and 3.4.10 does not perform any password length vali...�[0m                                                         ┃
2020-09-07T07:34:10.7452983Z ┣━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7453526Z ┃ Description        ┃ etcd before versions 3.3.23 and 3.4.10 does not perform any password length                                                             ┃
2020-09-07T07:34:10.7453971Z ┃                    ┃ validation, which allows for very short passwords, such as those with a                                                                 ┃
2020-09-07T07:34:10.7454406Z ┃                    ┃ length of one. This may allow an attacker to guess or brute-force users'                                                                ┃
2020-09-07T07:34:10.7454835Z ┃                    ┃ passwords with little computational effort.                                                                                             ┃
2020-09-07T07:34:10.7455382Z ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7455838Z ┃ OSS Index ID       ┃ 5def94e5-b89c-4a94-b9c6-ae0e120784c2                                                                                                    ┃
2020-09-07T07:34:10.7456373Z ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7456794Z ┃ CVSS Score         ┃ 5.8/10 (Medium)                                                                                                                         ┃
2020-09-07T07:34:10.7457327Z ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7457837Z ┃ CVSS Vector        ┃ CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N                                                                                            ┃
2020-09-07T07:34:10.7458401Z ┣━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
2020-09-07T07:34:10.7458999Z ┃ Link for more info ┃ https://ossindex.sonatype.org/vuln/5def94e5-b89c-4a94-b9c6-ae0e120784c2?component-type=golang&component-name=github.com%2Fcoreos%2Fetcd ┃
2020-09-07T07:34:10.7459565Z ┗━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Problem: no "denom_metadata" in genesis.json

"init" command could also add more information about the denomination, as it is now available in Stargate -- e.g. something like:

	"denom_metadata": [{ 
 		"description": "The native token of Crypto.com Chain.",
 		"denom_units": [ {
 				      "denom": "basecro",
 				      "exponent": 0,
 				      "aliases": [
 					"carson"
 					 ]
 				  },
 				    {
 				      "denom": "cro",
 				      "exponent": 8
 				    }],
 		"base": "basecro",
 	  	"display": "cro"
 	}]

Problem: incorrect denominations

the initial template uses "token" and "stake" -- but ideally, there's just one denomination ("cro", "coin" or "Carson")

bond_denom and denom names to be changed

automatically infer denomination in cli

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.