chia-blockchain 2.5.6rc2__py3-none-any.whl → 2.5.7rc1__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.
- chia/_tests/blockchain/blockchain_test_utils.py +6 -7
- chia/_tests/blockchain/test_augmented_chain.py +4 -3
- chia/_tests/blockchain/test_blockchain.py +10 -5
- chia/_tests/clvm/coin_store.py +1 -1
- chia/_tests/cmds/cmd_test_utils.py +84 -97
- chia/_tests/cmds/test_dev_gh.py +1 -1
- chia/_tests/cmds/test_farm_cmd.py +56 -2
- chia/_tests/cmds/wallet/test_consts.py +3 -1
- chia/_tests/cmds/wallet/test_did.py +3 -8
- chia/_tests/cmds/wallet/test_nft.py +6 -6
- chia/_tests/cmds/wallet/test_notifications.py +39 -21
- chia/_tests/cmds/wallet/test_vcs.py +2 -1
- chia/_tests/cmds/wallet/test_wallet.py +160 -136
- chia/_tests/conftest.py +51 -26
- chia/_tests/core/cmds/test_wallet.py +4 -3
- chia/_tests/core/consensus/test_pot_iterations.py +71 -24
- chia/_tests/core/custom_types/test_proof_of_space.py +60 -30
- chia/_tests/core/custom_types/test_spend_bundle.py +1 -4
- chia/_tests/core/data_layer/conftest.py +7 -2
- chia/_tests/core/data_layer/old_format/__init__.py +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-005876c1cdc4d5f1726551b207b9f63efc9cd2f72df80a3a26a1ba73d40d6745-delta-23-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-005876c1cdc4d5f1726551b207b9f63efc9cd2f72df80a3a26a1ba73d40d6745-full-23-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-01b36e72a975cdc00d6514eea81668d19e8ea3150217ae98cb3361688a016fab-delta-9-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-01b36e72a975cdc00d6514eea81668d19e8ea3150217ae98cb3361688a016fab-full-9-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-06147c3b12d73e9b83b686a8c10b4a36a513c8a93c0ff99ae197f06326278be9-delta-5-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-06147c3b12d73e9b83b686a8c10b4a36a513c8a93c0ff99ae197f06326278be9-full-5-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-073c051a5934ad3b8db39eee2189e4300e55f48aaa17ff4ae30eeae088ff544a-delta-22-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-073c051a5934ad3b8db39eee2189e4300e55f48aaa17ff4ae30eeae088ff544a-full-22-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-0cc077559b9c7b4aefe8f8f591c195e0779bebdf89f2ad8285a00ea5f859d965-delta-1-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-0cc077559b9c7b4aefe8f8f591c195e0779bebdf89f2ad8285a00ea5f859d965-full-1-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-16377275567b723b20936d3f1ec0a2fd83f6ac379b922351a5e4c54949069f3b-delta-2-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-16377275567b723b20936d3f1ec0a2fd83f6ac379b922351a5e4c54949069f3b-full-2-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-1cb824a7a5f02cd30ac6c38e8f6216780d9bfa2d24811d282a368dcd541438a7-delta-29-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-1cb824a7a5f02cd30ac6c38e8f6216780d9bfa2d24811d282a368dcd541438a7-full-29-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-27b89dc4809ebc5a3b87757d35e95e2761d978cf121e44fa2773a5c06e4cc7b5-delta-28-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-27b89dc4809ebc5a3b87757d35e95e2761d978cf121e44fa2773a5c06e4cc7b5-full-28-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-28a6b7c134abfaeb0ab58a018313f6c87a61a40a4d9ec9bedf53aa1d12f3ee37-delta-7-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-28a6b7c134abfaeb0ab58a018313f6c87a61a40a4d9ec9bedf53aa1d12f3ee37-full-7-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-30a6bfe7cecbeda259a295dc6de3a436357f52388c3b03d86901e7da68565aeb-delta-19-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-30a6bfe7cecbeda259a295dc6de3a436357f52388c3b03d86901e7da68565aeb-full-19-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-343a2bf9add798e3ac2e6a571823cf9fa7e8a1bed532143354ead2648bd036ef-delta-10-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-343a2bf9add798e3ac2e6a571823cf9fa7e8a1bed532143354ead2648bd036ef-full-10-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-4d90efbc1fb3df324193831ea4a57dd5e10e67d9653343eb18d178272adb0447-delta-17-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-4d90efbc1fb3df324193831ea4a57dd5e10e67d9653343eb18d178272adb0447-full-17-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-4dd2ea099e91635c441f40b36d3f84078a2d818d2dc601c7278e72cbdfe3eca8-delta-20-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-4dd2ea099e91635c441f40b36d3f84078a2d818d2dc601c7278e72cbdfe3eca8-full-20-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-509effbdca78639023b933ce6c08a0465fb247e1cd5329e9e9c553940e4b6e46-delta-31-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-509effbdca78639023b933ce6c08a0465fb247e1cd5329e9e9c553940e4b6e46-full-31-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-5379a4d9ff29c29d1ef0906d22e82c52472753d31806189ab813c43365341b78-delta-40-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-5379a4d9ff29c29d1ef0906d22e82c52472753d31806189ab813c43365341b78-full-40-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-55908eda5686a8f89e4c50672cbe893ec1734fb23449dc03325efe7c414f9aa4-delta-49-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-55908eda5686a8f89e4c50672cbe893ec1734fb23449dc03325efe7c414f9aa4-full-49-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-57cc2691fb1fb986c99a58bcb0e029d0cd0cff41553d703147c54196d7d9ca63-delta-14-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-57cc2691fb1fb986c99a58bcb0e029d0cd0cff41553d703147c54196d7d9ca63-full-14-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-5943bf8ae4f5e59969d8570e4f40a8223299febdcfbcf188b3b3e2ab11044e18-delta-34-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-5943bf8ae4f5e59969d8570e4f40a8223299febdcfbcf188b3b3e2ab11044e18-full-34-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6518527b7c939bee60ce6b024cbe90d3b9d8913c56b8ce11a4df5da7ff7db1c8-delta-8-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6518527b7c939bee60ce6b024cbe90d3b9d8913c56b8ce11a4df5da7ff7db1c8-full-8-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-66ff26a26620379e14a7c91252d27ee4dbe06ad69a3a390a88642fe757f2b288-delta-45-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-66ff26a26620379e14a7c91252d27ee4dbe06ad69a3a390a88642fe757f2b288-full-45-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6bd0a508ee2c4afbe9d4daa811139fd6e54e7f4e16850cbce999fa30f8bdccd2-delta-6-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6bd0a508ee2c4afbe9d4daa811139fd6e54e7f4e16850cbce999fa30f8bdccd2-full-6-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6ce850d0d77ca743fcc2fc792747472e5d2c1c0813aa43abbb370554428fc897-delta-48-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6ce850d0d77ca743fcc2fc792747472e5d2c1c0813aa43abbb370554428fc897-full-48-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6eb4ca2e1552b156c5969396b49070eb08ad6c96b347359387519be59f7ccaed-delta-26-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-6eb4ca2e1552b156c5969396b49070eb08ad6c96b347359387519be59f7ccaed-full-26-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-71c797fb7592d3f0a5a20c79ab8497ddaa0fd9ec17712e109d25c91b3f3c76e5-delta-3-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-71c797fb7592d3f0a5a20c79ab8497ddaa0fd9ec17712e109d25c91b3f3c76e5-full-3-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-73357026053d5a4969e7a6b9aeeef91c14cc6d5f32fc700fe6d21d2a1b22496c-delta-25-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-73357026053d5a4969e7a6b9aeeef91c14cc6d5f32fc700fe6d21d2a1b22496c-full-25-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-7c897e5c46e834ced65bde7de87716acfaa5dffbdb30b5cd9377d8c319df2034-delta-35-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-7c897e5c46e834ced65bde7de87716acfaa5dffbdb30b5cd9377d8c319df2034-full-35-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-87b8394d80d08117a5a1cd04ed8a682564eab7197a2c090159863591b5108874-delta-4-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-87b8394d80d08117a5a1cd04ed8a682564eab7197a2c090159863591b5108874-full-4-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-89eb40b9cc0921c5f5c3feb20927c13a9ada5760f82d219dcee153b7d400165c-delta-41-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-89eb40b9cc0921c5f5c3feb20927c13a9ada5760f82d219dcee153b7d400165c-full-41-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-8b649433156b8c924436cdec9c6de26106fd6f73a0528570f48748f7b40d7f8a-delta-21-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-8b649433156b8c924436cdec9c6de26106fd6f73a0528570f48748f7b40d7f8a-full-21-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-8d364023a0834c8c3077e236a465493acbf488e4f9d1f4c6cc230343c10a8f7d-delta-42-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-8d364023a0834c8c3077e236a465493acbf488e4f9d1f4c6cc230343c10a8f7d-full-42-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-925689e24a3d98d98676d816cdd8b73e7b2df057d9d4503da9b27bf91d79666c-delta-38-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-925689e24a3d98d98676d816cdd8b73e7b2df057d9d4503da9b27bf91d79666c-full-38-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-937be3d428b19f521be4f98faecc3307ae11ee731c76992f417fa4268d13859e-delta-11-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-937be3d428b19f521be4f98faecc3307ae11ee731c76992f417fa4268d13859e-full-11-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-97f34af499b79e2111fc296a598fc9654c2467ea038dfea41fd58241fb3642de-delta-32-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-97f34af499b79e2111fc296a598fc9654c2467ea038dfea41fd58241fb3642de-full-32-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-9d1b737243b8a1d0022f2b36ac53333c6280354a74d77f2a3642dcab35204e59-delta-33-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-9d1b737243b8a1d0022f2b36ac53333c6280354a74d77f2a3642dcab35204e59-full-33-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-a6663f98ef6ddf6db55f01163e34bb2e87aa82f0347e79ce31e8dbfa390c480c-delta-47-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-a6663f98ef6ddf6db55f01163e34bb2e87aa82f0347e79ce31e8dbfa390c480c-full-47-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-aa77376d1ccd3664e5c6366e010c52a978fedbf40f5ce262fee71b2e7fe0c6a9-delta-50-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-aa77376d1ccd3664e5c6366e010c52a978fedbf40f5ce262fee71b2e7fe0c6a9-full-50-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-b0f28514741ed1a71f5c6544bf92f9e0e493c5f3cf28328909771d8404eff626-delta-24-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-b0f28514741ed1a71f5c6544bf92f9e0e493c5f3cf28328909771d8404eff626-full-24-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-b3efee5358e6eb89ab3b60db2d128d57eef39e8538fb63c5632412d4f8e7d09e-delta-44-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-b3efee5358e6eb89ab3b60db2d128d57eef39e8538fb63c5632412d4f8e7d09e-full-44-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-bb0b56b6eb7acbb4e80893b04c72412fe833418232e1ed7b06d97d7a7f08b4e1-delta-16-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-bb0b56b6eb7acbb4e80893b04c72412fe833418232e1ed7b06d97d7a7f08b4e1-full-16-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-bc45262b757ff494b53bd2a8fba0f5511cc1f9c2a2c5360e04ea8cebbf6409df-delta-13-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-bc45262b757ff494b53bd2a8fba0f5511cc1f9c2a2c5360e04ea8cebbf6409df-full-13-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-bd0494ba430aff13458b557113b073d226eaf11257dfe26ff3323fa1cfe1335b-delta-39-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-bd0494ba430aff13458b557113b073d226eaf11257dfe26ff3323fa1cfe1335b-full-39-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-cd04f5fbba1553fa728b4dd8131d4723aaac288e0c7dc080447fbf0872c0a6eb-delta-36-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-cd04f5fbba1553fa728b4dd8131d4723aaac288e0c7dc080447fbf0872c0a6eb-full-36-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-cdd2399557fb3163a848f08831fdc833703354edb19a0d32a965fdb140f160c2-delta-18-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-cdd2399557fb3163a848f08831fdc833703354edb19a0d32a965fdb140f160c2-full-18-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-cf7a08fca7b1332095242e4d9800f4b94a3f4eaae88fe8407da42736d54b9e18-delta-37-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-cf7a08fca7b1332095242e4d9800f4b94a3f4eaae88fe8407da42736d54b9e18-full-37-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-d1f97465a9f52187e2ef3a0d811a1258f52380a65340c55f3e8e65b92753bc13-delta-15-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-d1f97465a9f52187e2ef3a0d811a1258f52380a65340c55f3e8e65b92753bc13-full-15-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-e475eccd4ee597e5ff67b1a249e37d65d6e3f754c3f0379fdb43692513588fef-delta-46-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-e475eccd4ee597e5ff67b1a249e37d65d6e3f754c3f0379fdb43692513588fef-full-46-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-e82e63517d78fd65b23a05c3b9a98cf905ddad7026995a238bfe634006b84cd0-delta-27-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-e82e63517d78fd65b23a05c3b9a98cf905ddad7026995a238bfe634006b84cd0-full-27-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-ed2cf0fd6c0f6237c87c161e1fca303b3fbe6c04e01f652b88720b4572143349-delta-12-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-ed2cf0fd6c0f6237c87c161e1fca303b3fbe6c04e01f652b88720b4572143349-full-12-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-f6e454eaf24a83c46a7bed4c19260a0a3ce0ed5c51739cb6d748d4913dc2ef58-delta-30-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-f6e454eaf24a83c46a7bed4c19260a0a3ce0ed5c51739cb6d748d4913dc2ef58-full-30-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-f7ad2bdf86d9609b4d6381086ec1e296bf558e2ff467ead29dd7fa6e31bacc56-delta-43-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e612073746f7265206964-f7ad2bdf86d9609b4d6381086ec1e296bf558e2ff467ead29dd7fa6e31bacc56-full-43-v1.0.dat +0 -0
- chia/_tests/core/data_layer/old_format/files/__init__.py +0 -0
- chia/_tests/core/data_layer/old_format/old_db.sqlite +0 -0
- chia/_tests/core/data_layer/test_data_layer_util.py +18 -21
- chia/_tests/core/data_layer/test_data_rpc.py +77 -28
- chia/_tests/core/data_layer/test_data_store.py +637 -700
- chia/_tests/core/data_layer/test_data_store_schema.py +2 -209
- chia/_tests/core/full_node/ram_db.py +1 -1
- chia/_tests/core/full_node/stores/test_block_store.py +4 -10
- chia/_tests/core/full_node/stores/test_coin_store.py +1 -1
- chia/_tests/core/full_node/test_address_manager.py +3 -3
- chia/_tests/core/full_node/test_block_height_map.py +1 -1
- chia/_tests/core/full_node/test_full_node.py +91 -30
- chia/_tests/core/full_node/test_generator_tools.py +17 -10
- chia/_tests/core/mempool/test_mempool.py +190 -90
- chia/_tests/core/mempool/test_mempool_fee_estimator.py +2 -4
- chia/_tests/core/mempool/test_mempool_item_queries.py +1 -1
- chia/_tests/core/mempool/test_mempool_manager.py +134 -75
- chia/_tests/core/mempool/test_singleton_fast_forward.py +9 -27
- chia/_tests/core/server/serve.py +0 -2
- chia/_tests/core/server/test_rate_limits.py +400 -347
- chia/_tests/core/server/test_server.py +2 -2
- chia/_tests/core/services/test_services.py +7 -7
- chia/_tests/core/test_cost_calculation.py +31 -10
- chia/_tests/core/test_crawler.py +4 -4
- chia/_tests/core/test_db_conversion.py +7 -14
- chia/_tests/core/test_db_validation.py +2 -6
- chia/_tests/core/test_farmer_harvester_rpc.py +34 -1
- chia/_tests/core/test_full_node_rpc.py +28 -24
- chia/_tests/core/test_merkle_set.py +1 -4
- chia/_tests/core/test_seeder.py +1 -1
- chia/_tests/core/util/test_keychain.py +2 -2
- chia/_tests/core/util/test_lru_cache.py +16 -0
- chia/_tests/core/util/test_streamable.py +85 -4
- chia/_tests/environments/wallet.py +4 -1
- chia/_tests/farmer_harvester/test_farmer.py +8 -6
- chia/_tests/farmer_harvester/test_farmer_harvester.py +306 -8
- chia/_tests/farmer_harvester/test_filter_prefix_bits.py +3 -3
- chia/_tests/farmer_harvester/test_third_party_harvesters.py +11 -11
- chia/_tests/fee_estimation/test_fee_estimation_integration.py +2 -2
- chia/_tests/fee_estimation/test_fee_estimation_rpc.py +1 -1
- chia/_tests/fee_estimation/test_fee_estimation_unit_tests.py +1 -2
- chia/_tests/generator/test_rom.py +2 -1
- chia/_tests/harvester/__init__.py +0 -0
- chia/_tests/harvester/config.py +4 -0
- chia/_tests/harvester/test_harvester_api.py +157 -0
- chia/_tests/plot_sync/test_plot_sync.py +6 -3
- chia/_tests/plot_sync/test_receiver.py +16 -4
- chia/_tests/plot_sync/test_sender.py +8 -7
- chia/_tests/plot_sync/test_sync_simulated.py +15 -13
- chia/_tests/plot_sync/util.py +3 -2
- chia/_tests/plotting/test_plot_manager.py +21 -5
- chia/_tests/plotting/test_prover.py +106 -0
- chia/_tests/pools/test_pool_cmdline.py +7 -6
- chia/_tests/pools/test_pool_puzzles_lifecycle.py +10 -3
- chia/_tests/pools/test_pool_rpc.py +92 -64
- chia/_tests/solver/__init__.py +0 -0
- chia/_tests/solver/config.py +4 -0
- chia/_tests/solver/test_solver_service.py +29 -0
- chia/_tests/timelord/test_new_peak.py +1 -1
- chia/_tests/timelord/test_timelord.py +1 -1
- chia/_tests/util/benchmarks.py +5 -12
- chia/_tests/util/blockchain.py +1 -1
- chia/_tests/util/build_network_protocol_files.py +7 -0
- chia/_tests/util/network_protocol_data.py +26 -0
- chia/_tests/util/protocol_messages_bytes-v1.0 +0 -0
- chia/_tests/util/protocol_messages_json.py +19 -0
- chia/_tests/util/setup_nodes.py +21 -2
- chia/_tests/util/spend_sim.py +9 -3
- chia/_tests/util/test_condition_tools.py +3 -2
- chia/_tests/util/test_full_block_utils.py +10 -9
- chia/_tests/util/test_misc.py +10 -10
- chia/_tests/util/test_network.py +32 -1
- chia/_tests/util/test_network_protocol_files.py +333 -318
- chia/_tests/util/test_network_protocol_json.py +6 -0
- chia/_tests/util/test_network_protocol_test.py +27 -0
- chia/_tests/util/test_priority_mutex.py +1 -1
- chia/_tests/util/test_replace_str_to_bytes.py +6 -6
- chia/_tests/wallet/cat_wallet/test_cat_wallet.py +17 -13
- chia/_tests/wallet/cat_wallet/test_trades.py +55 -55
- chia/_tests/wallet/did_wallet/test_did.py +118 -1229
- chia/_tests/wallet/nft_wallet/config.py +1 -1
- chia/_tests/wallet/nft_wallet/test_nft_1_offers.py +73 -96
- chia/_tests/wallet/nft_wallet/test_nft_bulk_mint.py +15 -12
- chia/_tests/wallet/nft_wallet/test_nft_offers.py +67 -134
- chia/_tests/wallet/nft_wallet/test_nft_wallet.py +31 -26
- chia/_tests/wallet/rpc/test_wallet_rpc.py +765 -371
- chia/_tests/wallet/sync/test_wallet_sync.py +6 -0
- chia/_tests/wallet/test_new_wallet_protocol.py +1 -1
- chia/_tests/wallet/test_signer_protocol.py +2 -2
- chia/_tests/wallet/test_singleton_lifecycle_fast.py +3 -4
- chia/_tests/wallet/test_transaction_store.py +42 -33
- chia/_tests/wallet/test_wallet.py +22 -31
- chia/_tests/wallet/test_wallet_state_manager.py +14 -7
- chia/_tests/wallet/vc_wallet/test_vc_wallet.py +53 -32
- chia/apis.py +2 -0
- chia/cmds/beta.py +7 -3
- chia/cmds/chia.py +2 -0
- chia/cmds/cmd_classes.py +11 -27
- chia/cmds/cmds_util.py +3 -0
- chia/cmds/coin_funcs.py +27 -22
- chia/cmds/configure.py +42 -18
- chia/cmds/dev/data.py +22 -3
- chia/cmds/farm.py +32 -0
- chia/cmds/farm_funcs.py +54 -5
- chia/cmds/init_funcs.py +4 -0
- chia/cmds/keys_funcs.py +8 -10
- chia/cmds/peer_funcs.py +8 -10
- chia/cmds/plotnft_funcs.py +24 -16
- chia/cmds/rpc.py +11 -1
- chia/cmds/show_funcs.py +5 -5
- chia/cmds/solver.py +33 -0
- chia/cmds/solver_funcs.py +21 -0
- chia/cmds/wallet_funcs.py +149 -96
- chia/consensus/block_body_validation.py +8 -9
- chia/consensus/block_creation.py +9 -10
- chia/consensus/block_header_validation.py +61 -69
- chia/{full_node → consensus}/block_height_map.py +2 -1
- chia/consensus/block_height_map_protocol.py +21 -0
- chia/consensus/block_rewards.py +12 -12
- chia/consensus/blockchain.py +8 -18
- chia/consensus/default_constants.py +6 -6
- chia/consensus/generator_tools.py +1 -1
- chia/consensus/get_block_challenge.py +24 -25
- chia/consensus/pos_quality.py +28 -2
- chia/consensus/pot_iterations.py +15 -17
- chia/daemon/keychain_proxy.py +5 -0
- chia/daemon/server.py +2 -3
- chia/data_layer/data_layer.py +32 -24
- chia/data_layer/data_layer_errors.py +5 -0
- chia/data_layer/data_layer_rpc_api.py +1 -1
- chia/data_layer/data_layer_service.py +8 -0
- chia/data_layer/data_layer_util.py +49 -89
- chia/data_layer/data_layer_wallet.py +20 -17
- chia/data_layer/data_store.py +1051 -1462
- chia/data_layer/download_data.py +44 -115
- chia/{server → data_layer}/start_data_layer.py +2 -1
- chia/data_layer/util/benchmark.py +38 -53
- chia/farmer/farmer.py +3 -0
- chia/farmer/farmer_api.py +104 -5
- chia/farmer/farmer_rpc_api.py +20 -0
- chia/farmer/farmer_rpc_client.py +6 -2
- chia/farmer/farmer_service.py +8 -0
- chia/{server → farmer}/start_farmer.py +4 -3
- chia/full_node/block_store.py +20 -10
- chia/full_node/coin_store.py +12 -4
- chia/full_node/eligible_coin_spends.py +17 -72
- chia/full_node/full_node.py +68 -71
- chia/full_node/full_node_api.py +26 -32
- chia/full_node/full_node_rpc_api.py +44 -32
- chia/full_node/full_node_rpc_client.py +67 -79
- chia/full_node/full_node_service.py +8 -0
- chia/full_node/full_node_store.py +5 -3
- chia/full_node/mempool.py +14 -14
- chia/full_node/mempool_manager.py +67 -89
- chia/{server → full_node}/start_full_node.py +1 -1
- chia/full_node/subscriptions.py +2 -2
- chia/full_node/weight_proof.py +14 -15
- chia/harvester/harvester.py +8 -1
- chia/harvester/harvester_api.py +178 -44
- chia/harvester/harvester_service.py +8 -0
- chia/{server → harvester}/start_harvester.py +1 -1
- chia/introducer/introducer_service.py +8 -0
- chia/{server → introducer}/start_introducer.py +1 -1
- chia/plot_sync/receiver.py +6 -1
- chia/plot_sync/sender.py +7 -4
- chia/plotting/cache.py +37 -28
- chia/plotting/check_plots.py +83 -48
- chia/plotting/create_plots.py +3 -4
- chia/plotting/manager.py +18 -13
- chia/plotting/prover.py +153 -0
- chia/plotting/util.py +14 -6
- chia/pools/pool_wallet.py +6 -4
- chia/protocols/harvester_protocol.py +14 -0
- chia/protocols/outbound_message.py +1 -0
- chia/protocols/pool_protocol.py +1 -1
- chia/protocols/protocol_message_types.py +7 -0
- chia/protocols/shared_protocol.py +2 -0
- chia/protocols/solver_protocol.py +18 -0
- chia/rpc/rpc_server.py +1 -1
- chia/seeder/crawl_store.py +4 -8
- chia/seeder/crawler.py +2 -2
- chia/seeder/crawler_service.py +8 -0
- chia/seeder/start_crawler.py +1 -1
- chia/server/address_manager.py +12 -15
- chia/server/introducer_peers.py +1 -1
- chia/server/node_discovery.py +9 -10
- chia/server/rate_limit_numbers.py +157 -168
- chia/server/rate_limits.py +44 -41
- chia/server/resolve_peer_info.py +5 -0
- chia/server/server.py +17 -7
- chia/server/start_service.py +0 -1
- chia/simulator/block_tools.py +92 -58
- chia/simulator/full_node_simulator.py +1 -1
- chia/simulator/setup_services.py +51 -15
- chia/solver/__init__.py +0 -0
- chia/solver/solver.py +100 -0
- chia/solver/solver_api.py +59 -0
- chia/solver/solver_rpc_api.py +31 -0
- chia/solver/solver_rpc_client.py +16 -0
- chia/solver/solver_service.py +8 -0
- chia/solver/start_solver.py +102 -0
- {mozilla-ca → chia/ssl}/cacert.pem +0 -27
- chia/ssl/create_ssl.py +3 -2
- chia/{server → timelord}/start_timelord.py +1 -1
- chia/timelord/timelord.py +12 -13
- chia/timelord/timelord_service.py +8 -0
- chia/types/blockchain_format/proof_of_space.py +61 -17
- chia/types/coin_spend.py +0 -8
- chia/types/internal_mempool_item.py +3 -3
- chia/types/mempool_item.py +15 -8
- chia/types/mempool_submission_status.py +1 -1
- chia/util/config.py +1 -3
- chia/util/db_wrapper.py +7 -8
- chia/util/initial-config.yaml +46 -0
- chia/util/lru_cache.py +8 -4
- chia/util/network.py +9 -0
- chia/util/service_groups.py +3 -1
- chia/util/streamable.py +38 -8
- chia/util/virtual_project_analysis.py +1 -1
- chia/wallet/cat_wallet/cat_outer_puzzle.py +7 -4
- chia/wallet/cat_wallet/cat_wallet.py +13 -7
- chia/wallet/cat_wallet/r_cat_wallet.py +4 -1
- chia/wallet/conditions.py +1 -3
- chia/wallet/did_wallet/did_wallet.py +27 -332
- chia/wallet/nft_wallet/nft_puzzle_utils.py +1 -1
- chia/wallet/nft_wallet/nft_wallet.py +9 -7
- chia/wallet/puzzle_drivers.py +7 -8
- chia/{server → wallet}/start_wallet.py +1 -1
- chia/wallet/trade_manager.py +12 -9
- chia/wallet/transaction_record.py +14 -51
- chia/wallet/util/clvm_streamable.py +28 -41
- chia/wallet/util/merkle_utils.py +2 -2
- chia/wallet/util/tx_config.py +3 -6
- chia/wallet/vc_wallet/cr_cat_wallet.py +12 -6
- chia/wallet/vc_wallet/vc_wallet.py +13 -15
- chia/wallet/wallet.py +5 -3
- chia/wallet/wallet_node.py +25 -30
- chia/wallet/wallet_request_types.py +538 -101
- chia/wallet/wallet_rpc_api.py +398 -570
- chia/wallet/wallet_rpc_client.py +144 -332
- chia/wallet/wallet_service.py +8 -0
- chia/wallet/wallet_state_manager.py +53 -42
- chia/wallet/wallet_transaction_store.py +13 -5
- {chia_blockchain-2.5.6rc2.dist-info → chia_blockchain-2.5.7rc1.dist-info}/METADATA +31 -31
- {chia_blockchain-2.5.6rc2.dist-info → chia_blockchain-2.5.7rc1.dist-info}/RECORD +368 -240
- {chia_blockchain-2.5.6rc2.dist-info → chia_blockchain-2.5.7rc1.dist-info}/WHEEL +1 -1
- {chia_blockchain-2.5.6rc2.dist-info → chia_blockchain-2.5.7rc1.dist-info}/entry_points.txt +8 -7
- chia/full_node/mempool_check_conditions.py +0 -102
- chia/server/aliases.py +0 -35
- {chia_blockchain-2.5.6rc2.dist-info → chia_blockchain-2.5.7rc1.dist-info/licenses}/LICENSE +0 -0
chia/full_node/full_node_api.py
CHANGED
|
@@ -30,6 +30,7 @@ from chia_rs import (
|
|
|
30
30
|
additions_and_removals,
|
|
31
31
|
get_flags_for_height_and_constants,
|
|
32
32
|
)
|
|
33
|
+
from chia_rs import get_puzzle_and_solution_for_coin2 as get_puzzle_and_solution_for_coin
|
|
33
34
|
from chia_rs.sized_bytes import bytes32
|
|
34
35
|
from chia_rs.sized_ints import uint8, uint32, uint64, uint128
|
|
35
36
|
from chiabip158 import PyBIP158
|
|
@@ -43,7 +44,6 @@ from chia.consensus.signage_point import SignagePoint
|
|
|
43
44
|
from chia.full_node.coin_store import CoinStore
|
|
44
45
|
from chia.full_node.fee_estimator_interface import FeeEstimatorInterface
|
|
45
46
|
from chia.full_node.full_block_utils import get_height_and_tx_status_from_block, header_block_from_block
|
|
46
|
-
from chia.full_node.mempool_check_conditions import get_puzzle_and_solution_for_coin
|
|
47
47
|
from chia.full_node.tx_processing_queue import TransactionQueueEntry, TransactionQueueFull
|
|
48
48
|
from chia.protocols import farmer_protocol, full_node_protocol, introducer_protocol, timelord_protocol, wallet_protocol
|
|
49
49
|
from chia.protocols.fee_estimate import FeeEstimate, FeeEstimateGroup, fee_rate_v2_to_v1
|
|
@@ -72,6 +72,7 @@ from chia.types.mempool_inclusion_status import MempoolInclusionStatus
|
|
|
72
72
|
from chia.types.peer_info import PeerInfo
|
|
73
73
|
from chia.util.batches import to_batches
|
|
74
74
|
from chia.util.db_wrapper import SQLITE_MAX_VARIABLE_NUMBER
|
|
75
|
+
from chia.util.errors import Err, ValidationError
|
|
75
76
|
from chia.util.hash import std_hash
|
|
76
77
|
from chia.util.limited_semaphore import LimitedSemaphoreFullError
|
|
77
78
|
from chia.util.task_referencer import create_referenced_task
|
|
@@ -1001,14 +1002,14 @@ class FullNodeAPI:
|
|
|
1001
1002
|
)
|
|
1002
1003
|
|
|
1003
1004
|
# The block's timestamp must be greater than the previous transaction block's timestamp
|
|
1004
|
-
timestamp = uint64(
|
|
1005
|
+
timestamp = uint64(time.time())
|
|
1005
1006
|
curr: Optional[BlockRecord] = prev_b
|
|
1006
1007
|
while curr is not None and not curr.is_transaction_block and curr.height != 0:
|
|
1007
1008
|
curr = self.full_node.blockchain.try_block_record(curr.prev_hash)
|
|
1008
1009
|
if curr is not None:
|
|
1009
1010
|
assert curr.timestamp is not None
|
|
1010
1011
|
if timestamp <= curr.timestamp:
|
|
1011
|
-
timestamp = uint64(
|
|
1012
|
+
timestamp = uint64(curr.timestamp + 1)
|
|
1012
1013
|
|
|
1013
1014
|
self.log.info("Starting to make the unfinished block")
|
|
1014
1015
|
unfinished_block: UnfinishedBlock = create_unfinished_block(
|
|
@@ -1133,6 +1134,12 @@ class FullNodeAPI:
|
|
|
1133
1134
|
try:
|
|
1134
1135
|
await self.full_node.add_unfinished_block(new_candidate, None, True)
|
|
1135
1136
|
except Exception as e:
|
|
1137
|
+
if isinstance(e, ValidationError) and e.code == Err.NO_OVERFLOWS_IN_FIRST_SUB_SLOT_NEW_EPOCH:
|
|
1138
|
+
self.full_node.log.info(
|
|
1139
|
+
f"Failed to farm block {e}. Consensus rules prevent this block from being farmed. Not retrying"
|
|
1140
|
+
)
|
|
1141
|
+
return None
|
|
1142
|
+
|
|
1136
1143
|
# If we have an error with this block, try making an empty block
|
|
1137
1144
|
self.full_node.log.error(f"Error farming block {e} {new_candidate}")
|
|
1138
1145
|
candidate_tuple = self.full_node.full_node_store.get_candidate_block(
|
|
@@ -1393,14 +1400,11 @@ class FullNodeAPI:
|
|
|
1393
1400
|
error_name = error.name if error is not None else None
|
|
1394
1401
|
if status == MempoolInclusionStatus.SUCCESS:
|
|
1395
1402
|
response = wallet_protocol.TransactionAck(spend_name, uint8(status.value), error_name)
|
|
1403
|
+
# If it failed/pending, but it previously succeeded (in mempool), this is idempotence, return SUCCESS
|
|
1404
|
+
elif self.full_node.mempool_manager.get_spendbundle(spend_name) is not None:
|
|
1405
|
+
response = wallet_protocol.TransactionAck(spend_name, uint8(MempoolInclusionStatus.SUCCESS.value), None)
|
|
1396
1406
|
else:
|
|
1397
|
-
|
|
1398
|
-
if self.full_node.mempool_manager.get_spendbundle(spend_name) is not None:
|
|
1399
|
-
response = wallet_protocol.TransactionAck(
|
|
1400
|
-
spend_name, uint8(MempoolInclusionStatus.SUCCESS.value), None
|
|
1401
|
-
)
|
|
1402
|
-
else:
|
|
1403
|
-
response = wallet_protocol.TransactionAck(spend_name, uint8(status.value), error_name)
|
|
1407
|
+
response = wallet_protocol.TransactionAck(spend_name, uint8(status.value), error_name)
|
|
1404
1408
|
return make_msg(ProtocolMessageTypes.transaction_ack, response)
|
|
1405
1409
|
|
|
1406
1410
|
@metadata.request()
|
|
@@ -1427,17 +1431,18 @@ class FullNodeAPI:
|
|
|
1427
1431
|
)
|
|
1428
1432
|
assert block_generator is not None
|
|
1429
1433
|
try:
|
|
1430
|
-
|
|
1434
|
+
puzzle, solution = await asyncio.get_running_loop().run_in_executor(
|
|
1431
1435
|
self.executor,
|
|
1432
1436
|
get_puzzle_and_solution_for_coin,
|
|
1433
|
-
block_generator,
|
|
1437
|
+
block_generator.program,
|
|
1438
|
+
block_generator.generator_refs,
|
|
1439
|
+
self.full_node.constants.MAX_BLOCK_COST_CLVM,
|
|
1434
1440
|
coin_record.coin,
|
|
1435
|
-
height,
|
|
1436
|
-
self.full_node.constants,
|
|
1441
|
+
get_flags_for_height_and_constants(height, self.full_node.constants),
|
|
1437
1442
|
)
|
|
1438
1443
|
except ValueError:
|
|
1439
1444
|
return reject_msg
|
|
1440
|
-
wrapper = PuzzleSolutionResponse(coin_name, height,
|
|
1445
|
+
wrapper = PuzzleSolutionResponse(coin_name, height, puzzle, solution)
|
|
1441
1446
|
response = wallet_protocol.RespondPuzzleSolution(wrapper)
|
|
1442
1447
|
response_msg = make_msg(ProtocolMessageTypes.respond_puzzle_solution, response)
|
|
1443
1448
|
return response_msg
|
|
@@ -1452,24 +1457,13 @@ class FullNodeAPI:
|
|
|
1452
1457
|
|
|
1453
1458
|
if request.end_height < request.start_height or request.end_height - request.start_height > 128:
|
|
1454
1459
|
return make_msg(ProtocolMessageTypes.reject_block_headers, reject)
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
return make_msg(ProtocolMessageTypes.reject_block_headers, reject)
|
|
1462
|
-
|
|
1463
|
-
else:
|
|
1464
|
-
height_to_hash = self.full_node.blockchain.height_to_hash
|
|
1465
|
-
header_hashes: list[bytes32] = []
|
|
1466
|
-
for i in range(request.start_height, request.end_height + 1):
|
|
1467
|
-
header_hash: Optional[bytes32] = height_to_hash(uint32(i))
|
|
1468
|
-
if header_hash is None:
|
|
1469
|
-
return make_msg(ProtocolMessageTypes.reject_header_blocks, reject)
|
|
1470
|
-
header_hashes.append(header_hash)
|
|
1460
|
+
try:
|
|
1461
|
+
blocks_bytes = await self.full_node.block_store.get_block_bytes_in_range(
|
|
1462
|
+
request.start_height, request.end_height
|
|
1463
|
+
)
|
|
1464
|
+
except ValueError:
|
|
1465
|
+
return make_msg(ProtocolMessageTypes.reject_block_headers, reject)
|
|
1471
1466
|
|
|
1472
|
-
blocks_bytes = await self.full_node.block_store.get_block_bytes_by_hash(header_hashes)
|
|
1473
1467
|
if len(blocks_bytes) != (request.end_height - request.start_height + 1): # +1 because interval is inclusive
|
|
1474
1468
|
return make_msg(ProtocolMessageTypes.reject_block_headers, reject)
|
|
1475
1469
|
return_filter = request.return_filter
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import asyncio
|
|
4
4
|
import time
|
|
5
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
5
6
|
from datetime import datetime, timezone
|
|
6
7
|
from typing import TYPE_CHECKING, Any, ClassVar, Optional, cast
|
|
7
8
|
|
|
@@ -13,8 +14,12 @@ from chia_rs import (
|
|
|
13
14
|
PlotSize,
|
|
14
15
|
SpendBundle,
|
|
15
16
|
SpendBundleConditions,
|
|
17
|
+
get_flags_for_height_and_constants,
|
|
18
|
+
get_spends_for_trusted_block,
|
|
19
|
+
get_spends_for_trusted_block_with_conditions,
|
|
16
20
|
run_block_generator2,
|
|
17
21
|
)
|
|
22
|
+
from chia_rs import get_puzzle_and_solution_for_coin2 as get_puzzle_and_solution_for_coin
|
|
18
23
|
from chia_rs.sized_bytes import bytes32
|
|
19
24
|
from chia_rs.sized_ints import uint32, uint64, uint128
|
|
20
25
|
|
|
@@ -23,11 +28,6 @@ from chia.consensus.get_block_generator import get_block_generator
|
|
|
23
28
|
from chia.consensus.pos_quality import UI_ACTUAL_SPACE_CONSTANT_FACTOR
|
|
24
29
|
from chia.full_node.fee_estimator_interface import FeeEstimatorInterface
|
|
25
30
|
from chia.full_node.full_node import FullNode
|
|
26
|
-
from chia.full_node.mempool_check_conditions import (
|
|
27
|
-
get_puzzle_and_solution_for_coin,
|
|
28
|
-
get_spends_for_block,
|
|
29
|
-
get_spends_for_block_with_conditions,
|
|
30
|
-
)
|
|
31
31
|
from chia.protocols.outbound_message import NodeType
|
|
32
32
|
from chia.rpc.rpc_server import Endpoint, EndpointResult
|
|
33
33
|
from chia.types.blockchain_format.proof_of_space import calculate_prefix_bits
|
|
@@ -90,6 +90,8 @@ async def get_average_block_time(
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
class FullNodeRpcApi:
|
|
93
|
+
executor: ThreadPoolExecutor
|
|
94
|
+
|
|
93
95
|
if TYPE_CHECKING:
|
|
94
96
|
from chia.rpc.rpc_server import RpcApiProtocol
|
|
95
97
|
|
|
@@ -99,6 +101,7 @@ class FullNodeRpcApi:
|
|
|
99
101
|
self.service = service
|
|
100
102
|
self.service_name = "chia_full_node"
|
|
101
103
|
self.cached_blockchain_state: Optional[dict[str, Any]] = None
|
|
104
|
+
self.executor = ThreadPoolExecutor(max_workers=2, thread_name_prefix="node-rpc-")
|
|
102
105
|
|
|
103
106
|
def get_routes(self) -> dict[str, Endpoint]:
|
|
104
107
|
return {
|
|
@@ -482,14 +485,21 @@ class FullNodeRpcApi:
|
|
|
482
485
|
if full_block is None:
|
|
483
486
|
raise ValueError(f"Block {header_hash.hex()} not found")
|
|
484
487
|
|
|
485
|
-
spends: list[CoinSpend] = []
|
|
486
488
|
block_generator = await get_block_generator(self.service.blockchain.lookup_block_generators, full_block)
|
|
487
489
|
if block_generator is None: # if block is not a transaction block.
|
|
488
|
-
return {"block_spends":
|
|
489
|
-
|
|
490
|
-
|
|
490
|
+
return {"block_spends": []}
|
|
491
|
+
|
|
492
|
+
flags = get_flags_for_height_and_constants(full_block.height, self.service.constants)
|
|
493
|
+
spends = await asyncio.get_running_loop().run_in_executor(
|
|
494
|
+
self.executor,
|
|
495
|
+
get_spends_for_trusted_block,
|
|
496
|
+
self.service.constants,
|
|
497
|
+
block_generator.program,
|
|
498
|
+
block_generator.generator_refs,
|
|
499
|
+
flags,
|
|
500
|
+
)
|
|
491
501
|
|
|
492
|
-
return
|
|
502
|
+
return spends
|
|
493
503
|
|
|
494
504
|
async def get_block_spends_with_conditions(self, request: dict[str, Any]) -> EndpointResult:
|
|
495
505
|
if "header_hash" not in request:
|
|
@@ -503,28 +513,22 @@ class FullNodeRpcApi:
|
|
|
503
513
|
if block_generator is None: # if block is not a transaction block.
|
|
504
514
|
return {"block_spends_with_conditions": []}
|
|
505
515
|
|
|
506
|
-
|
|
507
|
-
|
|
516
|
+
flags = get_flags_for_height_and_constants(full_block.height, self.service.constants)
|
|
517
|
+
spends_with_conditions = await asyncio.get_running_loop().run_in_executor(
|
|
518
|
+
self.executor,
|
|
519
|
+
get_spends_for_trusted_block_with_conditions,
|
|
520
|
+
self.service.constants,
|
|
521
|
+
block_generator.program,
|
|
522
|
+
block_generator.generator_refs,
|
|
523
|
+
flags,
|
|
508
524
|
)
|
|
509
|
-
|
|
510
|
-
return {
|
|
511
|
-
"block_spends_with_conditions": [
|
|
512
|
-
{
|
|
513
|
-
"coin_spend": spend_with_conditions.coin_spend,
|
|
514
|
-
"conditions": [
|
|
515
|
-
{"opcode": condition.opcode, "vars": [var.hex() for var in condition.vars]}
|
|
516
|
-
for condition in spend_with_conditions.conditions
|
|
517
|
-
],
|
|
518
|
-
}
|
|
519
|
-
for spend_with_conditions in spends_with_conditions
|
|
520
|
-
]
|
|
521
|
-
}
|
|
525
|
+
return {"block_spends_with_conditions": spends_with_conditions}
|
|
522
526
|
|
|
523
527
|
async def get_block_record_by_height(self, request: dict[str, Any]) -> EndpointResult:
|
|
524
528
|
if "height" not in request:
|
|
525
529
|
raise ValueError("No height in request")
|
|
526
530
|
height = request["height"]
|
|
527
|
-
header_height = uint32(
|
|
531
|
+
header_height = uint32(height)
|
|
528
532
|
peak_height = self.service.blockchain.get_peak_height()
|
|
529
533
|
if peak_height is None or header_height > peak_height:
|
|
530
534
|
raise ValueError(f"Block height {height} not found in chain")
|
|
@@ -613,7 +617,7 @@ class FullNodeRpcApi:
|
|
|
613
617
|
* additional_difficulty_constant
|
|
614
618
|
* eligible_plots_filter_multiplier
|
|
615
619
|
)
|
|
616
|
-
return {"space": uint128(
|
|
620
|
+
return {"space": uint128(network_space_bytes_estimate)}
|
|
617
621
|
|
|
618
622
|
async def get_coin_records_by_puzzle_hash(self, request: dict[str, Any]) -> EndpointResult:
|
|
619
623
|
"""
|
|
@@ -787,10 +791,17 @@ class FullNodeRpcApi:
|
|
|
787
791
|
)
|
|
788
792
|
assert block_generator is not None
|
|
789
793
|
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
+
try:
|
|
795
|
+
puzzle, solution = get_puzzle_and_solution_for_coin(
|
|
796
|
+
block_generator.program,
|
|
797
|
+
block_generator.generator_refs,
|
|
798
|
+
self.service.constants.MAX_BLOCK_COST_CLVM,
|
|
799
|
+
coin_record.coin,
|
|
800
|
+
get_flags_for_height_and_constants(block.height, self.service.constants),
|
|
801
|
+
)
|
|
802
|
+
return {"coin_solution": CoinSpend(coin_record.coin, puzzle, solution)}
|
|
803
|
+
except Exception as e:
|
|
804
|
+
raise ValueError(f"Failed to get puzzle and solution for coin {coin_record.coin}, error: {e}") from e
|
|
794
805
|
|
|
795
806
|
async def get_additions_and_removals(self, request: dict[str, Any]) -> EndpointResult:
|
|
796
807
|
if "header_hash" not in request:
|
|
@@ -884,7 +895,7 @@ class FullNodeRpcApi:
|
|
|
884
895
|
if maybe_gen is not None:
|
|
885
896
|
# this also validates the signature
|
|
886
897
|
err, conds = await asyncio.get_running_loop().run_in_executor(
|
|
887
|
-
self.
|
|
898
|
+
self.executor,
|
|
888
899
|
run_block_generator2,
|
|
889
900
|
bytes(gen.program),
|
|
890
901
|
gen.generator_refs,
|
|
@@ -1000,6 +1011,7 @@ class FullNodeRpcApi:
|
|
|
1000
1011
|
while last_tx_block is None or last_peak_timestamp is None:
|
|
1001
1012
|
peak_with_timestamp -= 1
|
|
1002
1013
|
last_tx_block = self.service.blockchain.height_to_block_record(peak_with_timestamp)
|
|
1014
|
+
assert last_tx_block.timestamp is not None # mypy
|
|
1003
1015
|
last_peak_timestamp = last_tx_block.timestamp
|
|
1004
1016
|
|
|
1005
1017
|
assert last_tx_block is not None # mypy
|
|
@@ -7,10 +7,13 @@ from chia_rs.sized_bytes import bytes32
|
|
|
7
7
|
from chia_rs.sized_ints import uint32
|
|
8
8
|
|
|
9
9
|
from chia.consensus.signage_point import SignagePoint
|
|
10
|
-
from chia.rpc.rpc_client import RpcClient
|
|
10
|
+
from chia.rpc.rpc_client import ResponseFailureError, RpcClient
|
|
11
11
|
from chia.types.coin_record import CoinRecord
|
|
12
12
|
from chia.types.coin_spend import CoinSpendWithConditions
|
|
13
|
+
from chia.types.condition_opcodes import ConditionOpcode
|
|
14
|
+
from chia.types.condition_with_args import ConditionWithArgs
|
|
13
15
|
from chia.types.unfinished_header_block import UnfinishedHeaderBlock
|
|
16
|
+
from chia.util.byte_types import hexstr_to_bytes
|
|
14
17
|
|
|
15
18
|
|
|
16
19
|
def coin_record_dict_backwards_compat(coin_record: dict[str, Any]) -> dict[str, Any]:
|
|
@@ -33,11 +36,8 @@ class FullNodeRpcClient(RpcClient):
|
|
|
33
36
|
response["blockchain_state"]["peak"] = BlockRecord.from_json_dict(response["blockchain_state"]["peak"])
|
|
34
37
|
return cast(dict[str, Any], response["blockchain_state"])
|
|
35
38
|
|
|
36
|
-
async def get_block(self, header_hash: bytes32) ->
|
|
37
|
-
|
|
38
|
-
response = await self.fetch("get_block", {"header_hash": header_hash.hex()})
|
|
39
|
-
except Exception:
|
|
40
|
-
return None
|
|
39
|
+
async def get_block(self, header_hash: bytes32) -> FullBlock:
|
|
40
|
+
response = await self.fetch("get_block", {"header_hash": header_hash.hex()})
|
|
41
41
|
return FullBlock.from_json_dict(response["block"])
|
|
42
42
|
|
|
43
43
|
async def get_blocks(self, start: int, end: int, exclude_reorged: bool = False) -> list[FullBlock]:
|
|
@@ -49,16 +49,15 @@ class FullNodeRpcClient(RpcClient):
|
|
|
49
49
|
async def get_block_record_by_height(self, height: int) -> Optional[BlockRecord]:
|
|
50
50
|
try:
|
|
51
51
|
response = await self.fetch("get_block_record_by_height", {"height": height})
|
|
52
|
-
except
|
|
53
|
-
|
|
52
|
+
except ResponseFailureError as e: # Block Height not found
|
|
53
|
+
if e.response["error"] == f"Block height {height} not found in chain":
|
|
54
|
+
return None
|
|
55
|
+
raise e
|
|
54
56
|
return BlockRecord.from_json_dict(response["block_record"])
|
|
55
57
|
|
|
56
58
|
async def get_block_record(self, header_hash: bytes32) -> Optional[BlockRecord]:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if response["block_record"] is None:
|
|
60
|
-
return None
|
|
61
|
-
except Exception:
|
|
59
|
+
response = await self.fetch("get_block_record", {"header_hash": header_hash.hex()})
|
|
60
|
+
if response["block_record"] is None:
|
|
62
61
|
return None
|
|
63
62
|
return BlockRecord.from_json_dict(response["block_record"])
|
|
64
63
|
|
|
@@ -81,12 +80,8 @@ class FullNodeRpcClient(RpcClient):
|
|
|
81
80
|
|
|
82
81
|
return cast(int, network_space_bytes_estimate["space"])
|
|
83
82
|
|
|
84
|
-
async def get_coin_record_by_name(self, coin_id: bytes32) ->
|
|
85
|
-
|
|
86
|
-
response = await self.fetch("get_coin_record_by_name", {"name": coin_id.hex()})
|
|
87
|
-
except Exception:
|
|
88
|
-
return None
|
|
89
|
-
|
|
83
|
+
async def get_coin_record_by_name(self, coin_id: bytes32) -> CoinRecord:
|
|
84
|
+
response = await self.fetch("get_coin_record_by_name", {"name": coin_id.hex()})
|
|
90
85
|
return CoinRecord.from_json_dict(coin_record_dict_backwards_compat(response["coin_record"]))
|
|
91
86
|
|
|
92
87
|
async def get_coin_records_by_names(
|
|
@@ -177,10 +172,7 @@ class FullNodeRpcClient(RpcClient):
|
|
|
177
172
|
return [CoinRecord.from_json_dict(coin_record_dict_backwards_compat(coin)) for coin in response["coin_records"]]
|
|
178
173
|
|
|
179
174
|
async def get_additions_and_removals(self, header_hash: bytes32) -> tuple[list[CoinRecord], list[CoinRecord]]:
|
|
180
|
-
|
|
181
|
-
response = await self.fetch("get_additions_and_removals", {"header_hash": header_hash.hex()})
|
|
182
|
-
except Exception:
|
|
183
|
-
return [], []
|
|
175
|
+
response = await self.fetch("get_additions_and_removals", {"header_hash": header_hash.hex()})
|
|
184
176
|
removals = []
|
|
185
177
|
additions = []
|
|
186
178
|
for coin_record in response["removals"]:
|
|
@@ -192,43 +184,43 @@ class FullNodeRpcClient(RpcClient):
|
|
|
192
184
|
async def get_block_records(self, start: int, end: int) -> list[dict[str, Any]]:
|
|
193
185
|
try:
|
|
194
186
|
response = await self.fetch("get_block_records", {"start": start, "end": end})
|
|
195
|
-
|
|
187
|
+
except ResponseFailureError as e: # No Peak Yet
|
|
188
|
+
if e.response["error"] == "Peak is None":
|
|
196
189
|
return []
|
|
197
|
-
|
|
190
|
+
raise e
|
|
191
|
+
if response["block_records"] is None:
|
|
198
192
|
return []
|
|
199
193
|
# TODO: return block records
|
|
200
194
|
return cast(list[dict[str, Any]], response["block_records"])
|
|
201
195
|
|
|
202
|
-
async def get_block_spends(self, header_hash: bytes32) ->
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
for
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
196
|
+
async def get_block_spends(self, header_hash: bytes32) -> list[CoinSpend]:
|
|
197
|
+
response = await self.fetch("get_block_spends", {"header_hash": header_hash.hex()})
|
|
198
|
+
output = []
|
|
199
|
+
for block_spend in response["block_spends"]:
|
|
200
|
+
output.append(CoinSpend.from_json_dict(block_spend))
|
|
201
|
+
return output
|
|
202
|
+
|
|
203
|
+
async def get_block_spends_with_conditions(self, header_hash: bytes32) -> list[CoinSpendWithConditions]:
|
|
204
|
+
response = await self.fetch("get_block_spends_with_conditions", {"header_hash": header_hash.hex()})
|
|
205
|
+
block_spends: list[CoinSpendWithConditions] = []
|
|
206
|
+
for block_spend in response["block_spends_with_conditions"]:
|
|
207
|
+
coin_spend = CoinSpend.from_json_dict(block_spend["coin_spend"])
|
|
208
|
+
cond_tuples = block_spend["conditions"]
|
|
209
|
+
conditions = []
|
|
210
|
+
for condition in cond_tuples:
|
|
211
|
+
cwa = ConditionWithArgs(
|
|
212
|
+
opcode=ConditionOpcode(bytes([condition[0]])), vars=[hexstr_to_bytes(b) for b in condition[1]]
|
|
213
|
+
)
|
|
214
|
+
conditions.append(cwa)
|
|
215
|
+
block_spends.append(CoinSpendWithConditions(coin_spend=coin_spend, conditions=conditions))
|
|
216
|
+
return block_spends
|
|
222
217
|
|
|
223
218
|
async def push_tx(self, spend_bundle: SpendBundle) -> dict[str, Any]:
|
|
224
219
|
return await self.fetch("push_tx", {"spend_bundle": spend_bundle.to_json_dict()})
|
|
225
220
|
|
|
226
|
-
async def get_puzzle_and_solution(self, coin_id: bytes32, height: uint32) ->
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
return CoinSpend.from_json_dict(response["coin_solution"])
|
|
230
|
-
except Exception:
|
|
231
|
-
return None
|
|
221
|
+
async def get_puzzle_and_solution(self, coin_id: bytes32, height: uint32) -> CoinSpend:
|
|
222
|
+
response = await self.fetch("get_puzzle_and_solution", {"coin_id": coin_id.hex(), "height": height})
|
|
223
|
+
return CoinSpend.from_json_dict(response["coin_solution"])
|
|
232
224
|
|
|
233
225
|
async def get_all_mempool_tx_ids(self) -> list[bytes32]:
|
|
234
226
|
response = await self.fetch("get_all_mempool_tx_ids", {})
|
|
@@ -245,14 +237,11 @@ class FullNodeRpcClient(RpcClient):
|
|
|
245
237
|
self,
|
|
246
238
|
tx_id: bytes32,
|
|
247
239
|
include_pending: bool = False,
|
|
248
|
-
) ->
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
return cast(dict[str, Any], response["mempool_item"])
|
|
254
|
-
except Exception:
|
|
255
|
-
return None
|
|
240
|
+
) -> dict[str, Any]:
|
|
241
|
+
response = await self.fetch(
|
|
242
|
+
"get_mempool_item_by_tx_id", {"tx_id": tx_id.hex(), "include_pending": include_pending}
|
|
243
|
+
)
|
|
244
|
+
return cast(dict[str, Any], response["mempool_item"])
|
|
256
245
|
|
|
257
246
|
async def get_mempool_items_by_coin_name(self, coin_name: bytes32) -> dict[str, Any]:
|
|
258
247
|
response = await self.fetch("get_mempool_items_by_coin_name", {"coin_name": coin_name.hex()})
|
|
@@ -264,26 +253,25 @@ class FullNodeRpcClient(RpcClient):
|
|
|
264
253
|
|
|
265
254
|
async def get_recent_signage_point_or_eos(
|
|
266
255
|
self, sp_hash: Optional[bytes32], challenge_hash: Optional[bytes32]
|
|
267
|
-
) ->
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
return None
|
|
256
|
+
) -> dict[str, Any]:
|
|
257
|
+
if sp_hash is not None and challenge_hash is not None:
|
|
258
|
+
raise ValueError("Either sp_hash or challenge_hash must be provided, not both.")
|
|
259
|
+
elif sp_hash is not None:
|
|
260
|
+
response = await self.fetch("get_recent_signage_point_or_eos", {"sp_hash": sp_hash.hex()})
|
|
261
|
+
return {
|
|
262
|
+
"signage_point": SignagePoint.from_json_dict(response["signage_point"]),
|
|
263
|
+
"time_received": response["time_received"],
|
|
264
|
+
"reverted": response["reverted"],
|
|
265
|
+
}
|
|
266
|
+
elif challenge_hash is not None:
|
|
267
|
+
response = await self.fetch("get_recent_signage_point_or_eos", {"challenge_hash": challenge_hash.hex()})
|
|
268
|
+
return {
|
|
269
|
+
"eos": EndOfSubSlotBundle.from_json_dict(response["eos"]),
|
|
270
|
+
"time_received": response["time_received"],
|
|
271
|
+
"reverted": response["reverted"],
|
|
272
|
+
}
|
|
273
|
+
else:
|
|
274
|
+
raise ValueError("sp_hash or challenge_hash must be provided.")
|
|
287
275
|
|
|
288
276
|
async def get_fee_estimate(
|
|
289
277
|
self,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from chia.full_node.full_node import FullNode
|
|
4
|
+
from chia.full_node.full_node_api import FullNodeAPI
|
|
5
|
+
from chia.full_node.full_node_rpc_api import FullNodeRpcApi
|
|
6
|
+
from chia.server.start_service import Service
|
|
7
|
+
|
|
8
|
+
FullNodeService = Service[FullNode, FullNodeAPI, FullNodeRpcApi]
|
|
@@ -833,10 +833,12 @@ class FullNodeStore:
|
|
|
833
833
|
self, cc_signage_point: bytes32, challenge: bytes32, index: uint8
|
|
834
834
|
) -> Optional[SignagePoint]:
|
|
835
835
|
assert len(self.finished_sub_slots) >= 1
|
|
836
|
-
if cc_signage_point == self.constants.GENESIS_CHALLENGE:
|
|
837
|
-
return SignagePoint(None, None, None, None)
|
|
838
836
|
for sub_slot, sps, _ in self.finished_sub_slots:
|
|
839
|
-
if sub_slot is not None
|
|
837
|
+
if sub_slot is not None:
|
|
838
|
+
cc_hash = sub_slot.challenge_chain.get_hash()
|
|
839
|
+
else:
|
|
840
|
+
cc_hash = self.constants.GENESIS_CHALLENGE
|
|
841
|
+
if cc_hash == challenge:
|
|
840
842
|
if index == 0:
|
|
841
843
|
# first SP in the sub slot
|
|
842
844
|
return SignagePoint(None, None, None, None)
|
chia/full_node/mempool.py
CHANGED
|
@@ -67,7 +67,7 @@ MEMPOOL_ITEM_FEE_LIMIT = 2**50
|
|
|
67
67
|
|
|
68
68
|
@dataclass
|
|
69
69
|
class MempoolRemoveInfo:
|
|
70
|
-
items:
|
|
70
|
+
items: dict[bytes32, InternalMempoolItem]
|
|
71
71
|
reason: MempoolRemoveReason
|
|
72
72
|
|
|
73
73
|
|
|
@@ -158,7 +158,7 @@ class Mempool:
|
|
|
158
158
|
item = self._items[name]
|
|
159
159
|
|
|
160
160
|
return MempoolItem(
|
|
161
|
-
item.
|
|
161
|
+
item.aggregated_signature,
|
|
162
162
|
uint64(fee),
|
|
163
163
|
item.conds,
|
|
164
164
|
name,
|
|
@@ -340,7 +340,7 @@ class Mempool:
|
|
|
340
340
|
Removes an item from the mempool.
|
|
341
341
|
"""
|
|
342
342
|
if items == []:
|
|
343
|
-
return MempoolRemoveInfo(
|
|
343
|
+
return MempoolRemoveInfo({}, reason)
|
|
344
344
|
|
|
345
345
|
removed_items: list[MempoolItemInfo] = []
|
|
346
346
|
if reason != MempoolRemoveReason.BLOCK_INCLUSION:
|
|
@@ -356,7 +356,7 @@ class Mempool:
|
|
|
356
356
|
item = MempoolItemInfo(int(row[1]), int(row[2]), internal_item.height_added_to_mempool)
|
|
357
357
|
removed_items.append(item)
|
|
358
358
|
|
|
359
|
-
removed_internal_items =
|
|
359
|
+
removed_internal_items = {name: self._items.pop(name) for name in items}
|
|
360
360
|
|
|
361
361
|
for batch in to_batches(items, SQLITE_MAX_VARIABLE_NUMBER):
|
|
362
362
|
args = ",".join(["?"] * len(batch.entries))
|
|
@@ -481,7 +481,7 @@ class Mempool:
|
|
|
481
481
|
conn.executemany("INSERT OR IGNORE INTO spends VALUES(?, ?)", all_coin_spends)
|
|
482
482
|
|
|
483
483
|
self._items[item_name] = InternalMempoolItem(
|
|
484
|
-
item.
|
|
484
|
+
item.aggregated_signature, item.conds, item.height_added_to_mempool, item.bundle_coin_spends
|
|
485
485
|
)
|
|
486
486
|
self._total_cost += item.cost
|
|
487
487
|
self._total_fee += item.fee
|
|
@@ -611,9 +611,9 @@ class Mempool:
|
|
|
611
611
|
# might fit, but we also want to avoid spending too much
|
|
612
612
|
# time on potentially expensive ones, hence this shortcut.
|
|
613
613
|
if any(
|
|
614
|
-
sd.eligible_for_dedup or sd.
|
|
614
|
+
sd.eligible_for_dedup or sd.supports_fast_forward for sd in item.bundle_coin_spends.values()
|
|
615
615
|
):
|
|
616
|
-
log.info(f"Skipping transaction with dedup or FF spends {
|
|
616
|
+
log.info(f"Skipping transaction with dedup or FF spends {name}")
|
|
617
617
|
continue
|
|
618
618
|
|
|
619
619
|
unique_coin_spends = []
|
|
@@ -627,7 +627,7 @@ class Mempool:
|
|
|
627
627
|
mempool_item=item, height=height, constants=constants
|
|
628
628
|
)
|
|
629
629
|
unique_coin_spends, cost_saving, unique_additions = dedup_coin_spends.get_deduplication_info(
|
|
630
|
-
bundle_coin_spends=bundle_coin_spends
|
|
630
|
+
bundle_coin_spends=bundle_coin_spends
|
|
631
631
|
)
|
|
632
632
|
item_cost = cost - cost_saving
|
|
633
633
|
log.info(
|
|
@@ -653,7 +653,7 @@ class Mempool:
|
|
|
653
653
|
break
|
|
654
654
|
coin_spends.extend(unique_coin_spends)
|
|
655
655
|
additions.extend(unique_additions)
|
|
656
|
-
sigs.append(item.
|
|
656
|
+
sigs.append(item.aggregated_signature)
|
|
657
657
|
cost_sum = new_cost_sum
|
|
658
658
|
fee_sum = new_fee_sum
|
|
659
659
|
processed_spend_bundles += 1
|
|
@@ -726,7 +726,7 @@ class Mempool:
|
|
|
726
726
|
mempool_item=item, height=height, constants=constants
|
|
727
727
|
)
|
|
728
728
|
unique_coin_spends, cost_saving, unique_additions = dedup_coin_spends.get_deduplication_info(
|
|
729
|
-
bundle_coin_spends=bundle_coin_spends
|
|
729
|
+
bundle_coin_spends=bundle_coin_spends
|
|
730
730
|
)
|
|
731
731
|
new_fee_sum = fee_sum + fee
|
|
732
732
|
if new_fee_sum > DEFAULT_CONSTANTS.MAX_COIN_AMOUNT:
|
|
@@ -750,6 +750,7 @@ class Mempool:
|
|
|
750
750
|
f"cost: {batch_cost} total cost: {block_cost}"
|
|
751
751
|
)
|
|
752
752
|
else:
|
|
753
|
+
log.info(f"Skipping transaction batch cumulative cost: {block_cost} batch cost: {batch_cost}")
|
|
753
754
|
skipped_items += 1
|
|
754
755
|
|
|
755
756
|
batch_cost = 0
|
|
@@ -760,7 +761,7 @@ class Mempool:
|
|
|
760
761
|
break
|
|
761
762
|
|
|
762
763
|
batch_cost += cost - cost_saving
|
|
763
|
-
batch_transactions.append(SpendBundle(unique_coin_spends, item.
|
|
764
|
+
batch_transactions.append(SpendBundle(unique_coin_spends, item.aggregated_signature))
|
|
764
765
|
batch_spends += len(unique_coin_spends)
|
|
765
766
|
batch_additions.extend(unique_additions)
|
|
766
767
|
fee_sum = new_fee_sum
|
|
@@ -775,12 +776,12 @@ class Mempool:
|
|
|
775
776
|
|
|
776
777
|
if len(batch_transactions) > 0:
|
|
777
778
|
added, _ = builder.add_spend_bundles(batch_transactions, uint64(batch_cost), constants)
|
|
779
|
+
log.info(f"trying to add residual batch: {len(batch_transactions)} batch cost: {batch_cost} added: {added}")
|
|
778
780
|
|
|
779
781
|
if added:
|
|
780
782
|
added_spends += batch_spends
|
|
781
783
|
additions.extend(batch_additions)
|
|
782
784
|
removals.extend([cs.coin for sb in batch_transactions for cs in sb.coin_spends])
|
|
783
|
-
block_cost = builder.cost()
|
|
784
785
|
log.info(
|
|
785
786
|
f"adding TX batch, additions: {len(batch_additions)} removals: {batch_spends} "
|
|
786
787
|
f"cost: {batch_cost} total cost: {block_cost}"
|
|
@@ -797,7 +798,6 @@ class Mempool:
|
|
|
797
798
|
f"create_block_generator2() took {duration:0.4f} seconds. "
|
|
798
799
|
f"block cost: {cost} spends: {added_spends} additions: {len(additions)}",
|
|
799
800
|
)
|
|
800
|
-
assert block_cost == cost
|
|
801
801
|
|
|
802
802
|
return NewBlockGenerator(
|
|
803
803
|
SerializedProgram.from_bytes(block_program),
|
|
@@ -806,5 +806,5 @@ class Mempool:
|
|
|
806
806
|
signature,
|
|
807
807
|
additions,
|
|
808
808
|
removals,
|
|
809
|
-
uint64(
|
|
809
|
+
uint64(cost),
|
|
810
810
|
)
|