chia-blockchain 2.5.6rc2__py3-none-any.whl → 2.5.7rc2__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.
Files changed (371) hide show
  1. chia/_tests/blockchain/blockchain_test_utils.py +6 -7
  2. chia/_tests/blockchain/test_augmented_chain.py +4 -3
  3. chia/_tests/blockchain/test_blockchain.py +10 -5
  4. chia/_tests/clvm/coin_store.py +1 -1
  5. chia/_tests/cmds/cmd_test_utils.py +84 -97
  6. chia/_tests/cmds/test_dev_gh.py +1 -1
  7. chia/_tests/cmds/test_farm_cmd.py +56 -2
  8. chia/_tests/cmds/wallet/test_consts.py +3 -1
  9. chia/_tests/cmds/wallet/test_did.py +3 -8
  10. chia/_tests/cmds/wallet/test_nft.py +6 -6
  11. chia/_tests/cmds/wallet/test_notifications.py +39 -21
  12. chia/_tests/cmds/wallet/test_vcs.py +2 -1
  13. chia/_tests/cmds/wallet/test_wallet.py +160 -136
  14. chia/_tests/conftest.py +51 -26
  15. chia/_tests/core/cmds/test_wallet.py +4 -3
  16. chia/_tests/core/consensus/test_pot_iterations.py +71 -24
  17. chia/_tests/core/custom_types/test_proof_of_space.py +60 -30
  18. chia/_tests/core/custom_types/test_spend_bundle.py +1 -4
  19. chia/_tests/core/data_layer/conftest.py +7 -2
  20. chia/_tests/core/data_layer/old_format/__init__.py +0 -0
  21. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-005876c1cdc4d5f1726551b207b9f63efc9cd2f72df80a3a26a1ba73d40d6745-delta-23-v1.0.dat +0 -0
  22. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-005876c1cdc4d5f1726551b207b9f63efc9cd2f72df80a3a26a1ba73d40d6745-full-23-v1.0.dat +0 -0
  23. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-01b36e72a975cdc00d6514eea81668d19e8ea3150217ae98cb3361688a016fab-delta-9-v1.0.dat +0 -0
  24. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-01b36e72a975cdc00d6514eea81668d19e8ea3150217ae98cb3361688a016fab-full-9-v1.0.dat +0 -0
  25. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-06147c3b12d73e9b83b686a8c10b4a36a513c8a93c0ff99ae197f06326278be9-delta-5-v1.0.dat +0 -0
  26. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-06147c3b12d73e9b83b686a8c10b4a36a513c8a93c0ff99ae197f06326278be9-full-5-v1.0.dat +0 -0
  27. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-073c051a5934ad3b8db39eee2189e4300e55f48aaa17ff4ae30eeae088ff544a-delta-22-v1.0.dat +0 -0
  28. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-073c051a5934ad3b8db39eee2189e4300e55f48aaa17ff4ae30eeae088ff544a-full-22-v1.0.dat +0 -0
  29. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-0cc077559b9c7b4aefe8f8f591c195e0779bebdf89f2ad8285a00ea5f859d965-delta-1-v1.0.dat +0 -0
  30. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-0cc077559b9c7b4aefe8f8f591c195e0779bebdf89f2ad8285a00ea5f859d965-full-1-v1.0.dat +0 -0
  31. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-16377275567b723b20936d3f1ec0a2fd83f6ac379b922351a5e4c54949069f3b-delta-2-v1.0.dat +0 -0
  32. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-16377275567b723b20936d3f1ec0a2fd83f6ac379b922351a5e4c54949069f3b-full-2-v1.0.dat +0 -0
  33. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-1cb824a7a5f02cd30ac6c38e8f6216780d9bfa2d24811d282a368dcd541438a7-delta-29-v1.0.dat +0 -0
  34. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-1cb824a7a5f02cd30ac6c38e8f6216780d9bfa2d24811d282a368dcd541438a7-full-29-v1.0.dat +0 -0
  35. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-27b89dc4809ebc5a3b87757d35e95e2761d978cf121e44fa2773a5c06e4cc7b5-delta-28-v1.0.dat +0 -0
  36. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-27b89dc4809ebc5a3b87757d35e95e2761d978cf121e44fa2773a5c06e4cc7b5-full-28-v1.0.dat +0 -0
  37. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-28a6b7c134abfaeb0ab58a018313f6c87a61a40a4d9ec9bedf53aa1d12f3ee37-delta-7-v1.0.dat +0 -0
  38. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-28a6b7c134abfaeb0ab58a018313f6c87a61a40a4d9ec9bedf53aa1d12f3ee37-full-7-v1.0.dat +0 -0
  39. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-30a6bfe7cecbeda259a295dc6de3a436357f52388c3b03d86901e7da68565aeb-delta-19-v1.0.dat +0 -0
  40. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-30a6bfe7cecbeda259a295dc6de3a436357f52388c3b03d86901e7da68565aeb-full-19-v1.0.dat +0 -0
  41. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-343a2bf9add798e3ac2e6a571823cf9fa7e8a1bed532143354ead2648bd036ef-delta-10-v1.0.dat +0 -0
  42. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-343a2bf9add798e3ac2e6a571823cf9fa7e8a1bed532143354ead2648bd036ef-full-10-v1.0.dat +0 -0
  43. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-4d90efbc1fb3df324193831ea4a57dd5e10e67d9653343eb18d178272adb0447-delta-17-v1.0.dat +0 -0
  44. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-4d90efbc1fb3df324193831ea4a57dd5e10e67d9653343eb18d178272adb0447-full-17-v1.0.dat +0 -0
  45. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-4dd2ea099e91635c441f40b36d3f84078a2d818d2dc601c7278e72cbdfe3eca8-delta-20-v1.0.dat +0 -0
  46. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-4dd2ea099e91635c441f40b36d3f84078a2d818d2dc601c7278e72cbdfe3eca8-full-20-v1.0.dat +0 -0
  47. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-509effbdca78639023b933ce6c08a0465fb247e1cd5329e9e9c553940e4b6e46-delta-31-v1.0.dat +0 -0
  48. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-509effbdca78639023b933ce6c08a0465fb247e1cd5329e9e9c553940e4b6e46-full-31-v1.0.dat +0 -0
  49. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-5379a4d9ff29c29d1ef0906d22e82c52472753d31806189ab813c43365341b78-delta-40-v1.0.dat +0 -0
  50. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-5379a4d9ff29c29d1ef0906d22e82c52472753d31806189ab813c43365341b78-full-40-v1.0.dat +0 -0
  51. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-55908eda5686a8f89e4c50672cbe893ec1734fb23449dc03325efe7c414f9aa4-delta-49-v1.0.dat +0 -0
  52. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-55908eda5686a8f89e4c50672cbe893ec1734fb23449dc03325efe7c414f9aa4-full-49-v1.0.dat +0 -0
  53. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-57cc2691fb1fb986c99a58bcb0e029d0cd0cff41553d703147c54196d7d9ca63-delta-14-v1.0.dat +0 -0
  54. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-57cc2691fb1fb986c99a58bcb0e029d0cd0cff41553d703147c54196d7d9ca63-full-14-v1.0.dat +0 -0
  55. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-5943bf8ae4f5e59969d8570e4f40a8223299febdcfbcf188b3b3e2ab11044e18-delta-34-v1.0.dat +0 -0
  56. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-5943bf8ae4f5e59969d8570e4f40a8223299febdcfbcf188b3b3e2ab11044e18-full-34-v1.0.dat +0 -0
  57. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6518527b7c939bee60ce6b024cbe90d3b9d8913c56b8ce11a4df5da7ff7db1c8-delta-8-v1.0.dat +0 -0
  58. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6518527b7c939bee60ce6b024cbe90d3b9d8913c56b8ce11a4df5da7ff7db1c8-full-8-v1.0.dat +0 -0
  59. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-66ff26a26620379e14a7c91252d27ee4dbe06ad69a3a390a88642fe757f2b288-delta-45-v1.0.dat +0 -0
  60. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-66ff26a26620379e14a7c91252d27ee4dbe06ad69a3a390a88642fe757f2b288-full-45-v1.0.dat +0 -0
  61. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6bd0a508ee2c4afbe9d4daa811139fd6e54e7f4e16850cbce999fa30f8bdccd2-delta-6-v1.0.dat +0 -0
  62. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6bd0a508ee2c4afbe9d4daa811139fd6e54e7f4e16850cbce999fa30f8bdccd2-full-6-v1.0.dat +0 -0
  63. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6ce850d0d77ca743fcc2fc792747472e5d2c1c0813aa43abbb370554428fc897-delta-48-v1.0.dat +0 -0
  64. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6ce850d0d77ca743fcc2fc792747472e5d2c1c0813aa43abbb370554428fc897-full-48-v1.0.dat +0 -0
  65. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6eb4ca2e1552b156c5969396b49070eb08ad6c96b347359387519be59f7ccaed-delta-26-v1.0.dat +0 -0
  66. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6eb4ca2e1552b156c5969396b49070eb08ad6c96b347359387519be59f7ccaed-full-26-v1.0.dat +0 -0
  67. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-71c797fb7592d3f0a5a20c79ab8497ddaa0fd9ec17712e109d25c91b3f3c76e5-delta-3-v1.0.dat +0 -0
  68. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-71c797fb7592d3f0a5a20c79ab8497ddaa0fd9ec17712e109d25c91b3f3c76e5-full-3-v1.0.dat +0 -0
  69. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-73357026053d5a4969e7a6b9aeeef91c14cc6d5f32fc700fe6d21d2a1b22496c-delta-25-v1.0.dat +0 -0
  70. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-73357026053d5a4969e7a6b9aeeef91c14cc6d5f32fc700fe6d21d2a1b22496c-full-25-v1.0.dat +0 -0
  71. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-7c897e5c46e834ced65bde7de87716acfaa5dffbdb30b5cd9377d8c319df2034-delta-35-v1.0.dat +0 -0
  72. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-7c897e5c46e834ced65bde7de87716acfaa5dffbdb30b5cd9377d8c319df2034-full-35-v1.0.dat +0 -0
  73. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-87b8394d80d08117a5a1cd04ed8a682564eab7197a2c090159863591b5108874-delta-4-v1.0.dat +0 -0
  74. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-87b8394d80d08117a5a1cd04ed8a682564eab7197a2c090159863591b5108874-full-4-v1.0.dat +0 -0
  75. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-89eb40b9cc0921c5f5c3feb20927c13a9ada5760f82d219dcee153b7d400165c-delta-41-v1.0.dat +0 -0
  76. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-89eb40b9cc0921c5f5c3feb20927c13a9ada5760f82d219dcee153b7d400165c-full-41-v1.0.dat +0 -0
  77. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-8b649433156b8c924436cdec9c6de26106fd6f73a0528570f48748f7b40d7f8a-delta-21-v1.0.dat +0 -0
  78. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-8b649433156b8c924436cdec9c6de26106fd6f73a0528570f48748f7b40d7f8a-full-21-v1.0.dat +0 -0
  79. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-8d364023a0834c8c3077e236a465493acbf488e4f9d1f4c6cc230343c10a8f7d-delta-42-v1.0.dat +0 -0
  80. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-8d364023a0834c8c3077e236a465493acbf488e4f9d1f4c6cc230343c10a8f7d-full-42-v1.0.dat +0 -0
  81. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-925689e24a3d98d98676d816cdd8b73e7b2df057d9d4503da9b27bf91d79666c-delta-38-v1.0.dat +0 -0
  82. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-925689e24a3d98d98676d816cdd8b73e7b2df057d9d4503da9b27bf91d79666c-full-38-v1.0.dat +0 -0
  83. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-937be3d428b19f521be4f98faecc3307ae11ee731c76992f417fa4268d13859e-delta-11-v1.0.dat +0 -0
  84. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-937be3d428b19f521be4f98faecc3307ae11ee731c76992f417fa4268d13859e-full-11-v1.0.dat +0 -0
  85. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-97f34af499b79e2111fc296a598fc9654c2467ea038dfea41fd58241fb3642de-delta-32-v1.0.dat +0 -0
  86. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-97f34af499b79e2111fc296a598fc9654c2467ea038dfea41fd58241fb3642de-full-32-v1.0.dat +0 -0
  87. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-9d1b737243b8a1d0022f2b36ac53333c6280354a74d77f2a3642dcab35204e59-delta-33-v1.0.dat +0 -0
  88. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-9d1b737243b8a1d0022f2b36ac53333c6280354a74d77f2a3642dcab35204e59-full-33-v1.0.dat +0 -0
  89. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-a6663f98ef6ddf6db55f01163e34bb2e87aa82f0347e79ce31e8dbfa390c480c-delta-47-v1.0.dat +0 -0
  90. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-a6663f98ef6ddf6db55f01163e34bb2e87aa82f0347e79ce31e8dbfa390c480c-full-47-v1.0.dat +0 -0
  91. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-aa77376d1ccd3664e5c6366e010c52a978fedbf40f5ce262fee71b2e7fe0c6a9-delta-50-v1.0.dat +0 -0
  92. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-aa77376d1ccd3664e5c6366e010c52a978fedbf40f5ce262fee71b2e7fe0c6a9-full-50-v1.0.dat +0 -0
  93. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-b0f28514741ed1a71f5c6544bf92f9e0e493c5f3cf28328909771d8404eff626-delta-24-v1.0.dat +0 -0
  94. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-b0f28514741ed1a71f5c6544bf92f9e0e493c5f3cf28328909771d8404eff626-full-24-v1.0.dat +0 -0
  95. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-b3efee5358e6eb89ab3b60db2d128d57eef39e8538fb63c5632412d4f8e7d09e-delta-44-v1.0.dat +0 -0
  96. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-b3efee5358e6eb89ab3b60db2d128d57eef39e8538fb63c5632412d4f8e7d09e-full-44-v1.0.dat +0 -0
  97. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-bb0b56b6eb7acbb4e80893b04c72412fe833418232e1ed7b06d97d7a7f08b4e1-delta-16-v1.0.dat +0 -0
  98. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-bb0b56b6eb7acbb4e80893b04c72412fe833418232e1ed7b06d97d7a7f08b4e1-full-16-v1.0.dat +0 -0
  99. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-bc45262b757ff494b53bd2a8fba0f5511cc1f9c2a2c5360e04ea8cebbf6409df-delta-13-v1.0.dat +0 -0
  100. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-bc45262b757ff494b53bd2a8fba0f5511cc1f9c2a2c5360e04ea8cebbf6409df-full-13-v1.0.dat +0 -0
  101. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-bd0494ba430aff13458b557113b073d226eaf11257dfe26ff3323fa1cfe1335b-delta-39-v1.0.dat +0 -0
  102. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-bd0494ba430aff13458b557113b073d226eaf11257dfe26ff3323fa1cfe1335b-full-39-v1.0.dat +0 -0
  103. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-cd04f5fbba1553fa728b4dd8131d4723aaac288e0c7dc080447fbf0872c0a6eb-delta-36-v1.0.dat +0 -0
  104. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-cd04f5fbba1553fa728b4dd8131d4723aaac288e0c7dc080447fbf0872c0a6eb-full-36-v1.0.dat +0 -0
  105. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-cdd2399557fb3163a848f08831fdc833703354edb19a0d32a965fdb140f160c2-delta-18-v1.0.dat +0 -0
  106. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-cdd2399557fb3163a848f08831fdc833703354edb19a0d32a965fdb140f160c2-full-18-v1.0.dat +0 -0
  107. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-cf7a08fca7b1332095242e4d9800f4b94a3f4eaae88fe8407da42736d54b9e18-delta-37-v1.0.dat +0 -0
  108. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-cf7a08fca7b1332095242e4d9800f4b94a3f4eaae88fe8407da42736d54b9e18-full-37-v1.0.dat +0 -0
  109. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-d1f97465a9f52187e2ef3a0d811a1258f52380a65340c55f3e8e65b92753bc13-delta-15-v1.0.dat +0 -0
  110. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-d1f97465a9f52187e2ef3a0d811a1258f52380a65340c55f3e8e65b92753bc13-full-15-v1.0.dat +0 -0
  111. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-e475eccd4ee597e5ff67b1a249e37d65d6e3f754c3f0379fdb43692513588fef-delta-46-v1.0.dat +0 -0
  112. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-e475eccd4ee597e5ff67b1a249e37d65d6e3f754c3f0379fdb43692513588fef-full-46-v1.0.dat +0 -0
  113. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-e82e63517d78fd65b23a05c3b9a98cf905ddad7026995a238bfe634006b84cd0-delta-27-v1.0.dat +0 -0
  114. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-e82e63517d78fd65b23a05c3b9a98cf905ddad7026995a238bfe634006b84cd0-full-27-v1.0.dat +0 -0
  115. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-ed2cf0fd6c0f6237c87c161e1fca303b3fbe6c04e01f652b88720b4572143349-delta-12-v1.0.dat +0 -0
  116. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-ed2cf0fd6c0f6237c87c161e1fca303b3fbe6c04e01f652b88720b4572143349-full-12-v1.0.dat +0 -0
  117. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-f6e454eaf24a83c46a7bed4c19260a0a3ce0ed5c51739cb6d748d4913dc2ef58-delta-30-v1.0.dat +0 -0
  118. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-f6e454eaf24a83c46a7bed4c19260a0a3ce0ed5c51739cb6d748d4913dc2ef58-full-30-v1.0.dat +0 -0
  119. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-f7ad2bdf86d9609b4d6381086ec1e296bf558e2ff467ead29dd7fa6e31bacc56-delta-43-v1.0.dat +0 -0
  120. chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-f7ad2bdf86d9609b4d6381086ec1e296bf558e2ff467ead29dd7fa6e31bacc56-full-43-v1.0.dat +0 -0
  121. chia/_tests/core/data_layer/old_format/files/__init__.py +0 -0
  122. chia/_tests/core/data_layer/old_format/old_db.sqlite +0 -0
  123. chia/_tests/core/data_layer/test_data_layer_util.py +18 -21
  124. chia/_tests/core/data_layer/test_data_rpc.py +77 -28
  125. chia/_tests/core/data_layer/test_data_store.py +637 -700
  126. chia/_tests/core/data_layer/test_data_store_schema.py +2 -209
  127. chia/_tests/core/full_node/ram_db.py +1 -1
  128. chia/_tests/core/full_node/stores/test_block_store.py +4 -10
  129. chia/_tests/core/full_node/stores/test_coin_store.py +1 -1
  130. chia/_tests/core/full_node/test_address_manager.py +3 -3
  131. chia/_tests/core/full_node/test_block_height_map.py +1 -1
  132. chia/_tests/core/full_node/test_full_node.py +91 -30
  133. chia/_tests/core/full_node/test_generator_tools.py +17 -10
  134. chia/_tests/core/mempool/test_mempool.py +190 -90
  135. chia/_tests/core/mempool/test_mempool_fee_estimator.py +2 -4
  136. chia/_tests/core/mempool/test_mempool_item_queries.py +1 -1
  137. chia/_tests/core/mempool/test_mempool_manager.py +134 -75
  138. chia/_tests/core/mempool/test_singleton_fast_forward.py +9 -27
  139. chia/_tests/core/server/serve.py +0 -2
  140. chia/_tests/core/server/test_rate_limits.py +400 -347
  141. chia/_tests/core/server/test_server.py +2 -2
  142. chia/_tests/core/services/test_services.py +7 -7
  143. chia/_tests/core/test_cost_calculation.py +31 -10
  144. chia/_tests/core/test_crawler.py +4 -4
  145. chia/_tests/core/test_db_conversion.py +7 -14
  146. chia/_tests/core/test_db_validation.py +2 -6
  147. chia/_tests/core/test_farmer_harvester_rpc.py +34 -1
  148. chia/_tests/core/test_full_node_rpc.py +28 -24
  149. chia/_tests/core/test_merkle_set.py +1 -4
  150. chia/_tests/core/test_seeder.py +1 -1
  151. chia/_tests/core/util/test_keychain.py +2 -2
  152. chia/_tests/core/util/test_lru_cache.py +16 -0
  153. chia/_tests/core/util/test_streamable.py +85 -4
  154. chia/_tests/environments/wallet.py +4 -1
  155. chia/_tests/farmer_harvester/test_farmer.py +8 -6
  156. chia/_tests/farmer_harvester/test_farmer_harvester.py +306 -8
  157. chia/_tests/farmer_harvester/test_filter_prefix_bits.py +3 -3
  158. chia/_tests/farmer_harvester/test_third_party_harvesters.py +11 -11
  159. chia/_tests/fee_estimation/test_fee_estimation_integration.py +2 -2
  160. chia/_tests/fee_estimation/test_fee_estimation_rpc.py +1 -1
  161. chia/_tests/fee_estimation/test_fee_estimation_unit_tests.py +1 -2
  162. chia/_tests/generator/test_rom.py +2 -1
  163. chia/_tests/harvester/__init__.py +0 -0
  164. chia/_tests/harvester/config.py +4 -0
  165. chia/_tests/harvester/test_harvester_api.py +157 -0
  166. chia/_tests/plot_sync/test_plot_sync.py +6 -3
  167. chia/_tests/plot_sync/test_receiver.py +16 -4
  168. chia/_tests/plot_sync/test_sender.py +8 -7
  169. chia/_tests/plot_sync/test_sync_simulated.py +15 -13
  170. chia/_tests/plot_sync/util.py +3 -2
  171. chia/_tests/plotting/test_plot_manager.py +21 -5
  172. chia/_tests/plotting/test_prover.py +106 -0
  173. chia/_tests/pools/test_pool_cmdline.py +7 -6
  174. chia/_tests/pools/test_pool_puzzles_lifecycle.py +10 -3
  175. chia/_tests/pools/test_pool_rpc.py +92 -64
  176. chia/_tests/solver/__init__.py +0 -0
  177. chia/_tests/solver/config.py +4 -0
  178. chia/_tests/solver/test_solver_service.py +29 -0
  179. chia/_tests/timelord/test_new_peak.py +1 -1
  180. chia/_tests/timelord/test_timelord.py +1 -1
  181. chia/_tests/util/benchmarks.py +5 -12
  182. chia/_tests/util/blockchain.py +1 -1
  183. chia/_tests/util/build_network_protocol_files.py +7 -0
  184. chia/_tests/util/network_protocol_data.py +26 -0
  185. chia/_tests/util/protocol_messages_bytes-v1.0 +0 -0
  186. chia/_tests/util/protocol_messages_json.py +19 -0
  187. chia/_tests/util/setup_nodes.py +21 -2
  188. chia/_tests/util/spend_sim.py +9 -3
  189. chia/_tests/util/test_condition_tools.py +3 -2
  190. chia/_tests/util/test_full_block_utils.py +10 -9
  191. chia/_tests/util/test_misc.py +10 -10
  192. chia/_tests/util/test_network.py +32 -1
  193. chia/_tests/util/test_network_protocol_files.py +333 -318
  194. chia/_tests/util/test_network_protocol_json.py +6 -0
  195. chia/_tests/util/test_network_protocol_test.py +27 -0
  196. chia/_tests/util/test_priority_mutex.py +1 -1
  197. chia/_tests/util/test_replace_str_to_bytes.py +6 -6
  198. chia/_tests/wallet/cat_wallet/test_cat_wallet.py +17 -13
  199. chia/_tests/wallet/cat_wallet/test_trades.py +55 -55
  200. chia/_tests/wallet/did_wallet/test_did.py +118 -1229
  201. chia/_tests/wallet/nft_wallet/config.py +1 -1
  202. chia/_tests/wallet/nft_wallet/test_nft_1_offers.py +73 -96
  203. chia/_tests/wallet/nft_wallet/test_nft_bulk_mint.py +15 -12
  204. chia/_tests/wallet/nft_wallet/test_nft_offers.py +67 -134
  205. chia/_tests/wallet/nft_wallet/test_nft_wallet.py +31 -26
  206. chia/_tests/wallet/rpc/test_wallet_rpc.py +765 -371
  207. chia/_tests/wallet/sync/test_wallet_sync.py +6 -0
  208. chia/_tests/wallet/test_new_wallet_protocol.py +1 -1
  209. chia/_tests/wallet/test_signer_protocol.py +2 -2
  210. chia/_tests/wallet/test_singleton_lifecycle_fast.py +3 -4
  211. chia/_tests/wallet/test_transaction_store.py +42 -33
  212. chia/_tests/wallet/test_wallet.py +22 -31
  213. chia/_tests/wallet/test_wallet_state_manager.py +14 -7
  214. chia/_tests/wallet/vc_wallet/test_vc_wallet.py +53 -32
  215. chia/apis.py +2 -0
  216. chia/cmds/beta.py +7 -3
  217. chia/cmds/chia.py +2 -0
  218. chia/cmds/cmd_classes.py +11 -27
  219. chia/cmds/cmds_util.py +3 -0
  220. chia/cmds/coin_funcs.py +27 -22
  221. chia/cmds/configure.py +42 -18
  222. chia/cmds/dev/data.py +22 -3
  223. chia/cmds/farm.py +32 -0
  224. chia/cmds/farm_funcs.py +54 -5
  225. chia/cmds/init_funcs.py +4 -0
  226. chia/cmds/keys_funcs.py +8 -10
  227. chia/cmds/peer_funcs.py +8 -10
  228. chia/cmds/plotnft_funcs.py +24 -16
  229. chia/cmds/rpc.py +11 -1
  230. chia/cmds/show_funcs.py +5 -5
  231. chia/cmds/solver.py +33 -0
  232. chia/cmds/solver_funcs.py +21 -0
  233. chia/cmds/wallet.py +1 -1
  234. chia/cmds/wallet_funcs.py +149 -96
  235. chia/consensus/block_body_validation.py +8 -9
  236. chia/consensus/block_creation.py +9 -10
  237. chia/consensus/block_header_validation.py +61 -69
  238. chia/{full_node → consensus}/block_height_map.py +2 -1
  239. chia/consensus/block_height_map_protocol.py +21 -0
  240. chia/consensus/block_rewards.py +12 -12
  241. chia/consensus/blockchain.py +8 -18
  242. chia/consensus/default_constants.py +6 -6
  243. chia/consensus/generator_tools.py +1 -1
  244. chia/consensus/get_block_challenge.py +24 -25
  245. chia/consensus/pos_quality.py +28 -2
  246. chia/consensus/pot_iterations.py +15 -17
  247. chia/daemon/keychain_proxy.py +5 -0
  248. chia/daemon/server.py +2 -3
  249. chia/data_layer/data_layer.py +32 -24
  250. chia/data_layer/data_layer_errors.py +5 -0
  251. chia/data_layer/data_layer_rpc_api.py +1 -1
  252. chia/data_layer/data_layer_service.py +8 -0
  253. chia/data_layer/data_layer_util.py +49 -89
  254. chia/data_layer/data_layer_wallet.py +20 -17
  255. chia/data_layer/data_store.py +1051 -1462
  256. chia/data_layer/download_data.py +44 -115
  257. chia/{server → data_layer}/start_data_layer.py +2 -1
  258. chia/data_layer/util/benchmark.py +38 -53
  259. chia/farmer/farmer.py +3 -0
  260. chia/farmer/farmer_api.py +104 -5
  261. chia/farmer/farmer_rpc_api.py +20 -0
  262. chia/farmer/farmer_rpc_client.py +6 -2
  263. chia/farmer/farmer_service.py +8 -0
  264. chia/{server → farmer}/start_farmer.py +4 -3
  265. chia/full_node/block_store.py +20 -10
  266. chia/full_node/coin_store.py +12 -4
  267. chia/full_node/eligible_coin_spends.py +17 -72
  268. chia/full_node/full_node.py +68 -71
  269. chia/full_node/full_node_api.py +26 -32
  270. chia/full_node/full_node_rpc_api.py +44 -32
  271. chia/full_node/full_node_rpc_client.py +67 -79
  272. chia/full_node/full_node_service.py +8 -0
  273. chia/full_node/full_node_store.py +5 -3
  274. chia/full_node/mempool.py +14 -14
  275. chia/full_node/mempool_manager.py +67 -89
  276. chia/{server → full_node}/start_full_node.py +1 -1
  277. chia/full_node/subscriptions.py +2 -2
  278. chia/full_node/weight_proof.py +14 -15
  279. chia/harvester/harvester.py +8 -1
  280. chia/harvester/harvester_api.py +178 -44
  281. chia/harvester/harvester_service.py +8 -0
  282. chia/{server → harvester}/start_harvester.py +1 -1
  283. chia/introducer/introducer_service.py +8 -0
  284. chia/{server → introducer}/start_introducer.py +1 -1
  285. chia/plot_sync/receiver.py +6 -1
  286. chia/plot_sync/sender.py +7 -4
  287. chia/plotting/cache.py +37 -28
  288. chia/plotting/check_plots.py +83 -48
  289. chia/plotting/create_plots.py +3 -4
  290. chia/plotting/manager.py +18 -13
  291. chia/plotting/prover.py +153 -0
  292. chia/plotting/util.py +14 -6
  293. chia/pools/pool_wallet.py +6 -4
  294. chia/protocols/harvester_protocol.py +14 -0
  295. chia/protocols/outbound_message.py +1 -0
  296. chia/protocols/pool_protocol.py +1 -1
  297. chia/protocols/protocol_message_types.py +7 -0
  298. chia/protocols/shared_protocol.py +2 -0
  299. chia/protocols/solver_protocol.py +18 -0
  300. chia/rpc/rpc_server.py +1 -1
  301. chia/seeder/crawl_store.py +4 -8
  302. chia/seeder/crawler.py +2 -2
  303. chia/seeder/crawler_service.py +8 -0
  304. chia/seeder/start_crawler.py +1 -1
  305. chia/server/address_manager.py +12 -15
  306. chia/server/introducer_peers.py +1 -1
  307. chia/server/node_discovery.py +9 -10
  308. chia/server/rate_limit_numbers.py +157 -168
  309. chia/server/rate_limits.py +44 -41
  310. chia/server/resolve_peer_info.py +5 -0
  311. chia/server/server.py +17 -7
  312. chia/server/start_service.py +0 -1
  313. chia/simulator/block_tools.py +92 -58
  314. chia/simulator/full_node_simulator.py +1 -1
  315. chia/simulator/setup_services.py +51 -15
  316. chia/solver/__init__.py +0 -0
  317. chia/solver/solver.py +100 -0
  318. chia/solver/solver_api.py +59 -0
  319. chia/solver/solver_rpc_api.py +31 -0
  320. chia/solver/solver_rpc_client.py +16 -0
  321. chia/solver/solver_service.py +8 -0
  322. chia/solver/start_solver.py +102 -0
  323. {mozilla-ca → chia/ssl}/cacert.pem +0 -27
  324. chia/ssl/create_ssl.py +3 -2
  325. chia/{server → timelord}/start_timelord.py +1 -1
  326. chia/timelord/timelord.py +12 -13
  327. chia/timelord/timelord_service.py +8 -0
  328. chia/types/blockchain_format/proof_of_space.py +61 -17
  329. chia/types/coin_spend.py +0 -8
  330. chia/types/internal_mempool_item.py +3 -3
  331. chia/types/mempool_item.py +15 -8
  332. chia/types/mempool_submission_status.py +1 -1
  333. chia/util/config.py +1 -3
  334. chia/util/db_wrapper.py +7 -8
  335. chia/util/initial-config.yaml +46 -0
  336. chia/util/lru_cache.py +8 -4
  337. chia/util/network.py +9 -0
  338. chia/util/service_groups.py +3 -1
  339. chia/util/streamable.py +38 -8
  340. chia/util/virtual_project_analysis.py +1 -1
  341. chia/wallet/cat_wallet/cat_outer_puzzle.py +7 -4
  342. chia/wallet/cat_wallet/cat_wallet.py +13 -7
  343. chia/wallet/cat_wallet/r_cat_wallet.py +4 -1
  344. chia/wallet/conditions.py +1 -3
  345. chia/wallet/did_wallet/did_wallet.py +27 -332
  346. chia/wallet/nft_wallet/nft_puzzle_utils.py +1 -1
  347. chia/wallet/nft_wallet/nft_wallet.py +9 -7
  348. chia/wallet/puzzle_drivers.py +7 -8
  349. chia/{server → wallet}/start_wallet.py +1 -1
  350. chia/wallet/trade_manager.py +12 -9
  351. chia/wallet/transaction_record.py +14 -51
  352. chia/wallet/util/clvm_streamable.py +28 -41
  353. chia/wallet/util/merkle_utils.py +2 -2
  354. chia/wallet/util/tx_config.py +3 -6
  355. chia/wallet/vc_wallet/cr_cat_wallet.py +12 -6
  356. chia/wallet/vc_wallet/vc_wallet.py +13 -15
  357. chia/wallet/wallet.py +5 -3
  358. chia/wallet/wallet_node.py +25 -30
  359. chia/wallet/wallet_request_types.py +538 -101
  360. chia/wallet/wallet_rpc_api.py +398 -570
  361. chia/wallet/wallet_rpc_client.py +144 -332
  362. chia/wallet/wallet_service.py +8 -0
  363. chia/wallet/wallet_state_manager.py +53 -42
  364. chia/wallet/wallet_transaction_store.py +13 -5
  365. {chia_blockchain-2.5.6rc2.dist-info → chia_blockchain-2.5.7rc2.dist-info}/METADATA +31 -31
  366. {chia_blockchain-2.5.6rc2.dist-info → chia_blockchain-2.5.7rc2.dist-info}/RECORD +369 -241
  367. {chia_blockchain-2.5.6rc2.dist-info → chia_blockchain-2.5.7rc2.dist-info}/WHEEL +1 -1
  368. {chia_blockchain-2.5.6rc2.dist-info → chia_blockchain-2.5.7rc2.dist-info}/entry_points.txt +8 -7
  369. chia/full_node/mempool_check_conditions.py +0 -102
  370. chia/server/aliases.py +0 -35
  371. {chia_blockchain-2.5.6rc2.dist-info → chia_blockchain-2.5.7rc2.dist-info/licenses}/LICENSE +0 -0
