GithubHelp home page GithubHelp logo

chain's Introduction

UnUniFi

Install

Environment setup

Install the necessary libraries for the build.

cd $HOME
sudo apt update -y; sudo apt upgrade -y
sudo apt install -y jq git build-essential

Install Go. Use the 20.x series version.

$ wget https://go.dev/dl/go1.20.linux-amd64.tar.gz
$ sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.20.linux-amd64.tar.gz
$ vim ~/.bashrc
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
$ source ~/.bashrc
$ go version
go version go1.20 linux/amd64

Clone the UnUniFi blockchain repository, check out the given branch, and build it with make install to build binaries.

git clone https://github.com/UnUniFi/chain chain_repo
cd chain_repo
git checkout v3.2.0
git pull
make install

Check the binary version.

ununifid version

Start node for debugging

Initialize node

ununifid init [your-moniker] --chain-id [chain-id]
  • your-moniker is like a nickname of your node.
  • chain-id is the id of the blockchain network. (ex. In the current mainnet beta, the chain-id is ununifi-beta-v1.)

Download correct genesis.json

rm ~/.ununifi/config/genesis.json
curl -L https://raw.githubusercontent.com/UnUniFi/network/main/launch/[chain-id]/genesis.json -o ~/.ununifi/config/genesis.json

If you necessary, Edit config files.

  • ~/.ununifi/config/app.toml
  • .ununifi/config/config.toml ex. in the case of chain-id="ununifi-beta-v1", the possible settings are as follows.
    • persistent-peers = "[email protected]:26656,[email protected]:26656,1357ac5cd92b215b05253b25d78cf485dd899d55@[2600:1f1c:534:8f02:7bf:6b31:3702:2265]:26656,25006d6b85daeac2234bcb94dafaa73861b43ee3@[2600:1f1c:534:8f02:a407:b1c6:e8f5:94b]:26656,caf792ed396dd7e737574a030ae8eabe19ecdf5c@[2600:1f1c:534:8f02:b0a4:dbf6:e50b:d64e]:26656,796c62bb2af411c140cf24ddc409dff76d9d61cf@[2600:1f1c:534:8f02:ca0e:14e9:8e60:989e]:26656,cea8d05b6e01188cf6481c55b7d1bc2f31de0eed@[2600:1f1c:534:8f02:ba43:1f69:e23a:df6b]:26656"

Start node.

ununifid start

Keep your node stable

If you wanna keep your node stable, we recommend to use Cosmovisor.

https://docs.cosmos.network/master/run-node/cosmovisor.html

Setup

Set the following environment variables. Some environment variables must be set to appropriate values for each node and each network.

~/.profile

export CHAIN_REPO=https://github.com/UnUniFi/chain
export CHAIN_REPO_BRANCHE=main
export TARGET=ununifid
export TARGET_HOME=.ununifi

# This value will be different for each node.
export MONIKER=<your-moniker>
export DL_CHAIN_BIN=

# This value is example of mainnet.
export CHAIN_ID=ununifi-beta-v1

# This value is example of mainnet.
export GENESIS_FILE_URL=https://raw.githubusercontent.com/UnUniFi/network/main/launch/ununifi-beta-v1/genesis.json
export SETUP_NODE_CONFIG_ENV=TRUE
export SETUP_NODE_ENV=TRUE
export SETUP_NODE_MASTER=TRUE
export DAEMON_NAME=ununifid

# This value will be different for each node.
export DAEMON_HOME=/home/<your-user>/.ununifi
export DAEMON_ALLOW_DOWNLOAD_BINARIES=true
export DAEMON_LOG_BUFFER_SIZE=512
export DAEMON_RESTART_AFTER_UPGRADE=true
export UNSAFE_SKIP_BACKUP=true

Install Cosmovisor

cd $HOME
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/[email protected]
mkdir -p $DAEMON_HOME/cosmovisor
mkdir -p $DAEMON_HOME/cosmovisor/genesis
mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin
mkdir -p $DAEMON_HOME/cosmovisor/upgrades
cp ~/go/bin/$DAEMON_NAME $DAEMON_HOME/cosmovisor/genesis/bin

Register daemon service

Create service file.

/lib/systemd/system/cosmovisor.service

[Unit]
Description=Cosmovisor daemon
After=network-online.target
[Service]
Environment="DAEMON_NAME=ununifid"
Environment="DAEMON_HOME=/home/<your-user>/.ununifi"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_LOG_BUFFER_SIZE=512"
Environment="UNSAFE_SKIP_BACKUP=true"
User=<your-user>
ExecStart=/home/<your-user>/go/bin/cosmovisor start
Restart=always
RestartSec=3
LimitNOFILE=infinity
LimitNPROC=infinity
[Install]
WantedBy=multi-user.target

Set systemctl

sudo systemctl daemon-reload
sudo systemctl restart systemd-journald
sudo systemctl enable cosmovisor

Start node with cosmovisor

Start node.

sudo systemctl start cosmovisor

You can check your node status with the following command.

$ sudo systemctl status cosmovisor

# Log sample
● cosmovisor.service - Cosmovisor daemon
      Loaded: loaded (/lib/systemd/system/cosmovisor.service; enabled; vendor preset: enabled)
      Active: active (running) since Mon 2022-05-16 17:57:24 +08; 46s ago
    Main PID: 232015 (cosmovisor)
      Tasks: 29 (limit: 36046)
      Memory: 123.3M
      CGroup: /system.slice/cosmovisor.service
              ├─232015 /home/ununifi/go/bin/cosmovisor start
              └─232029 /home/ununifi/.ununifi/cosmovisor/genesis/bin/ununifid start

May 16 17:57:26 cosmovisor[232029]: 5:57PM INF Completed ABCI Handshake - Tendermint and App are synced appHash= appHeight=0 module=consensus
May 16 17:57:26 cosmovisor[232029]: 5:57PM INF Version info block=11 p2p=8 tendermint_version=v0.34.16
May 16 17:57:26 cosmovisor[232029]: 5:57PM INF This node is not a validator addr=83FD137D6541F5198D7107FE6B75ACDDBCC72329 module=consensus pubKey=B8tjjYkW51s6bFqDNRIhJdZJsTR68Ez>
May 16 17:57:26 cosmovisor[232029]: 5:57PM INF P2P Node ID ID=729318b4ee913b1d56a1fe22b93860aa01bff82a file=/home/ununifi/.ununifi/config/node_key.json module=p2p
May 16 17:57:26 cosmovisor[232029]: 5:57PM INF Adding persistent peers addrs=["[email protected]:26656","404ea79bd31b1734caacced7a05>
May 16 17:57:26 cosmovisor[232029]: 5:57PM INF Adding unconditional peer ids ids=[] module=p2p
May 16 17:57:26 cosmovisor[232029]: 5:57PM INF Add our address to book addr={"id":"729318b4ee913b1d56a1fe22b93860aa01bff82a","ip":"0.0.0.0","port":26656} book=/home/ununifi/.unu>
May 16 17:57:26 cosmovisor[232029]: 5:57PM INF Starting Node service impl=Node
May 16 17:57:26 cosmovisor[232029]: 5:57PM INF Genesis time is in the future. Sleeping until then... genTime=2022-05-17T03:00:00Z
May 16 17:57:26 cosmovisor[232029]: 5:57PM INF Starting pprof server laddr=localhost:6060

License

Copyright © UnUniFi development team. All rights reserved.

Licensed under the Apache v2 License.

chain's People

Contributors

senna46 avatar mkxultra avatar kimurayu45z avatar jununifi avatar rhuairahrighairidh avatar taiki1frsh avatar yasunorimatsuoka avatar karzak avatar fedekunze avatar hikarunagamine avatar denalimarsh avatar nddeluca avatar tomosuke0930 avatar olwee avatar jmahess avatar kourin1996 avatar alexanderbez avatar kincaidoneil avatar saturn-radius avatar gr8scott06 avatar jmaheswaran avatar lovincyrus avatar fadeev avatar jackzampolin avatar dependabot[bot] avatar

Stargazers

 avatar Öß1_ðx avatar Matth3w Lui avatar yuk6ra avatar Omar avatar angleX avatar Chris avatar makhdoom13 avatar kobakaku avatar fuyutarow avatar  avatar  avatar Javed Khan avatar Fiqih Firdaus Maulana avatar Daniel Ribeiro avatar Aoi Kurokawa avatar Kevein Bluce avatar nuno avatar Nodeist avatar Jason Novinger avatar  avatar  avatar  avatar h-gocchi avatar Dbngothuynga avatar  avatar  avatar Elsie Soriano  avatar  avatar Mehdish14  avatar じぇい avatar Peter Blockman avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

chain's Issues

[優先度 中] incentive/keeper/keeper_test.go test修正

123 行目 func TestKeeperTestSuiteにて

Running tool: /usr/local/go/bin/go test -timeout 30s -run ^TestKeeperTestSuite$ github.com/lcnem/jpyx/x/incentive/keeper

--- FAIL: TestKeeperTestSuite (0.01s)
    --- FAIL: TestKeeperTestSuite/TestAccumulateJpyxMintingRewards (0.01s)
        --- FAIL: TestKeeperTestSuite/TestAccumulateJpyxMintingRewards/7_seconds (0.00s)
panic: bad Duration: time: missing unit in duration "1814400000000000" [recovered]
	panic: bad Duration: time: missing unit in duration "1814400000000000"

goroutine 185 [running]:
testing.tRunner.func1.2({0x512dd00, 0xc0011dc570})
	/usr/local/go/src/testing/testing.go:1209 +0x24e
testing.tRunner.func1()
	/usr/local/go/src/testing/testing.go:1212 +0x218
panic({0x512dd00, 0xc0011dc570})
	/usr/local/go/src/runtime/panic.go:1038 +0x215
github.com/cosmos/cosmos-sdk/codec.(*ProtoCodec).MustUnmarshalJSON(0x0, {0xc0011b0180, 0x0, 0x575c368}, {0x573b300, 0xc0000fd600})
	/Users/tom/go/pkg/mod/github.com/cosmos/[email protected]/codec/proto_codec.go:160 +0x45
github.com/cosmos/cosmos-sdk/x/staking.AppModule.InitGenesis({{{0x5783178, 0xc0010d8480}}, {{0x57324c0, 0xc0010d9680}, {0x577af28, 0xc0010d8480}, {0x5762678, 0xc0010dd8c0}, {0x2ffcf478, 0xc00111c420}, ...}, ...}, ...)
	/Users/tom/go/pkg/mod/github.com/cosmos/[email protected]/x/staking/module.go:148 +0xa2
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(_, {{0x575bf08, 0xc00011e008}, {0x5778db0, 0xc0005b5240}, {{0x0, 0x0}, {0x0, 0x0}, 0x0, ...}, ...}, ...)
	/Users/tom/go/pkg/mod/github.com/cosmos/[email protected]/types/module/module.go:304 +0x29d
github.com/lcnem/jpyx/app.(*App).InitChainer(_, {{0x575bf08, 0xc00011e008}, {0x5778db0, 0xc0005b5240}, {{0x0, 0x0}, {0x0, 0x0}, 0x0, ...}, ...}, ...)
	/Users/Tom/Desktop/Works/lcnem/cosmos/jpyx/app/app.go:547 +0x129
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc000ddbba0, {{0x0, 0x0, 0x0}, {0x0, 0x0}, 0x0, {0x63d9798, 0x0, 0x0}, ...})
	/Users/tom/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/abci.go:62 +0x475
