Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): Adjust RV target - riscv64g -> riscv64ima #868

Merged
merged 4 commits into from
Jan 2, 2025
Merged

Conversation

clabby
Copy link
Collaborator

@clabby clabby commented Dec 11, 2024

Overview

Note

I validated locally that this target works out fine for running on asterisc, but will need to cut a release of the asterisc-builder cross compilation image for this to pass CI. Will do after vaca.

For anyone who wants to experiment with this, head over to the build dir, and build the asterisc image locally w/ just asterisc. Then, head over to the root justfile, and adjust the build-asterisc recipe to use the local asterisc-pipeline:latest image that was built in the previous step.

Once this is done, head over to bin/client, and run kona on asterisc w/ just run-client-asterisc to use the new riscv64ima binary.

e: A new image was manually published. This is good to go.

Adjusts the build pipeline to use riscv64imac-unknown-none-elf as the target rather than riscv64gc. We still turn off compressed instructions, but this target forces LLVM to use soft-float operations for any floating point / doubleword floating point operations.

@clabby clabby added K-feature Kind: feature A-build Area: Build Pipelines labels Dec 11, 2024
@clabby clabby self-assigned this Dec 11, 2024
@clabby clabby requested a review from refcell as a code owner December 11, 2024 18:35
@clabby clabby marked this pull request as draft December 11, 2024 18:35
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.6%. Comparing base (f2b634f) to head (67e9df7).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zigtur
Copy link

zigtur commented Dec 17, 2024

I wonder if there is a way to exclude Zicsr instructions from the build.

The LLVM docs are unclear about it:

zicntr, zicsr, zifencei, zihpm
Between versions 2.0 and 2.1 of the base I specification, a backwards incompatible change was made to remove selected instructions and CSRs from the base ISA. These instructions were grouped into a set of new extensions, but were no longer required by the base ISA. This change is partially described in “Preface to Document Version 20190608-Base-Ratified” from the specification document (the zicntr and zihpm bits are not mentioned). LLVM currently implements version 2.1 of the base specification. To maintain compatibility, instructions from these extensions are accepted without being in the -march string. LLVM also allows the explicit specification of the extensions in an -march string.

It would make sense to also exclude these instructions as they are not supported by Asterisc.

@clabby
Copy link
Collaborator Author

clabby commented Jan 2, 2025

I wonder if there is a way to exclude Zicsr instructions from the build.

The LLVM docs are unclear about it:

zicntr, zicsr, zifencei, zihpm
Between versions 2.0 and 2.1 of the base I specification, a backwards incompatible change was made to remove selected instructions and CSRs from the base ISA. These instructions were grouped into a set of new extensions, but were no longer required by the base ISA. This change is partially described in “Preface to Document Version 20190608-Base-Ratified” from the specification document (the zicntr and zihpm bits are not mentioned). LLVM currently implements version 2.1 of the base specification. To maintain compatibility, instructions from these extensions are accepted without being in the -march string. LLVM also allows the explicit specification of the extensions in an -march string.

It would make sense to also exclude these instructions as they are not supported by Asterisc.

Yep, can turn these off. Note that rustc doesn't directly support these codegen options, but it does allow for fall-through directives to LLVM. We get a few warnings in the build, though from the rust forums this looks to be expected. Can validate that these features exist w/ rustc --target=riscv64imac-unknown-none-elf -Ctarget-feature=help

@clabby clabby marked this pull request as ready for review January 2, 2025 15:15
@clabby clabby added this pull request to the merge queue Jan 2, 2025
Merged via the queue into main with commit f7a21e1 Jan 2, 2025
16 checks passed
This was referenced Jan 2, 2025
byteflyfunny pushed a commit to mantle-xyz/kona that referenced this pull request Feb 13, 2025
* feat(build): `riscv64g` -> `riscv64ima`

* turn off `ziscr`, `zfencei`, `zicntr`, `zihpm`

* fmt

* fix
byteflyfunny pushed a commit to mantle-xyz/kona that referenced this pull request Feb 14, 2025
* feat(build): `riscv64g` -> `riscv64ima`

* turn off `ziscr`, `zfencei`, `zicntr`, `zihpm`

* fmt

* fix
byteflyfunny added a commit to mantle-xyz/kona that referenced this pull request Mar 4, 2025
* adjust kona code to support Mantle's current version

- Updated kona-executor codebase to ensure compatibility with the latest Mantle version

* feat: Add EigenDA as a new data source for retrieval

* feature: Adjust derive code to adapt to the Mantle version.

* feature: Adjust derive code to adapt to the Mantle version.

* feat: adapt revm for mantle

* feature: Adjust derive code to adapt to the Mantle version.

* remove grpc request method for zkvm compile

* add test;

* update revm

* add some errors type

* pub use some types

* Refactor code structure; update alloy package version; add new features.

* change bin for proof

* remove da_indexer

* remove da_indexer

* chore: Improve error handling messages for Eigen DA

* add log info

* add log info

* add log info

* add log info

* add log info

* add log info

* fix bug in eigen da blob size

* debug derive

* debug derive

* debug derive

* debug derive

* fix: set base_fee to None (#2)

* build: remove useless deps

* fix: Prior to Holocene activation, this base_fee should always be none

* fix: use non problematic hashmap fns

* Synchronize the latest remote repository code on the main branch; rebase the development branch onto the main branch.

* feat(build): Adjust RV target - `riscv64g` -> `riscv64ima` (op-rs#868)

* feat(build): `riscv64g` -> `riscv64ima`

* turn off `ziscr`, `zfencei`, `zicntr`, `zihpm`

* fmt

* fix

* fix(derive): `BatchStream` Past batch handling (op-rs#876)

* fix(derive): `BatchStream` Past batch handling

* test

* feat(build): Bump `asterisc-builder` version (op-rs#879)

* fix: op-rs rename (op-rs#883)

* fix: op-rs rename

* fix: justfile

* chore: op-rs rename:

* chore(derive): Test Ignoring EIP-7702 (op-rs#887)

* fix: Small Spelling Issue (op-rs#893)

* Move temporary error logs to lower level than WARN (op-rs#897)

* chore: fix some typos in comment (op-rs#906)

Signed-off-by: piguagua <piguagua@aliyun.com>

* feat(driver): Multi-block derivation (op-rs#888)

Co-authored-by: refcell <abigger87@gmail.com>

* chore(executor): Remove `anyhow` dev-dependency (op-rs#937)

* feat: use empty requests hash when isthmus enabled (op-rs#951)

* feat: Derive Eq/Ord/Hash for (Archived) PreimageKey(Type) (op-rs#956)

* feat: allow 7702 receipts after Isthmus active (op-rs#959)

* feat: fill eip 7702 tx env with auth list (op-rs#958)

Co-authored-by: refcell <abigger87@gmail.com>

* feat(executor): EIP-2935 Syscall Support [ISTHMUS] (op-rs#963)

* feat(executor): EIP-7251 Syscall Support [ISTHMUS] (op-rs#968)

* chore(executor): TxEnv Stuffing (op-rs#970)

* feat(client): EIP-2537 BLS12-381 Curve Precompile Acceleration (op-rs#960)

Co-authored-by: clabby <ben@clab.by>

* chore(executor): De-duplicate `TrieAccount` type (op-rs#977)

* fix(executor): Removes EIP-7002 and EIP-7251 Pre-block Calls (op-rs#990)

* feat(proof-sdk): Cleanup `Hint` API (op-rs#998)

* feat(mpt): Copy-on-hash (op-rs#1001)

* feat(host): Accelerate all BLS12-381 Precompiles (op-rs#1010)

* chore(client): Dedup MSM Required Gas Fn (op-rs#1012)

* chore(client): Precompile Run Macro (op-rs#1014)

* feat(executor): Sort trie keys (op-rs#1016)

* feat(ci): Remove support for features after MSRV (op-rs#1018)

* update upstream kona with some cherry pick commit

* implemente clear func in eigenda source

* fix: deposit_receipt_version should be None (#6)

* fix: deposit_receipt_version should be None

* chore: cargo fmt

* Mantle kona mpt verify (#7)


* downgrade the version of crossbeam-channel

* Integrated the adjusted Hokulea and rust-kzg-bn254.

* Integrated the eigenda verify

* Adjust the EigenDA blob saving method to temporarily use one-time saving.

* Optimize EigenDA blob data caching and proof generation.

* optimize log levels

* feat: support 7702 && cargo fmt

* fix decode blob data bug

* change eigen da point file

* update op-alloy

* without verification for commitment

* remove point file

---------

Co-authored-by: PinelliaC <wylbzc4928@gmail.com>

---------

Signed-off-by: piguagua <piguagua@aliyun.com>
Co-authored-by: PinelliaC <wylbzc4928@gmail.com>
Co-authored-by: clabby <ben@clab.by>
Co-authored-by: refcell <abigger87@gmail.com>
Co-authored-by: Serge Radinovich <47865535+sergerad@users.noreply.github.com>
Co-authored-by: piguagua <piguagua@aliyun.com>
Co-authored-by: Rami <2418646+hashcashier@users.noreply.github.com>
Co-authored-by: Julian Meyer <julianmeyer2000@gmail.com>
Co-authored-by: Julian Meyer <julian.meyer@coinbase.com>
Co-authored-by: Ratan Kaliani <ratankaliani@berkeley.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build Area: Build Pipelines K-feature Kind: feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants