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 RecentChainData, ProofBlockHeader and WeightProof #17738

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Mar 19, 2024

Purpose:

Like the title suggests, the following types are transitioned to use the rust counterparts, from chia_rs:

ProofBlockHeader = chia_rs.ProofBlockHeader
RecentChainData = chia_rs.RecentChainData
SubEpochData = chia_rs.SubEpochData
WeightProof = chia_rs.WeightProof

The rust types are defined here: https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/weight_proof.rs

This attempts to address one of the issues uncovered here: #17168
"serializing the weight proof is slow".

Current Behavior:

Serializing the weight proof is slow, when responding to a request_proof_of_weight request from a peer.

New Behavior:

Serializing the weight proof is faster.

@arvidn arvidn added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Mar 19, 2024
Copy link

Pull Request Test Coverage Report for Build 8520974916

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • 16 unchanged lines in 9 files lost coverage.
  • Overall coverage decreased (-0.001%) to 90.957%

Files with Coverage Reduction New Missed Lines %
chia/data_layer/data_store.py 1 95.32%
chia/rpc/rpc_server.py 1 89.0%
chia/wallet/wallet_node.py 1 88.27%
chia/_tests/core/util/test_lockfile.py 1 91.09%
chia/_tests/core/util/test_file_keyring_synchronization.py 1 97.1%
chia/farmer/farmer_api.py 2 94.4%
chia/plotters/madmax.py 3 49.4%
chia/server/node_discovery.py 3 80.32%
chia/util/streamable.py 3 98.51%
Totals Coverage Status
Change from base Build 8486429822: -0.001%
Covered Lines: 98340
Relevant Lines: 108102

💛 - Coveralls

@arvidn arvidn marked this pull request as ready for review April 2, 2024 11:23
@arvidn arvidn requested a review from a team as a code owner April 2, 2024 11:23
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.

lgtm

@arvidn arvidn requested a review from emlowe April 2, 2024 19:57
@arvidn arvidn added the ready_to_merge Submitter and reviewers think this is ready label Apr 2, 2024
@pmaslana pmaslana merged commit 3f0d5c0 into main Apr 3, 2024
309 checks passed
@pmaslana pmaslana deleted the weight-proof-rust branch April 3, 2024 16:08
cmmarslender pushed a commit that referenced this pull request Jun 21, 2024
…htProof" #17738 (#18231)

Revert "use rust types for RecentChainData, ProofBlockHeader and WeightProof …"

This reverts commit 3f0d5c0.
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 ready_to_merge Submitter and reviewers think this is ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants