@@ -334,11 +334,11 @@ async def test_v2_quality_chains_new_sp_hash(
334
334
farmer = farmer_api .farmer
335
335
336
336
sp_hash = bytes32 (b"1" * 32 )
337
- v2_quality_chains = harvester_protocol .V2QualityChains (
337
+ v2_quality_chains = harvester_protocol .PartialProofsData (
338
338
challenge_hash = bytes32 (b"2" * 32 ),
339
339
sp_hash = sp_hash ,
340
340
plot_identifier = "test_plot_id" ,
341
- quality_chains = [b"test_quality_chain_1" ],
341
+ partial_proofs = [b"test_quality_chain_1" ],
342
342
signage_point_index = uint8 (0 ),
343
343
plot_size = uint8 (32 ),
344
344
difficulty = uint64 (1000 ),
@@ -348,7 +348,7 @@ async def test_v2_quality_chains_new_sp_hash(
348
348
)
349
349
350
350
harvester_peer = await get_harvester_peer (farmer )
351
- await farmer_api .v2_quality_chains (v2_quality_chains , harvester_peer )
351
+ await farmer_api .partial_proofs (v2_quality_chains , harvester_peer )
352
352
353
353
assert sp_hash in farmer .number_of_responses
354
354
assert farmer .number_of_responses [sp_hash ] == 0
@@ -364,11 +364,11 @@ async def test_v2_quality_chains_missing_sp_hash(
364
364
farmer_api = farmer_service ._api
365
365
366
366
sp_hash = bytes32 (b"1" * 32 )
367
- v2_quality_chains = harvester_protocol .V2QualityChains (
367
+ v2_quality_chains = harvester_protocol .PartialProofsData (
368
368
challenge_hash = bytes32 (b"2" * 32 ),
369
369
sp_hash = sp_hash ,
370
370
plot_identifier = "test_plot_id" ,
371
- quality_chains = [b"test_quality_chain_1" ],
371
+ partial_proofs = [b"test_quality_chain_1" ],
372
372
signage_point_index = uint8 (0 ),
373
373
plot_size = uint8 (32 ),
374
374
difficulty = uint64 (1000 ),
@@ -378,13 +378,13 @@ async def test_v2_quality_chains_missing_sp_hash(
378
378
)
379
379
380
380
harvester_peer = await get_harvester_peer (farmer_api .farmer )
381
- await farmer_api .v2_quality_chains (v2_quality_chains , harvester_peer )
381
+ await farmer_api .partial_proofs (v2_quality_chains , harvester_peer )
382
382
383
383
assert f"Received V2 quality collection for a signage point that we do not have { sp_hash } " in caplog .text
384
384
385
385
386
386
@pytest .mark .anyio
387
- async def test_v2_quality_chains_with_existing_sp (
387
+ async def test_v2_partial_proofs_with_existing_sp (
388
388
farmer_one_harvester_solver : tuple [list [HarvesterService ], FarmerService , SolverService , BlockTools ],
389
389
) -> None :
390
390
_ , farmer_service , _ , _ = farmer_one_harvester_solver
@@ -407,11 +407,11 @@ async def test_v2_quality_chains_with_existing_sp(
407
407
408
408
farmer .sps [sp_hash ] = [sp ]
409
409
410
- v2_quality_chains = harvester_protocol .V2QualityChains (
410
+ partial_proofs = harvester_protocol .PartialProofsData (
411
411
challenge_hash = challenge_hash ,
412
412
sp_hash = sp_hash ,
413
413
plot_identifier = "test_plot_id" ,
414
- quality_chains = [b"test_quality_chain_1" , b"test_quality_chain_2" ],
414
+ partial_proofs = [b"test_quality_chain_1" , b"test_quality_chain_2" ],
415
415
signage_point_index = uint8 (0 ),
416
416
plot_size = uint8 (32 ),
417
417
difficulty = uint64 (1000 ),
@@ -421,7 +421,7 @@ async def test_v2_quality_chains_with_existing_sp(
421
421
)
422
422
423
423
harvester_peer = await get_harvester_peer (farmer )
424
- await farmer_api .v2_quality_chains ( v2_quality_chains , harvester_peer )
424
+ await farmer_api .partial_proofs ( partial_proofs , harvester_peer )
425
425
426
426
# should store 2 pending requests (one per quality)
427
427
assert len (farmer .pending_solver_requests ) == 2
@@ -441,11 +441,11 @@ async def test_solution_response_handler(
441
441
sp_hash = bytes32 (b"1" * 32 )
442
442
challenge_hash = bytes32 (b"2" * 32 )
443
443
444
- v2_quality_chains = harvester_protocol .V2QualityChains (
444
+ v2_quality_chains = harvester_protocol .PartialProofsData (
445
445
challenge_hash = challenge_hash ,
446
446
sp_hash = sp_hash ,
447
447
plot_identifier = "test_plot_id" ,
448
- quality_chains = [b"test_quality_chain_for_quality" ],
448
+ partial_proofs = [b"test_quality_chain_for_quality" ],
449
449
signage_point_index = uint8 (0 ),
450
450
plot_size = uint8 (32 ),
451
451
difficulty = uint64 (1000 ),
@@ -458,12 +458,12 @@ async def test_solution_response_handler(
458
458
459
459
# manually add pending request
460
460
farmer .pending_solver_requests [quality ] = {
461
- "quality_data " : v2_quality_chains ,
461
+ "proof_data " : v2_quality_chains ,
462
462
"peer" : harvester_peer ,
463
463
}
464
464
465
465
# create solution response
466
- solution_response = solver_protocol .SolverResponse (quality_chain = quality , proof = b"test_proof_from_solver" )
466
+ solution_response = solver_protocol .SolverResponse (partial_proof = quality , proof = b"test_proof_from_solver" )
467
467
solver_peer = Mock ()
468
468
solver_peer .peer_node_id = "solver_peer"
469
469
@@ -495,7 +495,7 @@ async def test_solution_response_unknown_quality(
495
495
solver_peer = await get_solver_peer (farmer )
496
496
497
497
# create solution response with unknown quality
498
- solution_response = solver_protocol .SolverResponse (quality_chain = bytes (b"1" * 32 ), proof = b"test_proof" )
498
+ solution_response = solver_protocol .SolverResponse (partial_proof = bytes (b"1" * 32 ), proof = b"test_proof" )
499
499
500
500
with unittest .mock .patch .object (farmer_api , "new_proof_of_space" , new_callable = AsyncMock ) as mock_new_proof :
501
501
await farmer_api .solution_response (solution_response , solver_peer )
@@ -519,11 +519,11 @@ async def test_solution_response_empty_proof(
519
519
sp_hash = bytes32 (b"1" * 32 )
520
520
challenge_hash = bytes32 (b"2" * 32 )
521
521
522
- v2_quality_chains = harvester_protocol .V2QualityChains (
522
+ v2_quality_chains = harvester_protocol .PartialProofsData (
523
523
challenge_hash = challenge_hash ,
524
524
sp_hash = sp_hash ,
525
525
plot_identifier = "test_plot_id" ,
526
- quality_chains = [b"test_quality_chain_for_quality" ],
526
+ partial_proofs = [b"test_quality_chain_for_quality" ],
527
527
signage_point_index = uint8 (0 ),
528
528
plot_size = uint8 (32 ),
529
529
difficulty = uint64 (1000 ),
@@ -537,15 +537,15 @@ async def test_solution_response_empty_proof(
537
537
538
538
# manually add pending request
539
539
farmer .pending_solver_requests [quality ] = {
540
- "quality_data " : v2_quality_chains ,
540
+ "proof_data " : v2_quality_chains ,
541
541
"peer" : harvester_peer ,
542
542
}
543
543
544
544
# get real solver peer connection
545
545
solver_peer = await get_solver_peer (farmer )
546
546
547
547
# create solution response with empty proof
548
- solution_response = solver_protocol .SolverResponse (quality_chain = quality , proof = b"" )
548
+ solution_response = solver_protocol .SolverResponse (partial_proof = quality , proof = b"" )
549
549
550
550
with unittest .mock .patch .object (farmer_api , "new_proof_of_space" , new_callable = AsyncMock ) as mock_new_proof :
551
551
await farmer_api .solution_response (solution_response , solver_peer )
@@ -582,11 +582,11 @@ async def test_v2_quality_chains_solver_exception(
582
582
583
583
farmer .sps [sp_hash ] = [sp ]
584
584
585
- v2_quality_chains = harvester_protocol .V2QualityChains (
585
+ v2_quality_chains = harvester_protocol .PartialProofsData (
586
586
challenge_hash = challenge_hash ,
587
587
sp_hash = sp_hash ,
588
588
plot_identifier = "test_plot_id" ,
589
- quality_chains = [b"test_quality_chain_1" ],
589
+ partial_proofs = [b"test_quality_chain_1" ],
590
590
signage_point_index = uint8 (0 ),
591
591
plot_size = uint8 (32 ),
592
592
difficulty = uint64 (1000 ),
@@ -599,7 +599,7 @@ async def test_v2_quality_chains_solver_exception(
599
599
600
600
# Mock send_to_all to raise an exception
601
601
with unittest .mock .patch .object (farmer .server , "send_to_all" , side_effect = Exception ("Solver connection failed" )):
602
- await farmer_api .v2_quality_chains (v2_quality_chains , harvester_peer )
602
+ await farmer_api .partial_proofs (v2_quality_chains , harvester_peer )
603
603
604
604
# verify pending request was cleaned up after exception
605
605
quality = bytes32 (b"3" * 32 )
0 commit comments