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

Changed: output plotid when we find an invalid proof of space #15257

Merged
merged 2 commits into from May 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion chia/farmer/farmer_api.py
Expand Up @@ -34,8 +34,10 @@
from chia.types.blockchain_format.proof_of_space import (
generate_plot_public_key,
generate_taproot_sk,
get_plot_id,
verify_and_get_quality_string,
)
from chia.types.blockchain_format.sized_bytes import bytes32
from chia.util.api_decorators import api_request
from chia.util.ints import uint32, uint64

Expand Down Expand Up @@ -92,7 +94,8 @@ async def new_proof_of_space(self, new_proof_of_space: harvester_protocol.NewPro
new_proof_of_space.sp_hash,
)
if computed_quality_string is None:
self.farmer.log.error(f"Invalid proof of space {new_proof_of_space.proof}")
plotid: bytes32 = get_plot_id(new_proof_of_space.proof)
self.farmer.log.error(f"Invalid proof of space: {plotid.hex()} proof: {new_proof_of_space.proof}")
return None

self.farmer.number_of_responses[new_proof_of_space.sp_hash] += 1
Expand Down