Skip to content

Separate on-chain state from reconstructed data - #1200

Open
jshufro wants to merge 1 commit into
rocket-pool:masterfrom
jshufro:jms/state
Open

Separate on-chain state from reconstructed data#1200
jshufro wants to merge 1 commit into
rocket-pool:masterfrom
jshufro:jms/state

Conversation

@jshufro

@jshufro jshufro commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Previous, NetworkState had a mix of fields: fields that directly map to storage on either the evm or beacon chain mixed with fields derived from the former.

This PR separates the derived fields into a separate, encapsulating type. This is a small reduction in tech debt, as maintainers no longer need to worry about whether or not they have called CalculateAverageFeeAndDistributorShares before accessing the state.

Further deconstruction of the treegen state machines will make it easier to make them more modular in the future. We update them to taking the state index from NewGenerator to GenerateTree, which shifts the dependency on data away from init-time and towards runtime. Ultimately we should fully remove state from the treegen structs and pass data to its subroutines on a case by case basis.

@0xfornax 0xfornax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetBulkMegapoolDetails is being called with no addresses and returns an empty map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants