-
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
Remove --xblock-v3-enabled and useBlindedBlock variable #8511
Merged
gfukushima
merged 23 commits into
Consensys:master
from
gfukushima:remove-Xblock-v3-enabled
Aug 21, 2024
Merged
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
5c0fad7
remove experimental flag and useBlindedBlock
gfukushima 30854e4
remove outdated comment
gfukushima 8fdd44d
remove redundant code
gfukushima 52d6c38
Merge branch 'refs/heads/master' into remove-Xblock-v3-enabled
gfukushima ae20b68
fix tests
gfukushima 73974e4
fix tests
gfukushima 3534683
spotless
gfukushima 0e2c4ae
remove old test used as base of v2 and blindedblock
gfukushima d18b280
spotless
gfukushima f47afa5
remove redundant check
gfukushima 996085c
fix tests
gfukushima a59953e
fix tests
gfukushima 46356e2
spotless
gfukushima 6a6a685
remove redundant ITs
gfukushima 1853058
spotless
gfukushima 2ec44e8
removed unused method
gfukushima 8ab3f75
PR review suggestion
gfukushima fbe3836
clean up deprecated log warn
gfukushima d389a88
Merge branch 'master' into remove-Xblock-v3-enabled
gfukushima 713f7e0
fix AT
gfukushima c469051
Merge branch 'master' into remove-Xblock-v3-enabled
gfukushima c98b937
remove fallback catch and fix IT
gfukushima f7b999f
Merge branch 'refs/heads/master' into remove-Xblock-v3-enabled
gfukushima File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,21 +218,20 @@ private SafeFuture<Void> setExecutionData( | |
blockSlotState.getSlot())); | ||
} | ||
|
||
// if requestedBlinded has been specified, we strictly follow it, otherwise we should run | ||
// Builder flow (blinded) only if we have a validator registration | ||
// We should run Builder flow (blinded) only if we have a validator registration | ||
final boolean shouldTryBuilderFlow = | ||
executionPayloadContext | ||
.map(ExecutionPayloadContext::isValidatorRegistrationPresent) | ||
.orElse(false); | ||
executionPayloadContext | ||
.map(ExecutionPayloadContext::isValidatorRegistrationPresent) | ||
.orElse(false); | ||
|
||
// pre-Merge Execution Payload / Execution Payload Header | ||
if (executionPayloadContext.isEmpty()) { | ||
if (shouldTryBuilderFlow) { | ||
bodyBuilder.executionPayloadHeader( | ||
schemaDefinitions.getExecutionPayloadHeaderSchema().getHeaderOfDefaultPayload()); | ||
} else { | ||
bodyBuilder.executionPayload(schemaDefinitions.getExecutionPayloadSchema().getDefault()); | ||
} | ||
|
||
bodyBuilder.executionPayloadHeader( | ||
schemaDefinitions.getExecutionPayloadHeaderSchema().getHeaderOfDefaultPayload()); | ||
|
||
bodyBuilder.executionPayload(schemaDefinitions.getExecutionPayloadSchema().getDefault()); | ||
|
||
return SafeFuture.COMPLETE; | ||
} | ||
|
||
|
@@ -246,8 +245,7 @@ private SafeFuture<Void> setExecutionData( | |
|
||
return SafeFuture.allOf( | ||
cacheExecutionPayloadValue(executionPayloadResult, blockSlotState), | ||
setPayloadOrPayloadHeader( | ||
bodyBuilder, schemaDefinitions, executionPayloadResult), | ||
setPayloadOrPayloadHeader(bodyBuilder, executionPayloadResult), | ||
setKzgCommitments(bodyBuilder, schemaDefinitions, executionPayloadResult)); | ||
} | ||
|
||
|
@@ -263,7 +261,6 @@ private SafeFuture<Void> cacheExecutionPayloadValue( | |
|
||
private SafeFuture<Void> setPayloadOrPayloadHeader( | ||
final BeaconBlockBodyBuilder bodyBuilder, | ||
final SchemaDefinitionsBellatrix schemaDefinitions, | ||
final ExecutionPayloadResult executionPayloadResult) { | ||
|
||
if (executionPayloadResult.isFromLocalFlow()) { | ||
|
@@ -291,16 +288,7 @@ private SafeFuture<Void> setPayloadOrPayloadHeader( | |
// from the builder bid | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can create similar method to |
||
.map(BuilderBid::getHeader) | ||
// from the local fallback | ||
.orElseGet( | ||
() -> { | ||
final ExecutionPayload executionPayload = | ||
builderBidOrFallbackData | ||
.getFallbackDataRequired() | ||
.getExecutionPayload(); | ||
return schemaDefinitions | ||
.getExecutionPayloadHeaderSchema() | ||
.createFromExecutionPayload(executionPayload); | ||
}); | ||
.orElseThrow(); | ||
bodyBuilder.executionPayloadHeader(executionPayloadHeader); | ||
} | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 0 additions & 119 deletions
119
.../beaconrestapi/src/test/java/tech/pegasys/teku/beaconrestapi/AbstractGetNewBlockTest.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hmm why did we remove the if statement?
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.
if
executionPayloadContext
is empty thenshouldTryBuilderFlow
will always be falseThere 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.
Oh yes, got it. In this case, we can just leave the
.executionPayload
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.
And move shouldTryBuilderFlow initialization afterwards
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.
leaving just the
.executionPayload
break one of the bellatrix unit tests (shouldIncludeExecutionPayloadHeaderOfDefaultPayload
). which in my opinion should probably be fine to be removed but I'd like a second opinion here.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, we can just remove that test, it is no longer applicable. We will always use the unblinded flow in that case.
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 think leaving only .executionPayload() will fix the acceptance test failure