Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
6a28f373
Unverified
Commit
6a28f373
authored
Nov 08, 2023
by
Adrian Sutton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-challenger: Add TraceAccessor docs and rename file.
parent
5b67802e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
0 deletions
+7
-0
access.go
op-challenger/game/fault/trace/access.go
+0
-0
access_test.go
op-challenger/game/fault/trace/access_test.go
+0
-0
types.go
op-challenger/game/fault/types/types.go
+7
-0
No files found.
op-challenger/game/fault/trace/
select
.go
→
op-challenger/game/fault/trace/
access
.go
View file @
6a28f373
File moved
op-challenger/game/fault/trace/
select
_test.go
→
op-challenger/game/fault/trace/
access
_test.go
View file @
6a28f373
File moved
op-challenger/game/fault/types/types.go
View file @
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
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment