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

chore: Test stackoverflow edge case #110

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kevaundray
Copy link
Contributor

No description provided.

@kevaundray
Copy link
Contributor Author

Only need to look at Test Stackoverflow test case / build (pull_request) as that workflow tests the edge case

@kevaundray kevaundray changed the title Test stackoverflow edge case chore: Test stackoverflow edge case Jul 23, 2024
@kevaundray
Copy link
Contributor Author

Note that even with vectors as return types, we are getting failures. The next commit will change:

                let mut blob = [0; BYTES_PER_BLOB];
                blob.copy_from_slice(&blob_vec);
                let cells_and_proofs = ctx.compute_cells_and_kzg_proofs(&blob);

to

                let cells_and_proofs =
                    ctx.compute_cells_and_kzg_proofs(blob_vec.as_slice().try_into().unwrap());

Effectively removing the allocation inside of the map function.

Copy link

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

Nice debugging!

})
.collect();

std::hint::black_box(blob_cells_and_proofs_vec);

Choose a reason for hiding this comment

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

TIL! This is handy!

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