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

chore: modify verifier to not require eth archive node #241

Merged
merged 15 commits into from
Jan 23, 2025
Merged
Changes from 1 commit
Commits
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
style(cert): remove unecessary bound checks from inside loop
  • Loading branch information
samlaf committed Jan 23, 2025
commit 4a86753f0ee2c8080a73e76174a22e9b4bdfe106
11 changes: 4 additions & 7 deletions verify/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,12 @@ func getQuorumParametersAtLatestBlock(
if err != nil {
return nil, nil, fmt.Errorf("failed to fetch QuorumAdversaryThresholdPercentages from EigenDAServiceManager: %w", err)
}
if len(thresholds) > math.MaxUint8 {
return nil, nil, fmt.Errorf("thresholds received from ServiceManager contains %d > 256 quorums, which isn't possible", len(thresholds))
}
var quorumAdversaryThresholds = make(map[uint8]uint8)
for quorumNum, threshold := range thresholds {
if quorumNum > math.MaxInt8 {
return nil, nil, fmt.Errorf("quorum number %d is too large to fit in int8", quorumNum)
}
if quorumNum < 0 {
return nil, nil, fmt.Errorf("quorum number %d cannot be negative", quorumNum)
}
quorumAdversaryThresholds[uint8(quorumNum)] = threshold
quorumAdversaryThresholds[uint8(quorumNum)] = threshold //nolint:gosec // disable G115 // We checked the length of thresholds above
}
// Sanity check: ensure that the required quorums are a subset of the quorums for which we have adversary thresholds
for _, quorum := range requiredQuorums {
Expand Down
Loading