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

Remove chia-blockchain dependency for most of chia_rs #887

Open
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

matt-o-how
Copy link
Contributor

This PR removes imports from test_blscache.py and deletes test_program_fidelity.py.

It also removes the python running from block_record.rs by implementing pot_iterations.py inside the class

@matt-o-how matt-o-how changed the title Remove chia-blockchain dependency in tests Remove chia-blockchain dependency for most of chia_rs Jan 17, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a really nice change. However, I think it would be good to check the correctness of this against the existing python implementation. One way to do that would be to break this off into a separate PR that still relies on the chia-blockchain dependency to compare the result between the rust and python implementation. Can you think of another way to be confident in the correctness of this port?

Copy link

coveralls-official bot commented Jan 17, 2025

Pull Request Test Coverage Report for Build 12992847296

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 201 of 232 (86.64%) changed or added relevant lines in 4 files are covered.
  • 303 unchanged lines in 13 files lost coverage.
  • Overall coverage decreased (-0.2%) to 84.238%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/chia-protocol/src/pot_iterations.rs 175 182 96.15%
crates/chia-protocol/src/block_record.rs 21 33 63.64%
crates/chia-protocol/src/pos_quality.rs 0 12 0.0%
Files with Coverage Reduction New Missed Lines %
crates/chia-protocol/src/lazy_node.rs 1 90.91%
crates/chia-puzzle-types/src/puzzles/standard.rs 3 76.32%
crates/chia-puzzle-types/src/puzzles/singleton.rs 3 29.17%
crates/chia-puzzle-types/src/puzzles/offer.rs 4 95.4%
crates/chia_streamable_macro/src/lib.rs 7 95.96%
wheel/src/run_program.rs 7 76.67%
crates/chia-consensus/src/fast_forward.rs 8 97.88%
wheel/src/api.rs 20 85.43%
crates/chia-bls/src/signature.rs 22 94.91%
crates/chia-bls/src/public_key.rs 37 91.26%
Totals Coverage Status
Change from base Build 12797692864: -0.2%
Covered Lines: 13655
Relevant Lines: 16210

💛 - Coveralls

@@ -4,7 +4,9 @@
pub const UI_ACTUAL_SPACE_CONSTANT_FACTOR: f32 = 0.78;

// TODO: Update this when new plot format releases
pub fn expected_plot_size(k: u32) -> u64 {
#[cfg(feature = "py-bindings")]
#[pyo3::pyfunction]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you have to do #[cfg_attr(feature = "py-bindings", pyo3::pyfunction)] instead?

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.

3 participants