@@ -138,13 +138,12 @@ def validate_unfinished_header_block(
138
138
  if not curr.finished_challenge_slot_hashes[-1] == challenge_hash:
139
139
  print(curr.finished_challenge_slot_hashes[-1], challenge_hash)
140
140
  return None, ValidationError(Err.INVALID_PREV_CHALLENGE_SLOT_HASH)
141
- else:
142
- # 2c. check sub-slot challenge hash for empty slot
143
- if (
144
- not header_block.finished_sub_slots[finished_sub_slot_n - 1].challenge_chain.get_hash()
145
- == challenge_hash
146
- ):
147
- return None, ValidationError(Err.INVALID_PREV_CHALLENGE_SLOT_HASH)
141
+ # 2c. check sub-slot challenge hash for empty slot
142
+ elif (
143
+ not header_block.finished_sub_slots[finished_sub_slot_n - 1].challenge_chain.get_hash()
144
+ == challenge_hash
145
+ ):
146
+ return None, ValidationError(Err.INVALID_PREV_CHALLENGE_SLOT_HASH)
148
147
 
149
148
  if genesis_block:
150
149
  # 2d. Validate that genesis block has no ICC
@@ -176,20 +175,19 @@ def validate_unfinished_header_block(
176
175
  icc_vdf_input = ClassgroupElement.get_default_element()
177
176
  else:
178
177
  icc_vdf_input = prev_b.infused_challenge_vdf_output
179
- else:
180
- # This is not the first sub slot after the last block, so we might not have an ICC
181
- if (
182
- header_block.finished_sub_slots[finished_sub_slot_n - 1].reward_chain.deficit
183
- < constants.MIN_BLOCKS_PER_CHALLENGE_BLOCK
184
- ):
185
- finished_ss = header_block.finished_sub_slots[finished_sub_slot_n - 1]
186
- assert finished_ss.infused_challenge_chain is not None
178
+ # This is not the first sub slot after the last block, so we might not have an ICC
179
+ elif (
180
+ header_block.finished_sub_slots[finished_sub_slot_n - 1].reward_chain.deficit
181
+ < constants.MIN_BLOCKS_PER_CHALLENGE_BLOCK
182
+ ):
183
+ finished_ss = header_block.finished_sub_slots[finished_sub_slot_n - 1]
184
+ assert finished_ss.infused_challenge_chain is not None
187
185
 
188
- # Only sets the icc iff the previous sub slots deficit is 4 or less
189
- icc_challenge_hash = finished_ss.infused_challenge_chain.get_hash()
190
- icc_iters_committed = prev_b.sub_slot_iters
191
- icc_iters_proof = icc_iters_committed
192
- icc_vdf_input = ClassgroupElement.get_default_element()
186
+ # Only sets the icc iff the previous sub slots deficit is 4 or less
187
+ icc_challenge_hash = finished_ss.infused_challenge_chain.get_hash()
188
+ icc_iters_committed = prev_b.sub_slot_iters
189
+ icc_iters_proof = icc_iters_committed
190
+ icc_vdf_input = ClassgroupElement.get_default_element()
193
191
 
194
192
  # 2e. Validate that there is not icc iff icc_challenge hash is None
195
193
  assert (sub_slot.infused_challenge_chain is None) == (icc_challenge_hash is None)
@@ -241,10 +239,9 @@ def validate_unfinished_header_block(
241
239
  != sub_slot.challenge_chain.infused_challenge_chain_sub_slot_hash
242
240
  ):
243
241
  return None, ValidationError(Err.INVALID_ICC_HASH_CC)
244
- else:
245
- # 2h. Check infused challenge sub-slot hash not included for other deficits
246
- if sub_slot.challenge_chain.infused_challenge_chain_sub_slot_hash is not None:
247
- return None, ValidationError(Err.INVALID_ICC_HASH_CC)
242
+ # 2h. Check infused challenge sub-slot hash not included for other deficits
243
+ elif sub_slot.challenge_chain.infused_challenge_chain_sub_slot_hash is not None:
244
+ return None, ValidationError(Err.INVALID_ICC_HASH_CC)
248
245
 
249
246
  # 2i. Check infused challenge sub-slot hash in reward sub-slot
250
247
  if (
@@ -396,10 +393,9 @@ def validate_unfinished_header_block(
396
393
  f"{sub_slot.reward_chain.deficit}",
397
394
  ),
398
395
  )
399
- else:
400
- # 2t. Otherwise, deficit stays the same at the slot ends, cannot reset until 0
401
- if sub_slot.reward_chain.deficit != prev_b.deficit:
402
- return None, ValidationError(Err.INVALID_DEFICIT, "deficit is wrong at slot end")
396
+ # 2t. Otherwise, deficit stays the same at the slot ends, cannot reset until 0
397
+ elif sub_slot.reward_chain.deficit != prev_b.deficit:
398
+ return None, ValidationError(Err.INVALID_DEFICIT, "deficit is wrong at slot end")
403
399
 
404
400
  # 3. Check sub-epoch summary
405
401
  # Note that the subepoch summary is the summary of the previous subepoch (not the one that just finished)
@@ -635,16 +631,15 @@ def validate_unfinished_header_block(
635
631
  return None, ValidationError(Err.INVALID_RC_SP_VDF)
636
632
  if new_sub_slot:
637
633
  rc_sp_hash = header_block.finished_sub_slots[-1].reward_chain.get_hash()
634
+ elif genesis_block:
635
+ rc_sp_hash = constants.GENESIS_CHALLENGE
638
636
  else:
639
- if genesis_block:
640
- rc_sp_hash = constants.GENESIS_CHALLENGE
641
- else:
642
- assert prev_b is not None
643
- curr = prev_b
644
- while not curr.first_in_sub_slot:
645
- curr = blocks.block_record(curr.prev_hash)
646
- assert curr.finished_reward_slot_hashes is not None
647
- rc_sp_hash = curr.finished_reward_slot_hashes[-1]
637
+ assert prev_b is not None
638
+ curr = prev_b
639
+ while not curr.first_in_sub_slot:
640
+ curr = blocks.block_record(curr.prev_hash)
641
+ assert curr.finished_reward_slot_hashes is not None
642
+ rc_sp_hash = curr.finished_reward_slot_hashes[-1]
648
643
 
649
644
  # 12. Check reward chain sp signature
650
645
  if not AugSchemeMPL.verify(
@@ -761,25 +756,24 @@ def validate_unfinished_header_block(
761
756
  != constants.GENESIS_PRE_FARM_FARMER_PUZZLE_HASH
762
757
  ):
763
758
  return None, ValidationError(Err.INVALID_PREFARM)
759
+ # 20b. If pospace has a pool pk, heck pool target signature. Should not check this for genesis block.
760
+ elif header_block.reward_chain_block.proof_of_space.pool_public_key is not None:
761
+ assert header_block.reward_chain_block.proof_of_space.pool_contract_puzzle_hash is None
762
+ assert header_block.foliage.foliage_block_data.pool_signature is not None
763
+ if not AugSchemeMPL.verify(
764
+ header_block.reward_chain_block.proof_of_space.pool_public_key,
765
+ bytes(header_block.foliage.foliage_block_data.pool_target),
766
+ header_block.foliage.foliage_block_data.pool_signature,
767
+ ):
768
+ return None, ValidationError(Err.INVALID_POOL_SIGNATURE)
764
769
  else:
765
- # 20b. If pospace has a pool pk, heck pool target signature. Should not check this for genesis block.
766
- if header_block.reward_chain_block.proof_of_space.pool_public_key is not None:
767
- assert header_block.reward_chain_block.proof_of_space.pool_contract_puzzle_hash is None
768
- assert header_block.foliage.foliage_block_data.pool_signature is not None
769
- if not AugSchemeMPL.verify(
770
- header_block.reward_chain_block.proof_of_space.pool_public_key,
771
- bytes(header_block.foliage.foliage_block_data.pool_target),
772
- header_block.foliage.foliage_block_data.pool_signature,
773
- ):
774
- return None, ValidationError(Err.INVALID_POOL_SIGNATURE)
775
- else:
776
- # 20c. Otherwise, the plot is associated with a contract puzzle hash, not a public key
777
- assert header_block.reward_chain_block.proof_of_space.pool_contract_puzzle_hash is not None
778
- if (
779
- header_block.foliage.foliage_block_data.pool_target.puzzle_hash
780
- != header_block.reward_chain_block.proof_of_space.pool_contract_puzzle_hash
781
- ):
782
- return None, ValidationError(Err.INVALID_POOL_TARGET)
770
+ # 20c. Otherwise, the plot is associated with a contract puzzle hash, not a public key
771
+ assert header_block.reward_chain_block.proof_of_space.pool_contract_puzzle_hash is not None
772
+ if (
773
+ header_block.foliage.foliage_block_data.pool_target.puzzle_hash
774
+ != header_block.reward_chain_block.proof_of_space.pool_contract_puzzle_hash
775
+ ):
776
+ return None, ValidationError(Err.INVALID_POOL_TARGET)
783
777
 
784
778
  # 21. Check extension data if applicable. None for mainnet.
785
779
  # 22. Check if foliage block is present
@@ -928,18 +922,17 @@ def validate_finished_header_block(
928
922
  # 29. Check challenge chain infusion point VDF
929
923
  if new_sub_slot:
930
924
  cc_vdf_challenge = header_block.finished_sub_slots[-1].challenge_chain.get_hash()
925
+ # Not first block in slot
926
+ elif genesis_block:
927
+ # genesis block
928
+ cc_vdf_challenge = constants.GENESIS_CHALLENGE
931
929
  else:
932
- # Not first block in slot
933
- if genesis_block:
934
- # genesis block
935
- cc_vdf_challenge = constants.GENESIS_CHALLENGE
936
- else:
937
- assert prev_b is not None
938
- # Not genesis block, go back to first block in slot
939
- curr = prev_b
940
- while curr.finished_challenge_slot_hashes is None:
941
- curr = blocks.block_record(curr.prev_hash)
942
- cc_vdf_challenge = curr.finished_challenge_slot_hashes[-1]
930
+ assert prev_b is not None
931
+ # Not genesis block, go back to first block in slot
932
+ curr = prev_b
933
+ while curr.finished_challenge_slot_hashes is None:
934
+ curr = blocks.block_record(curr.prev_hash)
935
+ cc_vdf_challenge = curr.finished_challenge_slot_hashes[-1]
943
936
 
944
937
  cc_target_vdf_info = VDFInfo(
945
938
  cc_vdf_challenge,
@@ -1047,9 +1040,8 @@ def validate_finished_header_block(
1047
1040
  icc_target_vdf_info,
1048
1041
  ):
1049
1042
  return None, ValidationError(Err.INVALID_ICC_VDF, "invalid icc proof")
1050
- else:
1051
- if header_block.infused_challenge_chain_ip_proof is not None:
1052
- return None, ValidationError(Err.INVALID_ICC_VDF)
1043
+ elif header_block.infused_challenge_chain_ip_proof is not None:
1044
+ return None, ValidationError(Err.INVALID_ICC_VDF)
1053
1045
 
1054
1046
  # 32. Check reward block hash
1055
1047
  if header_block.foliage.reward_block_hash != header_block.reward_chain_block.get_hash():
@@ -10,6 +10,7 @@ from chia_rs import SubEpochSummary
10
10
  from chia_rs.sized_bytes import bytes32
11
11
  from chia_rs.sized_ints import uint32
12
12
 
13
+ from chia.consensus.block_height_map_protocol import BlockHeightMapProtocol
13
14
  from chia.util.db_wrapper import DBWrapper2
14
15
  from chia.util.files import write_file_async
15
16
  from chia.util.streamable import Streamable, streamable
@@ -23,7 +24,7 @@ class SesCache(Streamable):
23
24
  content: list[tuple[uint32, bytes]]
24
25
 
25
26
 
26
- class BlockHeightMap:
27
+ class BlockHeightMap(BlockHeightMapProtocol):
27
28
  db: DBWrapper2
28
29
 
29
30
  # the below dictionaries are loaded from the database, from the peak
@@ -0,0 +1,21 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Optional, Protocol
4
+
5
+ from chia_rs import SubEpochSummary
6
+ from chia_rs.sized_bytes import bytes32
7
+ from chia_rs.sized_ints import uint32
8
+
9
+
10
+ class BlockHeightMapProtocol(Protocol):
11
+ def update_height(self, height: uint32, header_hash: bytes32, ses: Optional[SubEpochSummary]) -> None: ...
12
+
13
+ def get_hash(self, height: uint32) -> bytes32: ...
14
+
15
+ def contains_height(self, height: uint32) -> bool: ...
16
+
17
+ def rollback(self, fork_height: int) -> None: ...
18
+
19
+ def get_ses(self, height: uint32) -> SubEpochSummary: ...
20
+
21
+ def get_ses_heights(self) -> list[uint32]: ...
@@ -17,17 +17,17 @@ def calculate_pool_reward(height: uint32) -> uint64:
17
17
  """
18
18
 
19
19
  if height == 0:
20
- return uint64(int((7 / 8) * 21000000 * _mojo_per_chia))
20
+ return uint64((7 / 8) * 21000000 * _mojo_per_chia)
21
21
  elif height < 3 * _blocks_per_year:
22
- return uint64(int((7 / 8) * 2 * _mojo_per_chia))
22
+ return uint64((7 / 8) * 2 * _mojo_per_chia)
23
23
  elif height < 6 * _blocks_per_year:
24
- return uint64(int((7 / 8) * 1 * _mojo_per_chia))
24
+ return uint64((7 / 8) * 1 * _mojo_per_chia)
25
25
  elif height < 9 * _blocks_per_year:
26
- return uint64(int((7 / 8) * 0.5 * _mojo_per_chia))
26
+ return uint64((7 / 8) * 0.5 * _mojo_per_chia)
27
27
  elif height < 12 * _blocks_per_year:
28
- return uint64(int((7 / 8) * 0.25 * _mojo_per_chia))
28
+ return uint64((7 / 8) * 0.25 * _mojo_per_chia)
29
29
  else:
30
- return uint64(int((7 / 8) * 0.125 * _mojo_per_chia))
30
+ return uint64((7 / 8) * 0.125 * _mojo_per_chia)
31
31
 
32
32
 
33
33
  def calculate_base_farmer_reward(height: uint32) -> uint64:
@@ -40,14 +40,14 @@ def calculate_base_farmer_reward(height: uint32) -> uint64:
40
40
  rates increase continuously.
41
41
  """
42
42
  if height == 0:
43
- return uint64(int((1 / 8) * 21000000 * _mojo_per_chia))
43
+ return uint64((1 / 8) * 21000000 * _mojo_per_chia)
44
44
  elif height < 3 * _blocks_per_year:
45
- return uint64(int((1 / 8) * 2 * _mojo_per_chia))
45
+ return uint64((1 / 8) * 2 * _mojo_per_chia)
46
46
  elif height < 6 * _blocks_per_year:
47
- return uint64(int((1 / 8) * 1 * _mojo_per_chia))
47
+ return uint64((1 / 8) * 1 * _mojo_per_chia)
48
48
  elif height < 9 * _blocks_per_year:
49
- return uint64(int((1 / 8) * 0.5 * _mojo_per_chia))
49
+ return uint64((1 / 8) * 0.5 * _mojo_per_chia)
50
50
  elif height < 12 * _blocks_per_year:
51
- return uint64(int((1 / 8) * 0.25 * _mojo_per_chia))
51
+ return uint64((1 / 8) * 0.25 * _mojo_per_chia)
52
52
  else:
53
- return uint64(int((1 / 8) * 0.125 * _mojo_per_chia))
53
+ return uint64((1 / 8) * 0.125 * _mojo_per_chia)
@@ -26,6 +26,7 @@ from chia_rs.sized_ints import uint16, uint32, uint64, uint128
26
26
 
27
27
  from chia.consensus.block_body_validation import ForkInfo, validate_block_body
28
28
  from chia.consensus.block_header_validation import validate_unfinished_header_block
29
+ from chia.consensus.block_height_map import BlockHeightMap
29
30
  from chia.consensus.coin_store_protocol import CoinStoreProtocol
30
31
  from chia.consensus.cost_calculator import NPCResult
31
32
  from chia.consensus.difficulty_adjustment import get_next_sub_slot_iters_and_difficulty
@@ -34,7 +35,6 @@ from chia.consensus.full_block_to_block_record import block_to_block_record
34
35
  from chia.consensus.generator_tools import get_block_header
35
36
  from chia.consensus.get_block_generator import get_block_generator
36
37
  from chia.consensus.multiprocess_validation import PreValidationResult
37
- from chia.full_node.block_height_map import BlockHeightMap
38
38
  from chia.full_node.block_store import BlockStore
39
39
  from chia.types.blockchain_format.coin import Coin
40
40
  from chia.types.blockchain_format.vdf import VDFInfo
@@ -421,7 +421,7 @@ class Blockchain:
421
421
 
422
422
  try:
423
423
  # Always add the block to the database
424
- async with self.block_store.db_wrapper.writer():
424
+ async with self.block_store.transaction():
425
425
  # Perform the DB operations to update the state, and rollback if something goes wrong
426
426
  await self.block_store.add_full_block(header_hash, block, block_record)
427
427
  records, state_change_summary = await self._reconsider_peak(block_record, genesis, fork_info)
@@ -708,9 +708,8 @@ class Blockchain:
708
708
  if block.transactions_generator is not None:
709
709
  if std_hash(bytes(block.transactions_generator)) != block.transactions_info.generator_root:
710
710
  return None, Err.INVALID_TRANSACTIONS_GENERATOR_HASH
711
- else:
712
- if block.transactions_info.generator_root != bytes([0] * 32):
713
- return None, Err.INVALID_TRANSACTIONS_GENERATOR_HASH
711
+ elif block.transactions_info.generator_root != bytes([0] * 32):
712
+ return None, Err.INVALID_TRANSACTIONS_GENERATOR_HASH
714
713
 
715
714
  if (
716
715
  block.foliage_transaction_block is None
@@ -883,7 +882,7 @@ class Blockchain:
883
882
 
884
883
  blocks: list[FullBlock] = []
885
884
  for hash in hashes.copy():
886
- block = self.block_store.block_cache.get(hash)
885
+ block = self.block_store.get_block_from_cache(hash)
887
886
  if block is not None:
888
887
  blocks.append(block)
889
888
  hashes.remove(hash)
@@ -926,27 +925,18 @@ class Blockchain:
926
925
  return None
927
926
  return header_dict[header_hash]
928
927
 
929
- async def get_block_records_at(self, heights: list[uint32], batch_size: int = 900) -> list[BlockRecord]:
928
+ async def get_block_records_at(self, heights: list[uint32]) -> list[BlockRecord]:
930
929
  """
931
930
  gets block records by height (only blocks that are part of the chain)
932
931
  """
933
- records: list[BlockRecord] = []
934
932
  hashes: list[bytes32] = []
935
- assert batch_size < self.block_store.db_wrapper.host_parameter_limit
936
933
  for height in heights:
937
934
  header_hash: Optional[bytes32] = self.height_to_hash(height)
938
935
  if header_hash is None:
939
936
  raise ValueError(f"Do not have block at height {height}")
940
937
  hashes.append(header_hash)
941
- if len(hashes) > batch_size:
942
- res = await self.block_store.get_block_records_by_hash(hashes)
943
- records.extend(res)
944
- hashes = []
945
-
946
- if len(hashes) > 0:
947
- res = await self.block_store.get_block_records_by_hash(hashes)
948
- records.extend(res)
949
- return records
938
+
939
+ return await self.block_store.get_block_records_by_hash(hashes)
950
940
 
951
941
  def try_block_record(self, header_hash: bytes32) -> Optional[BlockRecord]:
952
942
  if header_hash in self.__block_records:
@@ -91,12 +91,12 @@ DEFAULT_CONSTANTS = ConsensusConstants(
91
91
  PLOT_FILTER_64_HEIGHT=uint32(15592000),
92
92
  # June 2033
93
93
  PLOT_FILTER_32_HEIGHT=uint32(20643000),
94
- PLOT_DIFFICULTY_INITIAL=uint8(2),
95
- PLOT_DIFFICULTY_4_HEIGHT=uint32(0xFFFFFFFB),
96
- PLOT_DIFFICULTY_5_HEIGHT=uint32(0xFFFFFFFC),
97
- PLOT_DIFFICULTY_6_HEIGHT=uint32(0xFFFFFFFD),
98
- PLOT_DIFFICULTY_7_HEIGHT=uint32(0xFFFFFFFE),
99
- PLOT_DIFFICULTY_8_HEIGHT=uint32(0xFFFFFFFF),
94
+ PLOT_STRENGTH_INITIAL=uint8(2),
95
+ PLOT_STRENGTH_4_HEIGHT=uint32(0xFFFFFFFB),
96
+ PLOT_STRENGTH_5_HEIGHT=uint32(0xFFFFFFFC),
97
+ PLOT_STRENGTH_6_HEIGHT=uint32(0xFFFFFFFD),
98
+ PLOT_STRENGTH_7_HEIGHT=uint32(0xFFFFFFFE),
99
+ PLOT_STRENGTH_8_HEIGHT=uint32(0xFFFFFFFF),
100
100
  )
101
101
 
102
102
 
@@ -65,6 +65,6 @@ def tx_removals_and_additions(results: Optional[SpendBundleConditions]) -> tuple
65
65
  for spend in results.spends:
66
66
  removals.append(bytes32(spend.coin_id))
67
67
  for puzzle_hash, amount, _ in spend.create_coin:
68
- additions.append(Coin(bytes32(spend.coin_id), bytes32(puzzle_hash), uint64(amount)))
68
+ additions.append(Coin(spend.coin_id, puzzle_hash, uint64(amount)))
69
69
 
70
70
  return removals, additions
@@ -72,34 +72,33 @@ def get_block_challenge(
72
72
  else:
73
73
  # No overflow, new slot with a new challenge
74
74
  challenge = header_block.finished_sub_slots[-1].challenge_chain.get_hash()
75
+ elif genesis_block:
76
+ challenge = constants.GENESIS_CHALLENGE
75
77
  else:
76
- if genesis_block:
77
- challenge = constants.GENESIS_CHALLENGE
78
- else:
79
- if overflow:
80
- if skip_overflow_last_ss_validation:
81
- # Overflow infusion without the new slot, so get the last challenge
82
- challenges_to_look_for = 1
83
- else:
84
- # Overflow infusion, so get the second to last challenge. skip_overflow_last_ss_validation is False,
85
- # Which means no sub slots are omitted
86
- challenges_to_look_for = 2
87
- else:
78
+ if overflow:
79
+ if skip_overflow_last_ss_validation:
80
+ # Overflow infusion without the new slot, so get the last challenge
88
81
  challenges_to_look_for = 1
89
- reversed_challenge_hashes: list[bytes32] = []
90
- curr: BlockRecord = blocks.block_record(header_block.prev_header_hash)
91
- while len(reversed_challenge_hashes) < challenges_to_look_for:
92
- if curr.first_in_sub_slot:
93
- assert curr.finished_challenge_slot_hashes is not None
94
- reversed_challenge_hashes += reversed(curr.finished_challenge_slot_hashes)
95
- if len(reversed_challenge_hashes) >= challenges_to_look_for:
96
- break
97
- if curr.height == 0:
98
- assert curr.finished_challenge_slot_hashes is not None
99
- assert len(curr.finished_challenge_slot_hashes) > 0
82
+ else:
83
+ # Overflow infusion, so get the second to last challenge. skip_overflow_last_ss_validation is False,
84
+ # Which means no sub slots are omitted
85
+ challenges_to_look_for = 2
86
+ else:
87
+ challenges_to_look_for = 1
88
+ reversed_challenge_hashes: list[bytes32] = []
89
+ curr: BlockRecord = blocks.block_record(header_block.prev_header_hash)
90
+ while len(reversed_challenge_hashes) < challenges_to_look_for:
91
+ if curr.first_in_sub_slot:
92
+ assert curr.finished_challenge_slot_hashes is not None
93
+ reversed_challenge_hashes += reversed(curr.finished_challenge_slot_hashes)
94
+ if len(reversed_challenge_hashes) >= challenges_to_look_for:
100
95
  break
101
- curr = blocks.block_record(curr.prev_hash)
102
- challenge = reversed_challenge_hashes[challenges_to_look_for - 1]
96
+ if curr.height == 0:
97
+ assert curr.finished_challenge_slot_hashes is not None
98
+ assert len(curr.finished_challenge_slot_hashes) > 0
99
+ break
100
+ curr = blocks.block_record(curr.prev_hash)
101
+ challenge = reversed_challenge_hashes[challenges_to_look_for - 1]
103
102
  return challenge
104
103
 
105
104
 
@@ -1,13 +1,28 @@
1
1
  from __future__ import annotations
2
2
 
3
+ from chia_rs import PlotSize
3
4
  from chia_rs.sized_ints import uint64
4
5
 
5
6
  # The actual space in bytes of a plot, is _expected_plot_size(k) * UI_ACTUAL_SPACE_CONSTANT_FACTO
6
7
  # This is not used in consensus, only for display purposes
7
8
  UI_ACTUAL_SPACE_CONSTANT_FACTOR = 0.78
8
9
 
10
+ # TODO: todo_v2_plots these values prelimenary. When the plotter is complete,
11
+ # replace this table with a closed form formula
12
+ v2_plot_sizes: dict[int, uint64] = {
13
+ 16: uint64(222_863),
14
+ 18: uint64(1_048_737),
15
+ 20: uint64(4_824_084),
16
+ 22: uint64(21_812_958),
17
+ 24: uint64(97_318_160),
18
+ 26: uint64(429_539_960),
19
+ 28: uint64(1_879_213_114),
20
+ 30: uint64(8_161_097_549),
21
+ 32: uint64(35_221_370_574),
22
+ }
9
23
 
10
- def _expected_plot_size(k: int) -> uint64:
24
+
25
+ def _expected_plot_size(size: PlotSize) -> uint64:
11
26
  """
12
27
  Given the plot size parameter k (which is between 32 and 59), computes the
13
28
  expected size of the plot in bytes (times a constant factor). This is based on efficient encoding
@@ -16,4 +31,15 @@ def _expected_plot_size(k: int) -> uint64:
16
31
  is necessary to store the entries in the plot.
17
32
  """
18
33
 
19
- return uint64(((2 * k) + 1) * (2 ** (k - 1)))
34
+ k: int
35
+ if size.size_v1 is not None:
36
+ k = size.size_v1
37
+ return uint64(((2 * k) + 1) * (2 ** (k - 1)))
38
+ else:
39
+ assert size.size_v2 is not None
40
+ k = size.size_v2
41
+ if k in v2_plot_sizes:
42
+ return v2_plot_sizes[k]
43
+ else:
44
+ # TODO: todo_v2_plots support test plots with lower k-values
45
+ return uint64(0)
@@ -10,9 +10,6 @@ from chia.consensus.pos_quality import _expected_plot_size
10
10
  from chia.types.blockchain_format.proof_of_space import verify_and_get_quality_string
11
11
  from chia.util.hash import std_hash
12
12
 
13
- # TODO: todo_v2_plots add to chia_rs and get from constants
14
- PHASE_OUT_PERIOD = uint32(10000000)
15
-
16
13
 
17
14
  def is_overflow_block(constants: ConsensusConstants, signage_point_index: uint8) -> bool:
18
15
  if signage_point_index >= constants.NUM_SPS_SUB_SLOT:
@@ -38,7 +35,7 @@ def calculate_phase_out(
38
35
  ) -> uint64:
39
36
  if prev_transaction_block_height <= constants.HARD_FORK2_HEIGHT:
40
37
  return uint64(0)
41
- elif uint32(prev_transaction_block_height - constants.HARD_FORK2_HEIGHT) >= PHASE_OUT_PERIOD:
38
+ elif uint32(prev_transaction_block_height - constants.HARD_FORK2_HEIGHT) >= constants.PLOT_V1_PHASE_OUT:
42
39
  return uint64(calculate_sp_interval_iters(constants, sub_slot_iters))
43
40
 
44
41
  return uint64(
@@ -46,7 +43,7 @@ def calculate_phase_out(
46
43
  uint32(prev_transaction_block_height - constants.HARD_FORK2_HEIGHT)
47
44
  * calculate_sp_interval_iters(constants, sub_slot_iters)
48
45
  )
49
- // PHASE_OUT_PERIOD
46
+ // constants.PLOT_V1_PHASE_OUT
50
47
  )
51
48
 
52
49
 
@@ -113,17 +110,18 @@ def calculate_iterations_quality(
113
110
  """
114
111
  if size.size_v1 is not None:
115
112
  assert size.size_v2 is None
116
- sp_quality_string: bytes32 = std_hash(quality_string + cc_sp_output_hash)
117
113
  phase_out = calculate_phase_out(constants, ssi, prev_transaction_block_height)
118
- iters = uint64(
119
- (
120
- int(difficulty)
121
- * int(constants.DIFFICULTY_CONSTANT_FACTOR)
122
- * int.from_bytes(sp_quality_string, "big", signed=False)
123
- // (int(pow(2, 256)) * int(_expected_plot_size(size.size_v1)))
124
- )
125
- + phase_out
126
- )
127
- return max(iters, uint64(1))
128
114
  else:
129
- raise NotImplementedError
115
+ phase_out = uint64(0)
116
+
117
+ sp_quality_string: bytes32 = std_hash(quality_string + cc_sp_output_hash)
118
+ iters = uint64(
119
+ (
120
+ int(difficulty)
121
+ * int(constants.DIFFICULTY_CONSTANT_FACTOR)
122
+ * int.from_bytes(sp_quality_string, "big", signed=False)
123
+ // (int(pow(2, 256)) * int(_expected_plot_size(size)))
124
+ )
125
+ + phase_out
126
+ )
127
+ return max(iters, uint64(1))
@@ -384,6 +384,11 @@ class KeychainProxy(DaemonProxy):
384
384
  self.log.error(f"{err}")
385
385
  raise KeychainMalformedResponse(f"{err}")
386
386
  elif private:
387
+ if ent is None:
388
+ err = f"Missing ent in {response.get('command')} response"
389
+ self.log.error(f"{err}")
390
+ raise KeychainMalformedResponse(f"{err}")
391
+
387
392
  mnemonic = bytes_to_mnemonic(bytes.fromhex(ent))
388
393
  seed = mnemonic_to_seed(mnemonic)
389
394
  private_key = AugSchemeMPL.key_gen(seed)
chia/daemon/server.py CHANGED
@@ -1373,9 +1373,8 @@ class WebSocketServer:
1373
1373
  "service": service,
1374
1374
  "queue": self.extract_plot_queue(),
1375
1375
  }
1376
- else:
1377
- if self.ping_job is None:
1378
- self.ping_job = create_referenced_task(self.ping_task())
1376
+ elif self.ping_job is None:
1377
+ self.ping_job = create_referenced_task(self.ping_task())
1379
1378
  self.log.info(f"registered for service {service}")
1380
1379
  log.info(f"{response}")
1381
1380
  return response