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

add BlockRecord #359

Merged
merged 2 commits into from
Jan 9, 2024
Merged

add BlockRecord #359

merged 2 commits into from
Jan 9, 2024

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Dec 28, 2023

This PR is best reviewed one commit at a time.

This adds the BlockRecord type, defined in python here.

The main challenge in this type is implementing sp_sub_slot_total_iters(), ip_sub_slot_total_iters(), sp_iters(), ip_iters(), sp_total_iters(). The underlying functions used by these are implemented in python.

This patch calls back into python to run these functions. It's not elegant or efficient, but it's a stop-gap until we have ported these functions to rust.

In order to ensure this works, a fuzzer constructs an arbitrary BlockRecord object and calls all these functions on both the rust and python version, ensuring the results are identical, including failures.

Copy link

coveralls-official bot commented Dec 28, 2023

Pull Request Test Coverage Report for Build 7402035226

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 85.897%

Totals Coverage Status
Change from base Build 7401016788: -0.1%
Covered Lines: 11128
Relevant Lines: 12955

💛 - Coveralls

@arvidn arvidn marked this pull request as ready for review December 29, 2023 09:59
@arvidn arvidn marked this pull request as draft December 29, 2023 10:23
@arvidn arvidn marked this pull request as ready for review January 3, 2024 20:35
@arvidn arvidn requested a review from Rigidity January 3, 2024 20:35
Copy link
Contributor

@Rigidity Rigidity left a comment

Choose a reason for hiding this comment

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

Looks good for now, would definitely like to remove any calls back into Python at some point

@arvidn arvidn merged commit 6bf91b6 into main Jan 9, 2024
54 checks passed
@arvidn arvidn deleted the block-request branch January 9, 2024 09:28
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