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

Invalid state root upgrading validator to 0x02 #7487

Open
twoeths opened this issue Feb 22, 2025 · 2 comments · May be fixed by #7478
Open

Invalid state root upgrading validator to 0x02 #7487

twoeths opened this issue Feb 22, 2025 · 2 comments · May be fixed by #7478
Labels
meta-bug Issues that identify a bug and require a fix.

Comments

@twoeths
Copy link
Contributor

twoeths commented Feb 22, 2025

Describe the bug

This happened in gnosis devnet

Tested this but on first consolidation same target and source validator it apparently worked fine. However, the erigon-lodestar validator node that proposed the consolidation request transaction rejected all peers and forked. It is stuck on this slot: [link](http://x.x.x.x:8083/slot/68121)
Lodestar shows these errors:
Feb-17 07:11:09.621[chain]           debug: Block error slot=68121, code=BLOCK_ERROR_INVALID_STATE_ROOT, slot=68121, root=0xb8362da32e9ba60bb4e76aa3dae3cf3722404f97be7d674a1ba2d61140bae2f0, expectedRoot=0xb3e18d8a01cb01ac43a0e2fc4d11f6f9298d74ed51ed8520f0597001e4499516
Error: BLOCK_ERROR_INVALID_STATE_ROOT
    at verifyBlocksStateTransitionOnly (file:///usr/app/packages/beacon-node/src/chain/blocks/verifyBlocksStateTransitionOnly.ts:71:13)
    at BeaconChain.verifyBlocksInEpoch (file:///usr/app/packages/beacon-node/src/chain/blocks/verifyBlock.ts:114:7)
    at BeaconChain.processBlocks (file:///usr/app/packages/beacon-node/src/chain/blocks/index.ts:74:7)
    at JobItemQueue.runJob (file:///usr/app/packages/beacon-node/src/util/queue/itemQueue.ts:102:22)
Feb-17 07:11:09.622[sync]          verbose: Batch process error id=Finalized, startEpoch=4257, status=Processing, code=BLOCK_ERROR_INVALID_STATE_ROOT, slot=68121, root=0xb8362da32e9ba60bb4e76aa3dae3cf3722404f97be7d674a1ba2d61140bae2f0, expectedRoot=0xb3e18d8a01cb01ac43a0e2fc4d11f6f9298d74ed51ed8520f0597001e4499516
Error: BLOCK_ERROR_INVALID_STATE_ROOT
    at verifyBlocksStateTransitionOnly (file:///usr/app/packages/beacon-node/src/chain/blocks/verifyBlocksStateTransitionOnly.ts:71:13)
    at BeaconChain.verifyBlocksInEpoch (file:///usr/app/packages/beacon-node/src/chain/blocks/verifyBlock.ts:114:7)
    at BeaconChain.processBlocks (file:///usr/app/packages/beacon-node/src/chain/blocks/index.ts:74:7)
    at JobItemQueue.runJob (file:///usr/app/packages/beacon-node/src/util/queue/itemQueue.ts:102:22)

The rest of the nodes are working the fine, even nethermind-lodestar, and the validator seems to have updated to 0x02 withdrawal credentials type. [link](http://x.x.x.x:8083/validator/2000)

Forkmon [link](http://x.x.x.x:8080/)
Slot: [link](http://x.x.x.x:8083/slot/0x79b6cf01f4fa6f3710b3e26f33bdcd7f20a6e8f26a110accd4fc0122b4e7a9a0)

in the above case, the node was able to publish block but then cannot process its published block and stale since then

Expected behavior

no error

Steps to reproduce

No response

Additional context

No response

Operating system

Linux

Lodestar version or commit hash

v1.26.0

@twoeths twoeths added the meta-bug Issues that identify a bug and require a fix. label Feb 22, 2025
@twoeths
Copy link
Contributor Author

twoeths commented Feb 22, 2025

@twoeths
Copy link
Contributor Author

twoeths commented Feb 22, 2025

the only difference from preState of a good node, and persisted preState in the "invalid state root" case is the withdrawalCredentials of validator 0, which was the validator that we upgraded to 0x02

it showed that this is the issue

newWithdrawalCredentials[0] = COMPOUNDING_WITHDRAWAL_PREFIX;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta-bug Issues that identify a bug and require a fix.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant