From 117c9a42716841eafe889e43e66e2b5d6930a9d1 Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Wed, 9 Oct 2024 01:31:26 +1000 Subject: [PATCH] cannon: Default load-elf to output state.bin.gz (#12367) Update README to use singlethreaded-2 since the old singlethreaded likely isn't available if just compiling the latest version. --- cannon/README.md | 6 +++--- cannon/cmd/load_elf.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cannon/README.md b/cannon/README.md index a3b917193901..be1615b45f8a 100644 --- a/cannon/README.md +++ b/cannon/README.md @@ -29,8 +29,8 @@ cd ../cannon make cannon # Transform MIPS op-program client binary into first VM state. -# This outputs state.json (VM state) and meta.json (for debug symbols). -./bin/cannon load-elf --type singlethreaded --path=../op-program/bin/op-program-client.elf +# This outputs state.bin.gz (VM state) and meta.json (for debug symbols). +./bin/cannon load-elf --type singlethreaded-2 --path=../op-program/bin/op-program-client.elf # Run cannon emulator (with example inputs) # Note that the server-mode op-program command is passed into cannon (after the --), @@ -45,7 +45,7 @@ make cannon --proof-at '=' \ --stop-at '=' \ --snapshot-at '%1000000000' \ - --input ./state.json \ + --input ./state.bin.gz \ -- \ ../op-program/bin/op-program \ --network op-mainnet \ diff --git a/cannon/cmd/load_elf.go b/cannon/cmd/load_elf.go index a844dd09c101..c76ebbe8f7cb 100644 --- a/cannon/cmd/load_elf.go +++ b/cannon/cmd/load_elf.go @@ -32,7 +32,7 @@ var ( LoadELFOutFlag = &cli.PathFlag{ Name: "out", Usage: "Output path to write state to. State is dumped to stdout if set to '-'. Not written if empty. Use file extension '.bin', '.bin.gz', or '.json' for binary, compressed binary, or JSON formats.", - Value: "state.json", + Value: "state.bin.gz", Required: false, } LoadELFMetaFlag = &cli.PathFlag{