-
Notifications
You must be signed in to change notification settings - Fork 90
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
core/bcast: add recaster to rebroadcast registrations every epoch #1008
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1008 +/- ##
==========================================
- Coverage 54.25% 53.54% -0.72%
==========================================
Files 117 119 +2
Lines 13130 13292 +162
==========================================
- Hits 7124 7117 -7
- Misses 4983 5146 +163
- Partials 1023 1029 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
run in ropsten cluster appear to be registering each epoch as intended beacon is keeping validators in its registered pool only strange behaviour was to do with /teku-proposer-config endpoint
also get a lot of these in the logs
length should be 100 - drop from 96 to 81 is end of an epoch so some validators will have had to have failed their re-broadcast in 3 consecutive epochs |
That teku error seems due to empty "fee_recipient" being returned by teku-proposer-config endpoint. Probably due to it being empty in the cluster lock. wrt "failed to submit validator registration", see the beacon API latency metrics. It seems like the beacon node is timing out after 2s. Strange that the register endpoint is so slow? |
defer r.mu.Unlock() | ||
|
||
tuple, ok := r.tuples[pubkey] | ||
if ok && tuple.duty.Slot >= duty.Slot { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be a ||
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope
core/bcast/recast.go
Outdated
r.mu.Lock() | ||
for k, v := range r.tuples { | ||
clonedTuples[k] = v | ||
clonedSubs = append(clonedSubs, r.subs...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't understand why cloning subs inside the loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ciaranmcveigh5 this might have caused some of the latency issue you saw, since we bombarded BN with duplicate rebroadcasts
s.scheduleSlot(slotCtx, slot) | ||
} | ||
} | ||
} | ||
|
||
func (s *Scheduler) emitCoreSlot(ctx context.Context, slot core.Slot) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add godoc
|
||
// FirstInEpoch returns true if this is the first slot in the epoch. | ||
func (s Slot) FirstInEpoch() bool { | ||
return s.Slot%s.SlotsPerEpoch == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we assume that s.Slot
is always a positive integer? coz this won't work for -1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 would return false and that is correct no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it is correct. the testcase i had in my mind was epoch -1
, ie, slots from -32...-1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure that is a valid test case
Adds the recaster component to rebroadcast builder registrations every epoch.
category: feature
ticket: #1009