-
Notifications
You must be signed in to change notification settings - Fork 1k
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
defer payload attribute computation #14644
Changes from all commits
d518182
d2dfd75
517c71a
9e02bcd
262ed05
97dcbd4
8c22fbf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,6 @@ import ( | |
|
||
"github.com/pkg/errors" | ||
"github.com/prysmaticlabs/prysm/v5/beacon-chain/core/blocks" | ||
"github.com/prysmaticlabs/prysm/v5/beacon-chain/core/feed" | ||
statefeed "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/feed/state" | ||
"github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" | ||
coreTime "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/time" | ||
"github.com/prysmaticlabs/prysm/v5/beacon-chain/core/transition" | ||
|
@@ -620,9 +618,6 @@ func (s *Service) lateBlockTasks(ctx context.Context) { | |
if !s.inRegularSync() { | ||
return | ||
} | ||
s.cfg.StateNotifier.StateFeed().Send(&feed.Event{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't we still need this? Missed slot feed. #12153 based on this it needs to send when it's late. I know you mentioned
but wouldn't it still need to be there? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the proposer is a tracked validator, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the meantime I'll add it back in. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe it's still needed for untracked ( this was opened a while back, I updated to reflect the same as lighthouse #14204) but it's related to the untracked and submitting it, the builder should only use the registered info though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I can't quite make sense of your comment. Right now the code fires events for head updates and missed slots, whether or not the upcoming proposer is tracked. If it is tracked, the fee recipient for the tracked validator will be used. Is that the correct behavior? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's the correct behavior, just meant that regardless the builder should use the data from the validator registrations and not from the proposer attributes event |
||
Type: statefeed.MissedSlot, | ||
}) | ||
s.headLock.RLock() | ||
headRoot := s.headRoot() | ||
headState := s.headState(ctx) | ||
|
@@ -650,6 +645,13 @@ func (s *Service) lateBlockTasks(ctx context.Context) { | |
attribute := s.getPayloadAttribute(ctx, headState, s.CurrentSlot()+1, headRoot[:]) | ||
// return early if we are not proposing next slot | ||
if attribute.IsEmpty() { | ||
fcuArgs := &fcuConfig{ | ||
headState: headState, | ||
headRoot: headRoot, | ||
headBlock: nil, | ||
attributes: attribute, | ||
} | ||
go firePayloadAttributesEvent(ctx, s.cfg.StateNotifier.StateFeed(), fcuArgs) | ||
return | ||
} | ||
|
||
|
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.
Another option is to make it a method with the receiver
(s *Service)
, allowing access toevent.SubscriberSender
directly instead of passing it as an extra parameter. A function is probably a better choice than a method in this case