Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid gentx causes hard-to-diagnose errors #9304

Closed
4 tasks
michaelfig opened this issue May 11, 2021 · 14 comments · Fixed by #11500
Closed
4 tasks

Invalid gentx causes hard-to-diagnose errors #9304

michaelfig opened this issue May 11, 2021 · 14 comments · Fixed by #11500
Labels
C:x/genutil genutil module issues T:Bug

Comments

@michaelfig
Copy link
Contributor

michaelfig commented May 11, 2021

Summary of Bug

When launching a testnet chain with collected gentxs, I found that some of them had invalid parameters. However validate-genesis did not detect these errors. They were only detected when launching a node based on the incorrect genesis.json.

It was also very inconvenient to narrow-down on the specific transactions that failed; none of their metadata was present in the node's error message.

These look like systemic problems, and likely a solution so that either errors are not fatal or are reported verbosely with validate-genesis would solve all of them.

Version

v0.42.4

Steps to Reproduce

ag-cosmos-helper is my appd.

  1. Initialise a new home directory: ag-cosmos-helper --home=/tmp/t init my-moniker
  2. Add some coins to a key in my keyring ag-cosmos-helper --home=/tmp/t add-genesis-account foo 1000000ustake
  3. Introduce an invalid gentx. One of:
    a. either: use a different chain-id than the initialized one: ag-cosmos-helper --home=/tmp/t gentx foo 1000000ustake --chain-id=something-else
    b. or: use commission of 1.0: ag-cosmos-helper --home=/tmp/t gentx foo 1000000ustake --chain-id=test-chain-Rvhym1 --commission-rate=1.0
  4. Collect gentxs: ag-cosmos-helper --home=/tmp/t collect-gentxs
  5. Validate: NO ERROR IS DETECTED! ag-cosmos-helper --home=/tmp/t validate-genesis
  6. Try starting the chain: ag-cosmos-helper --home=/tmp/t start
Panic with 3.a.
4:36PM INF starting ABCI with Tendermint
4:36PM INF Starting multiAppConn service impl=multiAppConn module=proxy
4:36PM INF Starting localClient service connection=query impl=localClient module=abci-client
4:36PM INF Starting localClient service connection=snapshot impl=localClient module=abci-client
4:36PM INF Starting localClient service connection=mempool impl=localClient module=abci-client
4:36PM INF Starting localClient service connection=consensus impl=localClient module=abci-client
4:36PM INF Starting EventBus service impl=EventBus module=events
4:36PM INF Starting PubSub service impl=PubSub module=pubsub
4:36PM INF Starting IndexerService service impl=IndexerService module=txindex
4:36PM INF ABCI Handshake App Info hash= height=0 module=consensus protocol-version=0 software-version=
4:36PM INF ABCI Replay Blocks appHeight=0 module=consensus stateHeight=0 storeHeight=0
4:36PM INF asserting crisis invariants inv=0/11 module=x/crisis name=gov/module-account
4:36PM INF asserting crisis invariants inv=1/11 module=x/crisis name=distribution/nonnegative-outstanding
4:36PM INF asserting crisis invariants inv=2/11 module=x/crisis name=distribution/can-withdraw
4:36PM INF asserting crisis invariants inv=3/11 module=x/crisis name=distribution/reference-count
4:36PM INF asserting crisis invariants inv=4/11 module=x/crisis name=distribution/module-account
4:36PM INF asserting crisis invariants inv=5/11 module=x/crisis name=bank/nonnegative-outstanding
4:36PM INF asserting crisis invariants inv=6/11 module=x/crisis name=bank/total-supply
4:36PM INF asserting crisis invariants inv=7/11 module=x/crisis name=staking/module-accounts
4:36PM INF asserting crisis invariants inv=8/11 module=x/crisis name=staking/nonnegative-power
4:36PM INF asserting crisis invariants inv=9/11 module=x/crisis name=staking/positive-delegation
4:36PM INF asserting crisis invariants inv=10/11 module=x/crisis name=staking/delegator-shares
4:36PM INF asserted all invariants duration=3.890041 height=0 module=x/crisis
panic: signature verification failed; please verify account number (0) and chain-id (test-chain-Rvhym1): unauthorized

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/genutil.DeliverGenTxs(0x5c272e0, 0xc000126008, 0x5c3ce80, 0xc0011adac0, 0x0, 0x0, 0xc001241e00, 0x11, 0x0, 0x28dc7eb8, ...)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/x/genutil/gentx.go:113 +0x328
github.com/cosmos/cosmos-sdk/x/genutil.InitGenesis(...)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/x/genutil/genesis.go:18
github.com/cosmos/cosmos-sdk/x/genutil.AppModule.InitGenesis(0x5c21a20, 0xc0000def30, 0x5beb940, 0xc000dc6e70, 0xc00123c610, 0x7774a18, 0xc00059c4c0, 0x5c272e0, 0xc000126008, 0x5c3ce80, ...)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/x/genutil/module.go:101 +0x198
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(0xc000dd4fc0, 0x5c272e0, 0xc000126008, 0x5c3ce80, 0xc0011adac0, 0x0, 0x0, 0xc001241e00, 0x11, 0x0, ...)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/types/module/module.go:304 +0x2b5
github.com/Agoric/agoric-sdk/golang/cosmos/app.(*GaiaApp).InitChainer(0xc0011b2d00, 0x5c272e0, 0xc000126008, 0x5c3ce80, 0xc0011adac0, 0x0, 0x0, 0xc001241e00, 0x11, 0x0, ...)
        /Users/michael/agoric/agoric-sdk/golang/cosmos/app/app.go:603 +0x1d0
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc0010031e0, 0x28dc7eb8, 0xed82cfd26, 0x0, 0xc001241e00, 0x11, 0xc000135c20, 0x6847410, 0x0, 0x0, ...)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/baseapp/abci.go:62 +0x318
github.com/tendermint/tendermint/abci/client.(*localClient).InitChainSync(0xc00058fbc0, 0x28dc7eb8, 0xed82cfd26, 0x0, 0xc001241e00, 0x11, 0xc000135c20, 0x6847410, 0x0, 0x0, ...)
        /Users/michael/go/pkg/mod/github.com/tendermint/[email protected]/abci/client/local_client.go:266 +0x115
github.com/tendermint/tendermint/proxy.(*appConnConsensus).InitChainSync(0xc000f05ab0, 0x28dc7eb8, 0xed82cfd26, 0x0, 0xc001241e00, 0x11, 0xc000135c20, 0x6847410, 0x0, 0x0, ...)
        /Users/michael/go/pkg/mod/github.com/tendermint/[email protected]/proxy/app_conn.go:77 +0x78
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(0xc00109e498, 0xb, 0x0, 0x0, 0x0, 0xc001241e00, 0x11, 0x1, 0x0, 0x0, ...)
        /Users/michael/go/pkg/mod/github.com/tendermint/[email protected]/consensus/replay.go:319 +0x695
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc00109e498, 0x5c41160, 0xc0005188f0, 0xc00123cdc0, 0x1)
        /Users/michael/go/pkg/mod/github.com/tendermint/[email protected]/consensus/replay.go:268 +0x478
github.com/tendermint/tendermint/node.doHandshake(0x5c3d080, 0xc000f04770, 0xb, 0x0, 0x0, 0x0, 0xc001241e00, 0x11, 0x1, 0x0, ...)
        /Users/michael/go/pkg/mod/github.com/tendermint/[email protected]/node/node.go:308 +0x1d8
github.com/tendermint/tendermint/node.NewNode(0xc000da57c0, 0x5c1e820, 0xc0001c6960, 0xc00123daa0, 0x5be9420, 0xc000510d80, 0xc00123db10, 0x5a215d8, 0xc00123dc00, 0x5c28060, ...)
        /Users/michael/go/pkg/mod/github.com/tendermint/[email protected]/node/node.go:715 +0x1f65
github.com/cosmos/cosmos-sdk/server.startInProcess(0xc000f97240, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c300e0, 0xc0004ef050, ...)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/server/start.go:244 +0x565
github.com/cosmos/cosmos-sdk/server.StartCmd.func2(0xc000df9180, 0xc000ffecd0, 0x0, 0x1, 0x0, 0x0)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/server/start.go:120 +0x169
github.com/spf13/cobra.(*Command).execute(0xc000df9180, 0xc000ffecc0, 0x1, 0x1, 0xc000df9180, 0xc000ffecc0)
        /Users/michael/go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000da6500, 0x0, 0x0, 0xc0004e29a0)
        /Users/michael/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/michael/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        /Users/michael/go/pkg/mod/github.com/spf13/[email protected]/command.go:890
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0xc000da6500, 0xc0004e29a0, 0x20, 0xc0004df580, 0x5c42ce0)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/server/cmd/execute.go:36 +0x265
github.com/Agoric/agoric-sdk/golang/cosmos/daemon.RunWithController(0x5a1f540)
        /Users/michael/agoric/agoric-sdk/golang/cosmos/daemon/main.go:63 +0x79
