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
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 and pack.promotional.basketball.playible.near
@Longarithm 's understanding of how this can cause node crash is as follows:
Chunk producer reads code from cache and doesn't go to trie for the code;
so trie nodes required for reading contract code are never read and recorded;
so chunk validator doesn't know where to take it.
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:
Introduce a new network message to request contract code
walnut-the-cat
changed the title
Incomplete state witness when contract code is cached.
Separate contract code out of state witness
Apr 18, 2024
walnut-the-cat
changed the title
Separate contract code out of state witness
Separate contract code out of state witness & reactive contract request by chunk validator
Apr 18, 2024
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:
The text was updated successfully, but these errors were encountered: