@@ -338,9 +338,11 @@ async def test_v2_partial_proofs_new_sp_hash(
338338 challenge_hash = bytes32 (b"2" * 32 ),
339339 sp_hash = sp_hash ,
340340 plot_identifier = "test_plot_id" ,
341- partial_proofs = [b"test_partial_proof_1" ],
341+ partial_proofs = [[ uint64 ( 1 ), uint64 ( 2 ), uint64 ( 3 ), uint64 ( 4 )] ],
342342 signage_point_index = uint8 (0 ),
343343 plot_size = uint8 (32 ),
344+ strength = uint8 (5 ),
345+ plot_id = bytes32 .fromhex ("abababababababababababababababababababababababababababababababab" ),
344346 pool_public_key = None ,
345347 pool_contract_puzzle_hash = bytes32 (b"4" * 32 ),
346348 plot_public_key = G1Element (),
@@ -367,9 +369,11 @@ async def test_v2_partial_proofs_missing_sp_hash(
367369 challenge_hash = bytes32 (b"2" * 32 ),
368370 sp_hash = sp_hash ,
369371 plot_identifier = "test_plot_id" ,
370- partial_proofs = [b"test_partial_proof_1" ],
372+ partial_proofs = [[ uint64 ( 1 ), uint64 ( 2 ), uint64 ( 3 ), uint64 ( 4 )] ],
371373 signage_point_index = uint8 (0 ),
372374 plot_size = uint8 (32 ),
375+ plot_id = bytes32 .fromhex ("abababababababababababababababababababababababababababababababab" ),
376+ strength = uint8 (5 ),
373377 pool_public_key = None ,
374378 pool_contract_puzzle_hash = bytes32 (b"4" * 32 ),
375379 plot_public_key = G1Element (),
@@ -409,9 +413,11 @@ async def test_v2_partial_proofs_with_existing_sp(
409413 challenge_hash = challenge_hash ,
410414 sp_hash = sp_hash ,
411415 plot_identifier = "test_plot_id" ,
412- partial_proofs = [b"test_partial_proof_1" , b"test_partial_proof_2" ],
416+ partial_proofs = [[ uint64 ( 1 ), uint64 ( 2 ), uint64 ( 3 ), uint64 ( 4 )], [ uint64 ( 2 ), uint64 ( 3 ), uint64 ( 4 ), uint64 ( 5 )] ],
413417 signage_point_index = uint8 (0 ),
414418 plot_size = uint8 (32 ),
419+ plot_id = bytes32 .fromhex ("abababababababababababababababababababababababababababababababab" ),
420+ strength = uint8 (5 ),
415421 pool_public_key = G1Element (),
416422 pool_contract_puzzle_hash = bytes32 (b"4" * 32 ),
417423 plot_public_key = G1Element (),
@@ -441,9 +447,11 @@ async def test_solution_response_handler(
441447 challenge_hash = challenge_hash ,
442448 sp_hash = sp_hash ,
443449 plot_identifier = "test_plot_id" ,
444- partial_proofs = [b"test_partial_proof_for_quality" ],
450+ partial_proofs = [[ uint64 ( 1 ), uint64 ( 2 ), uint64 ( 3 ), uint64 ( 4 )] ],
445451 signage_point_index = uint8 (0 ),
446452 plot_size = uint8 (32 ),
453+ plot_id = bytes32 .fromhex ("abababababababababababababababababababababababababababababababab" ),
454+ strength = uint8 (5 ),
447455 pool_public_key = G1Element (),
448456 pool_contract_puzzle_hash = bytes32 (b"4" * 32 ),
449457 plot_public_key = G1Element (),
@@ -452,7 +460,8 @@ async def test_solution_response_handler(
452460 harvester_peer = await get_harvester_peer (farmer )
453461
454462 # manually add pending request
455- farmer .pending_solver_requests [partial_proofs .partial_proofs [0 ]] = {
463+ key = bytes (partial_proofs .partial_proofs [0 ])
464+ farmer .pending_solver_requests [key ] = {
456465 "proof_data" : partial_proofs ,
457466 "peer" : harvester_peer ,
458467 }
@@ -477,7 +486,8 @@ async def test_solution_response_handler(
477486 assert original_peer == harvester_peer
478487
479488 # verify pending request was removed
480- assert partial_proofs .partial_proofs [0 ] not in farmer .pending_solver_requests
489+ key = bytes (partial_proofs .partial_proofs [0 ])
490+ assert key not in farmer .pending_solver_requests
481491
482492
483493@pytest .mark .anyio
@@ -492,7 +502,9 @@ async def test_solution_response_unknown_quality(
492502 solver_peer = await get_solver_peer (farmer )
493503
494504 # create solution response with unknown quality
495- solution_response = solver_protocol .SolverResponse (partial_proof = bytes (b"1" * 32 ), proof = b"test_proof" )
505+ solution_response = solver_protocol .SolverResponse (
506+ partial_proof = [uint64 (1 ), uint64 (2 ), uint64 (3 ), uint64 (4 )], proof = b"test_proof"
507+ )
496508
497509 with unittest .mock .patch .object (farmer_api , "new_proof_of_space" , new_callable = AsyncMock ) as mock_new_proof :
498510 await farmer_api .solution_response (solution_response , solver_peer )
@@ -518,9 +530,11 @@ async def test_solution_response_empty_proof(
518530 challenge_hash = challenge_hash ,
519531 sp_hash = sp_hash ,
520532 plot_identifier = "test_plot_id" ,
521- partial_proofs = [b"test_partial_proof_for_quality" ],
533+ partial_proofs = [[ uint64 ( 1 ), uint64 ( 2 ), uint64 ( 3 ), uint64 ( 4 )], [ uint64 ( 2 ), uint64 ( 3 ), uint64 ( 4 ), uint64 ( 5 )] ],
522534 signage_point_index = uint8 (0 ),
523535 plot_size = uint8 (32 ),
536+ plot_id = bytes32 .fromhex ("abababababababababababababababababababababababababababababababab" ),
537+ strength = uint8 (5 ),
524538 pool_public_key = G1Element (),
525539 pool_contract_puzzle_hash = bytes32 (b"4" * 32 ),
526540 plot_public_key = G1Element (),
@@ -530,8 +544,9 @@ async def test_solution_response_empty_proof(
530544 harvester_peer .peer_node_id = "harvester_peer"
531545
532546 # manually add pending request
533- farmer .pending_solver_requests [partial_proofs .partial_proofs [0 ]] = {
534- "proof_data" : partial_proofs .partial_proofs [0 ],
547+ key = bytes (partial_proofs .partial_proofs [0 ])
548+ farmer .pending_solver_requests [key ] = {
549+ "proof_data" : partial_proofs ,
535550 "peer" : harvester_peer ,
536551 }
537552
@@ -548,7 +563,8 @@ async def test_solution_response_empty_proof(
548563 mock_new_proof .assert_not_called ()
549564
550565 # verify pending request was removed (cleanup still happens)
551- assert partial_proofs .partial_proofs [0 ] not in farmer .pending_solver_requests
566+ key = bytes (partial_proofs .partial_proofs [0 ])
567+ assert key not in farmer .pending_solver_requests
552568
553569
554570@pytest .mark .anyio
@@ -579,9 +595,11 @@ async def test_v2_partial_proofs_solver_exception(
579595 challenge_hash = challenge_hash ,
580596 sp_hash = sp_hash ,
581597 plot_identifier = "test_plot_id" ,
582- partial_proofs = [b"test_partial_proof_1" ],
598+ partial_proofs = [[ uint64 ( 1 ), uint64 ( 2 ), uint64 ( 3 ), uint64 ( 4 )], [ uint64 ( 2 ), uint64 ( 3 ), uint64 ( 4 ), uint64 ( 5 )] ],
583599 signage_point_index = uint8 (0 ),
584600 plot_size = uint8 (32 ),
601+ plot_id = bytes32 .fromhex ("abababababababababababababababababababababababababababababababab" ),
602+ strength = uint8 (5 ),
585603 pool_public_key = G1Element (),
586604 pool_contract_puzzle_hash = bytes32 (b"4" * 32 ),
587605 plot_public_key = G1Element (),
@@ -594,4 +612,5 @@ async def test_v2_partial_proofs_solver_exception(
594612 await farmer_api .partial_proofs (partial_proofs , harvester_peer )
595613
596614 # verify pending request was cleaned up after exception
597- assert partial_proofs .partial_proofs [0 ] not in farmer .pending_solver_requests
615+ key = bytes (partial_proofs .partial_proofs [0 ])
616+ assert key not in farmer .pending_solver_requests
0 commit comments