Skip to content

[Plugin System] Create WorldStateArchiveProvider interface #9448

@jflo

Description

@jflo

Parent Issue: #9447

Goal

Create a new WorldStateArchiveProvider interface in plugin-api that allows plugins to provide world state archive implementations.

Implementation

Location

plugin-api/src/main/java/org/hyperledger/besu/plugin/services/storage/WorldStateArchiveProvider.java

Interface Definition

package org.hyperledger.besu.plugin.services.storage;

import org.hyperledger.besu.ethereum.worldstate.WorldStateArchive;
import org.hyperledger.besu.ethereum.worldstate.WorldStateStorageCoordinator;
import org.hyperledger.besu.ethereum.worldstate.WorldStatePreimageStorage;
import org.hyperledger.besu.evm.internal.EvmConfiguration;

/**
 * Provider interface for world state archive implementations.
 * Plugins can implement this to provide alternative storage formats.
 */
public interface WorldStateArchiveProvider {
  
  /**
   * Creates a world state archive instance.
   *
   * @param worldStateStorageCoordinator the storage coordinator
   * @param preimageStorage the preimage storage
   * @param evmConfiguration the EVM configuration
   * @return a world state archive instance
   */
  WorldStateArchive create(
      WorldStateStorageCoordinator worldStateStorageCoordinator,
      WorldStatePreimageStorage preimageStorage,
      EvmConfiguration evmConfiguration);
  
  /**
   * Returns the data storage format this provider supports.
   *
   * @return the supported data storage format
   */
  DataStorageFormat getDataStorageFormat();
}

Acceptance Criteria

  • Interface created in plugin-api module
  • Javadoc documentation added
  • No breaking changes to existing code
  • Compiles successfully

Notes

  • This is a pure interface addition with no implementation
  • No changes to existing code required in this task
  • This enables the next steps in the plugin system refactor

Dependencies

None - this is the first step

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions