chia-blockchain 2.5.5rc6__py3-none-any.whl → 2.5.6rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -117,6 +117,7 @@ def visit_harvester_protocol(visitor: Callable[[Any, str], None]) -> None:
117
117
  visitor(pool_difficulty, "pool_difficulty")
118
118
  visitor(harvester_handhsake, "harvester_handhsake")
119
119
  visitor(new_signage_point_harvester, "new_signage_point_harvester")
120
+ visitor(new_signage_point_harvester2, "new_signage_point_harvester2")
120
121
  visitor(new_proof_of_space, "new_proof_of_space")
121
122
  visitor(request_signatures, "request_signatures")
122
123
  visitor(respond_signatures, "respond_signatures")
@@ -789,6 +789,16 @@ harvester_handhsake = harvester_protocol.HarvesterHandshake(
789
789
  )
790
790
 
791
791
  new_signage_point_harvester = harvester_protocol.NewSignagePointHarvester(
792
+ bytes32(bytes.fromhex("e342c21b4aeaa52349d42492be934692db58494ca9bce4a8697d06fdf8e583bb")),
793
+ uint64(15615706268399948682),
794
+ uint64(10520767421667792980),
795
+ uint8(148),
796
+ bytes32(bytes.fromhex("b78c9fca155e9742df835cbe84bb7e518bee70d78b6be6e39996c0a02e0cfe4c")),
797
+ [pool_difficulty],
798
+ uint8(3),
799
+ )
800
+
801
+ new_signage_point_harvester2 = harvester_protocol.NewSignagePointHarvester2(
792
802
  bytes32(bytes.fromhex("e342c21b4aeaa52349d42492be934692db58494ca9bce4a8697d06fdf8e583bb")),
793
803
  uint64(15615706268399948682),
794
804
  uint64(10520767421667792980),
@@ -799,6 +809,7 @@ new_signage_point_harvester = harvester_protocol.NewSignagePointHarvester(
799
809
  uint32(0),
800
810
  )
801
811
 
812
+
802
813
  new_proof_of_space = harvester_protocol.NewProofOfSpace(
803
814
  bytes32.fromhex("1b64ec6bf3fe33bb80eca5b64ff1c88be07771eaed1e98a7199510522087e56e"),
804
815
  bytes32.fromhex("ad1f8a74376ce8c5c93b7fbb355c2fb6d689ae4f4a7134166593d95265a3da30"),
@@ -2148,6 +2148,22 @@ harvester_handhsake_json: dict[str, Any] = {
2148
2148
  }
2149
2149
 
2150
2150
  new_signage_point_harvester_json: dict[str, Any] = {
2151
+ "challenge_hash": "0xe342c21b4aeaa52349d42492be934692db58494ca9bce4a8697d06fdf8e583bb",
2152
+ "difficulty": 15615706268399948682,
2153
+ "sub_slot_iters": 10520767421667792980,
2154
+ "signage_point_index": 148,
2155
+ "sp_hash": "0xb78c9fca155e9742df835cbe84bb7e518bee70d78b6be6e39996c0a02e0cfe4c",
2156
+ "pool_difficulties": [
2157
+ {
2158
+ "difficulty": 14819251421858580996,
2159
+ "sub_slot_iters": 12852879676624401630,
2160
+ "pool_contract_puzzle_hash": "0xc9423123ea65e6923e973b95531b4874570dae942cb757a2daec4a6971753886",
2161
+ }
2162
+ ],
2163
+ "filter_prefix_bits": 3,
2164
+ }
2165
+
2166
+ new_signage_point_harvester2_json: dict[str, Any] = {
2151
2167
  "challenge_hash": "0xe342c21b4aeaa52349d42492be934692db58494ca9bce4a8697d06fdf8e583bb",
2152
2168
  "difficulty": 15615706268399948682,
2153
2169
  "sub_slot_iters": 10520767421667792980,
@@ -426,153 +426,158 @@ def test_protocol_bytes() -> None:
426
426
  assert bytes(message_79) == bytes(new_signage_point_harvester)
427
427
 
428
428
  message_bytes, input_bytes = parse_blob(input_bytes)
429
- message_80 = type(new_proof_of_space).from_bytes(message_bytes)
430
- assert message_80 == new_proof_of_space
431
- assert bytes(message_80) == bytes(new_proof_of_space)
429
+ message_80 = type(new_signage_point_harvester2).from_bytes(message_bytes)
430
+ assert message_80 == new_signage_point_harvester2
431
+ assert bytes(message_80) == bytes(new_signage_point_harvester2)
432
432
 
433
433
  message_bytes, input_bytes = parse_blob(input_bytes)
434
- message_81 = type(request_signatures).from_bytes(message_bytes)
435
- assert message_81 == request_signatures
436
- assert bytes(message_81) == bytes(request_signatures)
434
+ message_81 = type(new_proof_of_space).from_bytes(message_bytes)
435
+ assert message_81 == new_proof_of_space
436
+ assert bytes(message_81) == bytes(new_proof_of_space)
437
437
 
438
438
  message_bytes, input_bytes = parse_blob(input_bytes)
439
- message_82 = type(respond_signatures).from_bytes(message_bytes)
440
- assert message_82 == respond_signatures
441
- assert bytes(message_82) == bytes(respond_signatures)
439
+ message_82 = type(request_signatures).from_bytes(message_bytes)
440
+ assert message_82 == request_signatures
441
+ assert bytes(message_82) == bytes(request_signatures)
442
442
 
443
443
  message_bytes, input_bytes = parse_blob(input_bytes)
444
- message_83 = type(plot).from_bytes(message_bytes)
445
- assert message_83 == plot
446
- assert bytes(message_83) == bytes(plot)
444
+ message_83 = type(respond_signatures).from_bytes(message_bytes)
445
+ assert message_83 == respond_signatures
446
+ assert bytes(message_83) == bytes(respond_signatures)
447
447
 
448
448
  message_bytes, input_bytes = parse_blob(input_bytes)
449
- message_84 = type(request_plots).from_bytes(message_bytes)
450
- assert message_84 == request_plots
451
- assert bytes(message_84) == bytes(request_plots)
449
+ message_84 = type(plot).from_bytes(message_bytes)
450
+ assert message_84 == plot
451
+ assert bytes(message_84) == bytes(plot)
452
452
 
453
453
  message_bytes, input_bytes = parse_blob(input_bytes)
454
- message_85 = type(respond_plots).from_bytes(message_bytes)
455
- assert message_85 == respond_plots
456
- assert bytes(message_85) == bytes(respond_plots)
454
+ message_85 = type(request_plots).from_bytes(message_bytes)
455
+ assert message_85 == request_plots
456
+ assert bytes(message_85) == bytes(request_plots)
457
457
 
458
458
  message_bytes, input_bytes = parse_blob(input_bytes)
459
- message_86 = type(request_peers_introducer).from_bytes(message_bytes)
460
- assert message_86 == request_peers_introducer
461
- assert bytes(message_86) == bytes(request_peers_introducer)
459
+ message_86 = type(respond_plots).from_bytes(message_bytes)
460
+ assert message_86 == respond_plots
461
+ assert bytes(message_86) == bytes(respond_plots)
462
462
 
463
463
  message_bytes, input_bytes = parse_blob(input_bytes)
464
- message_87 = type(respond_peers_introducer).from_bytes(message_bytes)
465
- assert message_87 == respond_peers_introducer
466
- assert bytes(message_87) == bytes(respond_peers_introducer)
464
+ message_87 = type(request_peers_introducer).from_bytes(message_bytes)
465
+ assert message_87 == request_peers_introducer
466
+ assert bytes(message_87) == bytes(request_peers_introducer)
467
467
 
468
468
  message_bytes, input_bytes = parse_blob(input_bytes)
469
- message_88 = type(authentication_payload).from_bytes(message_bytes)
470
- assert message_88 == authentication_payload
471
- assert bytes(message_88) == bytes(authentication_payload)
469
+ message_88 = type(respond_peers_introducer).from_bytes(message_bytes)
470
+ assert message_88 == respond_peers_introducer
471
+ assert bytes(message_88) == bytes(respond_peers_introducer)
472
472
 
473
473
  message_bytes, input_bytes = parse_blob(input_bytes)
474
- message_89 = type(get_pool_info_response).from_bytes(message_bytes)
475
- assert message_89 == get_pool_info_response
476
- assert bytes(message_89) == bytes(get_pool_info_response)
474
+ message_89 = type(authentication_payload).from_bytes(message_bytes)
475
+ assert message_89 == authentication_payload
476
+ assert bytes(message_89) == bytes(authentication_payload)
477
477
 
478
478
  message_bytes, input_bytes = parse_blob(input_bytes)
479
- message_90 = type(post_partial_payload).from_bytes(message_bytes)
480
- assert message_90 == post_partial_payload
481
- assert bytes(message_90) == bytes(post_partial_payload)
479
+ message_90 = type(get_pool_info_response).from_bytes(message_bytes)
480
+ assert message_90 == get_pool_info_response
481
+ assert bytes(message_90) == bytes(get_pool_info_response)
482
482
 
483
483
  message_bytes, input_bytes = parse_blob(input_bytes)
484
- message_91 = type(post_partial_request).from_bytes(message_bytes)
485
- assert message_91 == post_partial_request
486
- assert bytes(message_91) == bytes(post_partial_request)
484
+ message_91 = type(post_partial_payload).from_bytes(message_bytes)
485
+ assert message_91 == post_partial_payload
486
+ assert bytes(message_91) == bytes(post_partial_payload)
487
487
 
488
488
  message_bytes, input_bytes = parse_blob(input_bytes)
489
- message_92 = type(post_partial_response).from_bytes(message_bytes)
490
- assert message_92 == post_partial_response
491
- assert bytes(message_92) == bytes(post_partial_response)
489
+ message_92 = type(post_partial_request).from_bytes(message_bytes)
490
+ assert message_92 == post_partial_request
491
+ assert bytes(message_92) == bytes(post_partial_request)
492
492
 
493
493
  message_bytes, input_bytes = parse_blob(input_bytes)
494
- message_93 = type(get_farmer_response).from_bytes(message_bytes)
495
- assert message_93 == get_farmer_response
496
- assert bytes(message_93) == bytes(get_farmer_response)
494
+ message_93 = type(post_partial_response).from_bytes(message_bytes)
495
+ assert message_93 == post_partial_response
496
+ assert bytes(message_93) == bytes(post_partial_response)
497
497
 
498
498
  message_bytes, input_bytes = parse_blob(input_bytes)
499
- message_94 = type(post_farmer_payload).from_bytes(message_bytes)
500
- assert message_94 == post_farmer_payload
501
- assert bytes(message_94) == bytes(post_farmer_payload)
499
+ message_94 = type(get_farmer_response).from_bytes(message_bytes)
500
+ assert message_94 == get_farmer_response
501
+ assert bytes(message_94) == bytes(get_farmer_response)
502
502
 
503
503
  message_bytes, input_bytes = parse_blob(input_bytes)
504
- message_95 = type(post_farmer_request).from_bytes(message_bytes)
505
- assert message_95 == post_farmer_request
506
- assert bytes(message_95) == bytes(post_farmer_request)
504
+ message_95 = type(post_farmer_payload).from_bytes(message_bytes)
505
+ assert message_95 == post_farmer_payload
506
+ assert bytes(message_95) == bytes(post_farmer_payload)
507
507
 
508
508
  message_bytes, input_bytes = parse_blob(input_bytes)
509
- message_96 = type(post_farmer_response).from_bytes(message_bytes)
510
- assert message_96 == post_farmer_response
511
- assert bytes(message_96) == bytes(post_farmer_response)
509
+ message_96 = type(post_farmer_request).from_bytes(message_bytes)
510
+ assert message_96 == post_farmer_request
511
+ assert bytes(message_96) == bytes(post_farmer_request)
512
512
 
513
513
  message_bytes, input_bytes = parse_blob(input_bytes)
514
- message_97 = type(put_farmer_payload).from_bytes(message_bytes)
515
- assert message_97 == put_farmer_payload
516
- assert bytes(message_97) == bytes(put_farmer_payload)
514
+ message_97 = type(post_farmer_response).from_bytes(message_bytes)
515
+ assert message_97 == post_farmer_response
516
+ assert bytes(message_97) == bytes(post_farmer_response)
517
517
 
518
518
  message_bytes, input_bytes = parse_blob(input_bytes)
519
- message_98 = type(put_farmer_request).from_bytes(message_bytes)
520
- assert message_98 == put_farmer_request
521
- assert bytes(message_98) == bytes(put_farmer_request)
519
+ message_98 = type(put_farmer_payload).from_bytes(message_bytes)
520
+ assert message_98 == put_farmer_payload
521
+ assert bytes(message_98) == bytes(put_farmer_payload)
522
522
 
523
523
  message_bytes, input_bytes = parse_blob(input_bytes)
524
- message_99 = type(put_farmer_response).from_bytes(message_bytes)
525
- assert message_99 == put_farmer_response
526
- assert bytes(message_99) == bytes(put_farmer_response)
524
+ message_99 = type(put_farmer_request).from_bytes(message_bytes)
525
+ assert message_99 == put_farmer_request
526
+ assert bytes(message_99) == bytes(put_farmer_request)
527
527
 
528
528
  message_bytes, input_bytes = parse_blob(input_bytes)
529
- message_100 = type(error_response).from_bytes(message_bytes)
530
- assert message_100 == error_response
531
- assert bytes(message_100) == bytes(error_response)
529
+ message_100 = type(put_farmer_response).from_bytes(message_bytes)
530
+ assert message_100 == put_farmer_response
531
+ assert bytes(message_100) == bytes(put_farmer_response)
532
532
 
533
533
  message_bytes, input_bytes = parse_blob(input_bytes)
534
- message_101 = type(new_peak_timelord).from_bytes(message_bytes)
535
- assert message_101 == new_peak_timelord
536
- assert bytes(message_101) == bytes(new_peak_timelord)
534
+ message_101 = type(error_response).from_bytes(message_bytes)
535
+ assert message_101 == error_response
536
+ assert bytes(message_101) == bytes(error_response)
537
537
 
538
538
  message_bytes, input_bytes = parse_blob(input_bytes)
539
- message_102 = type(new_unfinished_block_timelord).from_bytes(message_bytes)
540
- assert message_102 == new_unfinished_block_timelord
541
- assert bytes(message_102) == bytes(new_unfinished_block_timelord)
539
+ message_102 = type(new_peak_timelord).from_bytes(message_bytes)
540
+ assert message_102 == new_peak_timelord
541
+ assert bytes(message_102) == bytes(new_peak_timelord)
542
542
 
543
543
  message_bytes, input_bytes = parse_blob(input_bytes)
544
- message_103 = type(new_infusion_point_vdf).from_bytes(message_bytes)
545
- assert message_103 == new_infusion_point_vdf
546
- assert bytes(message_103) == bytes(new_infusion_point_vdf)
544
+ message_103 = type(new_unfinished_block_timelord).from_bytes(message_bytes)
545
+ assert message_103 == new_unfinished_block_timelord
546
+ assert bytes(message_103) == bytes(new_unfinished_block_timelord)
547
547
 
548
548
  message_bytes, input_bytes = parse_blob(input_bytes)
549
- message_104 = type(new_signage_point_vdf).from_bytes(message_bytes)
550
- assert message_104 == new_signage_point_vdf
551
- assert bytes(message_104) == bytes(new_signage_point_vdf)
549
+ message_104 = type(new_infusion_point_vdf).from_bytes(message_bytes)
550
+ assert message_104 == new_infusion_point_vdf
551
+ assert bytes(message_104) == bytes(new_infusion_point_vdf)
552
552
 
553
553
  message_bytes, input_bytes = parse_blob(input_bytes)
554
- message_105 = type(new_end_of_sub_slot_bundle).from_bytes(message_bytes)
555
- assert message_105 == new_end_of_sub_slot_bundle
556
- assert bytes(message_105) == bytes(new_end_of_sub_slot_bundle)
554
+ message_105 = type(new_signage_point_vdf).from_bytes(message_bytes)
555
+ assert message_105 == new_signage_point_vdf
556
+ assert bytes(message_105) == bytes(new_signage_point_vdf)
557
557
 
558
558
  message_bytes, input_bytes = parse_blob(input_bytes)
559
- message_106 = type(request_compact_proof_of_time).from_bytes(message_bytes)
560
- assert message_106 == request_compact_proof_of_time
561
- assert bytes(message_106) == bytes(request_compact_proof_of_time)
559
+ message_106 = type(new_end_of_sub_slot_bundle).from_bytes(message_bytes)
560
+ assert message_106 == new_end_of_sub_slot_bundle
561
+ assert bytes(message_106) == bytes(new_end_of_sub_slot_bundle)
562
562
 
563
563
  message_bytes, input_bytes = parse_blob(input_bytes)
564
- message_107 = type(respond_compact_proof_of_time).from_bytes(message_bytes)
565
- assert message_107 == respond_compact_proof_of_time
566
- assert bytes(message_107) == bytes(respond_compact_proof_of_time)
564
+ message_107 = type(request_compact_proof_of_time).from_bytes(message_bytes)
565
+ assert message_107 == request_compact_proof_of_time
566
+ assert bytes(message_107) == bytes(request_compact_proof_of_time)
567
567
 
568
568
  message_bytes, input_bytes = parse_blob(input_bytes)
569
- message_108 = type(error_without_data).from_bytes(message_bytes)
570
- assert message_108 == error_without_data
571
- assert bytes(message_108) == bytes(error_without_data)
569
+ message_108 = type(respond_compact_proof_of_time).from_bytes(message_bytes)
570
+ assert message_108 == respond_compact_proof_of_time
571
+ assert bytes(message_108) == bytes(respond_compact_proof_of_time)
572
572
 
573
573
  message_bytes, input_bytes = parse_blob(input_bytes)
574
- message_109 = type(error_with_data).from_bytes(message_bytes)
575
- assert message_109 == error_with_data
576
- assert bytes(message_109) == bytes(error_with_data)
574
+ message_109 = type(error_without_data).from_bytes(message_bytes)
575
+ assert message_109 == error_without_data
576
+ assert bytes(message_109) == bytes(error_without_data)
577
+
578
+ message_bytes, input_bytes = parse_blob(input_bytes)
579
+ message_110 = type(error_with_data).from_bytes(message_bytes)
580
+ assert message_110 == error_with_data
581
+ assert bytes(message_110) == bytes(error_with_data)
577
582
 
578
583
  assert input_bytes == b""
@@ -194,6 +194,11 @@ def test_protocol_json() -> None:
194
194
  type(new_signage_point_harvester).from_json_dict(new_signage_point_harvester_json)
195
195
  == new_signage_point_harvester
196
196
  )
197
+ assert str(new_signage_point_harvester2_json) == str(new_signage_point_harvester2.to_json_dict())
198
+ assert (
199
+ type(new_signage_point_harvester2).from_json_dict(new_signage_point_harvester2_json)
200
+ == new_signage_point_harvester2
201
+ )
197
202
  assert str(new_proof_of_space_json) == str(new_proof_of_space.to_json_dict())
198
203
  assert type(new_proof_of_space).from_json_dict(new_proof_of_space_json) == new_proof_of_space
199
204
  assert str(request_signatures_json) == str(request_signatures.to_json_dict())
@@ -172,6 +172,7 @@ def test_missing_messages() -> None:
172
172
  "ProofOfSpaceFeeInfo",
173
173
  "NewProofOfSpace",
174
174
  "NewSignagePointHarvester",
175
+ "NewSignagePointHarvester2",
175
176
  "Plot",
176
177
  "PlotSyncDone",
177
178
  "PlotSyncError",
chia/farmer/farmer_api.py CHANGED
@@ -6,9 +6,10 @@ import time
6
6
  from typing import TYPE_CHECKING, Any, ClassVar, Optional, Union, cast
7
7
 
8
8
  import aiohttp
9
- from chia_rs import AugSchemeMPL, G2Element, PoolTarget, PrivateKey
9
+ from chia_rs import AugSchemeMPL, G2Element, PlotSize, PoolTarget, PrivateKey
10
10
  from chia_rs.sized_bytes import bytes32
11
11
  from chia_rs.sized_ints import uint8, uint16, uint32, uint64
12
+ from packaging.version import Version
12
13
 
13
14
  from chia import __version__
14
15
  from chia.consensus.pot_iterations import calculate_iterations_quality, calculate_sp_interval_iters
@@ -38,6 +39,7 @@ from chia.server.server import ssl_context_for_root
38
39
  from chia.server.ws_connection import WSChiaConnection
39
40
  from chia.ssl.create_ssl import get_mozilla_ca_crt
40
41
  from chia.types.blockchain_format.proof_of_space import (
42
+ calculate_prefix_bits,
41
43
  generate_plot_public_key,
42
44
  generate_taproot_sk,
43
45
  get_plot_id,
@@ -528,7 +530,8 @@ class FarmerAPI:
528
530
  p2_singleton_puzzle_hash,
529
531
  )
530
532
  )
531
- message = harvester_protocol.NewSignagePointHarvester(
533
+
534
+ message2 = harvester_protocol.NewSignagePointHarvester2(
532
535
  new_signage_point.challenge_hash,
533
536
  new_signage_point.difficulty,
534
537
  new_signage_point.sub_slot_iters,
@@ -539,8 +542,31 @@ class FarmerAPI:
539
542
  new_signage_point.last_tx_height,
540
543
  )
541
544
 
542
- msg = make_msg(ProtocolMessageTypes.new_signage_point_harvester, message)
543
- await self.farmer.server.send_to_all([msg], NodeType.HARVESTER)
545
+ # The plot size in the call to calculate_prefix_bits is only used
546
+ # to distinguish v1 and v2 plots. The value does not matter
547
+ message1 = harvester_protocol.NewSignagePointHarvester(
548
+ new_signage_point.challenge_hash,
549
+ new_signage_point.difficulty,
550
+ new_signage_point.sub_slot_iters,
551
+ new_signage_point.signage_point_index,
552
+ new_signage_point.challenge_chain_sp,
553
+ pool_difficulties,
554
+ uint8(
555
+ calculate_prefix_bits(self.farmer.constants, new_signage_point.peak_height, PlotSize.make_v1(32))
556
+ ),
557
+ )
558
+
559
+ def old_harvesters(conn: WSChiaConnection) -> bool:
560
+ return conn.protocol_version <= Version("0.0.36")
561
+
562
+ def new_harvesters(conn: WSChiaConnection) -> bool:
563
+ return conn.protocol_version > Version("0.0.36")
564
+
565
+ msg1 = make_msg(ProtocolMessageTypes.new_signage_point_harvester, message1)
566
+ await self.farmer.server.send_to_all_if([msg1], NodeType.HARVESTER, old_harvesters)
567
+
568
+ msg2 = make_msg(ProtocolMessageTypes.new_signage_point_harvester, message2)
569
+ await self.farmer.server.send_to_all_if([msg2], NodeType.HARVESTER, new_harvesters)
544
570
  except Exception as exception:
545
571
  # Remove here, as we want to reprocess the SP should it be sent again
546
572
  self.farmer.sps[new_signage_point.challenge_chain_sp].remove(new_signage_point)
@@ -30,6 +30,9 @@ class CoinStore:
30
30
  """
31
31
 
32
32
  db_wrapper: DBWrapper2
33
+ # Fall back to the `coin_puzzle_hash` index if the ff unspent index
34
+ # does not exist.
35
+ _unspent_lineage_for_ph_idx: str = "coin_puzzle_hash"
33
36
 
34
37
  @classmethod
35
38
  async def create(cls, db_wrapper: DBWrapper2) -> CoinStore:
@@ -82,6 +85,12 @@ class CoinStore:
82
85
  WHERE spent_index = -1
83
86
  """
84
87
  )
88
+ async with conn.execute(
89
+ "SELECT 1 FROM sqlite_master WHERE type = 'index' AND name = 'coin_record_ph_ff_unspent_idx'"
90
+ ) as cursor:
91
+ has_ff_unspent_idx = await cursor.fetchone() is not None
92
+ if has_ff_unspent_idx:
93
+ self._unspent_lineage_for_ph_idx = "coin_record_ph_ff_unspent_idx"
85
94
 
86
95
  return self
87
96
 
@@ -639,6 +648,7 @@ class CoinStore:
639
648
  "unspent.coin_parent, "
640
649
  "parent.coin_parent "
641
650
  "FROM coin_record AS unspent "
651
+ f"INDEXED BY {self._unspent_lineage_for_ph_idx} "
642
652
  "LEFT JOIN coin_record AS parent ON unspent.coin_parent = parent.coin_name "
643
653
  "WHERE unspent.spent_index = -1 "
644
654
  "AND parent.spent_index > 0 "
@@ -65,9 +65,9 @@ class HarvesterAPI:
65
65
  await self.harvester.plot_sync_sender.start()
66
66
  self.harvester.plot_manager.start_refreshing()
67
67
 
68
- @metadata.request(peer_required=True)
68
+ @metadata.request(peer_required=True, request_type=ProtocolMessageTypes.new_signage_point_harvester)
69
69
  async def new_signage_point_harvester(
70
- self, new_challenge: harvester_protocol.NewSignagePointHarvester, peer: WSChiaConnection
70
+ self, new_challenge: harvester_protocol.NewSignagePointHarvester2, peer: WSChiaConnection
71
71
  ) -> None:
72
72
  """
73
73
  The harvester receives a new signage point from the farmer, this happens at the start of each slot.
@@ -34,6 +34,20 @@ class HarvesterHandshake(Streamable):
34
34
  @streamable
35
35
  @dataclass(frozen=True)
36
36
  class NewSignagePointHarvester(Streamable):
37
+ challenge_hash: bytes32
38
+ difficulty: uint64
39
+ sub_slot_iters: uint64
40
+ signage_point_index: uint8
41
+ sp_hash: bytes32
42
+ pool_difficulties: list[PoolDifficulty]
43
+ filter_prefix_bits: uint8
44
+
45
+
46
+ # this message has the same message ID as NewSignagePointHarvester, but this
47
+ # message format is used if the protocol version is 0.0.37 or higher
48
+ @streamable
49
+ @dataclass(frozen=True)
50
+ class NewSignagePointHarvester2(Streamable):
37
51
  challenge_hash: bytes32
38
52
  difficulty: uint64
39
53
  sub_slot_iters: uint64
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chia-blockchain
3
- Version: 2.5.5rc6
3
+ Version: 2.5.6rc1
4
4
  Summary: Chia blockchain full node, farmer, timelord, and wallet.
5
5
  License: Apache-2.0
6
6
  Keywords: chia,blockchain,node
@@ -260,7 +260,7 @@ chia/_tests/util/benchmarks.py,sha256=0cl147e492XFhU8Ehj41oFW3mNM8nH-sKymw3i-4mv
260
260
  chia/_tests/util/bip39_test_vectors.json,sha256=dMvohwzIzOVHKz0eOSUH7MJiL5BiDwp-EP9C4_VmN50,10283
261
261
  chia/_tests/util/blockchain.py,sha256=mEkmyEUXZr9sG1poG0L5OLA7PW82XuhRS9mu84Iq67Y,5367
262
262
  chia/_tests/util/blockchain_mock.py,sha256=Kq5wcPwjIk717hmrZ5HPUUDGaMaVnbMziZSo2SQqxio,4964
263
- chia/_tests/util/build_network_protocol_files.py,sha256=mVMT6vXHfwtcDi2PKrW3-ujMBZ2TMc37F_Exw-wzJG0,11225
263
+ chia/_tests/util/build_network_protocol_files.py,sha256=HX_f_t8UfkxsZmvIi2vDH5zmub7X3U-Z9c79RPgcAaI,11299
264
264
  chia/_tests/util/clvm_generator.bin,sha256=ELP6vjY8NcvkdwA5EbLl34oRH5RuQwoPRYnMoY8yQS0,121543
265
265
  chia/_tests/util/coin_store.py,sha256=1DrlY9dTTewc13ZOhK-MbIr6efn6i1Eq8RoQngtLHtk,1116
266
266
  chia/_tests/util/config.py,sha256=TnSXuVC5W08HFB6LzmAU0fznQn7HZJCMqFETMafVLeg,53
@@ -272,9 +272,9 @@ chia/_tests/util/generator_tools_testing.py,sha256=o51smSD-2TMGdYLCxZQCDuK8dL5lO
272
272
  chia/_tests/util/get_name_puzzle_conditions.py,sha256=tTHn2YckaixWT8e8gGe0KBKVEsXq1IjoXvu2GEFlZeU,1493
273
273
  chia/_tests/util/key_tool.py,sha256=3IJx5dHZJ3yV4hxoF6MEGE6jC4GIo_MWkSRmIeaQnzQ,1576
274
274
  chia/_tests/util/misc.py,sha256=QdiaFsMNcq4-GSZNMYoHDAjyAgEkHK_V13q9vNt153Q,21614
275
- chia/_tests/util/network_protocol_data.py,sha256=knqTPfN9AUTV0Vb1KM4OTrnbc4EhWWBNSXAuvsKDTv4,37446
276
- chia/_tests/util/protocol_messages_bytes-v1.0,sha256=xwSlyG3aROl7kNgFZj_7pi13Og84t9w-m9KbrUXuMb8,50571
277
- chia/_tests/util/protocol_messages_json.py,sha256=OyY10fJYEylDOnbXBNn3dd3WQbo7CXC0vuHxfHJO7gI,182378
275
+ chia/_tests/util/network_protocol_data.py,sha256=zKY3iD0nqorMuZvLXUbmyyA0CJlvW5-C0qcC_eFQRb0,37840
276
+ chia/_tests/util/protocol_messages_bytes-v1.0,sha256=x7DvuJlS3fQFMc-AUJq_xDxfb1jDw4CYhVL-H83Fn6A,50709
277
+ chia/_tests/util/protocol_messages_json.py,sha256=3IciZgUZcZGIWpolRsZVPDkOT61NYxPNiK5Z0OzTvKk,183022
278
278
  chia/_tests/util/rpc.py,sha256=g-vf7Nnp9Myr588lR2uyRs12eeQ1FIJ73h4FTFqiUeo,825
279
279
  chia/_tests/util/run_block.py,sha256=voyn8JJnGaG_M6QrdSB21lZ79I9ocFXtrXruo9cDgaI,5929
280
280
  chia/_tests/util/setup_nodes.py,sha256=_V0iddxULqWF1WQ8aSTN4KqXjJVZcXifEPbihnGWFYE,18409
@@ -297,9 +297,9 @@ chia/_tests/util/test_limited_semaphore.py,sha256=r2XPXc7vhdDzlwcEz9MRYmbZPs-BM3
297
297
  chia/_tests/util/test_logging_filter.py,sha256=omO-zPdaoR4vDAUeR-Ar2WNlREyxAnr4rP9HaYoloVo,1239
298
298
  chia/_tests/util/test_misc.py,sha256=vXPEoamAfTGMM55u1nxlMCO6pvUyVeH0qNzJs9_x1EI,13918
299
299
  chia/_tests/util/test_network.py,sha256=VM1mqnJ062bzdUxMnEYs0CeKjDlZclXglSpaminTmQM,2898
300
- chia/_tests/util/test_network_protocol_files.py,sha256=BgZP1xWM7J1Q6ZSY1LoM610PV9JFLDFdiaBtbDhxHwo,26518
301
- chia/_tests/util/test_network_protocol_json.py,sha256=nzp1DHdT7wgpPlVGh5QD_K_KvbmMmkL4aXbwWax_dh8,21326
302
- chia/_tests/util/test_network_protocol_test.py,sha256=gjGPLb6NDj0z-2XdQIh7KKA7suhelprmJsBfAGWW4Ic,8219
300
+ chia/_tests/util/test_network_protocol_files.py,sha256=HBkbpfkc3ATZG1S4PUshxgRBPOGZJ8nGPMx6teGeAq0,26779
301
+ chia/_tests/util/test_network_protocol_json.py,sha256=P86ggVruqS4uspMhQXWbjmh5Fv5Ar1Bh5ofdnDikZus,21580
302
+ chia/_tests/util/test_network_protocol_test.py,sha256=ERejqj833K-fmNzjdNpa3SO0iNA3YJ1dAwoXPc9Z36s,8256
303
303
  chia/_tests/util/test_paginator.py,sha256=IXiFXy9dccLsQNL1q_N4R4uMx42w2IZegIRmBFvCgjw,2304
304
304
  chia/_tests/util/test_pprint.py,sha256=sgi0nIJjJopbxZV5VVQmurorsi6spTpTHpIdgaPlKls,660
305
305
  chia/_tests/util/test_priority_mutex.py,sha256=jD_R_W7WE9Cvje_qerttipwI51U9-9sfsSOX7xfcdYs,16219
@@ -516,7 +516,7 @@ chia/data_layer/util/benchmark.py,sha256=sdP_kQYNxySJVDVGrMG9P99QStAMUC4OLnUFqpH
516
516
  chia/data_layer/util/plugin.py,sha256=jsU654JfiAsIy2rsAXPSnN9bU3usYJrRYY5m7yGccKU,1567
517
517
  chia/farmer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
518
518
  chia/farmer/farmer.py,sha256=JLO0_fdfQJAZpE1wt6dbpNF31dPCL5dg6hu28sZt9eA,45123
519
- chia/farmer/farmer_api.py,sha256=I7vrFaaFr2b61dvNL5DSSjaCgLCkRvmoYO4okCnxeGM,40111
519
+ chia/farmer/farmer_api.py,sha256=_LlWMpUIYna6cg_eQ2mIv37oO27DWNugQ-qEAiEBvpg,41340
520
520
  chia/farmer/farmer_rpc_api.py,sha256=OzA_-9-3rUenp1ucli0f--8sV2UhmVb6nNFSc5iSj1o,14231
521
521
  chia/farmer/farmer_rpc_client.py,sha256=TEsS5A_-LjrdfPIOX3UnMNPeZkhGpw3sj9w7ZZGW7aI,3928
522
522
  chia/full_node/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -525,7 +525,7 @@ chia/full_node/block_height_map.py,sha256=EOB6egK8jLWuFGmYW54uo6YmLFipcx0GoAbzV-
525
525
  chia/full_node/block_store.py,sha256=Kd5gWjotNC_ffEqUUXFfoJjF0e5xx0o-D1fBm-0ilAY,24535
526
526
  chia/full_node/bundle_tools.py,sha256=M-YSytA29mAIoteQ1FzfMrQYbbrzGXsXT0HSDjHaw3Y,854
527
527
  chia/full_node/check_fork_next_block.py,sha256=l2N-iW8GYdA9CkHLUDXuntuiLtG4jPcALFm00IflajQ,1434
528
- chia/full_node/coin_store.py,sha256=Fm-2NJtQvjK5psv_WrkX4ZQI1ek3YDcKo7VAnwMaG1k,29158
528
+ chia/full_node/coin_store.py,sha256=w8gOjHpGegf4QLH4k2oMe7KO3uTlGLaajWVhGh1EHTc,29739
529
529
  chia/full_node/eligible_coin_spends.py,sha256=FLwwOUaFJSnWCekdYwmCaRFizx-0vgc0u9-v1AeXLTA,16844
530
530
  chia/full_node/fee_estimate_store.py,sha256=Llp44WEeJmvafq2BDO_n4a6UeCY2wB6g52ImoLGxAOo,526
531
531
  chia/full_node/fee_estimation.py,sha256=ZpXoVHa8IS5ZeE0GLk7Fm1AYED2NVC2c7-N7WARr4lo,2903
@@ -553,7 +553,7 @@ chia/full_node/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
553
553
  chia/full_node/weight_proof.py,sha256=yTtTag1hemH3gw6K9XwFBPLWliAuzde5kY4zS-6V_pU,71307
554
554
  chia/harvester/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
555
555
  chia/harvester/harvester.py,sha256=oJOH9l8ymSqPraqWlWzWf0vBGBbM2CFkgFOfOEXSpeE,11828
556
- chia/harvester/harvester_api.py,sha256=F_95hNNexuXY2ejv9ZwdF-qtiN2-pEsoLxqObpWDDCg,19274
556
+ chia/harvester/harvester_api.py,sha256=I3q8z6HNNA0oEs_mOf6gP4AgC_foFiLwW-zlkcEWZdc,19338
557
557
  chia/harvester/harvester_rpc_api.py,sha256=N3o5PIgtEHSwxrLWw1pV-qDQb8JUfeu054FckK23MzE,6643
558
558
  chia/harvester/harvester_rpc_client.py,sha256=T1o_-Le1SMLTCEZ8Cnt8nC42UMD-92qU0w60ZPvgtSc,2262
559
559
  chia/introducer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -588,7 +588,7 @@ chia/protocols/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
588
588
  chia/protocols/farmer_protocol.py,sha256=Dv8tZpiQEkIjsay8WxP7uXcGBLkJCPySGPu--I4lWmo,2795
589
589
  chia/protocols/fee_estimate.py,sha256=vKeArjfEjOEuwGpV0dDXOYbVJUQmb3E8LVfaGs-SmPI,1795
590
590
  chia/protocols/full_node_protocol.py,sha256=rlo2MosotA5YCRqiB7kzOE5yn2NKpQRGHM-AB6I8mzs,4427
591
- chia/protocols/harvester_protocol.py,sha256=cOaouqDgqG9Zqn6-lnA70h02OL0s4Gy54YuedUSMOXw,5583
591
+ chia/protocols/harvester_protocol.py,sha256=gjJzsZ7EJ0tHyfMS2LcvLiUwk24EK5Fy-dRXDjsSjao,6016
592
592
  chia/protocols/introducer_protocol.py,sha256=qx-LGovClxzlqqrzFdrIiTps1-froMauD6HLEGZE1nQ,576
593
593
  chia/protocols/outbound_message.py,sha256=Wkl-l8o_9LXZi5HFlamIdrg0BmpX4SL7LvBj2TNbVnE,825
594
594
  chia/protocols/pool_protocol.py,sha256=LiZWLX6nzghUr74yWjl96RRObok2jtWvnrr5JQALqLo,3989
@@ -891,8 +891,8 @@ chia/wallet/wallet_user_store.py,sha256=rXiQpk5g8t1X0Chx0bValcQsHonjB1oQ_F_K16bp
891
891
  chia/wallet/wallet_weight_proof_handler.py,sha256=IcQg_w8EPjpS9xwmEE8GvPcneLePOtu74wWUu1l5uuM,4875
892
892
  chia/wallet/wsm_apis.py,sha256=6LmxbHXC-tqNbRyoiGgz-f19PF1nEfMbfm3BTnsNQ6s,3914
893
893
  mozilla-ca/cacert.pem,sha256=qz7jZRl3pBeKcCsLgopO57K7uRJyNbCrdA4uFZdL9ds,222971
894
- chia_blockchain-2.5.5rc6.dist-info/LICENSE,sha256=0tuU-jTzeRDJJaxF2YCEpBwbywgpbrVSXq1i6fJq63U,11347
895
- chia_blockchain-2.5.5rc6.dist-info/METADATA,sha256=E38JBxmQ1DRI5S9WlRGc0QZiW0R2Y-1ElIg2eY6Zgio,10687
896
- chia_blockchain-2.5.5rc6.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
897
- chia_blockchain-2.5.5rc6.dist-info/entry_points.txt,sha256=GL2-UvicPVdKz72IP4shnmV3XImfoD5pMzoURfoAYk4,742
898
- chia_blockchain-2.5.5rc6.dist-info/RECORD,,
894
+ chia_blockchain-2.5.6rc1.dist-info/LICENSE,sha256=0tuU-jTzeRDJJaxF2YCEpBwbywgpbrVSXq1i6fJq63U,11347
895
+ chia_blockchain-2.5.6rc1.dist-info/METADATA,sha256=vcwekHov8cBScaYIvNOKavhE7RQ9tYoRwLruA2rqipU,10687
896
+ chia_blockchain-2.5.6rc1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
897
+ chia_blockchain-2.5.6rc1.dist-info/entry_points.txt,sha256=GL2-UvicPVdKz72IP4shnmV3XImfoD5pMzoURfoAYk4,742
898
+ chia_blockchain-2.5.6rc1.dist-info/RECORD,,