github.com/Agoric/agoric-sdk/golang/cosmos/daemon.Run(...)
        /Users/michael/agoric/agoric-sdk/golang/cosmos/daemon/main.go:53
main.main()
        /Users/michael/agoric/agoric-sdk/golang/cosmos/cmd/helper/main.go:22 +0xc6
Panic with 3.b.
4:48PM INF starting ABCI with Tendermint
4:48PM INF Starting multiAppConn service impl=multiAppConn module=proxy
4:48PM INF Starting localClient service connection=query impl=localClient module=abci-client
4:48PM INF Starting localClient service connection=snapshot impl=localClient module=abci-client
4:48PM INF Starting localClient service connection=mempool impl=localClient module=abci-client
4:48PM INF Starting localClient service connection=consensus impl=localClient module=abci-client
4:48PM INF Starting EventBus service impl=EventBus module=events
4:48PM INF Starting PubSub service impl=PubSub module=pubsub
4:48PM INF Starting IndexerService service impl=IndexerService module=txindex
4:48PM INF ABCI Handshake App Info hash= height=0 module=consensus protocol-version=0 software-version=
4:48PM INF ABCI Replay Blocks appHeight=0 module=consensus stateHeight=0 storeHeight=0
4:48PM INF asserting crisis invariants inv=0/11 module=x/crisis name=staking/module-accounts
4:48PM INF asserting crisis invariants inv=1/11 module=x/crisis name=staking/nonnegative-power
4:48PM INF asserting crisis invariants inv=2/11 module=x/crisis name=staking/positive-delegation
4:48PM INF asserting crisis invariants inv=3/11 module=x/crisis name=staking/delegator-shares
4:48PM INF asserting crisis invariants inv=4/11 module=x/crisis name=distribution/nonnegative-outstanding
4:48PM INF asserting crisis invariants inv=5/11 module=x/crisis name=distribution/can-withdraw
4:48PM INF asserting crisis invariants inv=6/11 module=x/crisis name=distribution/reference-count
4:48PM INF asserting crisis invariants inv=7/11 module=x/crisis name=distribution/module-account
4:48PM INF asserting crisis invariants inv=8/11 module=x/crisis name=gov/module-account
4:48PM INF asserting crisis invariants inv=9/11 module=x/crisis name=bank/nonnegative-outstanding
4:48PM INF asserting crisis invariants inv=10/11 module=x/crisis name=bank/total-supply
4:48PM INF asserted all invariants duration=0.516866 height=0 module=x/crisis
panic: commission cannot be more than the max rate

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/genutil.DeliverGenTxs(0x5c272e0, 0xc000044088, 0x5c3ce80, 0xc0000a3200, 0x0, 0x0, 0xc0004e2840, 0x11, 0x0, 0x28dc7eb8, ...)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/x/genutil/gentx.go:113 +0x328
github.com/cosmos/cosmos-sdk/x/genutil.InitGenesis(...)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/x/genutil/genesis.go:18
github.com/cosmos/cosmos-sdk/x/genutil.AppModule.InitGenesis(0x5c21a20, 0xc000125680, 0x5beb940, 0xc0000220b0, 0xc001145e30, 0x9400058, 0xc000fcc0c0, 0x5c272e0, 0xc000044088, 0x5c3ce80, ...)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/x/genutil/module.go:101 +0x198
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(0xc000e6f420, 0x5c272e0, 0xc000044088, 0x5c3ce80, 0xc0000a3200, 0x0, 0x0, 0xc0004e2840, 0x11, 0x0, ...)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/types/module/module.go:304 +0x2b5
github.com/Agoric/agoric-sdk/golang/cosmos/app.(*GaiaApp).InitChainer(0xc0000e9b00, 0x5c272e0, 0xc000044088, 0x5c3ce80, 0xc0000a3200, 0x0, 0x0, 0xc0004e2840, 0x11, 0x0, ...)
        /Users/michael/agoric/agoric-sdk/golang/cosmos/app/app.go:603 +0x1d0
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc0000bb380, 0x28dc7eb8, 0xed82cfd26, 0x0, 0xc0004e2840, 0x11, 0xc000dbf5a0, 0x6847410, 0x0, 0x0, ...)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/baseapp/abci.go:62 +0x318
github.com/tendermint/tendermint/abci/client.(*localClient).InitChainSync(0xc000597b00, 0x28dc7eb8, 0xed82cfd26, 0x0, 0xc0004e2840, 0x11, 0xc000dbf5a0, 0x6847410, 0x0, 0x0, ...)
        /Users/michael/go/pkg/mod/github.com/tendermint/[email protected]/abci/client/local_client.go:266 +0x115
