Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement full chain workflow testing on TestLoop #11382

Closed
Longarithm opened this issue May 22, 2024 · 1 comment
Closed

Implement full chain workflow testing on TestLoop #11382

Longarithm opened this issue May 22, 2024 · 1 comment
Labels
A-testing Area: Unit testing / integration testing C-housekeeping Category: Refactoring, cleanups, code quality

Comments

@Longarithm
Copy link
Member

Longarithm commented May 22, 2024

This is a big issue, aiming to simplify testing of chain logic, which would allow to replace huge setups like in chunks_management and cross_shard_tx tests, and make tests deterministic. But there is a long way to that.

The closest test is https://github.com/near/nearcore/blob/7b68efbd9bdce6c97841422891866941704b1601/chain/chunks/src/test/multi.rs. It was implemented only for chunk distribution and doesn't cover arbitrary chains.

We can keep improving the situation sequentially, by implementing tests where:

  • clients generate blocks and approvals and chain must move forward; there can be forks; there can be different controlled delays on block production and network distribution.
  • clients also generate chunks, chunks get arbitrarily dropped, but chain still moves forward. resharding tests can be inspiring.
  • clients also support partial chunk distribution - this is what multi.rs is currently about - chunks_management are inspiring here
  • clients also support stateless validation, with state witness distribution, validation, and again arbitrary message drops and network delays.

Looks like Runtime won't be involved which is also great.
We can create specific issues for each step and work on that.
Note that it doesn't make much sense to migrate existing tests because TestLoop setup is quite different. We should understand test ideas and reimplement them on TestLoop.

cc @robin-near @walnut-the-cat

Old issue #8512

@Longarithm Longarithm added C-housekeeping Category: Refactoring, cleanups, code quality A-testing Area: Unit testing / integration testing labels May 22, 2024
@Longarithm Longarithm closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing Area: Unit testing / integration testing C-housekeeping Category: Refactoring, cleanups, code quality
Projects
None yet
Development

No branches or pull requests

1 participant