-
Notifications
You must be signed in to change notification settings - Fork 303
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
Decouple block and blobs publishing\import #8728
Decouple block and blobs publishing\import #8728
Conversation
} | ||
|
||
// when broadcast validation is enabled, we need to wait for the validation to complete before | ||
// publishing the block (and blob sidecars) | ||
|
||
final SafeFuture<BlockImportAndBroadcastValidationResults> | ||
blockImportAndBroadcastValidationResults = | ||
importBlockAndBlobSidecars( | ||
block, blobSidecars, broadcastValidationLevel, blockPublishingPerformance); | ||
importBlock(block, broadcastValidationLevel, blockPublishingPerformance); |
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 feel it requires more refactoring. Isn't block import always going to fail, because blob sidecars are not imported.
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 changed the way I push data in the tracker. Now i put them separated and the import should wait until the tracker completes.
This is what I have in mind, need to test if it actually behaves this way:)
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 actually working.
|
||
blockImportAndBroadcastValidationResults | ||
.thenCompose(BlockImportAndBroadcastValidationResults::broadcastValidationResult) | ||
.thenAccept( | ||
broadcastValidationResult -> { | ||
if (broadcastValidationResult == BroadcastValidationResult.SUCCESS) { | ||
publishBlockAndBlobSidecars(block, blobSidecars, blockPublishingPerformance); | ||
publishBlock(block, blockPublishingPerformance) | ||
.always( |
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.
Actually, why do we wait for block to finish publishing again and not just send both across async?
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.
that's a strategy that has been discussed in several places. The reason are essentially help solo stakers with low up bandwidth to reduce latency in block propagation. With the adoption of engine_getBlobs
blobs can be retrieved once the block is known, thus it is good to give priority to the block over the blobs.
I'll put this under a feature flag.
.../src/main/java/tech/pegasys/teku/validator/coordinator/publisher/AbstractBlockPublisher.java
Fixed
Show fixed
Hide fixed
.../src/main/java/tech/pegasys/teku/validator/coordinator/publisher/AbstractBlockPublisher.java
Fixed
Show fixed
Hide fixed
6a1c0a6
to
d5218e6
Compare
add feature flag add a test
refactor tests
bug fix
ad0ff80
to
5e2d991
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
* Decouple block and blobs publishing\import (#8728) * use correct schema definitions when creation full beacon block (#8806) * use correct schema definitions when creation full beacon block * use forkChoiceUpdatedV4 with PayloadAttributesV4 (#8752) (#8799) --------- Co-authored-by: Enrico Del Fante <[email protected]>
fixes #8682
PR Description
Documentation
doc-change-required
label to this PR if updates are required.Changelog