-
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
Implement Fee Recipient: CLI flags and Calling Beacon API #10312
Changes from 50 commits
38b4212
0e1cabe
b81afaa
f0e6270
f368ec6
3ce8ab4
5e9d583
3b1c9f5
3566a8b
6fdc281
b03c3a6
6ba2897
c675514
16098c5
8736e40
38864d2
ec87ea5
089fc19
c3242c0
f0b1db0
a9ed460
7a81615
29826cd
a880c64
6d78340
38cf604
bd62186
511cc8d
6b88e7b
6acc746
a71622e
7d97970
fa1f0cd
da65f45
a91df04
3c32213
8310e55
460bea6
ae88f51
c5276d5
a5fca40
3cc4f17
6c3445d
1450190
35e4a41
c549219
6d67832
b02cb93
acf7ea1
661cf01
962ceeb
96b5773
4a6340e
b2b20b7
6a14d50
b744e70
5a8861f
5e71149
9a1e20a
4463783
000f385
b40ea0a
d243449
dd41a61
eed1068
1cc55ca
513b12e
3818f16
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,6 +7,7 @@ import ( | |
"runtime" | ||
"time" | ||
|
||
field_params "github.com/prysmaticlabs/prysm/config/fieldparams" | ||
"github.com/prysmaticlabs/prysm/io/file" | ||
"github.com/urfave/cli/v2" | ||
) | ||
|
@@ -322,6 +323,26 @@ var ( | |
Usage: "Enables more verbose logging for counting down to duty", | ||
Value: false, | ||
} | ||
|
||
// ValidatorsProposerConfigDirFlag defines the path or URL to a file with proposer config. | ||
ValidatorsProposerConfigDirFlag = &cli.StringFlag{ | ||
Name: "validators-proposer-config-dir", | ||
Usage: "Set local directory path to proposer config(.json) for per validator mapping to an eth address to receive gas fees when proposing block (i.e. --validators-proposer-config-dir=/path/to/proposer.json). File format found in docs", | ||
Value: "", | ||
} | ||
// ValidatorsProposerConfigFlag defines the path or URL to a file with proposer config. | ||
ValidatorsProposerConfigURLFlag = &cli.StringFlag{ | ||
Name: "validators-proposer-config-url", | ||
Usage: "Set URL to load proposer config (.json) for per validator mapping to an eth address to receive gas fees when proposing block (i.e. --validators-proposer-config-url=https://example.com/api/getConfig). File format found in docs", | ||
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. +1 as above |
||
Value: "", | ||
} | ||
|
||
// SuggestedFeeRecipientFlag defines the address of the fee recipient. | ||
SuggestedFeeRecipientFlag = &cli.StringFlag{ | ||
Name: "suggested-fee-recipient", | ||
Usage: "Sets ALL validators' mapping to a suggested an eth address to receive gas fees when proposing a block. Overrides the ProposerConfigFlag(s) if set", | ||
rauljordan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Value: field_params.Eth1BurnAddressHex, | ||
} | ||
) | ||
|
||
// DefaultValidatorDir returns OS-specific default validator directory. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
load("@prysm//tools/go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "go_default_library", | ||
srcs = ["prepare_beacon_proposer_config.go"], | ||
importpath = "github.com/prysmaticlabs/prysm/config/validator/service", | ||
visibility = ["//visibility:public"], | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package validator_service_config | ||
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. Add some comments to these structs to explain what they are for. Maybe name the file to fee_recipients_config.go. We want to make it clear this is about fee recipients and not about something else proposer-related |
||
|
||
type PrepareBeaconProposalFileConfig struct { | ||
ProposeConfig map[string]*ValidatorProposerOptions `json:"proposer_config"` | ||
DefaultConfig *ValidatorProposerOptions `json:"default_config"` | ||
} | ||
|
||
type ValidatorProposerOptions struct { | ||
FeeRecipient string `json:"fee_recipient"` | ||
} |
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.
This is a file path and not a dir path so we should rename the flag and clarify the usage to say it is a path to a JSON file containing validator mappings to ETH addresses for receiving transaction fees when proposing blocks