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
ea51dfaf
Commit
ea51dfaf
authored
Sep 15, 2023
by
Andreas Bigger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trace provider
parent
d2ce890a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
main_test.go
op-challenger/cmd/main_test.go
+2
-0
config.go
op-challenger/config/config.go
+2
-1
flags.go
op-challenger/flags/flags.go
+3
-0
No files found.
op-challenger/cmd/main_test.go
View file @
ea51dfaf
...
@@ -428,6 +428,8 @@ func requiredArgs(traceType config.TraceType) map[string]string {
...
@@ -428,6 +428,8 @@ func requiredArgs(traceType config.TraceType) map[string]string {
args
[
"--cannon-server"
]
=
cannonServer
args
[
"--cannon-server"
]
=
cannonServer
args
[
"--cannon-prestate"
]
=
cannonPreState
args
[
"--cannon-prestate"
]
=
cannonPreState
args
[
"--cannon-l2"
]
=
cannonL2
args
[
"--cannon-l2"
]
=
cannonL2
case
config
.
TraceTypeOutput
:
// No additional args required
}
}
return
args
return
args
}
}
...
...
op-challenger/config/config.go
View file @
ea51dfaf
...
@@ -39,6 +39,7 @@ type TraceType string
...
@@ -39,6 +39,7 @@ type TraceType string
const
(
const
(
TraceTypeAlphabet
TraceType
=
"alphabet"
TraceTypeAlphabet
TraceType
=
"alphabet"
TraceTypeCannon
TraceType
=
"cannon"
TraceTypeCannon
TraceType
=
"cannon"
TraceTypeOutput
TraceType
=
"output"
// Mainnet games
// Mainnet games
CannonFaultGameID
=
0
CannonFaultGameID
=
0
...
@@ -47,7 +48,7 @@ const (
...
@@ -47,7 +48,7 @@ const (
AlphabetFaultGameID
=
255
AlphabetFaultGameID
=
255
)
)
var
TraceTypes
=
[]
TraceType
{
TraceTypeAlphabet
,
TraceTypeCannon
}
var
TraceTypes
=
[]
TraceType
{
TraceTypeAlphabet
,
TraceTypeCannon
,
TraceTypeOutput
}
// GameIdToString maps game IDs to their string representation.
// GameIdToString maps game IDs to their string representation.
var
GameIdToString
=
map
[
uint8
]
string
{
var
GameIdToString
=
map
[
uint8
]
string
{
...
...
op-challenger/flags/flags.go
View file @
ea51dfaf
...
@@ -210,6 +210,9 @@ func CheckRequired(ctx *cli.Context) error {
...
@@ -210,6 +210,9 @@ func CheckRequired(ctx *cli.Context) error {
if
!
ctx
.
IsSet
(
AlphabetFlag
.
Name
)
{
if
!
ctx
.
IsSet
(
AlphabetFlag
.
Name
)
{
return
fmt
.
Errorf
(
"flag %s is required"
,
"alphabet"
)
return
fmt
.
Errorf
(
"flag %s is required"
,
"alphabet"
)
}
}
case
config
.
TraceTypeOutput
:
// Mark the flag as unsupported for now so that we can implement downstream
return
fmt
.
Errorf
(
"flag %s is not supported"
,
"output"
)
default
:
default
:
return
fmt
.
Errorf
(
"invalid trace type. must be one of %v"
,
config
.
TraceTypes
)
return
fmt
.
Errorf
(
"invalid trace type. must be one of %v"
,
config
.
TraceTypes
)
}
}
...
...
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