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

fix(IndexedBlobHash): Change index to u64 #846

Closed

Conversation

ratankaliani
Copy link
Contributor

On 64-bit architectures the behavior of to_be_bytes for usize and u32 is the same, but in 32-bit architectures (e.g. SP1), to_be_bytes for a usize outputs 4 bytes instead of the expected 8 bytes.

This leads to the following error when getting blobs:

stderr: thread '<unnamed>' panicked at kona-d482f77e14858878/fd084b6/crates/proof-sdk/proof/src/l1/blob_provider.rs:41:31:
stderr: source slice length (4) does not match destination slice length (8)
stderr: stack backtrace:
stderr: note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
2024-11-26T19:26:01.928084Z  INFO execute: close time.busy=84.2s time.idle=20.0µs
thread 'main' panicked at /home/ubuntu/deployment-op-succinct/scripts/prove/src/lib.rs:44:10:
called `Result::unwrap()` on an `Err` value: execution failed with exit code 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Asterisc is a 64-bit architecture, which is why I think this issue wasn't caught: https://github.com/ethereum-optimism/asterisc.

Can we add CI for running a kona program in a 32-bit architecture? Happy to make a PR to ensure that consumers of kona (e.g. op-succinct) aren't impacted.

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.5%. Comparing base (fb7ff70) to head (35febd8).
Report is 1 commits behind head on main.

Additional details and impacted files

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

Copy link
Collaborator

@clabby clabby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Yeah, let's add it to CI. Best way to do that is probably to add a platform matrix to the native run of the client / host program. Also glad to add a 32-bit target to the build job.

@clabby clabby added this pull request to the merge queue Nov 27, 2024
@clabby clabby removed this pull request from the merge queue due to a manual request Nov 27, 2024
@clabby
Copy link
Collaborator

clabby commented Nov 27, 2024

Looks like #847 solves this, will close this PR and create an issue for the 32-bit coverage.

@clabby clabby linked an issue Nov 27, 2024 that may be closed by this pull request
@clabby clabby closed this Nov 27, 2024
@clabby
Copy link
Collaborator

clabby commented Nov 27, 2024

#849

@ratankaliani
Copy link
Contributor Author

Great, thanks @clabby @refcell!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants