Remove shared/utils - #1141
Closed
jshufro wants to merge 14 commits into
Closed
Conversation
jshufro
commented
Jul 27, 2026
| totalBeaconBalance += math.GweiToEth(validator.Balance) | ||
| } | ||
| totalDepositBalance += math.WeiToEth(minipool.NodeDepositBalance) + math.WeiToEth(minipool.UserDepositBalance) | ||
| totalNodeShare += math.WeiToEth(minipool.NodeDepositBalance) |
Contributor
Author
There was a problem hiding this comment.
See here for the change that needs closer inspection. Previously this queried the BN, now it gets all the data from the state.
jshufro
commented
Jul 27, 2026
Contributor
Author
There was a problem hiding this comment.
This functionaltiy is so straightforward I was surprised it didn't already have a test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is no secret that I dislike "shared/utils/..."
Every time I see it, my brain thinks "shared means stuff that has no other home, and utils means stuff that has no other home" so it just seems redundant.
Beyond that, it becomes a dumping ground for situations where developers either haven't thought critically about where to put some new code, or can't resolve some import cycle.
I have removed a lot of shared/utils to directories in rocketpool/ and rocketpool-cli/, and in a few cases where it makes sense for things to be truly 'shared', i have simply moved them up a directory (eg shared/utils/hex->shared/hex).
Eventually, we should also remove shared/services and shared/types to be closer to their respective functionality in either rocketpool/ or rocketpool-cli/, and potentially rename
sharedtoutils. At that point it'll only have a few useful math functions, colored logging, and some hex string manipulation, which are small and dumb enough to really fit the "utils" naming.NB that there is a change to node-collector that switches from querying the bn/ec for validator/minipool balances to getting them from the NetworkState object which will need checking up on. Everything else should be more or less non-functional.