File tree Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -154,3 +154,5 @@ require (
154154 pgregory.net/rapid v1.1.0 // indirect
155155 sigs.k8s.io/yaml v1.4.0 // indirect
156156)
157+
158+ replace github.com/cosmos/cosmos-sdk => github.com/piplabs/cosmos-sdk v0.50.7-piplabs-v0.15
Original file line number Diff line number Diff line change @@ -143,8 +143,6 @@ github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAK
143143github.com/cosmos/cosmos-db v1.0.2 /go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA =
144144github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA =
145145github.com/cosmos/cosmos-proto v1.0.0-beta.5 /go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec =
146- github.com/cosmos/cosmos-sdk v0.50.6 h1:efR3MsvMHX5sxS3be+hOobGk87IzlZbSpsI2x/Vw3hk =
147- github.com/cosmos/cosmos-sdk v0.50.6 /go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40 =
148146github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY =
149147github.com/cosmos/go-bip39 v1.0.0 /go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw =
150148github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE =
@@ -575,6 +573,9 @@ github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0
575573github.com/pierrec/lz4 v2.0.5+incompatible /go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY =
576574github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4 =
577575github.com/pingcap/errors v0.11.4 /go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8 =
576+ github.com/piplabs/cosmos-sdk v0.50.7-piplabs-v0.15 /go.mod h1:84xDDJEHttRT7NDGwBaUOLVOMN0JNE9x7NbsYIxXs1s =
577+ github.com/piplabs/cosmos-sdk v0.50.8-0.20241021173134-3032e1bdd6bf h1:SRT51TtdhuluqhQANrKP9ySQefV+XOwXzIeu8k3ewlY =
578+ github.com/piplabs/cosmos-sdk v0.50.8-0.20241021173134-3032e1bdd6bf /go.mod h1:84xDDJEHttRT7NDGwBaUOLVOMN0JNE9x7NbsYIxXs1s =
578579github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e /go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA =
579580github.com/pkg/errors v0.8.0 /go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0 =
580581github.com/pkg/errors v0.8.1 /go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0 =
Original file line number Diff line number Diff line change @@ -27,6 +27,17 @@ import (
2727func (k Keeper ) handleEquivocationEvidence (ctx context.Context , evidence * types.Equivocation ) error {
2828 sdkCtx := sdk .UnwrapSDKContext (ctx )
2929 logger := k .Logger (ctx )
30+
31+ singularityHeight , err := k .slashingKeeper .SingularityHeight (ctx )
32+ if err != nil {
33+ return err
34+ }
35+
36+ if sdkCtx .BlockHeight () < int64 (singularityHeight ) {
37+ logger .Debug ("skip handling evidence before singularity" )
38+ return nil
39+ }
40+
3041 consAddr := evidence .GetConsensusAddress (k .stakingKeeper .ConsensusAddressCodec ())
3142
3243 validator , err := k .stakingKeeper .ValidatorByConsAddr (ctx , consAddr )
Original file line number Diff line number Diff line change 3434 SlashFractionDoubleSign (context.Context ) (math.LegacyDec , error )
3535 Jail (context.Context , sdk.ConsAddress ) error
3636 JailUntil (context.Context , sdk.ConsAddress , time.Time ) error
37+
38+ // For Story
39+ SingularityHeight (ctx context.Context ) (uint64 , error )
3740 }
3841
3942 // AccountKeeper define the account keeper interface contracted needed by the evidence module
You can’t perform that action at this time.
0 commit comments