github.com/lcnem/jpyx/app.TestApp.InitializeFromGenesisStates({{0xc000ddbba0, 0xc0000b2de8, {0x5783178, 0xc0010d8480}, {0x576b2a0, 0xc0010b3380}, 0x0, 0xc0010fadb0, 0xc0010fade0, 0xc0010fae10, ...}}, ...)
	/Users/Tom/Desktop/Works/lcnem/cosmos/jpyx/app/test_common.go:115 +0x178
github.com/lcnem/jpyx/x/incentive/keeper_test.(*KeeperTestSuite).SetupWithGenState(0xc000eae000)
	/Users/Tom/Desktop/Works/lcnem/cosmos/jpyx/x/incentive/keeper/integration_test.go:222 +0x2ab
github.com/lcnem/jpyx/x/incentive/keeper_test.(*KeeperTestSuite).TestAccumulateJpyxMintingRewards.func1()
	/Users/Tom/Desktop/Works/lcnem/cosmos/jpyx/x/incentive/keeper/rewards_test.go:67 +0x4e
github.com/stretchr/testify/suite.(*Suite).Run.func1(0xc000ddad00)
	/Users/tom/go/pkg/mod/github.com/stretchr/[email protected]/suite/suite.go:77 +0xf2
testing.tRunner(0xc000ddad00, 0xc0010b3158)
	/usr/local/go/src/testing/testing.go:1259 +0x102
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1306 +0x35a
FAIL	github.com/lcnem/jpyx/x/incentive/keeper	1.267s
FAIL

[優先度 中] incentive/types/genesis_test.go test修正

Running tool: /Users/tom/.goenv/versions/1.16.4/bin/go test -timeout 30s -run ^TestGenesisStateValidate$ github.com/lcnem/jpyx/x/incentive/types
--- FAIL: TestGenesisStateValidate (0.00s)
    --- FAIL: TestGenesisStateValidate/invalid_genesis_accumulation_time (0.00s)
        /Users/Tom/Desktop/Works/lcnem/cosmos/jpyx/x/incentive/types/genesis_test.go:141: 
            	Error Trace:	genesis_test.go:141
            	Error:      	An error is expected but got nil.
            	Test:       	TestGenesisStateValidate/invalid_genesis_accumulation_time
            	Messages:   	invalid genesis accumulation time
FAIL
FAIL	github.com/lcnem/jpyx/x/incentive/types	0.444s
FAIL

The duplication of the tx command option: vesting

In the state that chain using develop branch, when you run a command ununifid tx --help,
you get (part of the result)

  vesting             Vesting transaction subcommands
  vesting             Vesting transaction subcommands

vesting option is duplicated.

ibc transferとgravitydexの無効化

ibc transferはここをfalse
https://github.com/lcnem/jpyx/blob/main/launch/jpyx-3-test/genesis-pretty.json#L722
https://github.com/lcnem/jpyx/blob/main/launch/jpyx-3-test/genesis-pretty.json#L723

liquidityを無効化するには
https://github.com/lcnem/jpyx/blob/main/launch/jpyx-3-test/genesis-pretty.json#L619
このpool_types配列を空にすれば良いと思います。
配列をもとに戻すときのために、いまここで配列の内容をメモっておきます。

{
  "id": 1,
  "name": "StandardLiquidityPool",
  "min_reserve_coin_num": 2,
  "max_reserve_coin_num": 2,
  "description": "Standard liquidity pool with pool price function X/Y, ESPM constraint, and two kinds of reserve coins"
}

(ついでにliquidityの誤り修正として
https://github.com/lcnem/jpyx/blob/main/launch/jpyx-3-test/genesis-pretty.json#L633
"stake""ujcbn"に直していただくのもお願いします)

CosmoscanのInflation表示機能に対応していない

新APIを使用しているCosmoscan使用時にsupplyなどは取れるが,inflationが取れない。

user@Blade15 ~ % curl http://a.test.jpyx.lcnem.net:1317/cosmos/mint/v1beta1/inflation
{
  "code": 2,
  "message": "panic message redacted to hide potentially sensitive system info: panic",
  "details": [
  ]
}%                                                                                                                      
user@Blade15 ~ % curl http://a.test.jpyx.lcnem.net:1317/cosmos/bank/v1beta1/supply
{
  "supply": [
    {
      "denom": "ubtc",
      "amount": "4000000"
    },
    {
      "denom": "ujsmn",
      "amount": "1036213169235"
    }
  ]
}%  

なお,旧APIだと取得できるため,JPYX側のバージョンの問題かと思われます。

user@Blade15 ~/jpyx % curl http://a.test.jpyx.lcnem.net:1317/minting/inflation
{"height":"1879251","result":"0.128864730355965974"}%

Forgot private key

Hi dear sir/medam
I have faced same issue
When i fill this airdrop nd create new account
I totally forgot to recover private key
Now when i see airdrop winner list
My acc address show in winners list
But when i go in website it's show enter your private key nd that i dont have so please help me dear sir/medam
I humble request you

Some files seem to be unnecessary

Describe the bug
A clear and concise description of what the bug is.

This is not a bug but some files are unnecessary?
They are only for debug or communication?
They should be removed?
(Of course priority can be low.)

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Query `loan` by class_id and nft_id

Is your feature request related to a problem? Please describe.
I want to query loan by class_id and nft_id.

Describe the solution you'd like
REST api like /ununifi/nftmarket/loans/:class_id/:nft_id

tendermint rpcのwebsocketのみ、nginxでリバースプロキシ

tendermint rpcのwebsocket、localhost以外にさらしてない可能性が高いので、nginxでリバースプロキシをしたい

なので

  • docker composeにnginx構成を足しつつ、
  • wsのみリバースプロキシするnginx.confも作り、
  • readmeにそれDLするコマンドを書き足す。

httpにはデリケートなapiがあるので、httpはなしで、websocketのみで良い

listed NFT is returned twice

Describe the bug
listed NFT is returned twice

chain id: ununifi-bubble-test-v6

To Reproduce
Steps to reproduce the behavior:

  1. GET https://ununifi-bubble-test-v6.cauchye.net:1318/ununifi/nftmarket/listed_class/ununifi-2F877964AAC53FC39A5FCD82F010B50189FBC428/10
{
  "class_id": "ununifi-2F877964AAC53FC39A5FCD82F010B50189FBC428",
  "name": "example_s5",
  "description": "this is example nft collection for ununifi",
  "symbol": "unexs5",
  "uri": "ipfs://QmRgteLbibwiLY1QHmx55XqL5MZGfaHqcHoBsEy34prEfD//class",
  "urihash": "",
  "nfts": [
    {
      "id": "a01",
      "uri": "ipfs://QmRgteLbibwiLY1QHmx55XqL5MZGfaHqcHoBsEy34prEfD/a01",
      "uri_hash": ""
    },
    {
      "id": "a02",
      "uri": "ipfs://QmRgteLbibwiLY1QHmx55XqL5MZGfaHqcHoBsEy34prEfD/a02",
      "uri_hash": ""
    },
    {
      "id": "a03",
      "uri": "ipfs://QmRgteLbibwiLY1QHmx55XqL5MZGfaHqcHoBsEy34prEfD/a03",
      "uri_hash": ""
    },
    {
      "id": "a01",
      "uri": "ipfs://QmRgteLbibwiLY1QHmx55XqL5MZGfaHqcHoBsEy34prEfD/a01",
      "uri_hash": ""
    },
    {
      "id": "a02",
      "uri": "ipfs://QmRgteLbibwiLY1QHmx55XqL5MZGfaHqcHoBsEy34prEfD/a02",
      "uri_hash": ""
    },
    {
      "id": "a03",
      "uri": "ipfs://QmRgteLbibwiLY1QHmx55XqL5MZGfaHqcHoBsEy34prEfD/a03",
      "uri_hash": ""
    }
  ],
  "nft_count": "6"
}

Expected behavior

{
  "class_id": "ununifi-2F877964AAC53FC39A5FCD82F010B50189FBC428",
  "name": "example_s5",
  "description": "this is example nft collection for ununifi",
  "symbol": "unexs5",
  "uri": "ipfs://QmRgteLbibwiLY1QHmx55XqL5MZGfaHqcHoBsEy34prEfD//class",
  "urihash": "",
  "nfts": [
    {
      "id": "a01",
      "uri": "ipfs://QmRgteLbibwiLY1QHmx55XqL5MZGfaHqcHoBsEy34prEfD/a01",
      "uri_hash": ""
    },
    {
      "id": "a02",
      "uri": "ipfs://QmRgteLbibwiLY1QHmx55XqL5MZGfaHqcHoBsEy34prEfD/a02",
      "uri_hash": ""
    },
    {
      "id": "a03",
      "uri": "ipfs://QmRgteLbibwiLY1QHmx55XqL5MZGfaHqcHoBsEy34prEfD/a03",
      "uri_hash": ""
    },
  ],
  "nft_count": "3"
}

nft uri is registered incorrectly

Describe the bug
nft uri is registered incorrectly

Current URI

> ununifid tx nftmint mint-nft ununifi-00827091B68269322ED6054A43F35B1F3DA79F28 a00  ununifi155u042u8wk3al32h3vzxu989jj76k4zcu44v6w --chain-id=ununifi-bubble-test-v5 --from=my_validator --keyring-backend=test --gas=300000 -y --broadcast-mode=block
> ununifid q nft nfts --owner ununifi155u042u8wk3al32h3vzxu989jj76k4zcu44v6w
nfts:
- class_id: ununifi-C401ECC57BB9F3F1CF9D03CF2AFCBBB9BB344023
  data: null
  id: a00
  uri: ipfs://QmTAvkJ9uUCLYTopHcE2quexY6X6Cvo7rwnncKPijwMVs6a00
  uri_hash: ""

Correct URI

> ununifid tx nftmint mint-nft ununifi-00827091B68269322ED6054A43F35B1F3DA79F28 a00  ununifi155u042u8wk3al32h3vzxu989jj76k4zcu44v6w --chain-id=ununifi-bubble-test-v5 --from=my_validator --keyring-backend=test --gas=300000 -y --broadcast-mode=block
> ununifid q nft nfts --owner ununifi155u042u8wk3al32h3vzxu989jj76k4zcu44v6w
nfts:
- class_id: ununifi-C401ECC57BB9F3F1CF9D03CF2AFCBBB9BB344023
  data: null
  id: a00
  uri: ipfs://QmTAvkJ9uUCLYTopHcE2quexY6X6Cvo7rwnncKPijwMVs6/a00
  uri_hash: ""

To Reproduce
Steps to reproduce the behavior:

ununifid tx nftmint create-class example_s1 ipfs://Qmd73atWWU7qHi3zWXUkeSmwyaXbnweeXLAprWrtKWrGPn 4 0 --class-uri ipfs://Qmd73atWWU7qHi3zWXUkeSmwyaXbnweeXLAprWrtKWrGPn/class --description="this is example nft collection for ununifi" --chain-id=ununifi-bubble-test-v5 --from=my_validator --keyring-backend=test --gas=300000 -y --broadcast-mode=block
ununifid q nftmint class-ids-by-owner  $(ununifid keys show -a my_validator)
ununifid q nftmint class-attributes ununifi-00827091B68269322ED6054A43F35B1F3DA79F28

ununifid tx nftmint mint-nft ununifi-00827091B68269322ED6054A43F35B1F3DA79F28 a00  ununifi155u042u8wk3al32h3vzxu989jj76k4zcu44v6w --chain-id=ununifi-bubble-test-v5 --from=my_validator --keyring-backend=test --gas=300000 -y --broadcast-mode=block
ununifid q nft nfts --owner ununifi155u042u8wk3al32h3vzxu989jj76k4zcu44v6w

