FCU ignored after payload is processed
advaita-saha opened this issue · comments
When a payload is sent to eth1, it processes and validates fine
but then fcu
is called, and says it is updating to the old head
and thus ignoring the request
Shouldn't behave like that, but it is because of the payload processing
In the new_payload
, we are also persisting the header to the db
nimbus-eth1/nimbus/core/chain/forked_chain.nim
Lines 88 to 95 in ea74e03
Then when the fcu call takes place, it checks if the header is there in the db, and it is thus ignoring the fcu call
nimbus-eth1/nimbus/beacon/api_handler/api_forkchoice.nim
Lines 158 to 163 in ea74e03
A similar issue arising from the same persistence of header #2588
A probable fix to this might be to use the state, @jangko can comment further if it's viable or not
This can be changed to
if db.getSavedStateBlockNumber() >= header.number :
notice "Ignoring beacon update to old head",
blockHash=blockHash.short,
blockNumber=header.number
return validFCU(Opt.none(PayloadID), blockHash)