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

use rust types for VDFInfo, VDFProof and ClassgroupElement #17102

Merged
merged 3 commits into from Jan 4, 2024

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Dec 20, 2023

Purpose:

This is a step towards making FullBlock a rust type, to move enough of the block validation into rust to be able to use threads instead of processes.

The rust counterparts are defined here:
https://github.com/Chia-Network/chia_rs/blob/main/chia-protocol/src/vdf.rs
https://github.com/Chia-Network/chia_rs/blob/main/chia-protocol/src/classgroup.rs

Since these types aren't dataclasses, the dataclass.replace() is changed to method replace().

Current Behavior:

VDFInfo, VDFProof and ClasgroupElement are python types.

New Behavior:

VDFInfo, VDFProof and ClasgroupElement are native (rust) types.

@arvidn arvidn added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Dec 20, 2023
@arvidn arvidn marked this pull request as ready for review December 20, 2023 08:26
@arvidn arvidn requested a review from a team as a code owner December 20, 2023 08:26
Copy link

coveralls-official bot commented Dec 20, 2023

Pull Request Test Coverage Report for Build 7386784801

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.009%) to 90.502%

Totals Coverage Status
Change from base Build 7339581890: 0.009%
Covered Lines: 94055
Relevant Lines: 103880

💛 - Coveralls

chia/util/recursive_replace.py Outdated Show resolved Hide resolved
tests/util/test_recursive_replace.py Outdated Show resolved Hide resolved
tests/util/test_recursive_replace.py Outdated Show resolved Hide resolved
chia/types/blockchain_format/vdf.py Show resolved Hide resolved
…se types aren't dataclasses, the dataclass.replace() is changed to method replace()
Copy link
Contributor

github-actions bot commented Jan 3, 2024

File Coverage Missing Lines
chia/full_node/full_node.py 0.0% lines 2096
chia/full_node/full_node_api.py 0.0% lines 579
chia/timelord/timelord.py 40.0% lines 488, 758, 781
Total Missing Coverage
105 lines 5 lines 95%

Copy link
Contributor

@wjblanke wjblanke left a comment

Choose a reason for hiding this comment

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

aok! exciting

@Starttoaster Starttoaster merged commit 92499b6 into main Jan 4, 2024
265 of 266 checks passed
@Starttoaster Starttoaster deleted the rust-vdf-types branch January 4, 2024 18:54
mikehw pushed a commit to mikehw/chia-blockchain that referenced this pull request Jan 11, 2024
…ork#17102)

* use rust types for VDFInfo, VDFProof and ClassgroupElement. Since these types aren't dataclasses, the dataclass.replace() is changed to method replace()

* add test for recursive_replace()

* add comment in recursive_replace() hack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants