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

refactor: remove equivocation proposal #1294

Merged

Conversation

insumity
Copy link
Contributor

@insumity insumity commented Sep 13, 2023

Description

Removes the EquivocationProposal that was original added here by @tbruyelle.


Author Checklist

I have...

  • Included the correct type prefix in the PR title -- it's not a clear revert and hence put it under a refactor
  • Added ! to the type prefix if state-machine breaking change (i.e., requires coordinated upgrade) -- it seems that we cannot have validators with this changes and others without it because then some might attempt to propose an equivocation
  • Confirmed this PR does not introduce changes requiring state migrations, OR migration code has been added to consumer and/or provider modules
  • Targeted the correct branch (see PR Targeting)
  • Provided a link to the relevant issue or specification
  • Followed the guidelines for building SDK modules
  • Included the necessary unit and integration tests
  • Added a changelog entry to CHANGELOG.md -- not sure if we want to do this here or later when we merge everything under feat/ics-misbehaviour-handling
  • Included comments for documenting Go code
  • Updated the relevant documentation or specification
  • Reviewed "Files changed" and left comments if necessary
  • Confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed this PR does not introduce changes requiring state migrations, OR confirmed migration code has been added to consumer and/or provider modules
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage

@insumity insumity changed the base branch from release/v2.1.x-lsm to feat/ics-misbehaviour-handling September 27, 2023 12:02
@insumity insumity force-pushed the insumity/deprecate-equivocation-proposal branch from e6275ab to e8a6408 Compare September 28, 2023 08:16
@@ -0,0 +1,147 @@
---
Copy link
Contributor Author

@insumity insumity Sep 28, 2023

Choose a reason for hiding this comment

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

Adding here so that markdown link checker does not complain.
No need to review this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Was this .md moved from somewhere else in this PR? I'm a bit confused

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should have clarified. This file stems from the main branch but added here because I reference the adr-013-equivocation-slashing.md file from the docs/docs/features/slashing.md file. Without having the file in this PR, the markdown link checker would have complained.

@@ -52,80 +52,6 @@ func stepsDoubleSignOnProviderAndConsumer(consumerName string) []Step {
},
},
},
{
// consumer double sign
Copy link
Contributor Author

@insumity insumity Sep 28, 2023

Choose a reason for hiding this comment

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

Seems this is used to check that the equivocation proposal operates correctly. This is not needed anymore. However, I kept the double signing on the provider that propagates a vote-power change on the consumer because this is still a useful test.

@insumity insumity changed the title remove equivocation proposal refactor: remove equivocation proposal Sep 28, 2023
@insumity insumity marked this pull request as ready for review September 28, 2023 13:33
@insumity insumity requested a review from a team as a code owner September 28, 2023 13:33
@@ -3,7 +3,7 @@ sidebar_position: 4
---

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mpoke It's not clear how valuable this doc is. It seems we could get rid of it altogether and interested readers can look a the corresponding ADRs?

Copy link
Contributor

Choose a reason for hiding this comment

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

Imo it's nice to have a top level doc outside of ADRs that outlines the current slashing functionality, but this doc could easily be outdated

@insumity insumity requested a review from sainoe September 28, 2023 13:46
@@ -526,6 +456,7 @@ func (tr TestRun) voteGovProposal(

wg.Wait()
time.Sleep(time.Duration(tr.chainConfigs[action.chain].votingWaitTime) * time.Second)
tr.waitBlocks(action.chain, 1, 5*time.Second)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We had cases where the tests were failing although the gov proposal was passing. Specifically, we had a test where the consumer chain was stopped and the proposal passed but the chain remained there. A chain is not removed immediately when a proposal passes but maybe a block later (see here) and that's why we wait one more block here. (thanks to @p-offtermatt !)

Copy link
Contributor

@shaspitz shaspitz left a comment

Choose a reason for hiding this comment

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

Great work! Didn't see anything problematic

@@ -0,0 +1,147 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this .md moved from somewhere else in this PR? I'm a bit confused

@@ -3,7 +3,7 @@ sidebar_position: 4
---

Copy link
Contributor

Choose a reason for hiding this comment

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

Imo it's nice to have a top level doc outside of ADRs that outlines the current slashing functionality, but this doc could easily be outdated

Copy link
Contributor

@sainoe sainoe left a comment

Choose a reason for hiding this comment

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

LGTM!

@sainoe sainoe merged commit 517cdb4 into feat/ics-misbehaviour-handling Sep 29, 2023
9 of 10 checks passed
@sainoe sainoe deleted the insumity/deprecate-equivocation-proposal branch September 29, 2023 15:27
@insumity insumity restored the insumity/deprecate-equivocation-proposal branch October 13, 2023 15:25
sainoe added a commit that referenced this pull request Nov 21, 2023
* docs: cleanup changelog for v2.0.0 on release/v2.0.x (#987)

* Update CHANGELOG.md

* Update CHANGELOG.md

* comment

* chore: Hardcode golangci-lint version (backport #990) (#1013)

chore: Hardcode golangci-lint version (#990)

* Hardcode golangci-lint version

* Hardcode version in CI config

(cherry picked from commit 9920121)

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* fix: proper consumer key prefix ordering (backport #991) (#1011)

fix: proper consumer key prefix ordering (#991)

* Update keys.go

* tests

* fix another bug

* fix comments

(cherry picked from commit a1e18d0)

Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>

* feat: Remove consumer genesis migration on provider (backport #997) (#1012)

feat: Remove consumer genesis migration on provider (#997)

* Update keys.go

* tests

* fix another bug

* remove consumer genesis deletion, link to test

* remove unused bond denom method

* Revert "remove unused bond denom method"

This reverts commit f930eca.

* remove test too

* update changelog

(cherry picked from commit e2ac974)

Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>

* fix: limit vsc matured packets handled per endblocker (backport #1004) (#1015)

fix: limit vsc matured packets handled per endblocker (#1004)

* initial implementation, still need tests

* UTs

* integration test

* linter

* Update CHANGELOG.md

* make vsc matured handled this block a var

* comment

(cherry picked from commit 8c2fc56)

Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>

* feat: integrate cometmock (backport #989) (#1030)

feat: integrate cometmock (#989)

* Add gorelayer and CometMock to Dockerfile

* Add option to start with cometmock in start-chain script

* Start adding support for rly

* Adjust relayer start action

* Add entrypoint for short happy path steps

* Add . nosec G204 and waiting for blocks

* Adjust rly config: Gas is free

* Remove optout steps from short happy path

* Use separate redelegate step for short happy path

* Wait for blocks after unbonding

* Make naming more descriptive and add comments

* Add comment to chain name sorting and improve comments

* Update start-chain.sh

Address comments form joint review session with @MSalopek

* Fix typo

(cherry picked from commit 07be71a)

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* feat!: Add DistributionTransmissionChannel to ConsumerAdditionProposal (manual backport #965) (#1031)

feat!: Add DistributionTransmissionChannel to ConsumerAdditionProposal (#965)

* update proto

* remove transfer_channel_id from consumer genesis

* ConsumerAdditionProposal: transfer_channel_id -> distribution_transmission_channel

* send updated ConsumerAdditionProposal

* validate consumer genesis param

* remove StandaloneTransferChannelID from store

* fix TestOnChanOpenAck

* remove state breaking change

* finalize merge and fix issues

* chore: update docs and changelog

* chore: regenerate protos

* re-add integrationt tests around changeover

* mv entry in changelog

* test: add sovereign to consumer changeover e2e (#1025)

* tests: add sovereign to consumer e2e test

* rm unused bash scripts

* partially address review comments

* apply remaining review comments

* chore: apply formatting rules

---------

Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: MSalopek <matija.salopek994@gmail.com>

* refactor: log when constructing IBC err ack (backport #1090) (#1094)

refactor: log when constructing IBC err ack (#1090)

* log with err ack

* linter

(cherry picked from commit 07302ff)

Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>

* fix: `AttributeDistributionTotal` in event emit (backport #1097) (#1114)

* fix: `AttributeDistributionTotal` in event emit (#1097)

* fix: emitted distribution events

* docs: update changelog

* fix: lint

---------

Co-authored-by: MSalopek <matija.salopek994@gmail.com>
(cherry picked from commit d16c766)

# Conflicts:
#	CHANGELOG.md
#	x/ccv/consumer/keeper/distribution.go

* resolve conflicts

* docs: remove v3 changelog from v2 release line

---------

Co-authored-by: yaruwangway <69694322+yaruwangway@users.noreply.github.com>
Co-authored-by: Yaru Wang <yaru@informal.systems>

* docs: update broken md links (backport #1130) (#1142)

* docs: update broken md links (#1130)

(cherry picked from commit fd76f45)

# Conflicts:
#	docs/docs/validators/joining-testnet.md

* Update joining-testnet.md

---------

Co-authored-by: MSalopek <matija.salopek994@gmail.com>
Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>

* feat!: add ICS misbehaviour handling (#826)

* define msg to submit misbehaviour to provider

implement msg handling logic

e2e test msg handling logic

* wip: get byzantine validators in misbehavioiur handling

* add tx handler

* format HandleConsumerMisbehaviour

* add tx handler

* add debugging stuff

* Add misbehaviour handler

* create message for consumer double voting evidence

* add DRAFT double vote handler

* Add cli cmd for submit consumer double voting

* Add double-vote handler

* add last update

* fix jailing

* pass first jailing integration test

* format tests

* doc

* save

* update e2e tests'

* fix typo and improve docs

* remove unwanted tm evidence protofile

* fix typos

* update submit-consumer-misbehaviour cli description

* check that header1 and header2 have the same TrustedValidators

* feat: add e2e tests for ICS misbehaviour (#1118)

* remove unwanted changes

* fix hermes config with assigned key

* revert unwanted changes

* revert local setup

* remove log file

* typo

* update doc

* update ICS misbehaviour test

* update ICS misbehaviour test

* revert mixed commits

* add doc

* lint

* update to handle only equivocations

* improve doc

* update doc

* update E2E tests comment

* optimize signatures check

* doc

* update e2e tests

* linter

* remove todo

* Feat: avoid race condition in ICS misbehaviour handling (#1148)

* remove unwanted changes

* fix hermes config with assigned key

* revert unwanted changes

* revert local setup

* remove log file

* typo

* update doc

* update ICS misbehaviour test

* update ICS misbehaviour test

* revert mixed commits

* update ICS misbehaviour test

* update ICS misbehaviour test

* Add test for MsgSubmitConsumerMisbehaviour parsing

* fix linter

* save progress

* add CheckMisbehaviourAndUpdateState

* update integration tests

* typo

* remove e2e tests from another PRs

* cleaning'

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* update integration tests

* save

* save

* nits

* remove todo

* lint

* Update x/ccv/provider/keeper/misbehaviour.go

---------

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>
Co-authored-by: Marius Poke <marius.poke@posteo.de>

* Update x/ccv/provider/client/cli/tx.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update x/ccv/provider/client/cli/tx.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* add attributes to EventTypeSubmitConsumerMisbehaviour

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* apply review suggestions

* fix docstring

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* fix link

* apply review suggestions

* update docstring

---------

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>
Co-authored-by: Marius Poke <marius.poke@posteo.de>

* deps!: support  cosmos-sdk-v45-ics-lsm integration (#1120)

* tests: check cosmos-sdk-v45-ics-lsm integration

* bump cosmos-sdk to inqlusion latest

* support new method signatuers

* fix: bump v0.45.16-ics-lsm to latest [fixes difftests]

* fix: update democracy tests representative registration

* chore: bump iqlusion:cosmos-sdk to latest

* chore: bump iqlusion:cosmos-sdk to latest

* chore: bump iqlusion:cosmos-sdk to latest

* fix!: avoid panicking on CancelUnbondingDelegation  (#977)

* handle CancelUnbondingDelegation message

* tests: add cancel-unbond e2e test

* fix: appease linter

* chore: Hardcode golangci-lint version (#990)

* Hardcode golangci-lint version

* Hardcode version in CI config

---------

Co-authored-by: MSalopek <matija.salopek994@gmail.com>
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* tests: fix broken cancelUnbond e2e after cherry pick

* chore: regenerate mocks

* chore: run make proto-gen

* fix: complete concel-unbond handling in hooks

* chore: bump iqlusion:cosmos-sdk to latest

* chore: fix brokene gov prop submit

* chore: fix brokene gov prop submit

* use SDK 0.45.16-ics-lsm-rc0

* add changelog entry

---------

Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* docs: add v2.0.0-lsm changelog section (#1210)

add changelog section

* deps: bump SDK to v0.45.16-ics-lsm (#1212)

bump SDK to v0.45.16-ics-lsm

* feat: improve ICS misbehaviour E2E testing coverage (#1225)

* update e2e tests

* update the chain halt assertion

* refactor: address comments of ICS Misbehaviour PRs #826 and #1148  (#1223)

* remove interface

* improve comment

* update godoc

* address last comments

* feat: add handler for consumer double voting (#1232)

* create new endpoint for consumer double voting

* add first draft handling logic

* first iteration of double voting

* draft first mem test

* error handling

* refactor

* add unit test of double voting verification

* remove evidence age checks

* document

* doc

* protogen

* reformat double voting handling

* logger nit

* nits

* check evidence age duration

* move verify double voting evidence to ut

* fix nit

* nits

* fix e2e tests

* improve double vote testing coverage

* remove TODO

* lint

* add UT for JailAndTombstoneValidator

* nits

* nits

* remove tombstoning and evidence age check

* lint

* typo

* improve godoc

* fix: tiny bug in `NewSubmitConsumerDoubleVotingCmd` (#1247)

* fix double voting cli

* fix bug double signing handler

* godoc

* nits

* revert wrong push of lasts commits

* fix: make `HandleConsumerDoubleVoting` works with provider pubkeys (#1254)

* fix double voting cli

* fix bug double signing handler

* godoc

* nits

* lint

* nit

* fix: verify equivocation using validator pubkey in `SubmitConsumerDoubleVoting` msg (#1264)

* verify dv evidence using malicious validator pubkey in infraction block header

* nits

* nits

* refactor: update the E2E tests to work with Hermes relayer v1.6.0 (#1278)

* save changes

* fix hermes config

* fist successful run

* nit

* nits

* nits

* doc and nits

* lint

* test: add E2E tests for double voting evidence handling (#1256)

* fix double voting cli

* add double-signing e2e test

* refortmat e2e double voting test

* godoc, revert unwanted changes

* nit

* verify dv evidence using malicious validator pubkey in infraction block header

* save changes

* fix hermes config

* fist successful run

* nit

* nits

* nits

* doc and nits

* lint

* refactor

* typo

* change hermes docker image

* nits

* Update tests/e2e/steps.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* address PR comments

* nits

---------

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* feat!: provider proposal for changing reward denoms (backport #1280) (#1291)

* feat!: provider proposal for changing reward denoms (#1280)

* new provider prop type

* add methods and tests for new prop, update docs

* remove old tx, fix tests

* e2e handling

* fix command type

* boilerplate

* fix e2e tests

* Update CHANGELOG.md

* lint

* validate denoms

* Update proposal.go

* rm msg string

* fix tests

* rm chain in change denom action

* lint

* test for invalid denom

* events for both add and remove

* Update proposal_test.go

(cherry picked from commit 48a2186)

# Conflicts:
#	CHANGELOG.md
#	app/provider/app.go
#	proto/interchain_security/ccv/provider/v1/provider.proto
#	proto/interchain_security/ccv/provider/v1/tx.proto
#	tests/e2e/actions.go
#	tests/integration/distribution.go
#	x/ccv/provider/client/cli/tx.go
#	x/ccv/provider/client/proposal_handler.go
#	x/ccv/provider/keeper/distribution.go
#	x/ccv/provider/keeper/distribution_test.go
#	x/ccv/provider/proposal_handler_test.go
#	x/ccv/provider/types/codec.go
#	x/ccv/provider/types/proposal.go
#	x/ccv/provider/types/provider.pb.go
#	x/ccv/provider/types/tx.pb.go

* fix conflicts

* fix rest handler

* Update CHANGELOG.md

* rm uneeded tx proto

---------

Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>

* save

* fix nits

* update changelog and fix nits

* feat: implement slashing functionality on the provider chain (ADR-013) (#1275)

Implementing the slashing functionality, as described in ADDR, on the provider chain.

* fix e2e happy-path-short test

* make consumer misbehaviour and double signing tests pass

* currently debugging democracy-reward

* fix e2e democ test

* refactor: remove equivocation proposal (#1294)

* remove equivocation proposal

* bring back evidencekeeper

* go.sum added

* rebase and fix lint issues

* fix mocks

* clean up protos & delete unecessary file

* fix E2E test

* fix Dockerfile

* more fixes

* increase wait attempt

* increase wait attempt

* wait 1 block in gov proposal

* fix numbers

---------

Co-authored-by: Karolos Antoniadis <karolos@informal.systems>

* add equivo removal failing tests

* fix democ e2e tests

* make mem tests pass

* lint

* fix Dockerfile

* update changelog

* fix nits

* update rapid test

* fix democ tests

* update changelog

* fix CHANGELOG.md

* nits

* Update docs/docs/features/slashing.md

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update proto/interchain_security/ccv/provider/v1/tx.proto

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/client/cli/tx.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/client/cli/tx.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/punish_validator.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/punish_validator.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/punish_validator.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* check verifying pubkey against validator address

* add tests

* update checkMisbehaviour tests

* save

* update all misbehaviour memory tests

* fix misb verify valset sigs test

* revert misb check fix for ibc 7

* nit fix

* fix nit

* fix: add equivocation proposal message back in protos (#1394)

* add depreacted equiv prop msg def

* add codec and content for equivo proposal msg

* doc

* proto

* fix!: verify the signatures of byzantine validators in misbehaviour handling (#1422)

* update byzantine validators extraction

* nits

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* last changes

* udpdate changelog

---------

Co-authored-by: insumity <insumity@users.noreply.github.com>

* feat: update misbehaviour handling using IBC-Go 7 (#1401)

* nit fix

* improve doc

* super picky nit

* fix!: drop nil votes in misbehaviour handling (#1404)

* update CHANGELOG for final release

* save

* update test to extract byzantine validators

* improve testing

* nits

* nits

* Update tests/integration/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update testutil/crypto/evidence.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* update util func

* doc

* check misb client ID

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* nits

---------

Co-authored-by: insumity <insumity@users.noreply.github.com>

* fix comments

* update changelog

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* improve tests

* lint

* udpate traces

* silly bug

---------

Co-authored-by: insumity <insumity@users.noreply.github.com>

* nit

* Update x/ccv/provider/keeper/double_vote.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/double_vote.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update tests/integration/double_vote.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/client/cli/tx.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/client/cli/tx.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* address comments

* address comments

* Update x/ccv/provider/types/proposal.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* Update tests/integration/double_vote.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* Port: (feat!) [#1435](#1435) Add height-base filter for consumer equivocation evidence.

* fix: update consumer double vote cmd (#1439)

add cmd fix

* update CHANGELOG

* update changelog

* update changelog entries

* nits

---------

Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>
Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: MSalopek <matija.salopek994@gmail.com>
Co-authored-by: yaruwangway <69694322+yaruwangway@users.noreply.github.com>
Co-authored-by: Yaru Wang <yaru@informal.systems>
Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>
Co-authored-by: insumity <insumity@users.noreply.github.com>
Co-authored-by: Karolos Antoniadis <karolos@informal.systems>
MSalopek added a commit that referenced this pull request Dec 1, 2023
* docs: cleanup changelog for v2.0.0 on release/v2.0.x (#987)

* Update CHANGELOG.md

* Update CHANGELOG.md

* comment

* chore: Hardcode golangci-lint version (backport #990) (#1013)

chore: Hardcode golangci-lint version (#990)

* Hardcode golangci-lint version

* Hardcode version in CI config

(cherry picked from commit 9920121)

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* fix: proper consumer key prefix ordering (backport #991) (#1011)

fix: proper consumer key prefix ordering (#991)

* Update keys.go

* tests

* fix another bug

* fix comments

(cherry picked from commit a1e18d0)

Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>

* feat: Remove consumer genesis migration on provider (backport #997) (#1012)

feat: Remove consumer genesis migration on provider (#997)

* Update keys.go

* tests

* fix another bug

* remove consumer genesis deletion, link to test

* remove unused bond denom method

* Revert "remove unused bond denom method"

This reverts commit f930eca.

* remove test too

* update changelog

(cherry picked from commit e2ac974)

Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>

* fix: limit vsc matured packets handled per endblocker (backport #1004) (#1015)

fix: limit vsc matured packets handled per endblocker (#1004)

* initial implementation, still need tests

* UTs

* integration test

* linter

* Update CHANGELOG.md

* make vsc matured handled this block a var

* comment

(cherry picked from commit 8c2fc56)

Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>

* feat: integrate cometmock (backport #989) (#1030)

feat: integrate cometmock (#989)

* Add gorelayer and CometMock to Dockerfile

* Add option to start with cometmock in start-chain script

* Start adding support for rly

* Adjust relayer start action

* Add entrypoint for short happy path steps

* Add . nosec G204 and waiting for blocks

* Adjust rly config: Gas is free

* Remove optout steps from short happy path

* Use separate redelegate step for short happy path

* Wait for blocks after unbonding

* Make naming more descriptive and add comments

* Add comment to chain name sorting and improve comments

* Update start-chain.sh

Address comments form joint review session with @MSalopek

* Fix typo

(cherry picked from commit 07be71a)

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* feat!: Add DistributionTransmissionChannel to ConsumerAdditionProposal (manual backport #965) (#1031)

feat!: Add DistributionTransmissionChannel to ConsumerAdditionProposal (#965)

* update proto

* remove transfer_channel_id from consumer genesis

* ConsumerAdditionProposal: transfer_channel_id -> distribution_transmission_channel

* send updated ConsumerAdditionProposal

* validate consumer genesis param

* remove StandaloneTransferChannelID from store

* fix TestOnChanOpenAck

* remove state breaking change

* finalize merge and fix issues

* chore: update docs and changelog

* chore: regenerate protos

* re-add integrationt tests around changeover

* mv entry in changelog

* test: add sovereign to consumer changeover e2e (#1025)

* tests: add sovereign to consumer e2e test

* rm unused bash scripts

* partially address review comments

* apply remaining review comments

* chore: apply formatting rules

---------

Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: MSalopek <matija.salopek994@gmail.com>

* refactor: log when constructing IBC err ack (backport #1090) (#1094)

refactor: log when constructing IBC err ack (#1090)

* log with err ack

* linter

(cherry picked from commit 07302ff)

Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>

* fix: `AttributeDistributionTotal` in event emit (backport #1097) (#1114)

* fix: `AttributeDistributionTotal` in event emit (#1097)

* fix: emitted distribution events

* docs: update changelog

* fix: lint

---------

Co-authored-by: MSalopek <matija.salopek994@gmail.com>
(cherry picked from commit d16c766)

* resolve conflicts

* docs: remove v3 changelog from v2 release line

---------

Co-authored-by: yaruwangway <69694322+yaruwangway@users.noreply.github.com>
Co-authored-by: Yaru Wang <yaru@informal.systems>

* docs: update broken md links (backport #1130) (#1142)

* docs: update broken md links (#1130)

(cherry picked from commit fd76f45)

* Update joining-testnet.md

---------

Co-authored-by: MSalopek <matija.salopek994@gmail.com>
Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>

* feat!: add ICS misbehaviour handling (#826)

* define msg to submit misbehaviour to provider

implement msg handling logic

e2e test msg handling logic

* wip: get byzantine validators in misbehavioiur handling

* add tx handler

* format HandleConsumerMisbehaviour

* add tx handler

* add debugging stuff

* Add misbehaviour handler

* create message for consumer double voting evidence

* add DRAFT double vote handler

* Add cli cmd for submit consumer double voting

* Add double-vote handler

* add last update

* fix jailing

* pass first jailing integration test

* format tests

* doc

* save

* update e2e tests'

* fix typo and improve docs

* remove unwanted tm evidence protofile

* fix typos

* update submit-consumer-misbehaviour cli description

* check that header1 and header2 have the same TrustedValidators

* feat: add e2e tests for ICS misbehaviour (#1118)

* remove unwanted changes

* fix hermes config with assigned key

* revert unwanted changes

* revert local setup

* remove log file

* typo

* update doc

* update ICS misbehaviour test

* update ICS misbehaviour test

* revert mixed commits

* add doc

* lint

* update to handle only equivocations

* improve doc

* update doc

* update E2E tests comment

* optimize signatures check

* doc

* update e2e tests

* linter

* remove todo

* Feat: avoid race condition in ICS misbehaviour handling (#1148)

* remove unwanted changes

* fix hermes config with assigned key

* revert unwanted changes

* revert local setup

* remove log file

* typo

* update doc

* update ICS misbehaviour test

* update ICS misbehaviour test

* revert mixed commits

* update ICS misbehaviour test

* update ICS misbehaviour test

* Add test for MsgSubmitConsumerMisbehaviour parsing

* fix linter

* save progress

* add CheckMisbehaviourAndUpdateState

* update integration tests

* typo

* remove e2e tests from another PRs

* cleaning'

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* update integration tests

* save

* save

* nits

* remove todo

* lint

* Update x/ccv/provider/keeper/misbehaviour.go

---------

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>
Co-authored-by: Marius Poke <marius.poke@posteo.de>

* Update x/ccv/provider/client/cli/tx.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update x/ccv/provider/client/cli/tx.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* add attributes to EventTypeSubmitConsumerMisbehaviour

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* apply review suggestions

* fix docstring

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* fix link

* apply review suggestions

* update docstring

---------

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>
Co-authored-by: Marius Poke <marius.poke@posteo.de>

* deps!: support  cosmos-sdk-v45-ics-lsm integration (#1120)

* tests: check cosmos-sdk-v45-ics-lsm integration

* bump cosmos-sdk to inqlusion latest

* support new method signatuers

* fix: bump v0.45.16-ics-lsm to latest [fixes difftests]

* fix: update democracy tests representative registration

* chore: bump iqlusion:cosmos-sdk to latest

* chore: bump iqlusion:cosmos-sdk to latest

* chore: bump iqlusion:cosmos-sdk to latest

* fix!: avoid panicking on CancelUnbondingDelegation  (#977)

* handle CancelUnbondingDelegation message

* tests: add cancel-unbond e2e test

* fix: appease linter

* chore: Hardcode golangci-lint version (#990)

* Hardcode golangci-lint version

* Hardcode version in CI config

---------

Co-authored-by: MSalopek <matija.salopek994@gmail.com>
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* tests: fix broken cancelUnbond e2e after cherry pick

* chore: regenerate mocks

* chore: run make proto-gen

* fix: complete concel-unbond handling in hooks

* chore: bump iqlusion:cosmos-sdk to latest

* chore: fix brokene gov prop submit

* chore: fix brokene gov prop submit

* use SDK 0.45.16-ics-lsm-rc0

* add changelog entry

---------

Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* docs: add v2.0.0-lsm changelog section (#1210)

add changelog section

* deps: bump SDK to v0.45.16-ics-lsm (#1212)

bump SDK to v0.45.16-ics-lsm

* feat: improve ICS misbehaviour E2E testing coverage (#1225)

* update e2e tests

* update the chain halt assertion

* refactor: address comments of ICS Misbehaviour PRs #826 and #1148  (#1223)

* remove interface

* improve comment

* update godoc

* address last comments

* feat: add handler for consumer double voting (#1232)

* create new endpoint for consumer double voting

* add first draft handling logic

* first iteration of double voting

* draft first mem test

* error handling

* refactor

* add unit test of double voting verification

* remove evidence age checks

* document

* doc

* protogen

* reformat double voting handling

* logger nit

* nits

* check evidence age duration

* move verify double voting evidence to ut

* fix nit

* nits

* fix e2e tests

* improve double vote testing coverage

* remove TODO

* lint

* add UT for JailAndTombstoneValidator

* nits

* nits

* remove tombstoning and evidence age check

* lint

* typo

* improve godoc

* fix: tiny bug in `NewSubmitConsumerDoubleVotingCmd` (#1247)

* fix double voting cli

* fix bug double signing handler

* godoc

* nits

* revert wrong push of lasts commits

* fix: make `HandleConsumerDoubleVoting` works with provider pubkeys (#1254)

* fix double voting cli

* fix bug double signing handler

* godoc

* nits

* lint

* nit

* fix: verify equivocation using validator pubkey in `SubmitConsumerDoubleVoting` msg (#1264)

* verify dv evidence using malicious validator pubkey in infraction block header

* nits

* nits

* refactor: update the E2E tests to work with Hermes relayer v1.6.0 (#1278)

* save changes

* fix hermes config

* fist successful run

* nit

* nits

* nits

* doc and nits

* lint

* test: add E2E tests for double voting evidence handling (#1256)

* fix double voting cli

* add double-signing e2e test

* refortmat e2e double voting test

* godoc, revert unwanted changes

* nit

* verify dv evidence using malicious validator pubkey in infraction block header

* save changes

* fix hermes config

* fist successful run

* nit

* nits

* nits

* doc and nits

* lint

* refactor

* typo

* change hermes docker image

* nits

* Update tests/e2e/steps.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* address PR comments

* nits

---------

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* feat!: provider proposal for changing reward denoms (backport #1280) (#1291)

* feat!: provider proposal for changing reward denoms (#1280)

* new provider prop type

* add methods and tests for new prop, update docs

* remove old tx, fix tests

* e2e handling

* fix command type

* boilerplate

* fix e2e tests

* Update CHANGELOG.md

* lint

* validate denoms

* Update proposal.go

* rm msg string

* fix tests

* rm chain in change denom action

* lint

* test for invalid denom

* events for both add and remove

* Update proposal_test.go

(cherry picked from commit 48a2186)

* fix conflicts

* fix rest handler

* Update CHANGELOG.md

* rm uneeded tx proto

---------

Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>

* save

* fix nits

* update changelog and fix nits

* feat: implement slashing functionality on the provider chain (ADR-013) (#1275)

Implementing the slashing functionality, as described in ADDR, on the provider chain.

* fix e2e happy-path-short test

* make consumer misbehaviour and double signing tests pass

* currently debugging democracy-reward

* fix e2e democ test

* refactor: remove equivocation proposal (#1294)

* remove equivocation proposal

* bring back evidencekeeper

* go.sum added

* rebase and fix lint issues

* fix mocks

* clean up protos & delete unecessary file

* fix E2E test

* fix Dockerfile

* more fixes

* increase wait attempt

* increase wait attempt

* wait 1 block in gov proposal

* fix numbers

---------

Co-authored-by: Karolos Antoniadis <karolos@informal.systems>

* add equivo removal failing tests

* fix democ e2e tests

* make mem tests pass

* lint

* fix Dockerfile

* update changelog

* fix nits

* update rapid test

* fix democ tests

* update changelog

* fix CHANGELOG.md

* nits

* Update docs/docs/features/slashing.md

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update proto/interchain_security/ccv/provider/v1/tx.proto

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/client/cli/tx.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/client/cli/tx.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/punish_validator.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/punish_validator.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/punish_validator.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* check verifying pubkey against validator address

* add tests

* update checkMisbehaviour tests

* save

* update all misbehaviour memory tests

* fix misb verify valset sigs test

* revert misb check fix for ibc 7

* nit fix

* fix nit

* fix: add equivocation proposal message back in protos (#1394)

* add depreacted equiv prop msg def

* add codec and content for equivo proposal msg

* doc

* proto

* fix!: verify the signatures of byzantine validators in misbehaviour handling (#1422)

* update byzantine validators extraction

* nits

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* last changes

* udpdate changelog

---------

Co-authored-by: insumity <insumity@users.noreply.github.com>

* feat: update misbehaviour handling using IBC-Go 7 (#1401)

* nit fix

* improve doc

* super picky nit

* fix!: drop nil votes in misbehaviour handling (#1404)

* update CHANGELOG for final release

* save

* update test to extract byzantine validators

* improve testing

* nits

* nits

* Update tests/integration/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update testutil/crypto/evidence.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* update util func

* doc

* check misb client ID

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* nits

---------

Co-authored-by: insumity <insumity@users.noreply.github.com>

* fix comments

* update changelog

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* improve tests

* lint

* udpate traces

* silly bug

---------

Co-authored-by: insumity <insumity@users.noreply.github.com>

* nit

* Update x/ccv/provider/keeper/double_vote.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/double_vote.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/keeper/misbehaviour.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update tests/integration/double_vote.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/client/cli/tx.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* Update x/ccv/provider/client/cli/tx.go

Co-authored-by: insumity <insumity@users.noreply.github.com>

* address comments

* address comments

* Update x/ccv/provider/types/proposal.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* Update tests/integration/double_vote.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* Port: (feat!) [#1435](#1435) Add height-base filter for consumer equivocation evidence.

* fix: update consumer double vote cmd (#1439)

add cmd fix

* update CHANGELOG

* update changelog

* update changelog entries

* nits

---------

Co-authored-by: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>
Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: MSalopek <matija.salopek994@gmail.com>
Co-authored-by: yaruwangway <69694322+yaruwangway@users.noreply.github.com>
Co-authored-by: Yaru Wang <yaru@informal.systems>
Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>
Co-authored-by: insumity <insumity@users.noreply.github.com>
Co-authored-by: Karolos Antoniadis <karolos@informal.systems>
@insumity insumity deleted the insumity/deprecate-equivocation-proposal branch January 31, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants