Commit 97cfa03b authored by Joshua Gutow's avatar Joshua Gutow Committed by GitHub

Merge pull request #8095 from ethereum-optimism/aj/add-docs

op-challenger: Add TraceAccessor docs and rename file
parents 3ed0891a 6a28f373
...@@ -57,8 +57,15 @@ type OracleUpdater interface { ...@@ -57,8 +57,15 @@ type OracleUpdater interface {
UpdateOracle(ctx context.Context, data *PreimageOracleData) error UpdateOracle(ctx context.Context, data *PreimageOracleData) error
} }
// TraceAccessor defines an interface to request data from a TraceProvider with additional context for the game position.
// This can be used to implement split games where lower layers of the game may have different values depending on claims
// at higher levels in the game.
type TraceAccessor interface { type TraceAccessor interface {
// Get returns the claim value at the requested position, evaluated in the context of the specified claim (ref).
Get(ctx context.Context, game Game, ref Claim, pos Position) (common.Hash, error) Get(ctx context.Context, game Game, ref Claim, pos Position) (common.Hash, error)
// GetStepData returns the data required to execute the step at the specified position,
// evaluated in the context of the specified claim (ref).
GetStepData(ctx context.Context, game Game, ref Claim, pos Position) (prestate []byte, proofData []byte, preimageData *PreimageOracleData, err error) GetStepData(ctx context.Context, game Game, ref Claim, pos Position) (prestate []byte, proofData []byte, preimageData *PreimageOracleData, err error)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment