Skip to content

Avoid accessing config, pubkey2index, index2pubkey from cached state #8652

@twoeths

Description

@twoeths

Problem description

as part of #8650 once we switch to using native state transition, we don't have a CachedBeaconStateAltair or CachedBeaconStateAllForks anymore so we should not access config, pubkey2index, index2pubkey from it

Solution description

we need to implement a global cache and use it instead, something like:

export type GlobalCache {
  config: BeaconConfig;
  pubkey2index: PubkeyIndexMap;
  index2pubkey: Index2PubkeyCache;
}

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions