-
Notifications
You must be signed in to change notification settings - Fork 283
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
Add support for multiple fee recipients #4894
Conversation
f553dbb
to
b7fdfa8
Compare
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.
I'm a bit out of it after staying up late so not sure I've properly understood this. Left a few comments but will have to come back to review it properly. Sorry.
validator/client/src/main/java/tech/pegasys/teku/validator/client/BeaconProposerPreparer.java
Outdated
Show resolved
Hide resolved
validator/client/src/main/java/tech/pegasys/teku/validator/client/BeaconProposerPreparer.java
Outdated
Show resolved
Hide resolved
validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorIndexProvider.java
Outdated
Show resolved
Hide resolved
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.
Makes much more sense now I'm awake properly. Looks good generally, mostly just tweaks to how concurrency is handled.
validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorIndexProvider.java
Outdated
Show resolved
Hide resolved
.../main/java/tech/pegasys/teku/validator/client/proposerconfig/FileProposerConfigProvider.java
Outdated
Show resolved
Hide resolved
validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorIndexProvider.java
Outdated
Show resolved
Hide resolved
...n/java/tech/pegasys/teku/validator/client/proposerconfig/AbstractProposerConfigProvider.java
Show resolved
Hide resolved
4d63f35
to
39be076
Compare
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.
LGTM. Given the OwnedValidators change turned out to be smaller than I expected feel free to pull that into here before merging as well.
unit tests on AbstractProposerConfigProvider
0274f82
to
6194e5a
Compare
I improved it by managing potential not-yet-existing indices |
PR Description
The PR introduces two new params for validator client:
--Xvalidators-proposer-config
: allows to specify a file path or a URL from which retrieve the configuration--Xvalidators-proposer-config-refresh-enabled
: enables reload of the config every time VC is about to callprepare_beacon_proposer
API (which currently happen at the beginning of each epoch)the config is an extensible json file which allows to specify:
proposer configuration currently contains only
fee_recipient
. It can be extended to include other information (ie block builder URL)behaviour details
--Xvalidators-proposer-config
is specified, VC during initialisation will try to load the configuration. If fails (or the json config is invalid\incorrect) VC will fail start up--Xvalidators-proposer-config-refresh-enabled
is activated, if config reload fails, the last valid configuration will be used.config json structure
proposer_config
is optionaldefault_config
is mandatoryfee_recipient
is mandatory in each configHow fee recipient will be actually chosen
when
--Xvalidators-proposer-config
is used in VCfee_recipient
from a specific validator in the configfee_recipient
fromdefault_config
in the config--Xvalidator-proposer-default-fee-recipient
at beacon nodewhen
--Xvalidators-proposer-default-fee-recipient
is used in VCfee_recipient
from--Xvalidators-proposer-default-fee-recipient
in VC--Xvalidator-proposer-default-fee-recipient
at beacon nodeadditional notes
currently, IO is blocking (file access as well as URL access). We have 5 threads on
validator
runner, to be evaluated if it is enough for the moment. It can be improved by migrating to async IO.Fixed Issue(s)
fixes #4850
Documentation
documentation
label to this PR if updates are required.Changelog