-
Notifications
You must be signed in to change notification settings - Fork 253
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
prepare builder API, modify electra BuilderBid #6872
base: unstable
Are you sure you want to change the base?
Conversation
|
The comment at
is addressed by this PR and should be removed. |
executionRequests: Opt.none(ExecutionRequests), | ||
executionPayloadValue: builderBid.value)) | ||
elif EPH is electra_mev.BlindedExecutionPayloadAndBlobsBundle: | ||
return ok(BuilderBid[EPH]( |
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.
The electra_mev.BlindedExecutionPayloadAndBlobsBundle
and fulu_mev.BlindedExecutionPayloadAndBlobsBundle
cases are identical and can be combined.
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, in general whenever nimbus-eth2
has these
when cond1:
...
elif cond2:
...
elif cond3:
...
conditions, it adds on an
else:
static: doAssert false
or
else:
static: raiseAssert "..."
e.g.
nimbus-eth2/beacon_chain/spec/state_transition_epoch.nim
Lines 1016 to 1037 in 4e44027
when consensusFork <= ConsensusFork.Deneb: | |
let penalty_numerator = validator.effective_balance div increment * | |
adjusted_total_slashing_balance | |
penalty_numerator div total_balance * increment | |
elif consensusFork == ConsensusFork.Electra: | |
let | |
effective_balance_increments = validator.effective_balance div increment | |
penalty_per_effective_balance_increment = | |
adjusted_total_slashing_balance div (total_balance div increment) | |
# [Modified in Electra:EIP7251] | |
penalty_per_effective_balance_increment * effective_balance_increments | |
elif consensusFork == ConsensusFork.Fulu: | |
let | |
effective_balance_increments = validator.effective_balance div increment | |
penalty_per_effective_balance_increment = | |
adjusted_total_slashing_balance div (total_balance div increment) | |
# [Modified in Electra:EIP7251] | |
penalty_per_effective_balance_increment * effective_balance_increments | |
else: | |
static: doAssert false |
That it's static: ...
is important; the exact way it causes the compilation to fail is less important. This way, if/when the conditions fail to hold -- e.g., here, a new fork is added after Fulu -- it won't silently stop working, but rather loudly fail to compile.
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.
resolved in 90ece63
executionRequests: Opt.none(ExecutionRequests), | ||
executionPayloadValue: bidValue, | ||
consensusBlockValue: consensusValue)) | ||
elif SBBB is electra_mev.SignedBlindedBeaconBlock: |
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.
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.
resolved in 90ece63
@@ -983,11 +1001,13 @@ proc getBlindedBlockParts[ | |||
debugComment "verify (again, after change) this is what builder API needs" |
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 debugComment
is addressed by this PR, can be removed
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.
resolved in 90ece63
No description provided.