Skip to content
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

[POC] Comment out backwards sync for newPayload #5666

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ public JsonRpcResponse syncResponse(final JsonRpcRequestContext requestContext)
new BlockBody(transactions, Collections.emptyList(), maybeWithdrawals, maybeDeposits));

if (maybeParentHeader.isEmpty()) {
LOG.atDebug()
.setMessage("Parent of block {} is not present, append it to backward sync")
.addArgument(block::toLogString)
.log();
mergeCoordinator.appendNewPayloadToSync(block);
// LOG.atDebug()
// .setMessage("Parent of block {} is not present, append it to backward sync")
// .addArgument(block::toLogString)
// .log();
Comment on lines +223 to +226
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should still log at debug, just change the message to indicate we have dropped it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't be merging this PR. If we want to progress this, we should create an issue and prioritise it.

I think we should take a more considered approach to ensure we align with the spec.
Also, there's more code we can rip out/refactor if we remove this code path.

// mergeCoordinator.appendNewPayloadToSync(block);

return respondWith(reqId, blockParam, null, SYNCING);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;

import io.vertx.core.Vertx;
import org.apache.tuweni.bytes.Bytes32;
Expand Down Expand Up @@ -361,8 +360,8 @@ public void shouldRespondWithSyncingDuringForwardSync() {
@Test
public void shouldRespondWithSyncingDuringBackwardsSync() {
BlockHeader mockHeader = new BlockHeaderTestFixture().baseFeePerGas(Wei.ONE).buildHeader();
when(mergeCoordinator.appendNewPayloadToSync(any()))
.thenReturn(CompletableFuture.completedFuture(null));
// when(mergeCoordinator.appendNewPayloadToSync(any()))
// .thenReturn(CompletableFuture.completedFuture(null));
var resp = resp(mockPayload(mockHeader, Collections.emptyList()));

EnginePayloadStatusResult res = fromSuccessResp(resp);
Expand Down