Skip to content

Instantly share code, notes, and snippets.

@levidurfee
Last active July 13, 2021 12:32
Show Gist options
  • Save levidurfee/9092b130ec0c8e179bcd7a8c446a18a6 to your computer and use it in GitHub Desktop.
Save levidurfee/9092b130ec0c8e179bcd7a8c446a18a6 to your computer and use it in GitHub Desktop.
Chia Harvester API log iterations patch
--- chia/farmer/farmer_api.py.orig 2021-07-13 12:30:09.737585015 +0000
+++ chia/farmer/farmer_api.py 2021-07-13 11:14:13.613493604 +0000
@@ -83,7 +83,10 @@
new_proof_of_space.sp_hash,
)
+
+ lmd_sp_interval_iters = calculate_sp_interval_iters(self.farmer.constants, sp.sub_slot_iters)
# If the iters are good enough to make a block, proceed with the block making flow
+ self.farmer.log.info(f"lmd Iterations, Required: {required_iters} SP: {lmd_sp_interval_iters}")
if required_iters < calculate_sp_interval_iters(self.farmer.constants, sp.sub_slot_iters):
# Proceed at getting the signatures for this PoSpace
request = harvester_protocol.RequestSignatures(
--- harvester_api.py.original 2021-07-01 11:38:49.695177962 -0400
+++ harvester_api.py 2021-07-01 11:40:43.658112916 -0400
@@ -120,6 +120,7 @@
new_challenge.sp_hash,
)
sp_interval_iters = calculate_sp_interval_iters(self.harvester.constants, sub_slot_iters)
+ self.harvester.log.info(f"Iterations, Required: {required_iters} SP: {sp_interval_iters}")
if required_iters < sp_interval_iters:
# Found a very good proof of space! will fetch the whole proof from disk,
# then send to farmer
https://github.com/Chia-Network/chia-blockchain/blob/main/chia/harvester/harvester_api.py
https://github.com/Chia-Network/chia-blockchain/blob/1.2.1/chia/farmer/farmer_api.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment