Open walnut-the-cat opened 5 months ago
For now, @tayfunelmas will continue making progress on building network message, but @Longarithm will pause and focus on #11124 until we have a clear evidence that including contract code in state witness does not work for MVP launch. Relevant discussion can be found here: link
Does this issue in principle imply that the contract code would no longer be a part of The State (i.e. no longer stored in the trie, with all that entails), or is this only a partial step towards such a future and the remaining work would need to be documented as a separate issue?
Relevant discussion
Link
Issue
During stateless validation forknet test, we observed node crash with the following error
@Longarithm mentioned that
is due to missing contract doe from state witness.
From debug log, @staffik confirmed that it was likely the case and the crash was happening with different contracts, including
lockup-meta-pool.near
andpack.promotional.basketball.playible.near
@Longarithm 's understanding of how this can cause node crash is as follows:
Timeline
April 17
@Longarithm is preparing a quick patch to bypass the issue in Forknet for now, but we need a proper solution in place before MainNet launch
April 18
The team had discussion on the proper solution and concluded to separate contract out of state witness. When a chunk validator realizes that it does not have a contract code to validate incoming state witness, it will reactively request missing code to its peers. As a result, chunk miss may happen, but the chunk validator should be compiled contract code ready fur the future validation.
The project involves following works but not limited to: