Skip to content

[Tracker] RAM Pinning #2104

@preston-evans98

Description

@preston-evans98

Description

Allows state items to be pinned in RAM, ensuring that we never touch disk when searching for their items.

Checklist

Feature Implementation

  • Implement db changes to support RAM pinning
  • Add new PinnedCache type
  • Add support for reading from the pinned cache in ProvableStorageCache instead of falling to disk
  • Add support for instantiating the pinned cache in the Runtime
  • Instantiate and pass PinnedCache correctly in sequencer
  • Instantiate and pass PinnedCache correctly in Node

Feature Testing

  • Test RAM Pinning in node/sequencer under normal operation
  • Test RAM pinning still works after recovery
  • Test RAM pinning still works after resync

Merging

Configuration

  • Rebase on top of Add "execution time" config for modules #2102 to allow configuration of pinned buckets at startup
  • Add privileged addresses to EVM whose contracts are automatically pinned
    • Add privileged addresses to base runtime config
    • Add ability to modify and save dynamic runtime config between runs so that we can track the addresses created by privileged users and pin them automatically.

Configuration Testing

  • Integration test RAM pinning with EVM

Optimization

  • Avoid re-creating the pinned cache on resync events from the sequencer

Unfinished Items from Initial PRs

  • Cleanup Storage API: Currently the pinned cache is passed as state through the Storage in the full node. SInce it's not referentially transparent, its hard to reason about
  • Cleanup and more obviously document handling of the cache in the sequencer.

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