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

Regression testing for RPC methods #4657

Closed
3 tasks
lemmih opened this issue Aug 20, 2024 · 6 comments
Closed
3 tasks

Regression testing for RPC methods #4657

lemmih opened this issue Aug 20, 2024 · 6 comments
Assignees
Labels
Type: Epic A feature or collection of issues that achieve a greater goal

Comments

@lemmih
Copy link
Contributor

lemmih commented Aug 20, 2024

Issue summary

Setting up regression tests for bugs in the RPC methods is demanding. It often requires recreating a complicated blockchain state or loading a snapshot file, which can weigh several gigabytes. Most of the data in the snapshot will be unused, though, and if we trim out dead values, the snapshot files may be small enough to be included in the regression tests.

  • Write a Blockstore wrapper, which loads a CAR file, keeps track of which keys are accessed, and writes a minimal CAR file when dropped. This new CAR file can then be used in the regression test.
  • Create convenience functions for invoking RPC methods without spinning up a networked node.
  • Add regression test for API parity test failure in Filecoin.StateCirculatingSupply #4446. This bug is reproducible with a 4GiB snapshot. If the required data can be reduced to a few KiB, it can be included in the repository.

Other information and links

@LesnyRumcajs
Copy link
Member

If the required data is larger, perhaps we could move it to a submodule or a downloadable artefact. If all regression snapshots would take less than 1 GB it'd be already great.

@lemmih lemmih self-assigned this Aug 22, 2024
@ansermino ansermino moved this from New to Ready in Forest Backlog 🌲 Aug 23, 2024
@LesnyRumcajs LesnyRumcajs added the Type: Epic A feature or collection of issues that achieve a greater goal label Sep 12, 2024
@LesnyRumcajs
Copy link
Member

I wonder if we can use some tooling from Lotus for this, see filecoin-project/FIPs#1036 (comment).

@LesnyRumcajs
Copy link
Member

@hanabi1224 do we consider this PR #5034 to close this initiative?

@hanabi1224
Copy link
Contributor

@hanabi1224 do we consider this PR #5034 to close this initiative?

I think so.

@hanabi1224
Copy link
Contributor

I missed this issue and created a duplicated one #5046

@LesnyRumcajs
Copy link
Member

Ok, let's close this one, then.

@LesnyRumcajs LesnyRumcajs closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Epic A feature or collection of issues that achieve a greater goal
Projects
None yet
Development

No branches or pull requests

3 participants