oursky / likecoin-chain

LikeCoin chain node
https://likecoin.bigdipper.live
GNU General Public License v3.0
1 stars 2 forks source link

[nft, bug] panic on mint blindbox nft #247

Closed elise-ng closed 2 years ago

elise-ng commented 2 years ago

Follow up Zube #262

./liked-3.0.0-alpha4 --node tcp://52.187.27.20:26657 --chain-id likecoin-skynet-1 tx likenft mint-nft likenft1gx39fd4p0g5kp4e0a3lea45dkx3q5qj09f4xt63a5y83qth36rrsnned6c --from faseng
{"body":{"messages":[{"@type":"/likechain.likenft.MsgMintNFT","creator":"like1m6v55nrm02f4he3s6jcfha3xgj70qyxnh8c5rf","class_id":"likenft1gx39fd4p0g5kp4e0a3lea45dkx3q5qj09f4xt63a5y83qth36rrsnned6c","id":"","input":null}],"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":"16054","txhash":"98794BD40B9D052E8317259C8CC8F3F76079B77D545536FB5E5F07B3DD18E41E","codespace":"undefined","code":111222,"data":"","raw_log":"panic message redacted to hide potentially sensitive system info: panic","logs":[],"info":"","gas_wanted":"200000","gas_used":"44575","tx":null,"timestamp":"","events":[{"type":"tx","attributes":[{"key":"ZmVl","value":"","index":false}]},{"type":"tx","attributes":[{"key":"YWNjX3NlcQ==","value":"bGlrZTFtNnY1NW5ybTAyZjRoZTNzNmpjZmhhM3hnajcwcXl4bmg4YzVyZi82","index":false}]},{"type":"tx","attributes":[{"key":"c2lnbmF0dXJl","value":"U2JVZHhQMmNDZmpsM3pOOUlHVldqV3hTSk43SnlDa1RBTnhWMDNpV3dPUUZoc05JLytOd0ZMcThDQmR3NWhobW9FMERYVHY1OGw2Z01ldWJvN25PUmc9PQ==","index":false}]}]}
elise-ng commented 2 years ago

probable due to missing module param:

./liked-3.0.0-alpha4 --node tcp://52.187.27.20:26657 --chain-id likecoin-skynet-1 query likenft params
Error: rpc error: code = Unknown desc = panic message redacted to hide potentially sensitive system info: panic
elise-ng commented 2 years ago

to add missing param:

{
  "title": "Set LikeNFT module params",
  "description": "Set LikeNFT MintPriceDenom param to nanolike",
  "changes": [
    {
      "subspace": "likenft",
      "key": "MintPriceDenom",
      "value": "nanolike"
    }
  ],
  "deposit": "10000000nanolike"
}
./liked tx gov submit-proposal param-change ./param-change.json --from azure --keyring-backend file --chain-id likecoin-skynet-1
./liked tx gov vote 1 yes --from azure --keyring-backend file --chain-id likecoin-skynet-1
elise-ng commented 2 years ago

fixed after param change proposal, however, found that the end blocker was not executing as expecting, seems we missed registering it in module.go; debugging now

elise-ng commented 2 years ago

end block issue fixed with alpha5;

results can be found via: http://52.187.27.20:26657/block_results?height=31823

in end_block_events

elise-ng commented 2 years ago

Documenting param change proposal for alpha7:

{
  "title": "Set LikeNFT module params for alpha7",
  "description": "Set LikeNFT module params for alpha7",
  "changes": [
    {
      "subspace": "likenft",
      "key": "PriceDenom",
      "value": "nanolike"
    },
    {
      "subspace": "likenft",
      "key": "FeePerByte",
      "value": {
        "denom": "nanolike",
        "amount": "10000"
      }
    },
    {
      "subspace": "likenft",
      "key": "MaxOfferDurationDays",
      "value": "180"
    },
    {
      "subspace": "likenft",
      "key": "MaxListingDurationDays",
      "value": "180"
    },
     {
      "subspace": "likenft",
      "key": "MaxRoyaltyBasisPoints",
      "value": "1000"
    }
  ],
  "deposit": "10000000nanolike"
}