From af531f3869604805d04a81921a5574c33bac8ad5 Mon Sep 17 00:00:00 2001 From: Simon Noetzlin Date: Thu, 16 Nov 2023 15:19:23 +0100 Subject: [PATCH] address comments --- ...0-add-cryptographic-verification-of-equivocation-feature.md | 3 +++ .../provider/1340-cryptographic-equivocation-feature.md | 3 +-- .../provider/1340-cryptographic-equivocation-feature.md | 3 +-- tests/e2e/steps.go | 1 - tests/integration/double_vote.go | 2 +- x/ccv/provider/keeper/misbehaviour.go | 2 +- x/ccv/provider/types/proposal.go | 3 ++- x/ccv/types/events.go | 1 - 8 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 .changelog/unreleased/api-breaking/provider/1340-add-cryptographic-verification-of-equivocation-feature.md diff --git a/.changelog/unreleased/api-breaking/provider/1340-add-cryptographic-verification-of-equivocation-feature.md b/.changelog/unreleased/api-breaking/provider/1340-add-cryptographic-verification-of-equivocation-feature.md new file mode 100644 index 0000000000..b6a2d31dce --- /dev/null +++ b/.changelog/unreleased/api-breaking/provider/1340-add-cryptographic-verification-of-equivocation-feature.md @@ -0,0 +1,3 @@ +- Add the cryptographic verification of equivocation feature to the + provider (cf. ADR-005 & ADR-013) and remove the equivocation proposal. + ([\#1340](https://github.com/cosmos/interchain-security/pull/1340)) \ No newline at end of file diff --git a/.changelog/unreleased/features/provider/1340-cryptographic-equivocation-feature.md b/.changelog/unreleased/features/provider/1340-cryptographic-equivocation-feature.md index e34b5fff28..6d84b9c8e4 100644 --- a/.changelog/unreleased/features/provider/1340-cryptographic-equivocation-feature.md +++ b/.changelog/unreleased/features/provider/1340-cryptographic-equivocation-feature.md @@ -1,3 +1,2 @@ - Add the cryptographic verification of equivocation feature to the provider - (cf. ADR-005 & ADR-013). ([\#1340](https://github.com/cosmos/interchain- - security/pull/1340)) \ No newline at end of file + (cf. ADR-005 & ADR-013). ([\#1340](https://github.com/cosmos/interchain-security/pull/1340)) \ No newline at end of file diff --git a/.changelog/unreleased/state-breaking/provider/1340-cryptographic-equivocation-feature.md b/.changelog/unreleased/state-breaking/provider/1340-cryptographic-equivocation-feature.md index e34b5fff28..6d84b9c8e4 100644 --- a/.changelog/unreleased/state-breaking/provider/1340-cryptographic-equivocation-feature.md +++ b/.changelog/unreleased/state-breaking/provider/1340-cryptographic-equivocation-feature.md @@ -1,3 +1,2 @@ - Add the cryptographic verification of equivocation feature to the provider - (cf. ADR-005 & ADR-013). ([\#1340](https://github.com/cosmos/interchain- - security/pull/1340)) \ No newline at end of file + (cf. ADR-005 & ADR-013). ([\#1340](https://github.com/cosmos/interchain-security/pull/1340)) \ No newline at end of file diff --git a/tests/e2e/steps.go b/tests/e2e/steps.go index 1da7e6a698..783d976a3a 100644 --- a/tests/e2e/steps.go +++ b/tests/e2e/steps.go @@ -111,7 +111,6 @@ var consumerMisbehaviourSteps = concatSteps( var consumerDoubleSignSteps = concatSteps( // start provider and consumer chain stepsStartChains([]string{"consu"}, false), - // make a consumer validator double sign and get jailed stepsCauseDoubleSignOnConsumer("consu", "provi"), ) diff --git a/tests/integration/double_vote.go b/tests/integration/double_vote.go index a4aa535859..3fae17adf5 100644 --- a/tests/integration/double_vote.go +++ b/tests/integration/double_vote.go @@ -38,7 +38,7 @@ func (s *CCVTestSuite) TestHandleConsumerDoubleVoting() { blockID2 := testutil.MakeBlockID([]byte("blockhash2"), 1000, []byte("partshash")) // Note that votes are signed along with the chain ID - // see VoteSignBytes in https://github.com/cometbft/cometbft/blob/main/types/vote.go#L139 + // see VoteSignBytes in https://github.com/cometbft/cometbft/blob/v0.37.2/types/vote.go#L93 // create two votes using the consumer validator key consuVote := testutil.MakeAndSignVote( diff --git a/x/ccv/provider/keeper/misbehaviour.go b/x/ccv/provider/keeper/misbehaviour.go index da1d73936f..9a09f0682d 100644 --- a/x/ccv/provider/keeper/misbehaviour.go +++ b/x/ccv/provider/keeper/misbehaviour.go @@ -153,7 +153,7 @@ func headerToLightBlock(h ibctmtypes.Header) (*tmtypes.LightBlock, error) { } // CheckMisbehaviour checks that headers in the given misbehaviour forms -// a valid light client attack from an ICS consumer chain and that the light client isn't expired +// a valid light client attack on a light client that tracks an ICS consumer chain func (k Keeper) CheckMisbehaviour(ctx sdk.Context, misbehaviour ibctmtypes.Misbehaviour) error { // check that the misbehaviour is for an ICS consumer chain clientId, found := k.GetConsumerClientId(ctx, misbehaviour.Header1.Header.ChainID) diff --git a/x/ccv/provider/types/proposal.go b/x/ccv/provider/types/proposal.go index a7fcbbdd73..5f6677f2a4 100644 --- a/x/ccv/provider/types/proposal.go +++ b/x/ccv/provider/types/proposal.go @@ -204,7 +204,8 @@ func (sccp *ConsumerRemovalProposal) ValidateBasic() error { } // NewEquivocationProposal creates a new equivocation proposal. -// [DEPRECATED]: do not use +// [DEPRECATED]: do not use since that equivocations can be submitted +// and verified automatically on the provider. func NewEquivocationProposal(title, description string, equivocations []*evidencetypes.Equivocation) govv1beta1.Content { return &EquivocationProposal{ Title: title, diff --git a/x/ccv/types/events.go b/x/ccv/types/events.go index 1252747507..4c597ded56 100644 --- a/x/ccv/types/events.go +++ b/x/ccv/types/events.go @@ -20,7 +20,6 @@ const ( AttributeKeyAckSuccess = "success" AttributeKeyAck = "acknowledgement" AttributeKeyAckError = "error" - AttributeValidatorConsumerAddress = "validator_consumer_address" AttributeInfractionHeight = "infraction_height" AttributeConsumerHeight = "consumer_height" AttributeTimestamp = "timestamp"