Desktop (please complete the following information):

  • OS: windows
  • Browser none[e.g. chrome, safari]
  • Version newDevelop branch [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

change cdp minimum lot

pricefeedをaのノードで動作させ、aのノード上で、cdpをcreateするコマンドを実行したところ、以下のような結果になりました。エラーメッセージを素直に読むと、cdpをcreateできる単位が10000000ubtc, 10000000jpyいずれかのように見え、いずれの場合も、単位が大きすぎる設定になっているように見えました。

root@jpyx-test-a:~/jpyx-telescope# jpyxd tx cdp create-cdp 10ubtc 1jpyx ubtc-a --from faucet --chain-id jpyx-3-test
{"body":{"messages":[{"@type":"/botany.cdp.MsgCreateCdp","sender":"jpyx1nxyujwckzwyg870gk9m9qzp9z2av00we6fks99","collateral":{"denom":"ubtc","amount":"10"},"principal":{"denom":"jpyx","amount":"1"},"collateral_type":"ubtc-a"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}

confirm transaction before signing and broadcasting [y/N]: y
{"height":"288309","txhash":"0322F3EC11567364A15481E7E558389C6161488362B1450104AB4710A6539EE5","codespace":"cdp","code":15,"data":"","raw_log":"failed to execute message; message index: 0: proposed 1jpyx \u003c minimum 10000000: proposed cdp debt is below minimum","logs":[],"info":"","gas_wanted":"200000","gas_used":"63958","tx":null,"timestamp":""}

cdp paramsの中の該当箇所の設定値を変更して修正を試みます。

Hooks in x/nftmarket and Method to get memo to pass in the hook

For the frontend-incentive module, I'd like x/nftmarket module to have hooks for the timing of listing NFT and ending listing.

The hook style reference is here:
https://github.com/UnUniFi/chain/blob/main/x/cdp/types/hooks.go
https://github.com/UnUniFi/chain/blob/main/x/cdp/keeper/hooks.go

This hook style doesn't create the two-way interaction between the modules using the hooks.

And, in the listing creation hook, a memo data is required to be in.

Query status "whether an address has been paid"

Is your feature request related to a problem? Please describe.
I want to know if an address has been paid

Describe the solution you'd like
I want to query the payment status of the corresponding NFT by class_id, nft_id, bidder address.

  • add parameter to bid?
  • Increase dedicated queries?

[優先度 中] auction/keeper/keeper_test.go test修正

Running tool: /Users/tom/.goenv/versions/1.16.4/bin/go test -timeout 30s -run ^TestIterateAuctions$ github.com/lcnem/jpyx/x/auction/keeper

# github.com/keybase/go-keychain
cgo-gcc-prolog:203:11: warning: 'SecTrustedApplicationCreateFromPath' is deprecated: first deprecated in macOS 10.15 - No longer supported [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecTrustedApplication.h:59:10: note: 'SecTrustedApplicationCreateFromPath' has been explicitly marked deprecated here
--- FAIL: TestIterateAuctions (0.00s)
panic: interface conversion: interface is nil, not types.Auction [recovered]
	panic: interface conversion: interface is nil, not types.Auction

goroutine 67 [running]:
testing.tRunner.func1.2(0x1015996a0, 0x14001044660)
	/Users/tom/.goenv/versions/1.16.4/src/testing/testing.go:1143 +0x25c
testing.tRunner.func1(0x14000183c80)
	/Users/tom/.goenv/versions/1.16.4/src/testing/testing.go:1146 +0x384
panic(0x1015996a0, 0x14001044660)
	/Users/tom/.goenv/versions/1.16.4/src/runtime/panic.go:965 +0x14c
github.com/lcnem/jpyx/x/auction/keeper.Keeper.IterateAuctions(0x1017cc238, 0x14000ee10c0, 0x10179dbf8, 0x14000f0a370, 0x10179dbf8, 0x0, 0x1017c7a88, 0x14000ee10c0, 0x140001aecd8, 0x10179dbf8, ...)
	/Users/Tom/Desktop/Works/lcnem/cosmos/jpyx/x/auction/keeper/keeper.go:175 +0x168
github.com/lcnem/jpyx/x/auction/keeper_test.TestIterateAuctions(0x14000183c80)
	/Users/Tom/Desktop/Works/lcnem/cosmos/jpyx/x/auction/keeper/keeper_test.go:87 +0x7b4
testing.tRunner(0x14000183c80, 0x10175e778)
	/Users/tom/.goenv/versions/1.16.4/src/testing/testing.go:1193 +0xe0
created by testing.(*T).Run
	/Users/tom/.goenv/versions/1.16.4/src/testing/testing.go:1238 +0x21c
FAIL	github.com/lcnem/jpyx/x/auction/keeper	0.289s
FAIL

Bidder bids query returns empty array

Describe the bug
Bidder bids query returns empty array.

To Reproduce

  1. From address ununifi155u042u8wk3al32h3vzxu989jj76k4zcu44v6w bid to class_id: "ununifi-0E0E04829C2C32C65181684F3C2DE5358F375635", nft_id: "a04"
  2. Call https://ununifi-bubble-test-v6.cauchye.net:1318/ununifi/nftmarket/bidder_bids/ununifi155u042u8wk3al32h3vzxu989jj76k4zcu44v6w
  3. Returns empty array.
{
  bids: [];
}

Expected behavior

{
  bids: [
    {
      nft_id: {
        class_id: "ununifi-0E0E04829C2C32C65181684F3C2DE5358F375635",
        nft_id: "a04",
      },
      bidder: "ununifi155u042u8wk3al32h3vzxu989jj76k4zcu44v6w",
      amount: {
        denom: "uguu",
        amount: "1",
      },
      automatic_payment: false,
      paid_amount: "1",
      bid_time: "2022-08-29T06:53:29.421545296Z",
    },
  ];
}

Additional context
Calling nft_bids will return a value.
https://ununifi-bubble-test-v6.cauchye.net:1318/ununifi/nftmarket/nft_bids/ununifi-0E0E04829C2C32C65181684F3C2DE5358F375635/a04

proto config and the way to generate files from them

Currently, we place third party proto files directly in our repository without having buf configs under proto folder to configure the rules to generate files from proto files.
Also we use old versin of buf and protoc to be compatible with the old way to generate them.
So the goal is to remove buf protoc way and construct new way to generate go files from proto files with buf generate command.
References:
https://github.com/osmosis-labs/osmosis/blob/ab06a4f8e938f930c4cc9bab5606f453a88c9ac6/Makefile#L168
https://github.com/osmosis-labs/osmosis/blob/ab06a4f8e938f930c4cc9bab5606f453a88c9ac6/scripts/protocgen.sh
https://github.com/osmosis-labs/osmosis/blob/ab06a4f8e938f930c4cc9bab5606f453a88c9ac6/scripts/generate-proto.sh

cmd failed (jpyxd tx cdp create-cdp 10ubtc 10jpyx ubtc-a --from main --chain-id jpyx-3-test)

jpyxd tx cdp create-cdp 10ubtc 10jpyx ubtc-a --from main --chain-id jpyx-3-test
Error: unable to resolve type URL /botany.cdp.MsgCreateCdp
Usage:
  jpyxd tx cdp create-cdp [collateral] [debt] [collateral-type] [flags]

Flags:
  -a, --account-number uint      The account number of the signing account (offline mode only)
  -b, --broadcast-mode string    Transaction broadcasting mode (sync|async|block) (default "sync")
      --dry-run                  ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it
      --fees string              Fees to pay along with transaction; eg: 10uatom
      --from string              Name or address of private key with which to sign
      --gas string               gas limit to set per-transaction; set to "auto" to calculate sufficient gas automatically (default 200000)
      --gas-adjustment float     adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored  (default 1)
      --gas-prices string        Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom)
      --generate-only            Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase is not accessible)
  -h, --help                     help for create-cdp
      --keyring-backend string   Select keyring's backend (os|file|kwallet|pass|test|memory) (default "test")
      --keyring-dir string       The client Keyring directory; if omitted, the default 'home' directory will be used
      --ledger                   Use a connected Ledger device
      --memo string              Memo to send along with transaction
      --node string              <host>:<port> to tendermint rpc interface for this chain (default "tcp://localhost:26657")
      --offline                  Offline mode (does not allow any online functionality
  -o, --output string            Output format (text|json) (default "json")
  -s, --sequence uint            The sequence number of the signing account (offline mode only)
      --sign-mode string         Choose sign mode (direct|amino-json), this is an advanced feature
      --timeout-height uint      Set a block timeout height to prevent the tx from being committed past a certain height
  -y, --yes                      Skip tx broadcasting prompt confirmation

Global Flags:
      --chain-id string     The network chain ID
      --home string         directory for config and data (default "/root/.jpyx")
      --log_format string   The logging format (json|plain) (default "plain")
      --log_level string    The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
      --trace               print out full stack trace on errors

アカウント情報ページでVesting Accountの残高が表示されない

APIが正常な残高を返しているが、画面では残高なしの表示になっている。
これまでのテストネットではVesting Accountが存在しなかったため、アドレスのバリデーションのようなプロセスでVesting Accountの存在が考慮されておらず、Invalidなアドレス扱いになっているかもしれない。

http://a.test.ununifi.cauchye.net/accounts/ununifi1gcn8y49vlkzxayttncw9zxywh9ghu06jcycegg

image

Separation of launch folder

Since we created network repository which contains launch folder in this repository, we should remove launch folder from this repository.

jpyx-2 アップデートのgentx

https://docs.google.com/spreadsheets/d/1hse7An8snWKhCb3NZBkzVh4QLnlOX563u_foh4VZBJE/edit#gid=0
こちらのシートだとLCNEM 1ノード、Neukind 2ノードが未記載

jpyx-1ではlcnem-aとlcnem-bの2つがここに記載されていないノードでpublic key不明ですが、gentxには何を含めれば良いのでしょうか?

現状、これらを除いた13ノードを記載したシェルスクリプトを作っています。

#!/bin/sh

# lcnem-a

# lcnem-b

# mano-san genio
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from mano-san-1 ip jpyx.mainnet.validator.genio.neukind.network --moniker genio --identity genio --node-id "" --pubkey jpyxvalconspub1zcjduepqc0qh49vf7gypaj4evzn50dzala5ysh0w0tevgdqldv3nm95d8v6sqvx8fg

# niikura-san-1 zofuku-japan
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from niikura-san-1 ip jpyx.mainnet.validator.zofuku-japan.neukind.network --moniker zofuku-japan --identity zofuku_japan --node-id "" --pubkey jpyxvalconspub1zcjduepqw5qee4h96ferfjfcu4gxkwdtq4zq3tdw5gat4sgvjrs6m8rld2gsm3a59h

# niikura-san-2 zofuku-tokyo
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from niikura-san-2 ip jpyx.mainnet.validator.zofuku-tokyo.neukind.network --moniker zofuku-tokyo --identity zofuku_tokyo --node-id "" --pubkey jpyxvalconspub1zcjduepqd06a5ae7343tv662728nugjl2rhd8gml3upal79n38tp4js299qswr6qhh

# chikako-kurita-1 chikako0903
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from chikako-kurita-1 ip jpyx.mainnet.validator.chikako0930.neukind.network --moniker chikako0903 --identity chikako0903 --node-id "" --pubkey jpyxvalconspub1zcjduepqcx6fccqggvqhyfpx00gkthv49we40pdglae3hkrwhy0q8drv7qjqtlhjfv

# yoichiro-kurita-1 kurata0211
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from yoichiro-kurita-1 ip jpyx.mainnet.validator.kurata0211.neukind.network --moniker kurata0211 --identity kurata0211 --node-id "" --pubkey jpyxvalconspub1zcjduepqsfdtdq2fqedlwkd93pr25al6a2gva0tzlwu60y8nz7hgwmzrah0qqt324h

# takano-san-1 keyplayers01
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from takano-san-1 ip jpyx.mainnet.validator.keyplayers01.neukind.network --moniker keyplayers01 --identity keyplayers01 --node-id "" --pubkey jpyxvalconspub1zcjduepqucxcr7nl5l49dsc04r036ea8vkwhd9grar6xgxxtg4dhz967yh7qdq4p8k

# takano-san-2 keyplayers02
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from takano-san-2 ip jpyx.mainnet.validator.keyplayers02.neukind.network --moniker keyplayers02 --identity keyplayers02 --node-id "" --pubkey jpyxvalconspub1zcjduepqx86xjj20tw7wt0cra9cpyh4zmuka9cx05255k24ypyt97ysdxsqsm2emyt

# tokyo-0
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from tokyo-0 ip jpyx.mainnet.validator.tokyo-0.neukind.network --moniker tokyo-0 --identity tokyo-0 --node-id "" --pubkey jpyxvalconspub1zcjduepq06hef840twnjqeemqqx4mhrtcydm4gcvxdedz5txtf9088s5w5qsjx008n

# tokyo-1
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from tokyo-1 ip jpyx.mainnet.validator.tokyo-1.neukind.network --moniker tokyo-1 --identity tokyo-1 --node-id "" --pubkey jpyxvalconspub1zcjduepq78mjsrtmgt96uze02j4s43w32fcl5ua0vlm0hx08lw4pm88uyuts5uc00w

# tokyo-2
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from tokyo-2 ip jpyx.mainnet.validator.tokyo-2.neukind.network --moniker tokyo-2 --identity tokyo-2 --node-id "" --pubkey jpyxvalconspub1zcjduepqa23wcrkccpaa3dflgq3x0rq3s99ptrwvywhdlgyyt86ulmhm6sqq0mhufy

# tokyo-3
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from tokyo-3 ip jpyx.mainnet.validator.tokyo-3.neukind.network --moniker tokyo-3 --identity tokyo-3 --node-id "" --pubkey jpyxvalconspub1zcjduepqlv0z8epq90stsavujfhnjph9ru30eqqsjj6eeeqa3j5ddmkuazeqqz994q

# tokyo-4
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from tokyo-4 ip jpyx.mainnet.validator.tokyo-4.neukind.network --moniker tokyo-4 --identity tokyo-4 --node-id "" --pubkey jpyxvalconspub1zcjduepqulr7qeykw4rauddf5u5u0vzvc8pxw3ld2e6mcar7yvrtn9nmstpqkfetmh

# add val iijima-san-1 toko1631
jpyxd gentx --amount 5000000000ujsmn --chain-id jpyx-2 --from iijima-san-1 ip jpyx.mainnet.validator.toko1631.neukind.network --moniker toko1631 --identity toko1631 --node-id "" --pubkey jpyxvalconspub1zcjduepqg0ug5x8xt8y52ydlxqrfw2de8a22mjwj7an9jj2mln5z6qp2h82sn4yeyh


# gentx-"hash".json into genesis.json
jpyxd collect-gentxs

CD to build and push new docker image to ghcr.io fail

Describe the bug
A clear and concise description of what the bug is.

After merging #151, CD to push docker image to ghcr.io fails.
https://github.com/UnUniFi/chain/actions/runs/1816402836

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

nothing

Expected behavior
A clear and concise description of what you expected to happen.

CD should be success and push new docker image to ghcr.io with test tag.

Screenshots
If applicable, add screenshots to help explain your problem.

nothing

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

nothing

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

nothing

Additional context
Add any other context about the problem here.

Following PR is not contained in UnUniFi Nod's docker image with test tag.

#151
#152

[優先度 中]AccAddressの変更

x/auction/types/auctions_test.go

	testAccAddress1         = "jpyx1qcfdf69js922qrdr4yaww3ax7gjml6pd39p8lj"
	testAccAddress2         = "jpyx1pdfav2cjhry9k79nu6r8kgknnjtq6a7rcr0qlr"

AccAddressをcosmos-client-tsなどで生成したまともな値に変更する

implement Cosmovisor

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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.