Finschia / finschia-sdk

A framework for building blockchains based Finschia Mainnet that is forked from cosmos-sdk
Apache License 2.0
61 stars 31 forks source link

panic occured when start with `/cosmos.staking.v1beta1.MsgCreateValidator` #768

Closed loin3 closed 2 years ago

loin3 commented 2 years ago

Summary of Bug

panic with no message occurs when start with /cosmos.staking.v1beta1.MsgCreateValidator in foundation.params.censored_msg_type_urls.

panic: 
github.com/line/lbm-sdk/types/errors.(*Error).Wrap
    github.com/line/lbm-sdk/types/errors/errors.go:270
github.com/line/lbm-sdk/x/foundation/keeper.Keeper.GetAuthorization
    github.com/line/lbm-sdk/x/foundation/keeper/grant.go:57
github.com/line/lbm-sdk/x/foundation/keeper.Keeper.Accept
    github.com/line/lbm-sdk/x/foundation/keeper/grant.go:93
github.com/line/lbm-sdk/x/stakingplus/keeper.msgServer.CreateValidator
    github.com/line/lbm-sdk/x/stakingplus/keeper/msg_server.go:39
github.com/line/lbm-sdk/x/staking/types._Msg_CreateValidator_Handler.func1
    github.com/line/lbm-sdk/x/staking/types/tx.pb.go:660
github.com/line/lbm-sdk/baseapp.(*MsgServiceRouter).RegisterService.func2.1
    github.com/line/lbm-sdk/baseapp/msg_service_router.go:113
github.com/line/lbm-sdk/x/staking/types._Msg_CreateValidator_Handler
    github.com/line/lbm-sdk/x/staking/types/tx.pb.go:662
github.com/line/lbm-sdk/baseapp.(*MsgServiceRouter).RegisterService.func2
    github.com/line/lbm-sdk/baseapp/msg_service_router.go:117
github.com/line/lbm-sdk/baseapp.(*BaseApp).runMsgs
    github.com/line/lbm-sdk/baseapp/baseapp.go:769
github.com/line/lbm-sdk/baseapp.(*BaseApp).runTx
    github.com/line/lbm-sdk/baseapp/baseapp.go:731
github.com/line/lbm-sdk/baseapp.(*BaseApp).DeliverTx
    github.com/line/lbm-sdk/baseapp/abci.go:312
github.com/line/lbm-sdk/x/genutil.DeliverGenTxs
    github.com/line/lbm-sdk/x/genutil/gentx.go:111
github.com/line/lbm-sdk/x/genutil.InitGenesis
    github.com/line/lbm-sdk/x/genutil/genesis.go:18
github.com/line/lbm-sdk/x/genutil.AppModule.InitGenesis
    github.com/line/lbm-sdk/x/genutil/module.go:99
github.com/line/lbm-sdk/types/module.(*Manager).InitGenesis
    github.com/line/lbm-sdk/types/module/module.go:321
github.com/line/lbm-sdk/simapp.(*SimApp).InitChainer
    github.com/line/lbm-sdk/simapp/app.go:739
github.com/line/lbm-sdk/baseapp.(*BaseApp).InitChain
    github.com/line/lbm-sdk/baseapp/abci.go:62
github.com/line/ostracon/abci/client.(*localClient).InitChainSync
    github.com/line/ostracon@v1.0.7-0.20220729051742-2231684789c6/abci/client/local_client.go:287
github.com/line/ostracon/proxy.(*appConnConsensus).InitChainSync
    github.com/line/ostracon@v1.0.7-0.20220729051742-2231684789c6/proxy/app_conn.go:81
github.com/line/ostracon/consensus.(*Handshaker).ReplayBlocks
    github.com/line/ostracon@v1.0.7-0.20220729051742-2231684789c6/consensus/replay.go:319
github.com/line/ostracon/consensus.(*Handshaker).Handshake
    github.com/line/ostracon@v1.0.7-0.20220729051742-2231684789c6/consensus/replay.go:268
github.com/line/ostracon/node.doHandshake
    github.com/line/ostracon@v1.0.7-0.20220729051742-2231684789c6/node/node.go:359
github.com/line/ostracon/node.NewNode
    github.com/line/ostracon@v1.0.7-0.20220729051742-2231684789c6/node/node.go:778
github.com/line/lbm-sdk/server.startInProcess
    github.com/line/lbm-sdk/server/start.go:297
github.com/line/lbm-sdk/server.StartCmd.func2
    github.com/line/lbm-sdk/server/start.go:136
github.com/spf13/cobra.(*Command).execute
    github.com/spf13/cobra@v1.6.1/command.go:916
github.com/spf13/cobra.(*Command).ExecuteC
    github.com/spf13/cobra@v1.6.1/command.go:1044
github.com/spf13/cobra.(*Command).Execute
    github.com/spf13/cobra@v1.6.1/command.go:968
github.com/spf13/cobra.(*Command).ExecuteContext
    github.com/spf13/cobra@v1.6.1/command.go:961
github.com/line/lbm-sdk/server/cmd.Execute
    github.com/line/lbm-sdk/server/cmd/execute.go:40
main.main
    github.com/line/lbm-sdk/simapp/simd/main.go:15
failed to execute message; message index: 0: authorization not found: unauthorized

goroutine 1 [running]:
github.com/line/lbm-sdk/x/genutil.DeliverGenTxs({{0x309fb20, 0xc0001a61c0}, {0x30b0200, 0xc000595b40}, {{0x0, 0x0}, {0xc000466610, 0xc}, 0x0, {0x1fc37c28, ...}, ...}, ...}, ...)
    github.com/line/lbm-sdk/x/genutil/gentx.go:113 +0x269
github.com/line/lbm-sdk/x/genutil.InitGenesis(...)
    github.com/line/lbm-sdk/x/genutil/genesis.go:18
github.com/line/lbm-sdk/x/genutil.AppModule.InitGenesis({{}, {_, _}, {_, _}, _, {_, _}}, {{0x309fb20, 0xc0001a61c0}, ...}, ...)
    github.com/line/lbm-sdk/x/genutil/module.go:99 +0x13f
github.com/line/lbm-sdk/types/module.(*Manager).InitGenesis(_, {{0x309fb20, 0xc0001a61c0}, {0x30b0200, 0xc000595b40}, {{0x0, 0x0}, {0xc000466610, 0xc}, 0x0, ...}, ...}, ...)
    github.com/line/lbm-sdk/types/module/module.go:321 +0x286
github.com/line/lbm-sdk/simapp.(*SimApp).InitChainer(_, {{0x309fb20, 0xc0001a61c0}, {0x30b0200, 0xc000595b40}, {{0x0, 0x0}, {0xc000466610, 0xc}, 0x0, ...}, ...}, ...)
    github.com/line/lbm-sdk/simapp/app.go:739 +0x1cf
github.com/line/lbm-sdk/baseapp.(*BaseApp).InitChain(0xc0000ec1e0, {{0x1fc37c28, 0xedaec5934, 0x0}, {0xc000466610, 0xc}, 0xc000417a60, {0x429fc80, 0x0, 0x0}, ...})
    github.com/line/lbm-sdk/baseapp/abci.go:62 +0x435
github.com/line/ostracon/abci/client.(*localClient).InitChainSync(0xc00043afc0, {{0x1fc37c28, 0xedaec5934, 0x0}, {0xc000466610, 0xc}, 0xc000417a60, {0x429fc80, 0x0, 0x0}, ...})
    github.com/line/ostracon@v1.0.7-0.20220729051742-2231684789c6/abci/client/local_client.go:287 +0x118
github.com/line/ostracon/proxy.(*appConnConsensus).InitChainSync(0x0?, {{0x1fc37c28, 0xedaec5934, 0x0}, {0xc000466610, 0xc}, 0xc000417a60, {0x429fc80, 0x0, 0x0}, ...})
    github.com/line/ostracon@v1.0.7-0.20220729051742-2231684789c6/proxy/app_conn.go:81 +0x55
github.com/line/ostracon/consensus.(*Handshaker).ReplayBlocks(_, {{{0xb, 0x0}, {0x0, 0x0}}, {0xc000466610, 0xc}, 0x1, 0xc000466878, 0x0, ...}, ...)
    github.com/line/ostracon@v1.0.7-0.20220729051742-2231684789c6/consensus/replay.go:319 +0xc98
github.com/line/ostracon/consensus.(*Handshaker).Handshake(0xc001289c68, {0x30b0b48, 0xc000d2cd00})
    github.com/line/ostracon@v1.0.7-0.20220729051742-2231684789c6/consensus/replay.go:268 +0x3c8
github.com/line/ostracon/node.doHandshake({_, _}, {{{0xb, 0x0}, {0x0, 0x0}}, {0xc000466610, 0xc}, 0x1, 0xc000466878, ...}, ...)
    github.com/line/ostracon@v1.0.7-0.20220729051742-2231684789c6/node/node.go:359 +0x198
github.com/line/ostracon/node.NewNode(0xc000d01e00, {0x30a0178, 0xc000ee3220}, 0xc000dbf210, {0x30830c0, 0xc000d289f0}, 0x0?, 0x0?, 0xc000dbf500, {0x30a0990, ...}, ...)
    github.com/line/ostracon@v1.0.7-0.20220729051742-2231684789c6/node/node.go:778 +0x50d
github.com/line/lbm-sdk/server.startInProcess(_, {{0x0, 0x0, 0x0}, {0x30bc958, 0xc0010fc540}, {0x0, 0x0}, {0x30a57c8, 0xc000442370}, ...}, ...)
    github.com/line/lbm-sdk/server/start.go:297 +0x80f
github.com/line/lbm-sdk/server.StartCmd.func2(0xc000d6e300?, {0xc0010a1d40?, 0x0?, 0x3?})
    github.com/line/lbm-sdk/server/start.go:136 +0x193
github.com/spf13/cobra.(*Command).execute(0xc000d6e300, {0xc0010a1cb0, 0x3, 0x3})
    github.com/spf13/cobra@v1.6.1/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0xc000d0a600)
    github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
    github.com/spf13/cobra@v1.6.1/command.go:968
github.com/spf13/cobra.(*Command).ExecuteContext(...)
    github.com/spf13/cobra@v1.6.1/command.go:961
github.com/line/lbm-sdk/server/cmd.Execute(0x0?, {0xc000cecb20, 0xd})
    github.com/line/lbm-sdk/server/cmd/execute.go:40 +0x1ef
main.main()
    github.com/line/lbm-sdk/simapp/simd/main.go:15 +0x2c

Version

I used line/lbm-simapp:0.46.0-rc9 docker image for running tests.

Steps to Reproduce

I ran test with genesis.json below.

