Closed Inphi closed 1 month ago
Attention: Patch coverage is 31.75182%
with 187 lines
in your changes missing coverage. Please review.
Project coverage is 68.14%. Comparing base (
9178d5f
) to head (77d6d37
). Report is 15 commits behind head on develop.
:exclamation: There is a different number of reports uploaded between BASE (9178d5f) and HEAD (77d6d37). Click for more details.
HEAD has 1 upload less than BASE
| Flag | BASE (9178d5f) | HEAD (77d6d37) | |------|------|------| |cannon-go-tests|2|1|
Semgrep found 1 sol-style-return-arg-fmt
finding:
Named return arguments to functions must be appended with an underscore (_
)
Semgrep found 2 sol-style-input-arg-fmt
findings:
Inputs to functions must be prepended with an underscore (_
)
Merging as soon as CI passes.
Multicannon is a cannon wrapper that can be used to load and run Cannon states using a variety of Cannon FPVM implementations. This solves the issue of supporting older versions of the Cannon FPVM STF, without introducing branching logic into the STF. See https://github.com/ethereum-optimism/design-docs/pull/88 for more details on the rationale.
Multicannon mimics the same CLI as regular
cannon
, and in a couple subcommands, requires an additional--version
flag to be specified where it cannot autodetect the VM implementation to use. The--version
flag is used to locate the appropriate cannon FPVM program to use.The run subcommand autodetects the appropriate VM implementation to use by inspecting the input state file. The
StateVersion
in the state file indicates the Cannon VM implementation to use.Multicannon also supports a new
list
subcommand that displays the embedded cannon VMs and their versions.Annoyances
An embedded cannon binary must exist for every version supported by multicannon. This is wasteful in the case of single-threaded and multi-threaded VMs as a single cannon VM implementation supports both using the
--type
flag.Adding additional Cannon VMs
Easiest way to do this is using the op-stack-go Dockerfile. Whenever the Cannon VM STF is altered, a new
StateVersion
must be created. A Github tag can then be created for the change. This tag can be referenced when building the op-stack-go docker image to build an older version of cannon into thecannon/multicannon/embeds
directory. When multicannon is built, it becomes aware of all cannon VM binaries found in the embeds directory.