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

cli: add custom cli commands #177

Closed
wants to merge 5 commits into from
Closed

Conversation

tac0turtle
Copy link
Contributor

Description

this removes spm commands and rolls your own. The benefits is more customisability in the commands and not reliant on a archived repo.

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@tac0turtle tac0turtle marked this pull request as ready for review January 10, 2022 20:58
@evan-forbes evan-forbes self-requested a review January 10, 2022 21:35
@@ -105,7 +106,7 @@ func setupApp(t *testing.T, pub cryptotypes.PubKey) *App {

skipUpgradeHeights := make(map[int64]bool)

encCfg := cosmoscmd.MakeEncodingConfig(ModuleBasics)
encCfg := appparams.MakeEncodingConfig()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to simply be MakeEncodingConfig, in order the fix the failing test. Unfortunately, after trying this it comes up with another panic, where something is causing the app codec to return nil

--- FAIL: TestPreprocessTxs (0.00s)
panic: value is nil [recovered]
        panic: value is nil

goroutine 55 [running]:
testing.tRunner.func1.2({0x152eae0, 0x1b54f30})
        /usr/local/go/src/testing/testing.go:1209 +0x24e
testing.tRunner.func1()
        /usr/local/go/src/testing/testing.go:1212 +0x218
panic({0x152eae0, 0x1b54f30})
        /usr/local/go/src/runtime/panic.go:1038 +0x215
github.com/cosmos/cosmos-sdk/store/types.AssertValidValue(...)
        /home/evan/go/pkg/mod/github.com/celestiaorg/[email protected]/store/types/validity.go:13
github.com/cosmos/cosmos-sdk/store/gaskv.(*Store).Set(0x1baadb0, {0x289db57, 0xc000568840, 0xc0012371c0}, {0x0, 0x0, 0x0})
        /home/evan/go/pkg/mod/github.com/celestiaorg/[email protected]/store/gaskv/store.go:50 +0xf7
github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper.SetFeePool({{0x1b7f420, 0xc001210690}, {0x7f873c5f63b8, 0xc00058efb8}, {{0x7f873c5f63b8, 0xc00058efb8}, 0xc00058efb0, {0x1b7f420, 0xc0012106b0}, {0x1b7f470, ...}, ...}, ...}, ...)
        /home/evan/go/pkg/mod/github.com/celestiaorg/[email protected]/x/distribution/keeper/store.go:61 +0x158
github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper.InitGenesis({{0x1b7f420, 0xc001210690}, {0x7f873c5f63b8, 0xc00058efb8}, {{0x7f873c5f63b8, 0xc00058efb8}, 0xc00058efb0, {0x1b7f420, 0xc0012106b0}, {0x1b7f470, ...}, ...}, ...}, ...)
        /home/evan/go/pkg/mod/github.com/celestiaorg/[email protected]/x/distribution/keeper/genesis.go:14 +0x98
github.com/cosmos/cosmos-sdk/x/distribution.AppModule.InitGenesis({{{0x1bd1218, 0xc00058efb8}}, {{0x1b7f420, 0xc001210690}, {0x7f873c5f63b8, 0xc00058efb8}, {{0x7f873c5f63b8, 0xc00058efb8}, 0xc00058efb0, {0x1b7f420, ...}, ...}, ...}, ...}, ...)
        /home/evan/go/pkg/mod/github.com/celestiaorg/[email protected]/x/distribution/module.go:154 +0x13b
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(_, {{0x1baadb0, 0xc000042120}, {0x1bcd220, 0xc0012371c0}, {{0x0, 0x0}, {0x0, 0x0}, 0x0, ...}, ...}, ...)
        /home/evan/go/pkg/mod/github.com/celestiaorg/[email protected]/types/module/module.go:307 +0x29d
github.com/celestiaorg/celestia-app/app.(*App).InitChainer(_, {{0x1baadb0, 0xc000042120}, {0x1bcd220, 0xc0012371c0}, {{0x0, 0x0}, {0x0, 0x0}, 0x0, ...}, ...}, ...)
        /home/evan/go/src/github.com/celestiaorg/celestia-app/app/app.go:447 +0x1d2
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc000fbba00, {{0x0, 0x0, 0x0}, {0x0, 0x0}, 0x0, {0x289dfa0, 0x0, 0x0}, ...})
        /home/evan/go/pkg/mod/github.com/celestiaorg/[email protected]/baseapp/abci.go:62 +0x475
github.com/celestiaorg/celestia-app/app.setupApp(0xc000fba820, {0x1bbf228, 0xc00028dd88})
        /home/evan/go/src/github.com/celestiaorg/celestia-app/app/abci_test.go:130 +0x56b
github.com/celestiaorg/celestia-app/app.TestPreprocessTxs(0xc000fba820)
        /home/evan/go/src/github.com/celestiaorg/celestia-app/app/abci_test.go:48 +0x108
testing.tRunner(0xc000fba820, 0x19c7bb0)
        /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/celestiaorg/celestia-app/app 0.041s
?       github.com/celestiaorg/celestia-app/app/params  [no test files]
?       github.com/celestiaorg/celestia-app/cmd/celestia-appd   [no test files]
?       github.com/celestiaorg/celestia-app/cmd/celestia-appd/cmd       [no test files]
?       github.com/celestiaorg/celestia-app/x/payment   [no test files]
?       github.com/celestiaorg/celestia-app/x/payment/client/cli        [no test files]
?       github.com/celestiaorg/celestia-app/x/payment/keeper    [no test files]
ok      github.com/celestiaorg/celestia-app/x/payment/types     (cached)
FAIL
make: *** [Makefile:56: test-unit] Error 1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I think I missed some codec somewhere. Ill fix this

@evan-forbes evan-forbes mentioned this pull request Feb 1, 2022
9 tasks
@liamsi
Copy link
Member

liamsi commented Apr 15, 2022

I think we can tackle this one as part of #331 and together with the upgrade to 0.46. Let's close? (pls re-open if you disagree)

@liamsi liamsi closed this Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants