[stateless_validation] Handle production of state witness for first chunk after genesis · Issue #10502 · near/nearcore · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently unable to handle production of the state witness for the first chunk after genesis as it's not possible to run the genesis chunk in runtime. For now we have just hacked up a solution to send an empty state witness and the validators can ignore this and directly send the endorsement.
Note: This is only a problem for starting a new blockchain, and does not affect mainnet, nevertheless should be properly addressed.
The text was updated successfully, but these errors were encountered:
…r genesis (#10503)
This is mainly to solve issues related to testing where we were
initially not getting the chunk endorsements.
I've created an issue for this here:
#10502
Fixes issue in PR #10487
This PR removes "approve anything" shortcut when previous chunk is part
of genesis. The only difference in case of genesis is that we don't want
to execute main state transition and instead just check that post state
root matches genesis state root for that shard.
This also exposed some issue I had to fix to make tests work:
* `MockEpochManager::get_epoch_chunk_producers` returns empty Vec which
results in `Chain:: should_produce_state_witness_for_this_or_next_epoch`
returning `false`. Fixed by adding `is_chunk_producer_for_epoch` as part
of `EpochManagerAdapter` so `MockEpochManager` can override it.
* `test_chunk_state_witness_bad_shard_id` test started failing: this
actually uncovered a real issue which could result in crashing chunk
validator when state witness contains invalid shard id, fixed in
c5b2c5eCloses#10502.
@Longarithm has more context on this problem.
We are currently unable to handle production of the state witness for the first chunk after genesis as it's not possible to run the genesis chunk in runtime. For now we have just hacked up a solution to send an empty state witness and the validators can ignore this and directly send the endorsement.
Note: This is only a problem for starting a new blockchain, and does not affect mainnet, nevertheless should be properly addressed.
The text was updated successfully, but these errors were encountered: