-
Notifications
You must be signed in to change notification settings - Fork 45
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
Support changing Effective Balance by config. #227
base: develop
Are you sure you want to change the base?
Conversation
.env.example
Outdated
@@ -29,6 +29,9 @@ CL_API_URLS=https://<consensus-layer-api-url> | |||
# Validator registry source will be "lido" or "file" (optional). | |||
VALIDATOR_REGISTRY_SOURCE=lido | |||
|
|||
# Effective Balance is 32 by default. | |||
# EFFECTIVE_BALANCE=32 |
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.
Thank you for your suggestion!
I would say it is
# EFFECTIVE_BALANCE=32 | |
# EFFECTIVE_BALANCE_INCREMENTS=32 |
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.
@vgorkavenko thanks for reviewing this PR and I agree with that.
The new commit 93d6c15 pushed for applying your comment :)
@@ -30,6 +30,7 @@ export class AppService implements OnModuleInit, OnApplicationBootstrap { | |||
this.logger.log(`DRY RUN ${this.configService.get('DRY_RUN') ? 'enabled' : 'disabled'}`); | |||
this.logger.log(`Slot time: ${this.configService.get('CHAIN_SLOT_TIME_SECONDS')} seconds`); | |||
this.logger.log(`Epoch size: ${this.configService.get('FETCH_INTERVAL_SLOTS')} slots`); | |||
this.logger.log(`Effective Balance: ${this.configService.get('EFFECTIVE_BALANCE_INCREMENTS')} ETH`); |
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 would say that it is not worth logging. This parameter affects only one particular part of the application while the rest described above are more general
@IsNumber() | ||
@Min(32) | ||
@Transform(({ value }) => parseInt(value, 10), { toClassOnly: true }) | ||
public EFFECTIVE_BALANCE_INCREMENTS = 32; |
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.
Sorry for misleading you. Let's think about naming this var more concretely. For example, REFERENCE_EFFECTIVE_BALANCE_INCREMENTS
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.
Please, don't forget to add this var to README.md
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.
What do you think to use MAX_EFFECTIVE_BALANCE
?
@@ -277,6 +277,14 @@ export class EnvironmentVariables { | |||
|
|||
@IsEnum(WorkingMode) | |||
public WORKING_MODE = WorkingMode.Finalized; | |||
|
|||
/** | |||
* Effective balance. |
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.
Let's add a few words about the purpose. For example, it's used for ...
Ah, sorry my bad. I leaved lack of information of this PR. |
Ah. Okay! For example, the chain has Also, we can rethink this model altogether and use not some strict value, but the actual effective balance of the validator to calculate the ideal attestation for it because it can be completely different for each other after that EIP. I would suggest postponing this PR until we don't have EIP implementation details. What do you think? |
👍 I got your intention and I also agree with you. it will be absolutely better to proceed this PR after we get more details about the EIP. Thanks. :) |
Support changing Effective Balance which is fixed to 32.
This feature could be useful for testnet and devnet.