-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
cannon: mipsevm: Support mips64r2
for kona
#14405
Closed
pcw109550
wants to merge
27
commits into
ethereum-optimism:develop
from
pcw109550:pcw109550/cannon-mipsevm-full-mips64r2
Closed
cannon: mipsevm: Support mips64r2
for kona
#14405
pcw109550
wants to merge
27
commits into
ethereum-optimism:develop
from
pcw109550:pcw109550/cannon-mipsevm-full-mips64r2
+1,022
−15
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drotr, drotr32, drotrv, rotr, rotrv
seb, seh, dext, dextm, dextu, dins, dinsm, dinsu, dsbh, dshd
seb, seh, dext, dextm, dextu, dins, dinsm, dinsu, dsbh, dshd
dclz, wsbh, ins, ext
wsbh, ins, ext
/ci authorize f7274b2 |
I see there are few unit test failures that need to be fixed: https://app.circleci.com/pipelines/github/ethereum-optimism/optimism/81542/workflows/59e428dd-81c1-4965-a4ec-5368becdd4bd/jobs/3264849/tests. All those are related with sign extensions; For example sign extending to 64bit but test hardcoded it to 32bit. Will be fixed. |
Going for minimal diff; |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This attempts cannon's offchain version(mipsevm) to support minimal instruction subset to run kona compiled down to mips64r2 introduced here. Relevant issue: #13969. We can extract all instructions by diassembling kona mips64r2 binary. Onchain fixes are not introduced intentionally. If we decide to merge this PR, further contract impls needed.
After building kona binary using
just build-cannon --bin kona --profile release-client-lto
at root of kona repo,Run
and get all instructions for kona. This PR implements instructions which were not implemented in mipsevm, for running kona mips64r2 binary.
Instruction manual here: https://s3-eu-west-1.amazonaws.com/downloads-mips/documents/MIPS_Architecture_MIPS64_InstructionSet_%20AFP_P_MD00087_06.05.pdf
Tests
Unit tests added per execution of new instructions off chain.
Validated that kona mips64r2 binary runs inside cannon by using preimage https://github.com/op-rs/kona/blob/main/bin/client/testdata/holocene-op-sepolia-22012816-witness.tar.zst, based on op-rs/kona#1052 and kona ci.
Differential testing not implemented because only implemented the offchain version. Also no fuzz tests yet.
Metadata
#13969