-
Notifications
You must be signed in to change notification settings - Fork 860
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
Post Merge cleanup: remove latestValidAncestorDescendsFromTerminal #4703
Conversation
AFAIK some devnets for Shanghai are still planned to start with PoW and transition to PoS. @gezero Should be able to confirm that. But if that is the case I think we still have to wait until we can remove it. |
Indeed this was one of the thing that I was recalling, not sure if these testnets are a blocker for the cleanup, since their bootstrap is quite controlled and limited to a small number of cooperating nodes. |
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.
In general I agree we should remove these checks, since they are only there to ensure a correct merge transition. I'd like to see besu successfully work in a multi-client merge network with these removed.
Last thought - we will most likely fail/regress hive merge tests after this PR. Not sure if we care though
...merge/src/main/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinator.java
Show resolved
Hide resolved
// TODO: post-merge cleanup | ||
if (!mergeCoordinator.latestValidAncestorDescendsFromTerminal(newBlockHeader)) { | ||
mergeCoordinator.addBadBlock(block); | ||
return respondWithInvalid( | ||
reqId, | ||
blockParam, | ||
Hash.ZERO, | ||
INVALID, | ||
newBlockHeader.getHash() + " did not descend from terminal block"); | ||
} |
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.
just a comment - this reflects the perspective that we do whatever the CL tells us to do and do not second guess it. I think doing this is consistent with that view
// TODO: post-merge cleanup, this should be unnecessary after merge | ||
if (!mergeCoordinator.latestValidAncestorDescendsFromTerminal(newHead.get())) { | ||
logForkchoiceUpdatedCall(INVALID, forkChoice); | ||
return new JsonRpcSuccessResponse( | ||
requestId, | ||
new EngineUpdateForkchoiceResult( | ||
INVALID, | ||
Hash.ZERO, | ||
null, | ||
Optional.of(newHead.get() + " did not descend from terminal block"))); | ||
} |
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.
same comment as on newPayload regarding second guessing the CL.
Update |
Another update. The goal for the next withdrawals testnet is to have all clients starting post-merge, so that blocker will hopefully go away soon. |
For the record in https://github.com/ConsenSys/teku/blob/a49f9a8a279a2260c57308fbb313162dfa7e2127/acceptance-tests/src/acceptance-test/java/tech/pegasys/teku/test/acceptance/MergedGenesisAcceptanceTest.java#L28 we have an AT that starts a Teku+Besu node with an already merged genesis state. |
d6fe16c
to
59e9f79
Compare
59e9f79
to
885d3a3
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> # Conflicts: # consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinator.java # consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeMiningCoordinator.java # consensus/merge/src/test/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinatorTest.java # ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdated.java # ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java # ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdatedTest.java # ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayloadTest.java
885d3a3
to
a51515d
Compare
# Conflicts: # consensus/merge/src/test/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinatorTest.java
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
9e688bc
to
0b46e19
Compare
# Conflicts: # ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdatedTest.java # ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayloadTest.java # ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineForkchoiceUpdatedV1Test.java # ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV1Test.java
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.
buh bye TTD!
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
…yperledger#4703) * Post Merge cleanup: remove latestValidAncestorDescendsFromTerminal Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * fixed tests Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> --------- Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
…yperledger#4703) * Post Merge cleanup: remove latestValidAncestorDescendsFromTerminal Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * fixed tests Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> --------- Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
…yperledger#4703) * Post Merge cleanup: remove latestValidAncestorDescendsFromTerminal Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * fixed tests Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> --------- Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: garyschulte <garyschulte@gmail.com>
…yperledger#4703) * Post Merge cleanup: remove latestValidAncestorDescendsFromTerminal Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * fixed tests Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> --------- Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
…yperledger#4703) * Post Merge cleanup: remove latestValidAncestorDescendsFromTerminal Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * fixed tests Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> --------- Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio fabio.difabio@consensys.net
PR description
Fixed Issue(s)
Documentation
doc-change-required
label to this PR ifupdates are required.
Changelog