-
Notifications
You must be signed in to change notification settings - Fork 300
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
[Decoupling] Implement BlockFactoryDeneb
(part 2)
#7161
[Decoupling] Implement BlockFactoryDeneb
(part 2)
#7161
Conversation
...rc/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerBlockProductionManager.java
Fixed
Show fixed
Hide fixed
...n/validator/src/test/java/tech/pegasys/teku/validator/coordinator/BlockFactoryDenebTest.java
Show resolved
Hide resolved
assertThat(block.getBody().getOptionalBlsToExecutionChanges()) | ||
.isPresent() | ||
.hasValue(blsToExecutionChanges); | ||
} else { | ||
assertThat(block.getBody().getOptionalBlsToExecutionChanges()).isEmpty(); | ||
} | ||
|
||
return block; | ||
if (milestone.isGreaterThanOrEqualTo(SpecMilestone.DENEB)) { |
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 worry on broad usage of such complex milestone based assertions in big methods. There is a chance we could assert not the thing we expect in tests. For example here, input block and milestone variable could be from different milestones etc.
Just a feeling
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.
But the milestone is based on the new block created, so will always align. Changed the test a little bit to mimic the blsExecutionChanges for Capella
...n/validator/src/test/java/tech/pegasys/teku/validator/coordinator/BlockFactoryDenebTest.java
Show resolved
Hide resolved
fc4f2fe
to
4856090
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.
wanted to share a couple of comments while reviewing
...tor/src/main/java/tech/pegasys/teku/validator/coordinator/BlockOperationSelectorFactory.java
Outdated
Show resolved
Hide resolved
import tech.pegasys.teku.spec.datastructures.blocks.versions.deneb.BlockContents; | ||
import tech.pegasys.teku.spec.util.DataStructureUtil; | ||
|
||
public class BlockFactoryDenebTest extends AbstractBlockFactoryTest { |
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 wonder if we could follow the same production class hierarchy so the deneb tests will run phase0 tests
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.
Tried that, the issue is BlockFactoryDeneb
is expected to have SchemaDefinitionsDeneb
which are not retrievable from a spec pre-Deneb. And there is no way to create BlockContents
without the schema definitions
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 see.. maybe we can generify some checks and move them to the Abstract test so we can call them from deneb too?
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.
yeah I find it hard to think of a way to generify it though since BlockFactoryDeneb
requires some stuff like prepareBlobsBundle()
which needs the deneb spec as well
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
PR Description
Next part of #7129
BlockFactoryDeneb
which createsBlockContents
orBlindedBlockContents
instead ofBeaconBlock
.BlockFactoryDeneb
is only used when slot is Deneb onegetOptionalBlsToExecutionChanges
inBeaconBlockBody
to act in a similar way to other optional fields.Next parts:
BlockContainer
inAbstractBlockPublisher
(in order to publish and import blobs)BlockProductionDuty
Fixed Issue(s)
when next parts are done, it will fix couple of tasks in #6822
Documentation
doc-change-required
label to this PR if updates are required.Changelog