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

chore: add upgrade handler to simapp for v6 -> v7 #2842

Merged
merged 31 commits into from
Nov 30, 2022
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bd37d18
refactor: add tendermint manual pruning function
colin-axner Nov 21, 2022
7ad76de
chore: add extra checks into pruning test
colin-axner Nov 21, 2022
5e9f208
chore: add docs and logging for tendermint pruning
colin-axner Nov 21, 2022
5cb1262
Apply suggestions from code review
colin-axner Nov 21, 2022
33c64d6
Apply suggestions from code review
colin-axner Nov 21, 2022
21ab154
Merge branch 'main' into colin/1863-tm-pruning
colin-axner Nov 21, 2022
f6bbe6f
Apply suggestions from code review
colin-axner Nov 21, 2022
f7d8871
Update modules/core/02-client/migrations/store.go
colin-axner Nov 21, 2022
348b21e
chore: move tendermint migrations to 07-tendermint directory
colin-axner Nov 21, 2022
969cc0b
Merge branch 'colin/1863-tm-pruning' of github.com:cosmos/ibc-go into…
colin-axner Nov 21, 2022
4399a42
chore: add changelog entry
colin-axner Nov 21, 2022
78fd0a3
chore: update imports
colin-axner Nov 21, 2022
0f90c1e
refactor: add automatic migrations for 02-client-refactor
colin-axner Nov 23, 2022
9d7c048
review: apply self nits
colin-axner Nov 23, 2022
fa08b63
chore: add changelog entry
colin-axner Nov 23, 2022
ae2b1c2
test: add an additional test for improperly registered codecs
colin-axner Nov 23, 2022
20e4d8d
chore: update migration doc header
colin-axner Nov 23, 2022
bf2a11b
Merge branch 'main' into colin/1863-02-client-migrations
colin-axner Nov 23, 2022
af99600
Merge branch 'main' of github.com:cosmos/ibc-go into colin/1863-02-cl…
colin-axner Nov 23, 2022
b95f5f0
Merge branch 'main' of github.com:cosmos/ibc-go into colin/1863-tm-pr…
colin-axner Nov 23, 2022
6aa58bc
Merge branch 'main' into charly/2437_upgradehandler_6_7
charleenfei Nov 29, 2022
d828218
create upgrade handler and call handler in app.go of simapp
charleenfei Nov 29, 2022
54334ce
Merge branch 'main' into colin/1863-tm-pruning
colin-axner Nov 29, 2022
92b71a4
Merge remote-tracking branch 'upstream/colin/1863-tm-pruning' into ch…
charleenfei Nov 29, 2022
e039aae
Merge branch 'main' into charly/2437_upgradehandler_6_7
charleenfei Nov 30, 2022
fddd991
update to main
charleenfei Nov 30, 2022
d85e8c7
err check for tendermint consensus state pruning
charleenfei Nov 30, 2022
9d732f8
add comments, rm unnecessary moduleName
charleenfei Nov 30, 2022
2b5b10d
fix re: pr comments
charleenfei Nov 30, 2022
3171ca2
Merge branch 'main' into charly/2437_upgradehandler_6_7
charleenfei Nov 30, 2022
e51e87c
Merge branch 'main' into charly/2437_upgradehandler_6_7
charleenfei Nov 30, 2022
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
Apply suggestions from code review
  • Loading branch information
colin-axner authored Nov 21, 2022
commit 5cb1262f11fdf9b9c2e1333c608eb80dedbb4946
5 changes: 2 additions & 3 deletions modules/core/02-client/migrations/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ import (
)

// PruneTendermintConsensusStates prunes all expired tendermint consensus states. This function
// may optionally be called during in-place store migrations. The 02-client store key must be provided.
// may optionally be called during in-place store migrations. The ibc store key must be provided.
func PruneTendermintConsensusStates(ctx sdk.Context, cdc codec.BinaryCodec, storeKey storetypes.StoreKey) error {
store := ctx.KVStore(storeKey)

// iterate over 02-client store with prefix: clients/07-tendermint,
// example iterator.Key = -100/clientState (second half of the clientID + clientStore specific keys)
// iterate over ibc store with prefix: host.ClientStoreKeyPrefix/07-tendermint,
tendermintClientPrefix := []byte(fmt.Sprintf("%s/%s", host.KeyClientStorePrefix, exported.Tendermint))
iterator := sdk.KVStorePrefixIterator(store, tendermintClientPrefix)

Expand Down