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!: add cryptographic equivocation #1340

Merged
merged 88 commits into from
Nov 21, 2023
Merged
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
42279c8
docs: cleanup changelog for v2.0.0 on release/v2.0.x (#987)
shaspitz Jun 1, 2023
8ce740f
chore: Hardcode golangci-lint version (backport #990) (#1013)
mergify[bot] Jun 13, 2023
e8230bc
fix: proper consumer key prefix ordering (backport #991) (#1011)
mergify[bot] Jun 13, 2023
42f916e
feat: Remove consumer genesis migration on provider (backport #997) (…
mergify[bot] Jun 13, 2023
2395b6f
fix: limit vsc matured packets handled per endblocker (backport #1004…
mergify[bot] Jun 13, 2023
163da4e
feat: integrate cometmock (backport #989) (#1030)
mergify[bot] Jun 16, 2023
afa541f
feat!: Add DistributionTransmissionChannel to ConsumerAdditionProposa…
shaspitz Jun 16, 2023
362b7c0
refactor: log when constructing IBC err ack (backport #1090) (#1094)
mergify[bot] Jun 28, 2023
16e71ab
fix: `AttributeDistributionTotal` in event emit (backport #1097) (#1114)
mergify[bot] Jul 6, 2023
8a1b3ca
docs: update broken md links (backport #1130) (#1142)
mergify[bot] Jul 13, 2023
a77eea1
feat!: add ICS misbehaviour handling (#826)
sainoe Aug 14, 2023
309bd85
deps!: support cosmos-sdk-v45-ics-lsm integration (#1120)
MSalopek Aug 16, 2023
2573975
docs: add v2.0.0-lsm changelog section (#1210)
mpoke Aug 16, 2023
6b0a94a
deps: bump SDK to v0.45.16-ics-lsm (#1212)
mpoke Aug 18, 2023
21e3d83
feat: improve ICS misbehaviour E2E testing coverage (#1225)
sainoe Aug 23, 2023
292ad75
refactor: address comments of ICS Misbehaviour PRs #826 and #1148 (#…
sainoe Aug 23, 2023
f168b9b
feat: add handler for consumer double voting (#1232)
sainoe Aug 28, 2023
f12a5c0
fix: tiny bug in `NewSubmitConsumerDoubleVotingCmd` (#1247)
sainoe Aug 31, 2023
2501e83
fix: make `HandleConsumerDoubleVoting` works with provider pubkeys (#…
sainoe Sep 4, 2023
eb6a079
fix: verify equivocation using validator pubkey in `SubmitConsumerDou…
sainoe Sep 6, 2023
98af9c0
refactor: update the E2E tests to work with Hermes relayer v1.6.0 (#1…
sainoe Sep 8, 2023
c881a1a
test: add E2E tests for double voting evidence handling (#1256)
sainoe Sep 11, 2023
494c4d2
feat!: provider proposal for changing reward denoms (backport #1280) …
mergify[bot] Sep 12, 2023
a71f1fe
save
sainoe Sep 13, 2023
3be76ad
fix nits
sainoe Sep 14, 2023
691d206
Merge remote-tracking branch 'upstream/release/v2.1.x-lsm' into feat/…
sainoe Sep 14, 2023
88e0717
update changelog and fix nits
sainoe Sep 14, 2023
022cd5d
feat: implement slashing functionality on the provider chain (ADR-013…
insumity Sep 27, 2023
a8f6b11
make build pass
sainoe Sep 28, 2023
04ca9a1
fix e2e happy-path-short test
sainoe Sep 28, 2023
8163735
make consumer misbehaviour and double signing tests pass
sainoe Sep 28, 2023
ac9f3ff
currently debugging democracy-reward
sainoe Sep 29, 2023
1fbaf09
fix e2e democ test
sainoe Sep 29, 2023
517cdb4
refactor: remove equivocation proposal (#1294)
insumity Sep 29, 2023
dddcd1b
add equivo removal failing tests
sainoe Oct 2, 2023
d9903a2
fix democ e2e tests
sainoe Oct 2, 2023
67b8c31
make mem tests pass
insumity Sep 27, 2023
1fd8409
lint
sainoe Oct 3, 2023
e424e47
refactor for SDK v47 and merge with main branch
sainoe Oct 3, 2023
e27b7b7
fix Dockerfile
sainoe Oct 3, 2023
e7a8e7b
update changelog
sainoe Oct 3, 2023
7868be6
Merge branch 'main' into feat/ics-misbehaviour-handling
sainoe Oct 3, 2023
8349b82
fix nits
sainoe Oct 3, 2023
ea545b4
update rapid test
sainoe Oct 4, 2023
92a9d17
fix democ tests
sainoe Oct 4, 2023
f8f1029
update test traces
sainoe Oct 4, 2023
00d4f2f
update changelog
sainoe Oct 4, 2023
e29cb92
fix CHANGELOG.md
sainoe Oct 4, 2023
d35c983
nits
sainoe Oct 4, 2023
9688154
Update docs/docs/features/slashing.md
sainoe Oct 12, 2023
108fe33
Update proto/interchain_security/ccv/provider/v1/tx.proto
sainoe Oct 12, 2023
1aaea88
Update x/ccv/provider/client/cli/tx.go
sainoe Oct 12, 2023
1d511b4
Update x/ccv/provider/client/cli/tx.go
sainoe Oct 12, 2023
991181a
Update x/ccv/provider/keeper/misbehaviour.go
sainoe Oct 12, 2023
c858173
Update x/ccv/provider/keeper/punish_validator.go
sainoe Oct 12, 2023
fb92af9
Update x/ccv/provider/keeper/punish_validator.go
sainoe Oct 12, 2023
28e0c14
Update x/ccv/provider/keeper/punish_validator.go
sainoe Oct 12, 2023
9f23165
check verifying pubkey against validator address
sainoe Oct 13, 2023
7092914
add tests
sainoe Oct 13, 2023
f886a7b
update checkMisbehaviour tests
sainoe Nov 8, 2023
a290d76
save
sainoe Nov 8, 2023
7dc78bb
update all misbehaviour memory tests
sainoe Nov 8, 2023
ecd796f
fix misb verify valset sigs test
sainoe Nov 9, 2023
6769af5
revert misb check fix for ibc 7
sainoe Nov 9, 2023
e070f3b
nit fix
sainoe Nov 9, 2023
80e9d25
fix nit
sainoe Nov 9, 2023
310788e
fix: add equivocation proposal message back in protos (#1394)
sainoe Nov 6, 2023
f2c1a3f
fix!: verify the signatures of byzantine validators in misbehaviour h…
sainoe Nov 13, 2023
a22030b
Merge branch 'main' into feat/ics-misbehaviour-handling
sainoe Nov 14, 2023
84955b9
feat: update misbehaviour handling using IBC-Go 7 (#1401)
sainoe Nov 15, 2023
12c1bda
nit
sainoe Nov 16, 2023
c72fa09
Update x/ccv/provider/keeper/double_vote.go
sainoe Nov 16, 2023
74a3314
Update x/ccv/provider/keeper/double_vote.go
sainoe Nov 16, 2023
481f0cc
Update x/ccv/provider/keeper/misbehaviour.go
sainoe Nov 16, 2023
eabf667
Update x/ccv/provider/keeper/misbehaviour.go
sainoe Nov 16, 2023
6c3d1b5
Update tests/integration/double_vote.go
sainoe Nov 16, 2023
9037e30
Update x/ccv/provider/client/cli/tx.go
sainoe Nov 16, 2023
d458eda
Update x/ccv/provider/client/cli/tx.go
sainoe Nov 16, 2023
af531f3
address comments
sainoe Nov 16, 2023
26c1b11
address comments
sainoe Nov 16, 2023
7440b43
Update x/ccv/provider/types/proposal.go
sainoe Nov 21, 2023
d61f474
Update tests/integration/double_vote.go
sainoe Nov 21, 2023
1895f87
Port: (feat!) [#1435](https://github.com/cosmos/interchain-security/p…
sainoe Nov 21, 2023
695bd6e
fix: update consumer double vote cmd (#1439)
sainoe Nov 20, 2023
8caad9f
update CHANGELOG
sainoe Nov 21, 2023
3310d91
update changelog
sainoe Nov 21, 2023
2d476c2
update changelog entries
sainoe Nov 21, 2023
03aada4
nits
sainoe Nov 21, 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
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>
  • Loading branch information
sainoe and p-offtermatt authored Sep 11, 2023
commit c881a1aad37f2f8041c913468602edaf69fef9bf
2 changes: 2 additions & 0 deletions tests/e2e/main.go
Original file line number Diff line number Diff line change
@@ -63,7 +63,9 @@ func main() {
{DemocracyTestRun(false), rewardDenomConsumerSteps},
{SlashThrottleTestRun(), slashThrottleSteps},
{ConsumerMisbehaviourTestRun(), consumerMisbehaviourSteps},
{DefaultTestRun(), consumerDoubleSignSteps},
}

if includeMultiConsumer != nil && *includeMultiConsumer {
testRuns = append(testRuns, testRunWithSteps{MultiConsumerTestRun(), multipleConsumers})
}
10 changes: 9 additions & 1 deletion tests/e2e/steps.go
Original file line number Diff line number Diff line change
@@ -91,6 +91,14 @@ var changeoverSteps = concatSteps(
var consumerMisbehaviourSteps = concatSteps(
// start provider and consumer chain
stepsStartChainsWithSoftOptOut("consu"),
// make consumer validator to misbehave and get jail
// make a consumer validator to misbehave and get jailed
stepsCauseConsumerMisbehaviour("consu"),
)

var consumerDoubleSignSteps = concatSteps(
// start provider and consumer chain
stepsStartChains([]string{"consu"}, false),

sainoe marked this conversation as resolved.
Show resolved Hide resolved
// make a consumer validator double sign and get jailed
stepsCauseDoubleSignOnConsumer("consu", "provi"),
)
76 changes: 76 additions & 0 deletions tests/e2e/steps_double_sign.go
Original file line number Diff line number Diff line change
@@ -128,3 +128,79 @@ func stepsDoubleSignOnProviderAndConsumer(consumerName string) []Step {
},
}
}

// Steps that make bob double sign on the consumer
func stepsCauseDoubleSignOnConsumer(consumerName, providerName string) []Step {
return []Step{
{
action: doublesignSlashAction{
chain: chainID(consumerName),
validator: validatorID("bob"),
},
state: State{
chainID(providerName): ChainState{
ValPowers: &map[validatorID]uint{
validatorID("alice"): 500,
validatorID("bob"): 500,
validatorID("carol"): 500,
},
},
chainID(consumerName): ChainState{
ValPowers: &map[validatorID]uint{
validatorID("alice"): 500,
validatorID("bob"): 500,
validatorID("carol"): 500,
},
},
},
},
// detect the double voting infraction
// and jail bob on the provider
{
action: detectConsumerEvidenceAction{
chain: chainID(consumerName),
},
state: State{
chainID(providerName): ChainState{
ValPowers: &map[validatorID]uint{
validatorID("alice"): 500,
validatorID("bob"): 0,
validatorID("carol"): 500,
},
},
chainID(consumerName): ChainState{
ValPowers: &map[validatorID]uint{
validatorID("alice"): 500,
validatorID("bob"): 500,
validatorID("carol"): 500,
},
},
},
},
// consumer learns about the jailing
{
action: relayPacketsAction{
chainA: chainID(providerName),
chainB: chainID(consumerName),
port: "provider",
channel: 0,
},
state: State{
chainID(providerName): ChainState{
ValPowers: &map[validatorID]uint{
validatorID("alice"): 500,
validatorID("bob"): 0,
validatorID("carol"): 500,
},
},
chainID(consumerName): ChainState{
ValPowers: &map[validatorID]uint{
validatorID("alice"): 500,
validatorID("bob"): 0,
validatorID("carol"): 500,
},
},
},
},
}
}