NethermindEth / NethermindEth/juno

Unexport some of `prune` pkg functions

Open
#3,671 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

no-stale
Dominant language
Go
Stars
444
Forks
244
Avg merge
2d 15h
Merged PRs (30d)
78

Description

Functions FindOldestBlockAtOrAfter, PrunUpTo and OldestRetainedBlock are public just to be accessible to the pruner_test package.

While it is nice to have this tests, we are following a style where we only test our external API and not our internal API (as much as possible and as long as it makes sense).

Therefore, we should investigate we can un-export this functions and, if necessary, write other test functions that access only the external API and make sure the part of the code touched by this is correct.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the prune package by locating FindOldestBlockAtOrAfter, PrunUpTo, and OldestRetainedBlock, then inspect the pruner_test package to see how they are used. Run the existing prune tests and determine whether external-API tests cover the affected behavior; done means the functions are unexported and the relevant behavior remains tested through the external API.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.