Commit ea51dfaf authored by Andreas Bigger's avatar Andreas Bigger

trace provider

parent d2ce890a
......@@ -428,6 +428,8 @@ func requiredArgs(traceType config.TraceType) map[string]string {
args["--cannon-server"] = cannonServer
args["--cannon-prestate"] = cannonPreState
args["--cannon-l2"] = cannonL2
case config.TraceTypeOutput:
// No additional args required
}
return args
}
......
......@@ -39,6 +39,7 @@ type TraceType string
const (
TraceTypeAlphabet TraceType = "alphabet"
TraceTypeCannon TraceType = "cannon"
TraceTypeOutput TraceType = "output"
// Mainnet games
CannonFaultGameID = 0
......@@ -47,7 +48,7 @@ const (
AlphabetFaultGameID = 255
)
var TraceTypes = []TraceType{TraceTypeAlphabet, TraceTypeCannon}
var TraceTypes = []TraceType{TraceTypeAlphabet, TraceTypeCannon, TraceTypeOutput}
// GameIdToString maps game IDs to their string representation.
var GameIdToString = map[uint8]string{
......
......@@ -210,6 +210,9 @@ func CheckRequired(ctx *cli.Context) error {
if !ctx.IsSet(AlphabetFlag.Name) {
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:
return fmt.Errorf("invalid trace type. must be one of %v", config.TraceTypes)
}
......
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