question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalidated terminal block hash (by EL)

See original GitHub issue

Description

I stuck how should we handle this, so explaining the issue. We reach the terminal block and are sending FCU to the EL:

2022-08-08 13:56:28.120 INFO  - Loaded initial state at epoch 0 (state root = 0x71ef5939afd6e13ef0bf496e51144e4a95381ecdd7eba875aee705adfd43a31a, block root = 0x9a13008edfae88d4c53c4a48d8ca1bc3a207e0facb37b175dc4096df4684f40c, block slot = 0).
2022-08-08 13:56:28.132 INFO  - Genesis Event *** 
Genesis state root: 0x71ef5939afd6e13ef0bf496e51144e4a95381ecdd7eba875aee705adfd43a31a 
Genesis block root: 0x9a13008edfae88d4c53c4a48d8ca1bc3a207e0facb37b175dc4096df4684f40c 
Genesis time: 2022-08-08 13:56:34 GMT
2022-08-08 13:56:48.086 TRACE  - engineForkChoiceUpdated(forkChoiceState=ForkChoiceState{headBlockRoot=0x9a13008edfae88d4c53c4a48d8ca1bc3a207e0facb37b175dc4096df4684f40c, headBlockSlot=0, headExecutionBlockHash=0x463bb01dc74aaf70ea402298240a43e40f323f535b00e9218da2df8a3a77552c, safeExecutionBlockHash=0x0000000000000000000000000000000000000000000000000000000000000000, finalizedExecutionBlockHash=0x0000000000000000000000000000000000000000000000000000000000000000, isHeadOptimistic=false}, payloadAttributes=Optional.empty) -> ForkChoiceUpdatedResult{payloadStatus=PayloadStatus{status=Optional[INVALID], latestValidHash=Optional[0x0fea94893de4066de64c5f3ad817b3370607cb1d95876f2e71b44ea7ad741aa1], validationError=Optional.empty, failureCause=Optional.empty}, payloadId=Optional.empty}

It looks like a correct answer by EL as it invalidates exact terminal block hash. But what we are doing next looks incorrect: we are trying to invalidate corresponding BeaconBlock which is not incorrect and getting an Exception:

2022-08-08 13:56:48.088 INFO  - node ProtoNode{blockSlot=0, stateRoot=0x71ef5939afd6e13ef0bf496e51144e4a95381ecdd7eba875aee705adfd43a31a, blockRoot=0x9a13008edfae88d4c53c4a48d8ca1bc3a207e0facb37b175dc4096df4684f40c, parentRoot=0x0000000000000000000000000000000000000000000000000000000000000000, justifiedCheckpoint=Checkpoint{epoch=0, root=0x0000000000000000000000000000000000000000000000000000000000000000}, finalizedCheckpoint=Checkpoint{epoch=0, root=0x0000000000000000000000000000000000000000000000000000000000000000}, unrealizedJustifiedCheckpoint=Checkpoint{epoch=0, root=0x0000000000000000000000000000000000000000000000000000000000000000}, unrealizedFinalizedCheckpoint=Checkpoint{epoch=0, root=0x0000000000000000000000000000000000000000000000000000000000000000}, executionBlockHash=0x0000000000000000000000000000000000000000000000000000000000000000, weight=0, parentIndex=Optional.empty, bestChildIndex=Optional.empty, bestDescendantIndex=Optional.empty, validationStatus=VALID} marking as invalid, 0x9a13008edfae88d4c53c4a48d8ca1bc3a207e0facb37b175dc4096df4684f40c, Optional[0x0fea94893de4066de64c5f3ad817b3370607cb1d95876f2e71b44ea7ad741aa1], true
2022-08-08 13:56:48.089 ERROR - PLEASE FIX OR REPORT | Unexpected exception thrown for forkchoice-async-0
java.util.concurrent.CompletionException: java.lang.IllegalStateException: Cannot change node validity from VALID to INVALID

From my view invalid terminal block hash should be handled here in the same way like in #5887 not invalidating transition BeaconBlock by default because it doesn’t have any reference to the terminal block (and is not invalid btw). Do I understand it correctly?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ajsuttoncommented, Aug 9, 2022

but what if, say ttd = 1000

pre-terminal (999) - terminal 1 (1001)
               \- terminal 2 (1002) - arrives a bit later

And we are sending fcU with terminal 1? It looks like a correct EL behavior in this case

No, it is entirely within the CL’s prerogative to choose any terminal block that meets the conditions. It would normally pick the EL chain head which would have the highest total difficulty, but there is no requirement for that to be true and the block isn’t invalid just because there’s an alternative block.

0reactions
zilm13commented, Aug 9, 2022

yeah, CL could have requirement for hash, for example, right

Read more comments on GitHub >

github_iconTop Results From Across the Web

Synchronisation failed "retrieved hash chain is invalid" #14435
Hi guys, I setted up my wallet a few days ago and I didn't get that ethernet had to download all the blocks...
Read more >
EIP-3675: Upgrade consensus to Proof-of-Stake
TERMINAL_BLOCK_HASH Designates the hash of the terminal PoW block if ... If one of the new rules fails then the block MUST be...
Read more >
Invalid Merkle Root error : r/ethstaker - Reddit
I've had my validator up and running since genesis and have kept everything up to date. I even fully resynced my db after...
Read more >
Error: Custom: Invalid blockhash when solana program deploy
Trying to deploy a program to solana devnet. I was using solana program deploy ./path/xxxx.so -u devnet. And I got multiple lines of...
Read more >
RFC 1321 MD5 Message-Digest Algorithm - IETF
Let T[i] denote the i-th element of the table, which is equal to the integer part of 4294967296 times abs(sin(i)), where i is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found