Closed sbnair closed 1 year ago
claim.elf
requires pre-image data. That pre-image data is provided in the example test here: https://github.com/ethereum-optimism/cannon/blob/32c76db43dc4b5fb25f49ba8fbdb84fed8e5615a/mipsevm/state_test.go#L115 , but the CLI does not have it, so it won't work via CLI without implementing a pre-image serving binary.
thanks for your response protolambda.
Hi !
When running state.json created by running load-elf of claim.elf's file i get the below mentioned error, and the commands i used is shown below :
goroutine 1 [running]: github.com/ethereum-optimism/cannon/cmd.(ProcessPreimageOracle).GetPreimage(0x7f4d9f1245b8?, {0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}) /home/ubuntu/src/github.com/ethereum-optimism/cannon/cmd/run.go:159 +0x85 github.com/ethereum-optimism/cannon/mipsevm.(InstrumentedState).readPreimage(0xc000081000, {0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...) /home/ubuntu/src/github.com/ethereum-optimism/cannon/mipsevm/mips.go:13 +0xec github.com/ethereum-optimism/cannon/mipsevm.(InstrumentedState).handleSyscall(0xc000081000) /home/ubuntu/src/github.com/ethereum-optimism/cannon/mipsevm/mips.go:86 +0x685 github.com/ethereum-optimism/cannon/mipsevm.(InstrumentedState).mipsStep(0xc000081000) /home/ubuntu/src/github.com/ethereum-optimism/cannon/mipsevm/mips.go:363 +0x3b9 github.com/ethereum-optimism/cannon/mipsevm.(InstrumentedState).Step(0xc000081000, 0x0) /home/ubuntu/src/github.com/ethereum-optimism/cannon/mipsevm/instrumented.go:68 +0x17d github.com/ethereum-optimism/cannon/cmd.Run(0xc0002b3e00) /home/ubuntu/src/github.com/ethereum-optimism/cannon/cmd/run.go:554 +0x1444 github.com/urfave/cli/v2.(Command).Run(0x1445e60, 0xc0002b3e00, {0xc0000e3dc0, 0x7, 0x7}) /home/ubuntu/pkg/mod/github.com/urfave/cli/v2@v2.25.3/command.go:274 +0x9eb github.com/urfave/cli/v2.(Command).Run(0xc0002da420, 0xc0002b3d40, {0xc0000b2000, 0x8, 0x8}) /home/ubuntu/pkg/mod/github.com/urfave/cli/v2@v2.25.3/command.go:267 +0xc4d github.com/urfave/cli/v2.(App).RunContext(0xc0003643c0, {0xef3a58?, 0xc0000b4000}, {0xc0000b2000, 0x8, 0x8}) /home/ubuntu/pkg/mod/github.com/urfave/cli/v2@v2.25.3/app.go:332 +0x616 github.com/urfave/cli/v2.(*App).Run(...) /home/ubuntu/pkg/mod/github.com/urfave/cli/v2@v2.25.3/app.go:309
Please let me know how can we use pre-image oracle in elf program ?.
Thanks, Shailesh.