cannon: Implement dclo|dclz#14454
Conversation
|
/ci authorize a162409 |
|
This pr has been automatically marked as stale and will be closed in 5 days if no updates |
|
What's still needed here? Just reviews? |
Inphi
left a comment
There was a problem hiding this comment.
MIPS64 semver needs updating. But lgtm.
Inphi
left a comment
There was a problem hiding this comment.
I later realized that this change warrants an update to the StateVersion.
All breaking changes to the FPVM STF, even if they do not update the state format, must be paired with a StateVersion bump. This should be done for both 32-bit and 64-bit cannon. So:
VersionMultiThreaded_v3VersionMultiThreaded64_v4
The absolute prestate encodes the StateVersion, tying a particular VM STF to a program. This ensures we don't accidentally execute a program on a VM that doesn't support it.
## Overview Adds a dockerfile for reproducible builds of the `cannon` prestate with `kona-client`. Note that `cannon` does not yet support `kona`. ethereum-optimism/optimism#14454 must be merged before this can be used. This PR just adds the route to build the artifacts, but we will need to follow up with <issue_num> once the new instructions are supported and a new `cannon` tag has been released.
a162409 to
c022c67
Compare
|
/ci authorize c022c67 |
|
/ci authorize be5a38e |
|
/ci authorize 4ebf22b |
|
/ci authorize 8b137a7 |
|
Yay finally CI is green, but I got few questions @Inphi |
Good callout on the 32-bit state version. We don't need to introduce a
We're currently cutting new prestates to be governance-approved for the existing VM. So we don't want to alter the prestate versions used until after we're done cutting releases. |
|
/ci authorize 8d65092 |
|
/ci authorize 1bd10c7 |
d38b80e
* cannon: Implement dclo|dclz in the offchain mipsevm * cannon: Implement dclo|dclz in the onchain MIPS64 FPVM * cannon: dclo|dclz tests * cannon: dclo|dclz README * cannon: Update MIPS64 contract version * cannon: Run semver-lock * cannon: dclo|dclz test style * cannon: bump StateVersion for dclz|dclo * cannon: Run semver-lock after rebase * cannon: ci update for dclo|dclz * cannon: Makefile for dclo|dclz * cannon: test states for dclz|dclo * cannon: remove VersionMultiThreaded_v3 * cannon: test states for dclz|dclo
…ereum-optimism#15367) This reverts commit d38b80e.
* cannon: Implement dclo|dclz in the offchain mipsevm * cannon: Implement dclo|dclz in the onchain MIPS64 FPVM * cannon: dclo|dclz tests * cannon: dclo|dclz README * cannon: Update MIPS64 contract version * cannon: Run semver-lock * cannon: dclo|dclz test style * cannon: bump StateVersion for dclz|dclo * cannon: Run semver-lock after rebase * cannon: ci update for dclo|dclz * cannon: Makefile for dclo|dclz * cannon: test states for dclz|dclo * cannon: remove VersionMultiThreaded_v3 * cannon: test states for dclz|dclo
…ereum-optimism#15367) This reverts commit d38b80e.
Description
Implements
dcloanddclzinstruction for offchain/onchain cannon implementation. We need these instructions because for executing kona compiled down to mips64r1. There were attempts(#14405) to support kona to be executed as mips64r2, but this causes more diff for cannon. The point here is to introduce as small diff as possible, while making cannon capable of executing kona in mips64, so mips64r1 is enough.There are contract diffs, so I decided to bump patch version to 1.0.1, but not sure this is the right version to update. For example at #13429 single instruction was added to onchain FPVM, and the version was bumped to
1.0.0-beta.8from1.0.0-beta.7. Anyway ran semver lock to update codehashes.Tests
Added unit tests for testing both offchain/onchain implementation and comparing them.
Validated that kona at commit op-rs/kona@161547c compiled to mips64r1 calculates expected state hash using preimage https://github.com/op-rs/kona/blob/main/bin/client/testdata/holocene-op-sepolia-22012816-witness.tar.zst with cannon with this PR applied.
Metadata