UnUniFi / chain

GNU General Public License v3.0
33 stars 14 forks source link

ibc transferとgravitydexの無効化 #122

Closed kimurayu45z closed 2 years ago

kimurayu45z commented 2 years ago

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"に直していただくのもお願いします)

YasunoriMATSUOKA commented 2 years ago

@KimuraYu45z 本件、liquidityの無効化を意図して、pool_types配列を空にして、gentxコマンドを実行したところ、以下のようなエラーでgentxコマンドが失敗しました。pool_types消すのはNGぽいのですが、その場合、liquidityの無効化のためには、どうするのが良いでしょうか?

Error: failed to validate genesis state: pool types must not be empty
Usage:
  jpyxd gentx [key_name] [amount] [flags]

Flags:
  -a, --account-number uint                 The account number of the signing account (offline mode only)
      --amount string                       Amount of coins to bond
  -b, --broadcast-mode string               Transaction broadcasting mode (sync|async|block) (default "sync")
      --chain-id string                     The network chain ID
      --commission-max-change-rate string   The maximum commission change rate percentage (per day)
      --commission-max-rate string          The maximum commission rate percentage
      --commission-rate string              The initial commission rate percentage
      --details string                      The validator's (optional) details
      --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 gentx
      --identity string                     The (optional) identity signature (ex. UPort or Keybase)
      --ip string                           The node's public IP (default "172.17.0.2")
      --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
      --min-self-delegation string          The minimum self delegation required on the validator
      --moniker string                      The validator's (optional) moniker
      --node string                         <host>:<port> to tendermint rpc interface for this chain (default "tcp://localhost:26657")
      --node-id string                      The node's NodeID
      --offline                             Offline mode (does not allow any online functionality
  -o, --output string                       Output format (text|json) (default "json")
      --output-document string              Write the genesis transaction JSON document to the given file instead of the default location
      --pubkey string                       The Bech32 encoded PubKey of the validator
      --security-contact string             The validator's (optional) security contact email
  -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
      --website string                      The validator's (optional) website
  -y, --yes                                 Skip tx broadcasting prompt confirmation

Global Flags:
      --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
YasunoriMATSUOKA commented 2 years ago

相談の結果、liquidityモジュールのガスの設定を、あえて存在しないトークンとしておくことで、liquidityモジュール管轄のトランザクションが成功しようもない状態としておく形で無効化しておくことにします。