Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit fa0914b
Author: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>
Date:   Fri Jun 2 15:05:44 2023 -0700

    fix another bug

commit 88d7764
Author: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>
Date:   Fri Jun 2 09:52:29 2023 -0700

    tests

commit ab372d6
Author: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>
Date:   Fri Jun 2 09:46:32 2023 -0700

    Update keys.go

commit 9920121
Author: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>
Date:   Fri Jun 2 17:55:13 2023 +0200

    chore: Hardcode golangci-lint version (#990)

    * Hardcode golangci-lint version

    * Hardcode version in CI config

commit 1ec8148
Author: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>
Date:   Thu Jun 1 15:30:00 2023 -0700

    docs: cleanup changelog for v2.0.0 on main (#988)

    cleans
  • Loading branch information
shaspitz committed Jun 4, 2023
1 parent 8cbe591 commit 18cace8
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
version: v1.52.2

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Upgrading a provider from `v1.1.0-multiden` to `v2.0.0` will require state migra

Upgrading a consumer from `v1.2.0-multiden` to `v2.0.0` will NOT require state migrations. See the consumer module's `ConsensusVersion` in [module](./x/ccv/consumer/module.go)

Upgrading a provider from `v1.1.0-multiden` to `v2.0.0` will require state migrations. See [migration.go](./x/ccv/provider/keeper/migration.go). See the provider module's `ConsensusVersion` in [module](./x/ccv/provider/module.go)

Upgrading a consumer from `v1.2.0-multiden` to `v2.0.0` will NOT require state migrations. See the consumer module's `ConsensusVersion` in [module](./x/ccv/consumer/module.go)

### High level changes included in v2.0.0

* MVP for standalone to consumer changeover, see [EPIC](https://github.com/cosmos/interchain-security/issues/756)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ test-no-cache:
### Linting ###
###############################################################################

golangci_version=latest
golangci_version=v1.52.2

lint:
@echo "--> Running linter"
Expand Down
35 changes: 19 additions & 16 deletions x/ccv/consumer/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,24 @@ const (
// received over CCV channel but not yet flushed over ABCI
PendingChangesByteKey

// PendingDataPacketsByteKey is the byte key for storing
// a list of data packets that cannot be sent yet to the provider
// chain either because the CCV channel is not established or
// because the client is expired
PendingDataPacketsByteKey

// PreCCVByteKey is the byte to store the consumer is running on democracy staking module without consumer
PreCCVByteKey

// InitialValSetByteKey is the byte to store the initial validator set for a consumer
InitialValSetByteKey

// NOTE: This prefix is depreciated, but left in place to avoid consumer state migrations
LastStandaloneHeightByteKey

// SmallestNonOptOutPowerByteKey is the byte that will store the smallest val power that cannot opt out
SmallestNonOptOutPowerByteKey

// HistoricalInfoKey is the byte prefix that will store the historical info for a given height
HistoricalInfoBytePrefix

Expand All @@ -67,24 +85,9 @@ const (
// CrossChainValidatorPrefix is the byte prefix that will store cross-chain validators by consensus address
CrossChainValidatorBytePrefix

// PendingDataPacketsByteKey is the byte key for storing
// a list of data packets that cannot be sent yet to the provider
// chain either because the CCV channel is not established or
// because the client is expired
PendingDataPacketsByteKey

// PreCCVByteKey is the byte to store the consumer is running on democracy staking module without consumer
PreCCVByteKey

// InitialValSetByteKey is the byte to store the initial validator set for a consumer
InitialValSetByteKey

// InitGenesisHeightByteKey is the byte that will store the init genesis height
InitGenesisHeightByteKey

// SmallestNonOptOutPowerByteKey is the byte that will store the smallest val power that cannot opt out
SmallestNonOptOutPowerByteKey

// StandaloneTransferChannelIDByteKey is the byte storing the channelID of transfer channel
// that existed from a standalone chain changing over to a consumer
StandaloneTransferChannelIDByteKey
Expand Down Expand Up @@ -170,7 +173,7 @@ func CrossChainValidatorKey(addr []byte) []byte {
// that cannot be sent yet to the provider chain either because the CCV channel
// is not established or because the client is expired.
func PendingDataPacketsKey() []byte {
return []byte{PendingDataPacketsByteKey}
return []byte{PendingDataPacketsBytePrefix}
}

func PreCCVKey() []byte {
Expand Down
20 changes: 12 additions & 8 deletions x/ccv/consumer/types/keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,18 @@ func getAllKeyPrefixes() []byte {
ProviderClientByteKey,
ProviderChannelByteKey,
PendingChangesByteKey,
PendingDataPacketsByteKey,
PreCCVByteKey,
InitialValSetByteKey,
LastStandaloneHeightByteKey,
SmallestNonOptOutPowerByteKey,
HistoricalInfoBytePrefix,
PacketMaturityTimeBytePrefix,
HeightValsetUpdateIDBytePrefix,
OutstandingDowntimeBytePrefix,
PendingDataPacketsBytePrefix,
CrossChainValidatorBytePrefix,
PendingDataPacketsByteKey,
PreCCVByteKey,
InitialValSetByteKey,
InitGenesisHeightByteKey,
SmallestNonOptOutPowerByteKey,
StandaloneTransferChannelIDByteKey,
PrevStandaloneChainByteKey,
}
Expand All @@ -61,16 +63,18 @@ func getAllFullyDefinedKeys() [][]byte {
ProviderClientIDKey(),
ProviderChannelKey(),
PendingChangesKey(),
// PendingDataPacketsKey() does not use duplicated prefix with value of 0x06
PreCCVKey(),
InitialValSetKey(),
// LastStandaloneHeightKey() is depreciated
SmallestNonOptOutPowerKey(),
HistoricalInfoKey(0),
PacketMaturityTimeKey(0, time.Time{}),
HeightValsetUpdateIDKey(0),
OutstandingDowntimeKey([]byte{}),
CrossChainValidatorKey([]byte{}),
PendingDataPacketsKey(),
PreCCVKey(),
InitialValSetKey(),
CrossChainValidatorKey([]byte{}),
InitGenesisHeightKey(),
SmallestNonOptOutPowerKey(),
StandaloneTransferChannelIDKey(),
PrevStandaloneChainKey(),
}
Expand Down

0 comments on commit 18cace8

Please sign in to comment.