-
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
app: handle fee recipient #1246
Conversation
Codecov ReportBase: 53.54% // Head: 53.59% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1246 +/- ##
==========================================
+ Coverage 53.54% 53.59% +0.05%
==========================================
Files 139 139
Lines 16152 16284 +132
==========================================
+ Hits 8648 8728 +80
- Misses 6260 6298 +38
- Partials 1244 1258 +14
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
app/app.go
Outdated
// setFeeRecipient returns a slot subscriber for scheduler which calls prepare_beacon_proposer endpoint at start of each epoch. | ||
func setFeeRecipient(eth2Cl eth2wrap.Client, pubkeys []eth2p0.BLSPubKey, feeRecipient string) func(ctx context.Context, slot core.Slot) error { | ||
return func(ctx context.Context, slot core.Slot) error { | ||
if !slot.FirstInEpoch() { |
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.
also do this on startup (ie the first time it is called)
core/fetcher/fetcher.go
Outdated
if block.Version == spec.DataVersionBellatrix { | ||
actual := fmt.Sprintf("%#x", block.Bellatrix.Body.ExecutionPayload.FeeRecipient) | ||
if actual != f.feeRecipientAddress { | ||
log.Warn(ctx, "Fee recipient address different than expected", nil, |
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.
Proposing block with unexpected fee recipient address
@@ -650,6 +655,12 @@ func submitSyncCommitteeMessages(s eth2client.SyncCommitteeMessagesSubmitter) ha | |||
} | |||
} | |||
|
|||
func submitProposalPreparations() handlerFunc { | |||
return func(context.Context, map[string]string, url.Values, []byte) (interface{}, error) { | |||
return nil, nil |
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 a comment why we swallow this
app/app.go
Outdated
// setFeeRecipient returns a slot subscriber for scheduler which calls prepare_beacon_proposer endpoint at start of each epoch. | ||
// TODO(dhruv): move this somewhere else once more use-cases like this becomes clear. | ||
func setFeeRecipient(eth2Cl eth2wrap.Client, pubkeys []eth2p0.BLSPubKey, feeRecipient string) func(ctx context.Context, slot core.Slot) error { | ||
onStartup := false |
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.
suggest:
onStartup := true
...
if !onStartup && !slot.FirstInEpoch() {
return nil
}
onStartup = false
Handles fee recipient address by adding a slot subscriber to scheduler which calls prepare_beacon_proposer endpoint at the start of each epoch.
category: feature
ticket: #1100