github.com/tendermint/tendermint/proxy.(*appConnConsensus).InitChainSync(0xc0005133e0, 0x28dc7eb8, 0xed82cfd26, 0x0, 0xc0004e2840, 0x11, 0xc000dbf5a0, 0x6847410, 0x0, 0x0, ...)
        /Users/michael/go/pkg/mod/github.com/tendermint/[email protected]/proxy/app_conn.go:77 +0x78
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(0xc000d70498, 0xb, 0x0, 0x0, 0x0, 0xc0004e2840, 0x11, 0x1, 0x0, 0x0, ...)
        /Users/michael/go/pkg/mod/github.com/tendermint/[email protected]/consensus/replay.go:319 +0x695
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc000d70498, 0x5c41160, 0xc0000b9790, 0xc0011448f0, 0x1)
        /Users/michael/go/pkg/mod/github.com/tendermint/[email protected]/consensus/replay.go:268 +0x478
github.com/tendermint/tendermint/node.doHandshake(0x5c3d080, 0xc0005125d0, 0xb, 0x0, 0x0, 0x0, 0xc0004e2840, 0x11, 0x1, 0x0, ...)
        /Users/michael/go/pkg/mod/github.com/tendermint/[email protected]/node/node.go:308 +0x1d8
github.com/tendermint/tendermint/node.NewNode(0xc000e59900, 0x5c1e820, 0xc000f32aa0, 0xc0004dd6c0, 0x5be9420, 0xc00051bfe0, 0xc0004dd730, 0x5a215d8, 0xc0004dd820, 0x5c28060, ...)
        /Users/michael/go/pkg/mod/github.com/tendermint/[email protected]/node/node.go:715 +0x1f65
github.com/cosmos/cosmos-sdk/server.startInProcess(0xc000ec6d20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c300e0, 0xc000e40b80, ...)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/server/start.go:244 +0x565
github.com/cosmos/cosmos-sdk/server.StartCmd.func2(0xc000e9e780, 0xc000f1e800, 0x0, 0x1, 0x0, 0x0)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/server/start.go:120 +0x169
github.com/spf13/cobra.(*Command).execute(0xc000e9e780, 0xc000f1e7f0, 0x1, 0x1, 0xc000e9e780, 0xc000f1e7f0)
        /Users/michael/go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000e4d900, 0x0, 0x0, 0xc000e3d420)
        /Users/michael/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/michael/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        /Users/michael/go/pkg/mod/github.com/spf13/[email protected]/command.go:890
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0xc000e4d900, 0xc000e3d420, 0x20, 0xc000e49060, 0x5c42ce0)
        /Users/michael/go/pkg/mod/github.com/agoric-labs/[email protected]/server/cmd/execute.go:36 +0x265
github.com/Agoric/agoric-sdk/golang/cosmos/daemon.RunWithController(0x5a1f540)
        /Users/michael/agoric/agoric-sdk/golang/cosmos/daemon/main.go:63 +0x79
github.com/Agoric/agoric-sdk/golang/cosmos/daemon.Run(...)
        /Users/michael/agoric/agoric-sdk/golang/cosmos/daemon/main.go:53
main.main()
        /Users/michael/agoric/agoric-sdk/golang/cosmos/cmd/helper/main.go:22 +0xc6

Thanks!


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@michaelfig
Copy link
Contributor Author

@dckc, @dtribble, @rowgraus this is an issue we ran into that delayed our genesis.json verification and creation.

@aaronc
Copy link
Member

aaronc commented May 11, 2021

Hmmm looks like there isn't a call to sdk.Msg.ValidateBasic in x/genutil/types/genesis_state.go ValidateGenesis.

@aaronc aaronc added this to the v0.42.X milestone May 11, 2021
@aaronc
Copy link
Member

aaronc commented May 11, 2021

Note that calling ValidateBasic will only catch some errors. The validate-genesis call is stateless and can't catch everything.

@alexanderbez
Copy link
Contributor

Note that calling ValidateBasic will only catch some errors. The validate-genesis call is stateless and can't catch everything.

This is my thought as well. We should call ValidateBasic but that can only go so far.

@michaelfig michaelfig changed the title Invalid gentx is not detected by validate-genesis Invalid gentx causes hard-to-diagnose errors May 12, 2021
@michaelfig
Copy link
Contributor Author

Note that calling ValidateBasic will only catch some errors. The validate-genesis call is stateless and can't catch everything.

Then would my other suggestion be useful?

errors are not fatal

It is such a pain when in a rush to produce a genesis to have

BOTH validate-genesis pass (which I can understand it doesn't have enough information to catch everything)

AND running github.com/cosmos/cosmos-sdk/x/genutil.DeliverGenTxs causes a panic.

Can we address the second part? Why does DeliverGenTxs have to cause a panic and not just log an error to the console?

@anilcse
Copy link
Collaborator

anilcse commented May 17, 2021

Can we address the second part? Why does DeliverGenTxs have to cause a panic and not just log an error to the console?

May be we can improve the panic message and include gentx metadata as an easy fix.

@zmanian
Copy link
Member

zmanian commented May 18, 2021

yeah this has been a long standing issue. During the Cosmos Hub launch, Chorus One wrote a github got to validate the gentxs. I don't think they open sourced it.

@anilcse
Copy link
Collaborator

anilcse commented May 19, 2021

We are using a GitHub action recently to validate gentxs on PR submission. Here's the CI job we used for regen mainnet gentx validation recently: https://github.com/regen-network/mainnet/blob/main/.github/workflows/validate-gentx.yml

May be we can provide a simple shell script on the SDK to validate all the gentxs from a dir.

@michaelfig
Copy link
Contributor Author

We are using a GitHub action recently to validate gentxs on PR submission. Here's the CI job we used for regen mainnet gentx validation recently: https://github.com/regen-network/mainnet/blob/main/.github/workflows/validate-gentx.yml

Thanks for the pointer!

OMG, I was hoping there was a cleaner way to do it, but looks like there isn't. Your script is just a refinement of the basic idea I used under pressure (try starting a chain with just one gentx at a time and see if it dies right away).

May be we can provide a simple shell script on the SDK to validate all the gentxs from a dir.

That would be useful! I may be able to help do this, starting from your script and making it work for Agoric as well. I don't have time immediately, but it is on the critical path for our next testnet phase, so I'll be looking into it before then.

@robert-zaremba
Copy link
Collaborator

Hi @michaelfig - could you confirm if you are working on a PR? do you need support?

@michaelfig
Copy link
Contributor Author

Hi @michaelfig - could you confirm if you are working on a PR? do you need support?

Thanks for asking. I won't be able to work on this for another few weeks.

mergify bot pushed a commit that referenced this issue Jul 27, 2021
<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

ref: #9304

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
@amaury1093
Copy link
Contributor

amaury1093 commented Jul 27, 2021

@anilcse wrote a PR here #9486 which adds a bash script to validate gentx. It's on master now.

It was proposed as an alternative solution to look into using Go code to validate gentxs in the collect-gentx CLI command, ref #9486 (comment). It seems like a better solution than the CI-checked bash script, @anilcse will look into this. Let's keep this issue open for now.

@michaelfig
Copy link
Contributor Author

@anilcse any news on this? It would be nice to have the Go code do the validation, or at least produce understandable errors on chain start.

Ideally, we could leverage the appd start code to display a proper level of detail, such as the transaction type and data to narrow down on the actual culprits (i.e. process all gentxs as if they appeared in separate transactions, then abort the genesis block with details of all of the failures) rather than having to run appd start on one gentx at a time.

@amaury1093
Copy link
Contributor

@anilcse are you still interested in putting these validations into Go code, or should we keep your script?

@mergify mergify bot closed this as completed in #11500 Mar 31, 2022
mergify bot pushed a commit that referenced this issue Mar 31, 2022
## Description

Closes: #9304 



---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
Repository owner moved this from Icebox to Done in Cosmos SDK Maintenance Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/genutil genutil module issues T:Bug
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

10 participants