nearcore icon indicating copy to clipboard operation
nearcore copied to clipboard

[stateless_validation] Refactor all tests to handle ChunkStateWitness and ChunkEndorsement network messages

Open shreyan-gupta opened this issue 1 year ago • 1 comments

Handling single client tests with stateless validation is currently very difficult as we don't have good ways to deal with the network messages to send the chunk state witness and chunk endorsements.

As a temporary solution, we're calling process_chunk_endorsement bypassing the network stack for single client settings.

More context in this comment: https://github.com/near/nearcore/pull/10501#discussion_r1467117301

shreyan-gupta avatar Jan 26 '24 00:01 shreyan-gupta

What's the current status?

walnut-the-cat avatar Mar 14 '24 16:03 walnut-the-cat

@shreyan-gupta is this needed for MVP?

walnut-the-cat avatar Apr 10 '24 21:04 walnut-the-cat

Is this still an issue after the new chunk witness distribution work? does the distribution logic has the same shortcoming in tests? I am interested in learning the details of this issue.

tayfunelmas avatar May 01 '24 21:05 tayfunelmas

confirmed with @shreyan-gupta that this is not needed for MVP

walnut-the-cat avatar May 06 '24 15:05 walnut-the-cat

This is actually quite an old issue from Jan. This was for when I had originally implemented the ChunkEndorsement logic for state validation, we didn't have a great way to test out the feature with multiple nodes.

Since then we have invested time in framework like TestLoop to get a set of reliable tests for end to end scenarios. Meanwhile we've also written custom handlers (and tests) for the normal test framework as well. I guess we can close this issue.

shreyan-gupta avatar May 06 '24 15:05 shreyan-gupta