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

feat!: store proposed chainID before voting finishes #1289

Merged
merged 38 commits into from
Oct 2, 2023
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ac7e1b9
feat: store chain in proposal
Sep 12, 2023
0eea515
add govHook
Sep 12, 2023
a79f384
delete GetChainsInProposal
Sep 14, 2023
690c61c
check proposal type
Sep 14, 2023
658b5f5
update key
Sep 15, 2023
b0a3721
feat: add query proposed chainIDs
Sep 19, 2023
fbb74fc
feat: set govhook
Sep 19, 2023
b61bd85
feat: parse key
Sep 19, 2023
d13c124
refactor: names
Sep 19, 2023
1c6d099
feat: add list proposed consumer chains
Sep 20, 2023
2f007f5
test: add e2e test
Sep 20, 2023
402fcd4
merge main
Sep 20, 2023
27daf3a
add e2e test
Sep 20, 2023
114db15
update comments
Sep 20, 2023
74b7d91
update ProposeConsumerChains in e2e test
Sep 21, 2023
8db40a8
remove wait for block
Sep 21, 2023
5a26420
docs: update changelog
Sep 21, 2023
956b4cc
fix: lint
Sep 21, 2023
f193361
add TestParseProposedConsumerChainKey
Sep 21, 2023
c2cb529
refactor gov hook
Sep 21, 2023
8253ee7
Update proto/interchain_security/ccv/provider/v1/query.proto
yaruwangway Sep 21, 2023
f0c591e
update proto
Sep 21, 2023
4aa274a
add test for set kv
Sep 21, 2023
979b383
refactor key to be prefix_proposalID
Sep 21, 2023
b020e49
formatting
Sep 21, 2023
a90f87c
update e2e test
Sep 21, 2023
c159764
format
Sep 21, 2023
1f2f388
Update x/ccv/provider/keeper/gov_hook.go
yaruwangway Sep 22, 2023
39ca877
Update x/ccv/provider/keeper/keeper.go
yaruwangway Sep 22, 2023
85d0f33
Update x/ccv/provider/keeper/keeper.go
yaruwangway Sep 22, 2023
e094e42
fix e2e test
Sep 22, 2023
c7cda12
fix gosec
Sep 22, 2023
6bf0f39
remove type url check
Oct 2, 2023
dc7371b
test: add unit test
Oct 2, 2023
5ee3116
lint
Oct 2, 2023
d31f4c8
fix lint
Oct 2, 2023
533ea06
fix err
Oct 2, 2023
834a2af
Merge branch 'feat/refactor-key-assignment' into chain-in-proposal
yaruwangway Oct 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add list proposed consumer chains
Yaru Wang committed Sep 20, 2023
commit 1c6d099bcba43c6e89688ca9f0d4d29e63564a9a
28 changes: 28 additions & 0 deletions x/ccv/provider/client/cli/query.go
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ func NewQueryCmd() *cobra.Command {
cmd.AddCommand(CmdThrottleState())
cmd.AddCommand(CmdThrottledConsumerPacketData())
cmd.AddCommand(CmdRegisteredConsumerRewardDenoms())
cmd.AddCommand(CmdProposedConsumerChains())

return cmd
}
@@ -93,6 +94,33 @@ func CmdConsumerChains() *cobra.Command {
return cmd
}

func CmdProposedConsumerChains() *cobra.Command {
cmd := &cobra.Command{
Use: "list-proposed-consumer-chains",
Short: "Query chainIDs in consumer addition proposal before voting finishes",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) (err error) {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}
queryClient := types.NewQueryClient(clientCtx)

req := &types.QueryProposedChainIDsRequest{}
res, err := queryClient.QueryProposedConsumerChainIDs(cmd.Context(), req)
if err != nil {
return err
}

return clientCtx.PrintProto(res)
},
}

flags.AddQueryFlagsToCmd(cmd)

return cmd
}

func CmdConsumerStartProposals() *cobra.Command {
cmd := &cobra.Command{
Use: "list-start-proposals",