Skip to content

Commit 242c380

Browse files
committed
Hotfix:
- downgrade go-ethereum to v1.15.3 - re-add missing code in outcome generation Based on a1b823f6dc40edaa950158e15aa454bfd71dd49b
1 parent 4c59914 commit 242c380

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.23.0
55
toolchain go1.23.6
66

77
require (
8-
github.com/ethereum/go-ethereum v1.15.6
8+
github.com/ethereum/go-ethereum v1.15.3
99
github.com/leanovate/gopter v0.2.11
1010
github.com/mr-tron/base58 v1.2.0
1111
github.com/pkg/errors v0.9.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRk
5959
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
6060
github.com/ethereum/c-kzg-4844 v1.0.3 h1:IEnbOHwjixW2cTvKRUlAAUOeleV7nNM/umJR+qy4WDs=
6161
github.com/ethereum/c-kzg-4844 v1.0.3/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
62-
github.com/ethereum/go-ethereum v1.15.6 h1:jgLoUM6/pNjp0uEnXyWcWikDwa4j1wZlcqkX8Pm8A+I=
63-
github.com/ethereum/go-ethereum v1.15.6/go.mod h1:+S9k+jFzlyVTNcYGvqFhzN/SFhI6vA+aOY4T5tLSPL0=
62+
github.com/ethereum/go-ethereum v1.15.3 h1:OeTWAq6r8iR89bfJDjmmOemE74ywArl9DUViFsVj3Y8=
63+
github.com/ethereum/go-ethereum v1.15.3/go.mod h1:jMXlpZXfSar1mGs/5sB0aEpEnPsiE1Jn6/3anlueqz8=
6464
github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8=
6565
github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk=
6666
github.com/ferranbt/fastssz v0.1.2 h1:Dky6dXlngF6Qjc+EfDipAkE83N5I5DE68bY6O0VLNPk=

offchainreporting2plus/internal/ocr3/protocol/outcome_generation_leader.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (outgen *outcomeGenerationState[RI]) messageEpochStartRequest(msg MessageEp
7979
return
8080
}
8181

82-
notBadCount := 0 // Note: just because a request is not bad does not mean it's good. Tertium datur!
82+
notBadCount := 0 // Note: just because a request is not marked bad does not mean it's good. Tertium datur!
8383
for _, epochStartRequest := range outgen.leaderState.epochStartRequests {
8484
if epochStartRequest.bad {
8585
continue
@@ -91,18 +91,26 @@ func (outgen *outcomeGenerationState[RI]) messageEpochStartRequest(msg MessageEp
9191
return
9292
}
9393

94+
// The not-bad entries in epochStartRequests here are guaranteed to be
95+
// nonempty due to definition of ByzQuorumSize.
9496
var maxSender *commontypes.OracleID
9597
for sender, epochStartRequest := range outgen.leaderState.epochStartRequests {
98+
if epochStartRequest.bad {
99+
continue
100+
}
96101
if maxSender != nil {
97102
maxTimestamp := outgen.leaderState.epochStartRequests[*maxSender].message.HighestCertified.Timestamp()
98103
if !maxTimestamp.Less31(epochStartRequest.message.HighestCertified.Timestamp()) {
99104
continue
100105
}
101106
}
102-
103107
maxSender = &sender
104108
}
105109

110+
if maxSender == nil {
111+
return
112+
}
113+
106114
maxRequest := outgen.leaderState.epochStartRequests[*maxSender]
107115

108116
if !maxRequest.message.HighestCertified.Timestamp().Equal(maxRequest.message.SignedHighestCertifiedTimestamp.HighestCertifiedTimestamp) {

0 commit comments

Comments
 (0)