{
  "genesis_time": "2022-10-27T10:52:55.320619Z",
  "chain_id": "simd-testing",
  "initial_height": "1",
  "consensus_params": {
    "block": {
      "max_bytes": "22020096",
      "max_gas": "-1",
      "time_iota_ms": "1000"
    },
    "evidence": {
      "max_age_num_blocks": "100000",
      "max_age_duration": "172800000000000",
      "max_bytes": "1048576"
    },
    "validator": {
      "pub_key_types": ["ed25519", "composite(bls12-381,ed25519)"]
    },
    "version": {}
  },
  "voter_params": {
    "voter_election_threshold": 33,
    "max_tolerable_byzantine_percentage": 20
  },
  "app_hash": "",
  "app_state": {
    "auth": {
      "params": {
        "max_memo_characters": "256",
        "tx_sig_limit": "7",
        "tx_size_cost_per_byte": "10",
        "sig_verify_cost_ed25519": "590",
        "sig_verify_cost_secp256k1": "1000"
      },
      "accounts": [
        {
          "@type": "/cosmos.auth.v1beta1.BaseAccount",
          "address": "link146asaycmtydq45kxc8evntqfgepagygelel00h",
          "pub_key": null,
          "account_number": "0",
          "sequence": "0"
        },
        {
          "@type": "/cosmos.auth.v1beta1.BaseAccount",
          "address": "link1aaffxdz4dwcnjzumjm7h89yjw5c5wul88zvzuu",
          "pub_key": null,
          "account_number": "0",
          "sequence": "0"
        },
        {
          "@type": "/cosmos.auth.v1beta1.BaseAccount",
          "address": "link1ey0w0xj9v48vk82ht6mhqdlh9wqkx8enkpjwpr",
          "pub_key": null,
          "account_number": "0",
          "sequence": "0"
        },
        {
          "@type": "/cosmos.auth.v1beta1.BaseAccount",
          "address": "link1dfyywjglcfptn72axxhsslpy8ep6wq7wujasma",
          "pub_key": null,
          "account_number": "0",
          "sequence": "0"
        },
        {
          "@type": "/cosmos.auth.v1beta1.BaseAccount",
          "address": "link1equ4n3uwyhapak5g3leq0avz85k0q6jcdy5w0f",
          "pub_key": null,
          "account_number": "0",
          "sequence": "0"
        },
        {
          "@type": "/cosmos.auth.v1beta1.BaseAccount",
          "address": "link14nvvrk4dz3k695t8740vqzjnvrwszwm69hw0ls",
          "pub_key": null,
          "account_number": "0",
          "sequence": "0"
        },
        {
          "@type": "/cosmos.auth.v1beta1.BaseAccount",
          "address": "link1efpqqvlu9pv0he5t8qvft95e8delhf05w8zkzj",
          "pub_key": null,
          "account_number": "0",
          "sequence": "0"
        },
        {
          "@type": "/cosmos.auth.v1beta1.BaseAccount",
          "address": "link1g07927q5ca8cvwl2fx6r8egkw6lanx7p37txs6",
          "pub_key": null,
          "account_number": "0",
          "sequence": "0"
        },
        {
          "@type": "/cosmos.auth.v1beta1.BaseAccount",
          "address": "link1g7gsgktl9yjqatacswlwvns5yzy4u5jehsx2pz",
          "pub_key": null,
          "account_number": "0",
          "sequence": "0"
        },
        {
          "@type": "/cosmos.auth.v1beta1.BaseAccount",
          "address": "link164fvwlqv6actq6tvzqwmxjnu3ry7vr4rpskl8p",
          "pub_key": null,
          "account_number": "0",
          "sequence": "0"
        },
        {
          "@type": "/cosmos.auth.v1beta1.BaseAccount",
          "address": "link1twsfmuj28ndph54k4nw8crwu8h9c8mh3rtx705",
          "pub_key": null,
          "account_number": "0",
          "sequence": "0"
        }
      ]
    },
    "authz": {
      "authorization": []
    },
    "bank": {
      "params": {
        "send_enabled": [],
        "default_send_enabled": true
      },
      "balances": [
        {
          "address": "link1g07927q5ca8cvwl2fx6r8egkw6lanx7p37txs6",
          "coins": [
            {
              "denom": "cony",
              "amount": "100000000000"
            },
            {
              "denom": "stake",
              "amount": "20000000000"
            }
          ]
        },
        {
          "address": "link1g7gsgktl9yjqatacswlwvns5yzy4u5jehsx2pz",
          "coins": [
            {
              "denom": "cony",
              "amount": "100000000000"
            },
            {
              "denom": "stake",
              "amount": "20000000000"
            }
          ]
        },
        {
          "address": "link1twsfmuj28ndph54k4nw8crwu8h9c8mh3rtx705",
          "coins": [
            {
              "denom": "cony",
              "amount": "100000000000"
            },
            {
              "denom": "stake",
              "amount": "20000000000"
            }
          ]
        },
        {
          "address": "link1dfyywjglcfptn72axxhsslpy8ep6wq7wujasma",
          "coins": [
            {
              "denom": "cony",
              "amount": "100000000000"
            },
            {
              "denom": "stake",
              "amount": "20000000000"
            }
          ]
        },
        {
          "address": "link14nvvrk4dz3k695t8740vqzjnvrwszwm69hw0ls",
          "coins": [
            {
              "denom": "cony",
              "amount": "100000000000"
            },
            {
              "denom": "stake",
              "amount": "20000000000"
            }
          ]
        },
        {
          "address": "link146asaycmtydq45kxc8evntqfgepagygelel00h",
          "coins": [
            {
              "denom": "cony",
              "amount": "100000000000"
            },
            {
              "denom": "stake",
              "amount": "20000000000"
            }
          ]
        },
        {
          "address": "link1equ4n3uwyhapak5g3leq0avz85k0q6jcdy5w0f",
          "coins": [
            {
              "denom": "cony",
              "amount": "100000000000"
            },
            {
              "denom": "stake",
              "amount": "20000000000"
            }
          ]
        },
        {
          "address": "link1ey0w0xj9v48vk82ht6mhqdlh9wqkx8enkpjwpr",
          "coins": [
            {
              "denom": "cony",
              "amount": "100000000000"
            },
            {
              "denom": "stake",
              "amount": "20000000000"
            }
          ]
        },
        {
          "address": "link1efpqqvlu9pv0he5t8qvft95e8delhf05w8zkzj",
          "coins": [
            {
              "denom": "cony",
              "amount": "100000000000"
            },
            {
              "denom": "stake",
              "amount": "20000000000"
            }
          ]
        },
        {
          "address": "link164fvwlqv6actq6tvzqwmxjnu3ry7vr4rpskl8p",
          "coins": [
            {
              "denom": "cony",
              "amount": "100000000000"
            },
            {
              "denom": "stake",
              "amount": "20000000000"
            }
          ]
        },
        {
          "address": "link1aaffxdz4dwcnjzumjm7h89yjw5c5wul88zvzuu",
          "coins": [
            {
              "denom": "cony",
              "amount": "100000000000"
            },
            {
              "denom": "stake",
              "amount": "20000000000"
            }
          ]
        }
      ],
      "supply": [
        {
          "denom": "cony",
          "amount": "1100000000000"
        },
        {
          "denom": "stake",
          "amount": "220000000000"
        }
      ],
      "denom_metadata": [
        {
          "description": "The fee token of this test chain",
          "denom_units": [
            {
              "denom": "cony",
              "exponent": 0,
              "aliases": []
            },
            {
              "denom": "LN",
              "exponent": 6,
              "aliases": []
            }
          ],
          "base": "LINK",
          "display": "LN"
        }
      ]
    },
    "capability": {
      "index": "1",
      "owners": []
    },
    "collection": {
      "params": {
        "depth_limit": 3,
        "width_limit": 8
      },
      "contracts": [],
      "next_class_ids": [],
      "classes": [],
      "next_token_ids": [],
      "balances": [],
      "nfts": [],
      "parents": [],
      "grants": [],
      "authorizations": [],
      "supplies": [],
      "burnts": []
    },
    "crisis": {
      "constant_fee": {
        "denom": "stake",
        "amount": "1000"
      }
    },
    "distribution": {
      "params": {
        "community_tax": "0.020000000000000000",
        "base_proposer_reward": "0.010000000000000000",
        "bonus_proposer_reward": "0.040000000000000000",
        "withdraw_addr_enabled": true
      },
      "fee_pool": {
        "community_pool": []
      },
      "delegator_withdraw_infos": [],
      "previous_proposer": "",
      "outstanding_rewards": [],
      "validator_accumulated_commissions": [],
      "validator_historical_rewards": [],
      "validator_current_rewards": [],
      "delegator_starting_infos": [],
      "validator_slash_events": []
    },
    "evidence": {
      "evidence": []
    },
    "feegrant": {
      "allowances": []
    },
    "foundation": {
      "params": {
        "foundation_tax": "0.000000000000000000",
        "censored_msg_type_urls": ["/cosmos.staking.v1beta1.MsgCreateValidator"]
      },
      "foundation": {
        "version": "1",
        "total_weight": "1.000000000000000000",
        "decision_policy": {
          "@type": "/lbm.foundation.v1.ThresholdDecisionPolicy",
          "threshold": "4.000000000000000000",
          "windows": {
            "min_execution_period": "0s",
            "voting_period": "600s"
          }
        }
      },
      "members": [
        {
          "address": "link146asaycmtydq45kxc8evntqfgepagygelel00h"
        }
      ],
      "previous_proposal_id": "0",
      "proposals": [],
      "votes": [],
      "authorizations": [],
      "pool": {
        "treasury": []
      },
      "govMintLeftCount": 0
    },
    "genutil": {
      "gen_txs": [
        {
          "body": {
            "messages": [
              {
                "@type": "/cosmos.staking.v1beta1.MsgCreateValidator",
                "description": {
                  "moniker": "simd-testing",
                  "identity": "",
                  "website": "",
                  "security_contact": "",
                  "details": ""
                },
                "commission": {
                  "rate": "0.100000000000000000",
                  "max_rate": "0.200000000000000000",
                  "max_change_rate": "0.010000000000000000"
                },
                "min_self_delegation": "1",
                "delegator_address": "link1twsfmuj28ndph54k4nw8crwu8h9c8mh3rtx705",
                "validator_address": "linkvaloper1twsfmuj28ndph54k4nw8crwu8h9c8mh33lyrp8",
                "pubkey": {
                  "@type": "/cosmos.crypto.ed25519.PubKey",
                  "key": "Z3G8Dxdy6E3pt0TH/Wgw4ovkMiSbDDzM5LZ5+DrgPxY="
                },
                "value": {
                  "denom": "stake",
                  "amount": "10000000000"
                }
              }
            ],
            "memo": "7e7efe4de6e99eb1ed6e797cb6e2f5b508dee33b@172.30.1.87:26656",
            "timeout_height": "0",
            "extension_options": [],
            "non_critical_extension_options": []
          },
          "auth_info": {
            "signer_infos": [
              {
                "public_key": {
                  "@type": "/cosmos.crypto.secp256k1.PubKey",
                  "key": "AsVtdRaoc8AsTmzIvRAKWSYgHXf97/HI4ls2wENFk9C8"
                },
                "mode_info": {
                  "single": {
                    "mode": "SIGN_MODE_DIRECT"
                  }
                },
                "sequence": "0"
              }
            ],
            "fee": {
              "amount": [],
              "gas_limit": "200000",
              "payer": "",
              "granter": ""
            }
          },
          "signatures": [
            "SEuyfoMUuZ9CQyWjgOjAI+XLYy8SRXRmmDXX+UvehIVrNDrT2pS9IZCAHY7C30oeW3Dafdcd062u3NuKDG+cVg=="
          ]
        }
      ]
    },
    "gov": {
      "starting_proposal_id": "1",
      "deposits": [],
      "votes": [],
      "proposals": [],
      "deposit_params": {
        "min_deposit": [
          {
            "denom": "stake",
            "amount": "10000000"
          }
        ],
        "max_deposit_period": "172800s"
      },
      "voting_params": {
        "voting_period": "172800s"
      },
      "tally_params": {
        "quorum": "0.334000000000000000",
        "threshold": "0.500000000000000000",
        "veto_threshold": "0.334000000000000000"
      }
    },
    "ibc": {
      "client_genesis": {
        "clients": [],
        "clients_consensus": [],
        "clients_metadata": [],
        "params": {
          "allowed_clients": ["06-solomachine", "99-ostracon"]
        },
        "create_localhost": false,
        "next_client_sequence": "0"
      },
      "connection_genesis": {
        "connections": [],
        "client_connection_paths": [],
        "next_connection_sequence": "0",
        "params": {
          "max_expected_time_per_block": "30000000000"
        }
      },
      "channel_genesis": {
        "channels": [],
        "acknowledgements": [],
        "commitments": [],
        "receipts": [],
        "send_sequences": [],
        "recv_sequences": [],
        "ack_sequences": [],
        "next_channel_sequence": "0"
      }
    },
    "interchainaccounts": {
      "controller_genesis_state": {
        "active_channels": [],
        "interchain_accounts": [],
        "ports": [],
        "params": {
          "controller_enabled": true
        }
      },
      "host_genesis_state": {
        "active_channels": [],
        "interchain_accounts": [],
        "port": "icahost",
        "params": {
          "host_enabled": true,
          "allow_messages": []
        }
      }
    },
    "mint": {
      "minter": {
        "inflation": "0.130000000000000000",
        "annual_provisions": "0.000000000000000000"
      },
      "params": {
        "mint_denom": "stake",
        "inflation_rate_change": "0.130000000000000000",
        "inflation_max": "0.200000000000000000",
        "inflation_min": "0.070000000000000000",
        "goal_bonded": "0.670000000000000000",
        "blocks_per_year": "6311520"
      }
    },
    "mock": null,
    "params": null,
    "slashing": {
      "params": {
        "signed_blocks_window": "100",
        "min_signed_per_window": "0.500000000000000000",
        "downtime_jail_duration": "600s",
        "slash_fraction_double_sign": "0.050000000000000000",
        "slash_fraction_downtime": "0.010000000000000000"
      },
      "signing_infos": [],
      "missed_blocks": []
    },
    "staking": {
      "params": {
        "unbonding_time": "1814400s",
        "max_validators": 100,
        "max_entries": 7,
        "historical_entries": 10000,
        "bond_denom": "stake"
      },
      "last_total_power": "0",
      "last_validator_powers": [],
      "validators": [],
      "delegations": [],
      "unbonding_delegations": [],
      "redelegations": [],
      "exported": false
    },
    "token": {
      "params": {},
      "class_state": {
        "nonce": "0",
        "ids": []
      },
      "balances": [],
      "classes": [],
      "grants": [],
      "authorizations": [],
      "supplies": [],
      "mints": [],
      "burns": []
    },
    "transfer": {
      "port_id": "transfer",
      "denom_traces": [],
      "params": {
        "send_enabled": true,
        "receive_enabled": true
      }
    },
    "upgrade": {},
    "vesting": {},
    "wasm": {
      "params": {
        "code_upload_access": {
          "permission": "Everybody",
          "address": ""
        },
        "instantiate_default_permission": "Everybody",
        "gas_multiplier": "140000000",
        "instance_cost": "60000",
        "compile_cost": "3"
      },
      "codes": [],
      "contracts": [],
      "sequences": [],
      "gen_msgs": [],
      "inactive_contract_addresses": []
    }
  }
}

For Admin Use

0Tech commented 2 years ago

It's a spec and not a bug. Please refer to: https://github.com/line/lbm-sdk/blob/v0.46.0-rc9/x/foundation/README.md#createvalidatorauthorization

And, there is actually the error message: failed to execute message; message index: 0: authorization not found: unauthorized

0Tech commented 2 years ago

So, in your case, please insert following authorizations into the x/foundation's authorizations:

{
  "grantee": "link1twsfmuj28ndph54k4nw8crwu8h9c8mh3rtx705",
  "authorization": {
    "@type": "/lbm.stakingplus.v1.CreateValidatorAuthorization",
    "validator_address": "linkvaloper1twsfmuj28ndph54k4nw8crwu8h9c8mh33lyrp8"
  }
}

I hope this would solve your issue.

loin3 commented 2 years ago

I got it. I should have got authroization for MsgCreateValidator. Thank you.

0Tech commented 2 years ago

If there is another problem, you may re-open this issue.