- first find when we have actual state found give big timeout because it can take a bit of time
$ cast rpc --rpc-timeout=9999999999 --rpc-url=localhost:3545 debug_getAccessibleState $(cast
to-hex START_BLOCK) $(cast to-hex END_BLOCK)
where START_BLOCK
is the beginning the search and END_BLOCK
is the end of the search
- Get the block hash and rewind the chain to it
now say we got back 12594554
from step 1, lets find its corresponding block hash and rewind the chain to it
$ cast block --rpc-url=localhost:3545 12594554 --json | jq .hash
which gave back 0x67790e70a68fbbb2cf9336aa4b945b0dba1620cd5e7a5732a64960ce5d8a72fe
and lets set the head to it (also this could take a while so do the --rpc-timeout)
$ cast rpc --rpc-timeout=9999999999 --rpc-url=localhost:3545 debug_setHead $(cast to-hex 12594554)
- Finally lets do the fcu call to update the block pointers to that block hash, notice we do it on the authed port and the jwt secret
$ cast rpc --jwt-secret $(cat jwt.txt) --rpc-url=localhost:8551 engine_forkchoiceUpdatedV3
'{"headBlockHash":"0x67790e70a68fbbb2cf9336aa4b945b0dba1620cd5e7a5732a64960ce5d8a72fe",
"safeBlockHash":"0x67790e70a68fbbb2cf9336aa4b945b0dba1620cd5e7a5732a64960ce5d8a72fe",
"finalizedBlockHash":"0x67790e70a68fbbb2cf9336aa4b945b0dba1620cd5e7a5732a64960ce5d8a72fe"}'