chia-blockchain 2.5.2rc2__py3-none-any.whl → 2.5.3rc2__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/__init__.py +7 -0
- chia/_tests/blockchain/blockchain_test_utils.py +1 -1
- chia/_tests/blockchain/test_augmented_chain.py +54 -5
- chia/_tests/blockchain/test_blockchain.py +5 -12
- chia/_tests/blockchain/test_blockchain_transactions.py +3 -5
- chia/_tests/blockchain/test_get_block_generator.py +2 -2
- chia/_tests/blockchain/test_lookup_fork_chain.py +2 -2
- chia/_tests/clvm/benchmark_costs.py +2 -1
- chia/_tests/clvm/coin_store.py +4 -3
- chia/_tests/clvm/test_chialisp_deserialization.py +2 -2
- chia/_tests/clvm/test_curry_and_treehash.py +1 -1
- chia/_tests/clvm/test_puzzle_compression.py +2 -2
- chia/_tests/clvm/test_puzzles.py +2 -2
- chia/_tests/clvm/test_singletons.py +2 -2
- chia/_tests/clvm/test_spend_sim.py +1 -1
- chia/_tests/cmds/cmd_test_utils.py +2 -2
- chia/_tests/cmds/test_click_types.py +2 -2
- chia/_tests/cmds/test_cmd_framework.py +6 -6
- chia/_tests/cmds/test_show.py +4 -3
- chia/_tests/cmds/test_tx_config_args.py +1 -1
- chia/_tests/cmds/testing_classes.py +2 -2
- chia/_tests/cmds/wallet/test_consts.py +2 -2
- chia/_tests/cmds/wallet/test_did.py +2 -2
- chia/_tests/cmds/wallet/test_nft.py +2 -2
- chia/_tests/cmds/wallet/test_notifications.py +3 -2
- chia/_tests/cmds/wallet/test_vcs.py +2 -2
- chia/_tests/cmds/wallet/test_wallet.py +4 -8
- chia/_tests/conftest.py +4 -3
- chia/_tests/connection_utils.py +2 -2
- chia/_tests/core/cmds/test_keys.py +1 -2
- chia/_tests/core/cmds/test_wallet.py +2 -2
- chia/_tests/core/consensus/test_block_creation.py +2 -2
- chia/_tests/core/consensus/test_pot_iterations.py +1 -1
- chia/_tests/core/custom_types/test_coin.py +2 -2
- chia/_tests/core/custom_types/test_proof_of_space.py +2 -2
- chia/_tests/core/custom_types/test_spend_bundle.py +2 -2
- chia/_tests/core/data_layer/conftest.py +1 -1
- chia/_tests/core/data_layer/test_data_layer.py +1 -1
- chia/_tests/core/data_layer/test_data_layer_util.py +1 -1
- chia/_tests/core/data_layer/test_data_rpc.py +2 -2
- chia/_tests/core/data_layer/test_data_store.py +1 -1
- chia/_tests/core/data_layer/test_data_store_schema.py +1 -1
- chia/_tests/core/data_layer/util.py +2 -1
- chia/_tests/core/farmer/test_farmer_api.py +1 -1
- chia/_tests/core/full_node/full_sync/test_full_sync.py +1 -7
- chia/_tests/core/full_node/ram_db.py +2 -1
- chia/_tests/core/full_node/stores/test_block_store.py +2 -2
- chia/_tests/core/full_node/stores/test_coin_store.py +2 -2
- chia/_tests/core/full_node/stores/test_full_node_store.py +3 -3
- chia/_tests/core/full_node/stores/test_hint_store.py +2 -2
- chia/_tests/core/full_node/stores/test_sync_store.py +1 -1
- chia/_tests/core/full_node/test_address_manager.py +1 -1
- chia/_tests/core/full_node/test_block_height_map.py +2 -2
- chia/_tests/core/full_node/test_conditions.py +1 -1
- chia/_tests/core/full_node/test_full_node.py +346 -164
- chia/_tests/core/full_node/test_generator_tools.py +3 -2
- chia/_tests/core/full_node/test_hint_management.py +2 -2
- chia/_tests/core/full_node/test_performance.py +2 -15
- chia/_tests/core/full_node/test_subscriptions.py +1 -1
- chia/_tests/core/full_node/test_transactions.py +186 -185
- chia/_tests/core/full_node/test_tx_processing_queue.py +1 -1
- chia/_tests/core/make_block_generator.py +2 -2
- chia/_tests/core/mempool/test_mempool.py +165 -22
- chia/_tests/core/mempool/test_mempool_fee_estimator.py +1 -1
- chia/_tests/core/mempool/test_mempool_fee_protocol.py +1 -1
- chia/_tests/core/mempool/test_mempool_manager.py +476 -66
- chia/_tests/core/mempool/test_mempool_performance.py +2 -2
- chia/_tests/core/mempool/test_singleton_fast_forward.py +19 -25
- chia/_tests/core/node_height.py +2 -1
- chia/_tests/core/server/test_capabilities.py +1 -1
- chia/_tests/core/server/test_dos.py +36 -28
- chia/_tests/core/server/test_loop.py +3 -3
- chia/_tests/core/server/test_rate_limits.py +1 -1
- chia/_tests/core/server/test_server.py +2 -2
- chia/_tests/core/services/test_services.py +1 -1
- chia/_tests/core/ssl/test_ssl.py +1 -1
- chia/_tests/core/test_coins.py +2 -1
- chia/_tests/core/test_cost_calculation.py +2 -2
- chia/_tests/core/test_crawler.py +2 -2
- chia/_tests/core/test_db_conversion.py +2 -2
- chia/_tests/core/test_db_validation.py +26 -13
- chia/_tests/core/test_farmer_harvester_rpc.py +2 -2
- chia/_tests/core/test_full_node_rpc.py +2 -2
- chia/_tests/core/test_merkle_set.py +2 -2
- chia/_tests/core/test_program.py +2 -2
- chia/_tests/core/test_rpc_util.py +1 -1
- chia/_tests/core/test_seeder.py +1 -1
- chia/_tests/core/util/test_block_cache.py +3 -3
- chia/_tests/core/util/test_jsonify.py +3 -2
- chia/_tests/core/util/test_keychain.py +3 -3
- chia/_tests/core/util/test_streamable.py +3 -4
- chia/_tests/environments/wallet.py +3 -2
- chia/_tests/farmer_harvester/test_farmer.py +3 -4
- chia/_tests/farmer_harvester/test_farmer_harvester.py +2 -2
- chia/_tests/farmer_harvester/test_filter_prefix_bits.py +2 -2
- chia/_tests/farmer_harvester/test_third_party_harvesters.py +3 -4
- chia/_tests/fee_estimation/test_fee_estimation_integration.py +1 -1
- chia/_tests/fee_estimation/test_fee_estimation_rpc.py +2 -2
- chia/_tests/fee_estimation/test_fee_estimation_unit_tests.py +1 -1
- chia/_tests/fee_estimation/test_mempoolitem_height_added.py +3 -4
- chia/_tests/generator/test_compression.py +20 -10
- chia/_tests/generator/test_rom.py +7 -9
- chia/_tests/plot_sync/test_delta.py +2 -2
- chia/_tests/plot_sync/test_plot_sync.py +2 -2
- chia/_tests/plot_sync/test_receiver.py +2 -2
- chia/_tests/plot_sync/test_sender.py +2 -2
- chia/_tests/plot_sync/test_sync_simulated.py +2 -2
- chia/_tests/plot_sync/util.py +3 -2
- chia/_tests/plotting/test_plot_manager.py +1 -1
- chia/_tests/pools/test_pool_cli_parsing.py +3 -2
- chia/_tests/pools/test_pool_cmdline.py +2 -2
- chia/_tests/pools/test_pool_puzzles_lifecycle.py +3 -3
- chia/_tests/pools/test_pool_rpc.py +4 -5
- chia/_tests/pools/test_pool_wallet.py +1 -1
- chia/_tests/pools/test_wallet_pool_store.py +2 -2
- chia/_tests/rpc/test_rpc_client.py +1 -1
- chia/_tests/rpc/test_rpc_server.py +1 -1
- chia/_tests/simulation/test_simulation.py +36 -8
- chia/_tests/simulation/test_simulator.py +5 -5
- chia/_tests/simulation/test_start_simulator.py +2 -2
- chia/_tests/timelord/test_new_peak.py +2 -2
- chia/_tests/tools/test_run_block.py +3 -2
- chia/_tests/util/benchmark_cost.py +2 -2
- chia/_tests/util/benchmarks.py +17 -6
- chia/_tests/util/blockchain.py +2 -1
- chia/_tests/util/blockchain_mock.py +9 -5
- chia/_tests/util/build_network_protocol_files.py +2 -1
- chia/_tests/util/constants.py +2 -1
- chia/_tests/util/full_sync.py +6 -3
- chia/_tests/util/gen_ssl_certs.py +2 -2
- chia/_tests/util/generator_tools_testing.py +4 -3
- chia/_tests/util/get_name_puzzle_conditions.py +2 -2
- chia/_tests/util/misc.py +16 -2
- chia/_tests/util/network_protocol_data.py +17 -7
- chia/_tests/util/run_block.py +6 -8
- chia/_tests/util/setup_nodes.py +4 -3
- chia/_tests/util/spend_sim.py +9 -5
- chia/_tests/util/test_condition_tools.py +2 -2
- chia/_tests/util/test_config.py +2 -1
- chia/_tests/util/test_errors.py +2 -1
- chia/_tests/util/test_full_block_utils.py +17 -7
- chia/_tests/util/test_misc.py +1 -1
- chia/_tests/util/test_network_protocol_test.py +24 -24
- chia/_tests/util/test_replace_str_to_bytes.py +2 -2
- chia/_tests/util/test_trusted_peer.py +1 -1
- chia/_tests/util/time_out_assert.py +20 -7
- chia/_tests/wallet/cat_wallet/test_cat_lifecycle.py +1 -1
- chia/_tests/wallet/cat_wallet/test_cat_outer_puzzle.py +2 -2
- chia/_tests/wallet/cat_wallet/test_cat_wallet.py +5 -6
- chia/_tests/wallet/cat_wallet/test_offer_lifecycle.py +17 -15
- chia/_tests/wallet/cat_wallet/test_trades.py +2 -2
- chia/_tests/wallet/clawback/test_clawback_lifecycle.py +2 -2
- chia/_tests/wallet/clawback/test_clawback_metadata.py +2 -2
- chia/_tests/wallet/conftest.py +3 -3
- chia/_tests/wallet/db_wallet/test_db_graftroot.py +3 -5
- chia/_tests/wallet/db_wallet/test_dl_offers.py +2 -2
- chia/_tests/wallet/db_wallet/test_dl_wallet.py +433 -384
- chia/_tests/wallet/did_wallet/test_did.py +3 -3
- chia/_tests/wallet/nft_wallet/test_nft_1_offers.py +2 -2
- chia/_tests/wallet/nft_wallet/test_nft_bulk_mint.py +2 -2
- chia/_tests/wallet/nft_wallet/test_nft_lifecycle.py +3 -4
- chia/_tests/wallet/nft_wallet/test_nft_offers.py +1293 -703
- chia/_tests/wallet/nft_wallet/test_nft_puzzles.py +28 -30
- chia/_tests/wallet/nft_wallet/test_nft_wallet.py +2 -2
- chia/_tests/wallet/nft_wallet/test_ownership_outer_puzzle.py +2 -2
- chia/_tests/wallet/rpc/config.py +1 -1
- chia/_tests/wallet/rpc/test_dl_wallet_rpc.py +2 -2
- chia/_tests/wallet/rpc/test_wallet_rpc.py +20 -77
- chia/_tests/wallet/simple_sync/test_simple_sync_protocol.py +9 -7
- chia/_tests/wallet/sync/test_wallet_sync.py +79 -31
- chia/_tests/wallet/test_clvm_streamable.py +2 -2
- chia/_tests/wallet/test_coin_management.py +7 -7
- chia/_tests/wallet/test_coin_selection.py +20 -2
- chia/_tests/wallet/test_conditions.py +2 -2
- chia/_tests/wallet/test_debug_spend_bundle.py +2 -2
- chia/_tests/wallet/test_new_wallet_protocol.py +2 -2
- chia/_tests/wallet/test_nft_store.py +2 -2
- chia/_tests/wallet/test_notifications.py +2 -2
- chia/_tests/wallet/test_puzzle_store.py +2 -2
- chia/_tests/wallet/test_sign_coin_spends.py +2 -2
- chia/_tests/wallet/test_signer_protocol.py +3 -3
- chia/_tests/wallet/test_singleton.py +3 -11
- chia/_tests/wallet/test_singleton_lifecycle_fast.py +12 -13
- chia/_tests/wallet/test_singleton_store.py +2 -4
- chia/_tests/wallet/test_transaction_store.py +2 -2
- chia/_tests/wallet/test_util.py +2 -2
- chia/_tests/wallet/test_wallet.py +53 -49
- chia/_tests/wallet/test_wallet_action_scope.py +24 -6
- chia/_tests/wallet/test_wallet_blockchain.py +1 -1
- chia/_tests/wallet/test_wallet_coin_store.py +2 -2
- chia/_tests/wallet/test_wallet_interested_store.py +2 -2
- chia/_tests/wallet/test_wallet_node.py +3 -3
- chia/_tests/wallet/test_wallet_retry.py +3 -3
- chia/_tests/wallet/test_wallet_state_manager.py +8 -8
- chia/_tests/wallet/test_wallet_test_framework.py +1 -1
- chia/_tests/wallet/test_wallet_trade_store.py +2 -2
- chia/_tests/wallet/test_wallet_utils.py +2 -2
- chia/_tests/wallet/vc_wallet/test_cr_outer_puzzle.py +3 -2
- chia/_tests/wallet/vc_wallet/test_vc_lifecycle.py +15 -15
- chia/_tests/wallet/vc_wallet/test_vc_wallet.py +5 -3
- chia/_tests/wallet/wallet_block_tools.py +15 -7
- chia/_tests/weight_proof/test_weight_proof.py +3 -3
- chia/cmds/chia.py +0 -2
- chia/cmds/cmd_classes.py +3 -3
- chia/cmds/cmd_helpers.py +4 -4
- chia/cmds/cmds_util.py +2 -2
- chia/cmds/coin_funcs.py +3 -2
- chia/cmds/coins.py +1 -1
- chia/cmds/data.py +2 -2
- chia/cmds/data_funcs.py +3 -2
- chia/cmds/db_upgrade_func.py +2 -2
- chia/cmds/db_validate_func.py +15 -8
- chia/cmds/farm.py +2 -4
- chia/cmds/keys.py +0 -2
- chia/cmds/keys_funcs.py +1 -1
- chia/cmds/netspace_funcs.py +2 -1
- chia/cmds/param_types.py +2 -2
- chia/cmds/plotnft.py +2 -2
- chia/cmds/plotnft_funcs.py +2 -2
- chia/cmds/rpc.py +1 -1
- chia/cmds/show.py +1 -2
- chia/cmds/show_funcs.py +6 -3
- chia/cmds/signer.py +1 -2
- chia/cmds/sim.py +1 -2
- chia/cmds/sim_funcs.py +2 -2
- chia/cmds/wallet.py +2 -2
- chia/cmds/wallet_funcs.py +4 -11
- chia/consensus/block_body_validation.py +3 -4
- chia/consensus/block_creation.py +10 -6
- chia/consensus/block_header_validation.py +3 -4
- chia/consensus/block_record.py +2 -3
- chia/consensus/block_rewards.py +1 -1
- chia/consensus/blockchain.py +20 -17
- chia/consensus/blockchain_interface.py +5 -4
- chia/consensus/coinbase.py +2 -2
- chia/consensus/constants.py +1 -1
- chia/consensus/cost_calculator.py +2 -1
- chia/consensus/default_constants.py +4 -3
- chia/consensus/deficit.py +3 -2
- chia/consensus/difficulty_adjustment.py +8 -9
- chia/consensus/find_fork_point.py +4 -3
- chia/consensus/full_block_to_block_record.py +4 -3
- chia/consensus/get_block_challenge.py +4 -3
- chia/consensus/get_block_generator.py +3 -2
- chia/consensus/make_sub_epoch_summary.py +3 -2
- chia/consensus/multiprocess_validation.py +9 -4
- chia/consensus/pos_quality.py +1 -1
- chia/consensus/pot_iterations.py +4 -3
- chia/consensus/vdf_info_computation.py +4 -3
- chia/daemon/client.py +1 -1
- chia/daemon/keychain_server.py +1 -1
- chia/daemon/server.py +1 -1
- chia/daemon/windows_signal.py +1 -1
- chia/data_layer/data_layer.py +4 -3
- chia/data_layer/data_layer_errors.py +1 -1
- chia/data_layer/data_layer_util.py +2 -2
- chia/data_layer/data_layer_wallet.py +47 -69
- chia/data_layer/data_store.py +1 -1
- chia/data_layer/dl_wallet_store.py +5 -6
- chia/data_layer/download_data.py +1 -1
- chia/data_layer/s3_plugin_service.py +4 -4
- chia/data_layer/singleton_record.py +23 -0
- chia/data_layer/util/benchmark.py +2 -1
- chia/farmer/farmer.py +4 -6
- chia/farmer/farmer_api.py +4 -6
- chia/full_node/bitcoin_fee_estimator.py +2 -1
- chia/full_node/block_height_map.py +2 -2
- chia/full_node/block_store.py +8 -9
- chia/{util → full_node}/check_fork_next_block.py +2 -1
- chia/full_node/coin_store.py +10 -10
- chia/full_node/fee_estimate.py +2 -1
- chia/full_node/fee_estimation.py +2 -1
- chia/full_node/fee_estimator.py +2 -1
- chia/full_node/fee_estimator_interface.py +1 -1
- chia/full_node/fee_history.py +2 -1
- chia/full_node/fee_tracker.py +2 -1
- chia/full_node/full_node.py +15 -13
- chia/full_node/full_node_api.py +12 -32
- chia/full_node/full_node_store.py +4 -3
- chia/full_node/hint_management.py +2 -1
- chia/full_node/hint_store.py +3 -3
- chia/full_node/mempool.py +80 -12
- chia/full_node/mempool_check_conditions.py +6 -7
- chia/full_node/mempool_manager.py +168 -21
- chia/full_node/pending_tx_cache.py +2 -2
- chia/full_node/subscriptions.py +2 -2
- chia/full_node/sync_store.py +2 -3
- chia/full_node/tx_processing_queue.py +2 -1
- chia/full_node/weight_proof.py +5 -8
- chia/harvester/harvester.py +5 -3
- chia/harvester/harvester_api.py +2 -2
- chia/introducer/introducer.py +30 -2
- chia/introducer/introducer_api.py +9 -1
- chia/legacy/keyring.py +1 -2
- chia/plot_sync/exceptions.py +2 -1
- chia/plot_sync/receiver.py +2 -2
- chia/plot_sync/sender.py +1 -1
- chia/plotting/cache.py +2 -2
- chia/plotting/check_plots.py +4 -2
- chia/plotting/create_plots.py +1 -1
- chia/plotting/manager.py +3 -3
- chia/plotting/util.py +2 -2
- chia/pools/pool_config.py +1 -1
- chia/pools/pool_puzzles.py +23 -17
- chia/pools/pool_wallet.py +22 -9
- chia/pools/pool_wallet_info.py +2 -2
- chia/protocols/farmer_protocol.py +3 -6
- chia/protocols/full_node_protocol.py +3 -2
- chia/protocols/harvester_protocol.py +3 -4
- chia/protocols/pool_protocol.py +2 -2
- chia/protocols/shared_protocol.py +2 -1
- chia/protocols/timelord_protocol.py +4 -4
- chia/protocols/wallet_protocol.py +2 -2
- chia/rpc/data_layer_rpc_api.py +3 -4
- chia/rpc/data_layer_rpc_client.py +3 -2
- chia/rpc/farmer_rpc_api.py +2 -2
- chia/rpc/farmer_rpc_client.py +2 -1
- chia/rpc/full_node_rpc_api.py +3 -2
- chia/rpc/full_node_rpc_client.py +3 -2
- chia/rpc/harvester_rpc_api.py +2 -1
- chia/rpc/rpc_client.py +2 -2
- chia/rpc/rpc_server.py +1 -1
- chia/rpc/wallet_request_types.py +2 -62
- chia/rpc/wallet_rpc_api.py +98 -628
- chia/rpc/wallet_rpc_client.py +5 -253
- chia/seeder/crawl_store.py +1 -1
- chia/seeder/crawler.py +2 -2
- chia/seeder/peer_record.py +2 -1
- chia/seeder/start_crawler.py +3 -1
- chia/server/address_manager.py +2 -1
- chia/server/address_manager_store.py +1 -1
- chia/server/capabilities.py +2 -1
- chia/server/introducer_peers.py +2 -1
- chia/server/node_discovery.py +1 -1
- chia/server/outbound_message.py +2 -1
- chia/server/server.py +2 -2
- chia/server/start_data_layer.py +2 -1
- chia/server/start_farmer.py +3 -1
- chia/server/start_full_node.py +4 -2
- chia/server/start_harvester.py +3 -1
- chia/server/start_introducer.py +12 -1
- chia/server/start_service.py +2 -1
- chia/server/start_timelord.py +3 -1
- chia/server/start_wallet.py +3 -1
- chia/server/upnp.py +1 -2
- chia/server/ws_connection.py +3 -4
- chia/simulator/add_blocks_in_batches.py +5 -3
- chia/simulator/block_tools.py +16 -12
- chia/simulator/full_node_simulator.py +9 -14
- chia/simulator/setup_services.py +5 -3
- chia/simulator/simulator_full_node_rpc_api.py +3 -2
- chia/simulator/simulator_full_node_rpc_client.py +3 -2
- chia/simulator/simulator_protocol.py +3 -2
- chia/simulator/simulator_test_tools.py +2 -2
- chia/simulator/start_simulator.py +3 -2
- chia/simulator/wallet_tools.py +3 -4
- chia/timelord/iters_from_block.py +4 -4
- chia/timelord/timelord.py +7 -12
- chia/timelord/timelord_api.py +3 -3
- chia/timelord/timelord_state.py +4 -3
- chia/types/block_protocol.py +2 -2
- chia/types/blockchain_format/coin.py +2 -2
- chia/types/blockchain_format/program.py +1 -1
- chia/types/blockchain_format/proof_of_space.py +3 -4
- chia/types/blockchain_format/tree_hash.py +1 -1
- chia/types/blockchain_format/vdf.py +3 -4
- chia/types/clvm_cost.py +1 -1
- chia/types/coin_record.py +4 -3
- chia/types/coin_spend.py +1 -1
- chia/types/eligible_coin_spends.py +9 -5
- chia/types/fee_rate.py +1 -1
- chia/types/generator_types.py +3 -3
- chia/types/internal_mempool_item.py +3 -2
- chia/types/mempool_item.py +10 -3
- chia/types/mempool_submission_status.py +2 -1
- chia/types/mojos.py +1 -1
- chia/types/peer_info.py +2 -1
- chia/types/transaction_queue_entry.py +2 -1
- chia/types/unfinished_header_block.py +4 -4
- chia/types/validation_state.py +2 -1
- chia/types/weight_proof.py +1 -9
- chia/util/augmented_chain.py +20 -9
- chia/util/block_cache.py +8 -4
- chia/util/condition_tools.py +2 -2
- chia/util/full_block_utils.py +3 -4
- chia/util/generator_tools.py +2 -2
- chia/util/initial-config.yaml +2 -11
- chia/util/network.py +2 -2
- chia/util/prev_transaction_block.py +2 -1
- chia/util/task_timing.py +1 -1
- chia/util/vdf_prover.py +3 -3
- chia/util/ws_message.py +1 -1
- chia/wallet/cat_wallet/cat_info.py +3 -2
- chia/wallet/cat_wallet/cat_outer_puzzle.py +3 -2
- chia/wallet/cat_wallet/cat_utils.py +6 -4
- chia/wallet/cat_wallet/cat_wallet.py +16 -18
- chia/wallet/cat_wallet/lineage_store.py +2 -1
- chia/wallet/coin_selection.py +5 -5
- chia/wallet/conditions.py +22 -16
- chia/wallet/db_wallet/db_wallet_puzzles.py +15 -15
- chia/wallet/derivation_record.py +2 -2
- chia/wallet/derive_keys.py +2 -2
- chia/wallet/did_wallet/did_info.py +3 -2
- chia/wallet/did_wallet/did_wallet.py +41 -19
- chia/wallet/did_wallet/did_wallet_puzzles.py +18 -12
- chia/wallet/driver_protocol.py +1 -1
- chia/wallet/lineage_proof.py +3 -2
- chia/wallet/nft_wallet/metadata_outer_puzzle.py +6 -7
- chia/wallet/nft_wallet/nft_info.py +5 -5
- chia/wallet/nft_wallet/nft_puzzle_utils.py +293 -0
- chia/wallet/nft_wallet/nft_puzzles.py +21 -298
- chia/wallet/nft_wallet/nft_wallet.py +47 -62
- chia/wallet/nft_wallet/ownership_outer_puzzle.py +4 -8
- chia/wallet/nft_wallet/singleton_outer_puzzle.py +3 -2
- chia/wallet/nft_wallet/transfer_program_puzzle.py +6 -10
- chia/wallet/nft_wallet/uncurry_nft.py +6 -8
- chia/wallet/notification_manager.py +5 -5
- chia/wallet/notification_store.py +3 -2
- chia/wallet/outer_puzzles.py +2 -1
- chia/wallet/puzzles/clawback/drivers.py +21 -8
- chia/wallet/puzzles/clawback/metadata.py +3 -2
- chia/wallet/puzzles/clawback/puzzle_decorator.py +5 -4
- chia/wallet/puzzles/deployed_puzzle_hashes.json +0 -10
- chia/wallet/puzzles/p2_conditions.py +3 -2
- chia/wallet/puzzles/p2_delegated_conditions.py +3 -2
- chia/wallet/puzzles/p2_delegated_puzzle.py +3 -2
- chia/wallet/puzzles/p2_delegated_puzzle_or_hidden_puzzle.py +3 -3
- chia/wallet/puzzles/p2_m_of_n_delegate_direct.py +3 -2
- chia/wallet/puzzles/p2_puzzle_hash.py +4 -3
- chia/wallet/puzzles/puzzle_utils.py +3 -2
- chia/wallet/puzzles/singleton_top_layer.py +26 -10
- chia/wallet/puzzles/singleton_top_layer_v1_1.py +21 -9
- chia/wallet/puzzles/tails.py +21 -129
- chia/wallet/signer_protocol.py +3 -2
- chia/wallet/singleton.py +12 -6
- chia/wallet/singleton_record.py +3 -2
- chia/wallet/trade_manager.py +31 -55
- chia/wallet/trade_record.py +3 -2
- chia/wallet/trading/offer.py +14 -13
- chia/wallet/trading/trade_store.py +3 -4
- chia/wallet/transaction_record.py +2 -2
- chia/wallet/util/blind_signer_tl.py +3 -2
- chia/wallet/util/compute_hints.py +3 -2
- chia/wallet/util/compute_memos.py +2 -2
- chia/wallet/util/curry_and_treehash.py +1 -2
- chia/wallet/util/merkle_tree.py +1 -1
- chia/wallet/util/merkle_utils.py +1 -1
- chia/wallet/util/new_peak_queue.py +2 -1
- chia/wallet/util/notifications.py +5 -4
- chia/wallet/util/peer_request_cache.py +3 -2
- chia/wallet/util/puzzle_compression.py +6 -4
- chia/wallet/util/puzzle_decorator.py +6 -4
- chia/wallet/util/query_filter.py +3 -2
- chia/wallet/util/tx_config.py +3 -3
- chia/wallet/util/wallet_sync_utils.py +2 -2
- chia/wallet/util/wallet_types.py +2 -3
- chia/wallet/vc_wallet/cr_cat_drivers.py +18 -22
- chia/wallet/vc_wallet/cr_cat_wallet.py +14 -10
- chia/wallet/vc_wallet/cr_outer_puzzle.py +2 -2
- chia/wallet/vc_wallet/vc_drivers.py +50 -68
- chia/wallet/vc_wallet/vc_store.py +2 -2
- chia/wallet/vc_wallet/vc_wallet.py +47 -15
- chia/wallet/wallet.py +51 -46
- chia/wallet/wallet_action_scope.py +4 -0
- chia/wallet/wallet_blockchain.py +12 -7
- chia/wallet/wallet_coin_record.py +3 -2
- chia/wallet/wallet_coin_store.py +3 -2
- chia/wallet/wallet_info.py +2 -1
- chia/wallet/wallet_interested_store.py +3 -2
- chia/wallet/wallet_nft_store.py +4 -4
- chia/wallet/wallet_node.py +3 -4
- chia/wallet/wallet_pool_store.py +3 -4
- chia/wallet/wallet_protocol.py +19 -5
- chia/wallet/wallet_puzzle_store.py +2 -2
- chia/wallet/wallet_retry_store.py +3 -6
- chia/wallet/wallet_singleton_store.py +2 -2
- chia/wallet/wallet_state_manager.py +20 -197
- chia/wallet/wallet_transaction_store.py +2 -2
- chia/wallet/wallet_user_store.py +2 -1
- chia/wallet/wallet_weight_proof_handler.py +3 -2
- {chia_blockchain-2.5.2rc2.dist-info → chia_blockchain-2.5.3rc2.dist-info}/METADATA +3 -2
- chia_blockchain-2.5.3rc2.dist-info/RECORD +891 -0
- mozilla-ca/cacert.pem +64 -33
- chia/_tests/clvm/test_condition_codes.py +0 -13
- chia/_tests/cmds/wallet/test_dao.py +0 -565
- chia/_tests/wallet/dao_wallet/__init__.py +0 -0
- chia/_tests/wallet/dao_wallet/config.py +0 -3
- chia/_tests/wallet/dao_wallet/test_dao_clvm.py +0 -1330
- chia/_tests/wallet/dao_wallet/test_dao_wallets.py +0 -3488
- chia/cmds/dao.py +0 -1064
- chia/cmds/dao_funcs.py +0 -598
- chia/consensus/puzzles/__init__.py +0 -0
- chia/consensus/puzzles/chialisp_deserialisation.clsp +0 -69
- chia/consensus/puzzles/chialisp_deserialisation.clsp.hex +0 -1
- chia/consensus/puzzles/rom_bootstrap_generator.clsp +0 -37
- chia/consensus/puzzles/rom_bootstrap_generator.clsp.hex +0 -1
- chia/full_node/puzzles/__init__.py +0 -0
- chia/full_node/puzzles/block_program_zero.clsp +0 -14
- chia/full_node/puzzles/block_program_zero.clsp.hex +0 -1
- chia/full_node/puzzles/decompress_coin_spend_entry.clsp +0 -5
- chia/full_node/puzzles/decompress_coin_spend_entry.clsp.hex +0 -1
- chia/full_node/puzzles/decompress_coin_spend_entry_with_prefix.clsp +0 -7
- chia/full_node/puzzles/decompress_coin_spend_entry_with_prefix.clsp.hex +0 -1
- chia/full_node/puzzles/decompress_puzzle.clsp +0 -6
- chia/full_node/puzzles/decompress_puzzle.clsp.hex +0 -1
- chia/pools/puzzles/__init__.py +0 -0
- chia/pools/puzzles/pool_member_innerpuz.clsp +0 -70
- chia/pools/puzzles/pool_member_innerpuz.clsp.hex +0 -1
- chia/pools/puzzles/pool_waitingroom_innerpuz.clsp +0 -69
- chia/pools/puzzles/pool_waitingroom_innerpuz.clsp.hex +0 -1
- chia/simulator/simulator_constants.py +0 -13
- chia/types/blockchain_format/foliage.py +0 -8
- chia/types/blockchain_format/pool_target.py +0 -5
- chia/types/blockchain_format/reward_chain_block.py +0 -6
- chia/types/blockchain_format/sized_bytes.py +0 -11
- chia/util/ints.py +0 -19
- chia/wallet/cat_wallet/dao_cat_info.py +0 -28
- chia/wallet/cat_wallet/dao_cat_wallet.py +0 -669
- chia/wallet/cat_wallet/puzzles/__init__.py +0 -0
- chia/wallet/cat_wallet/puzzles/cat_truths.clib +0 -31
- chia/wallet/cat_wallet/puzzles/cat_v2.clsp +0 -397
- chia/wallet/cat_wallet/puzzles/cat_v2.clsp.hex +0 -1
- chia/wallet/cat_wallet/puzzles/delegated_tail.clsp +0 -25
- chia/wallet/cat_wallet/puzzles/delegated_tail.clsp.hex +0 -1
- chia/wallet/cat_wallet/puzzles/everything_with_signature.clsp +0 -15
- chia/wallet/cat_wallet/puzzles/everything_with_signature.clsp.hex +0 -1
- chia/wallet/cat_wallet/puzzles/genesis_by_coin_id.clsp +0 -26
- chia/wallet/cat_wallet/puzzles/genesis_by_coin_id.clsp.hex +0 -1
- chia/wallet/cat_wallet/puzzles/genesis_by_coin_id_or_singleton.clsp +0 -42
- chia/wallet/cat_wallet/puzzles/genesis_by_coin_id_or_singleton.clsp.hex +0 -1
- chia/wallet/cat_wallet/puzzles/genesis_by_puzzle_hash.clsp +0 -24
- chia/wallet/cat_wallet/puzzles/genesis_by_puzzle_hash.clsp.hex +0 -1
- chia/wallet/dao_wallet/__init__.py +0 -0
- chia/wallet/dao_wallet/dao_info.py +0 -61
- chia/wallet/dao_wallet/dao_utils.py +0 -811
- chia/wallet/dao_wallet/dao_wallet.py +0 -2119
- chia/wallet/did_wallet/puzzles/__init__.py +0 -0
- chia/wallet/did_wallet/puzzles/did_innerpuz.clsp +0 -135
- chia/wallet/did_wallet/puzzles/did_innerpuz.clsp.hex +0 -1
- chia/wallet/payment.py +0 -33
- chia/wallet/puzzles/augmented_condition.clsp +0 -13
- chia/wallet/puzzles/augmented_condition.clsp.hex +0 -1
- chia/wallet/puzzles/condition_codes.clib +0 -77
- chia/wallet/puzzles/curry-and-treehash.clib +0 -102
- chia/wallet/puzzles/curry.clib +0 -135
- chia/wallet/puzzles/curry_by_index.clib +0 -16
- chia/wallet/puzzles/dao_cat_eve.clsp +0 -17
- chia/wallet/puzzles/dao_cat_eve.clsp.hex +0 -1
- chia/wallet/puzzles/dao_cat_launcher.clsp +0 -36
- chia/wallet/puzzles/dao_cat_launcher.clsp.hex +0 -1
- chia/wallet/puzzles/dao_finished_state.clsp +0 -35
- chia/wallet/puzzles/dao_finished_state.clsp.hex +0 -1
- chia/wallet/puzzles/dao_finished_state.clsp.hex.sha256tree +0 -1
- chia/wallet/puzzles/dao_lockup.clsp +0 -288
- chia/wallet/puzzles/dao_lockup.clsp.hex +0 -1
- chia/wallet/puzzles/dao_lockup.clsp.hex.sha256tree +0 -1
- chia/wallet/puzzles/dao_proposal.clsp +0 -377
- chia/wallet/puzzles/dao_proposal.clsp.hex +0 -1
- chia/wallet/puzzles/dao_proposal.clsp.hex.sha256tree +0 -1
- chia/wallet/puzzles/dao_proposal_timer.clsp +0 -78
- chia/wallet/puzzles/dao_proposal_timer.clsp.hex +0 -1
- chia/wallet/puzzles/dao_proposal_timer.clsp.hex.sha256tree +0 -1
- chia/wallet/puzzles/dao_proposal_validator.clsp +0 -87
- chia/wallet/puzzles/dao_proposal_validator.clsp.hex +0 -1
- chia/wallet/puzzles/dao_proposal_validator.clsp.hex.sha256tree +0 -1
- chia/wallet/puzzles/dao_spend_p2_singleton_v2.clsp +0 -240
- chia/wallet/puzzles/dao_spend_p2_singleton_v2.clsp.hex +0 -1
- chia/wallet/puzzles/dao_spend_p2_singleton_v2.clsp.hex.sha256tree +0 -1
- chia/wallet/puzzles/dao_treasury.clsp +0 -115
- chia/wallet/puzzles/dao_treasury.clsp.hex +0 -1
- chia/wallet/puzzles/dao_update_proposal.clsp +0 -44
- chia/wallet/puzzles/dao_update_proposal.clsp.hex +0 -1
- chia/wallet/puzzles/json.clib +0 -25
- chia/wallet/puzzles/merkle_utils.clib +0 -18
- chia/wallet/puzzles/notification.clsp +0 -7
- chia/wallet/puzzles/notification.clsp.hex +0 -1
- chia/wallet/puzzles/p2_1_of_n.clsp +0 -22
- chia/wallet/puzzles/p2_1_of_n.clsp.hex +0 -1
- chia/wallet/puzzles/p2_conditions.clsp +0 -3
- chia/wallet/puzzles/p2_conditions.clsp.hex +0 -1
- chia/wallet/puzzles/p2_delegated_conditions.clsp +0 -18
- chia/wallet/puzzles/p2_delegated_conditions.clsp.hex +0 -1
- chia/wallet/puzzles/p2_delegated_puzzle.clsp +0 -19
- chia/wallet/puzzles/p2_delegated_puzzle.clsp.hex +0 -1
- chia/wallet/puzzles/p2_delegated_puzzle_or_hidden_puzzle.clsp +0 -91
- chia/wallet/puzzles/p2_delegated_puzzle_or_hidden_puzzle.clsp.hex +0 -1
- chia/wallet/puzzles/p2_m_of_n_delegate_direct.clsp +0 -108
- chia/wallet/puzzles/p2_m_of_n_delegate_direct.clsp.hex +0 -1
- chia/wallet/puzzles/p2_parent.clsp +0 -19
- chia/wallet/puzzles/p2_parent.clsp.hex +0 -1
- chia/wallet/puzzles/p2_puzzle_hash.clsp +0 -18
- chia/wallet/puzzles/p2_puzzle_hash.clsp.hex +0 -1
- chia/wallet/puzzles/p2_singleton.clsp +0 -30
- chia/wallet/puzzles/p2_singleton.clsp.hex +0 -1
- chia/wallet/puzzles/p2_singleton_aggregator.clsp +0 -81
- chia/wallet/puzzles/p2_singleton_aggregator.clsp.hex +0 -1
- chia/wallet/puzzles/p2_singleton_or_delayed_puzhash.clsp +0 -50
- chia/wallet/puzzles/p2_singleton_or_delayed_puzhash.clsp.hex +0 -1
- chia/wallet/puzzles/p2_singleton_via_delegated_puzzle.clsp +0 -47
- chia/wallet/puzzles/p2_singleton_via_delegated_puzzle.clsp.hex +0 -1
- chia/wallet/puzzles/settlement_payments.clsp +0 -49
- chia/wallet/puzzles/settlement_payments.clsp.hex +0 -1
- chia/wallet/puzzles/sha256tree.clib +0 -11
- chia/wallet/puzzles/singleton_launcher.clsp +0 -16
- chia/wallet/puzzles/singleton_launcher.clsp.hex +0 -1
- chia/wallet/puzzles/singleton_top_layer.clsp +0 -177
- chia/wallet/puzzles/singleton_top_layer.clsp.hex +0 -1
- chia/wallet/puzzles/singleton_top_layer_v1_1.clsp +0 -107
- chia/wallet/puzzles/singleton_top_layer_v1_1.clsp.hex +0 -1
- chia/wallet/puzzles/singleton_truths.clib +0 -21
- chia/wallet/vc_wallet/cr_puzzles/__init__.py +0 -0
- chia/wallet/vc_wallet/cr_puzzles/conditions_w_fee_announce.clsp +0 -3
- chia/wallet/vc_wallet/cr_puzzles/conditions_w_fee_announce.clsp.hex +0 -1
- chia/wallet/vc_wallet/cr_puzzles/credential_restriction.clsp +0 -304
- chia/wallet/vc_wallet/cr_puzzles/credential_restriction.clsp.hex +0 -1
- chia/wallet/vc_wallet/cr_puzzles/flag_proofs_checker.clsp +0 -45
- chia/wallet/vc_wallet/cr_puzzles/flag_proofs_checker.clsp.hex +0 -1
- chia/wallet/vc_wallet/vc_puzzles/__init__.py +0 -0
- chia/wallet/vc_wallet/vc_puzzles/covenant_layer.clsp +0 -30
- chia/wallet/vc_wallet/vc_puzzles/covenant_layer.clsp.hex +0 -1
- chia/wallet/vc_wallet/vc_puzzles/eml_covenant_morpher.clsp +0 -75
- chia/wallet/vc_wallet/vc_puzzles/eml_covenant_morpher.clsp.hex +0 -1
- chia/wallet/vc_wallet/vc_puzzles/eml_transfer_program_covenant_adapter.clsp +0 -32
- chia/wallet/vc_wallet/vc_puzzles/eml_transfer_program_covenant_adapter.clsp.hex +0 -1
- chia/wallet/vc_wallet/vc_puzzles/eml_update_metadata_with_DID.clsp +0 -80
- chia/wallet/vc_wallet/vc_puzzles/eml_update_metadata_with_DID.clsp.hex +0 -1
- chia/wallet/vc_wallet/vc_puzzles/exigent_metadata_layer.clsp +0 -163
- chia/wallet/vc_wallet/vc_puzzles/exigent_metadata_layer.clsp.hex +0 -1
- chia/wallet/vc_wallet/vc_puzzles/p2_announced_delegated_puzzle.clsp +0 -16
- chia/wallet/vc_wallet/vc_puzzles/p2_announced_delegated_puzzle.clsp.hex +0 -1
- chia/wallet/vc_wallet/vc_puzzles/standard_vc_backdoor_puzzle.clsp +0 -74
- chia/wallet/vc_wallet/vc_puzzles/standard_vc_backdoor_puzzle.clsp.hex +0 -1
- chia/wallet/vc_wallet/vc_puzzles/std_parent_morpher.clsp +0 -23
- chia/wallet/vc_wallet/vc_puzzles/std_parent_morpher.clsp.hex +0 -1
- chia/wallet/vc_wallet/vc_puzzles/viral_backdoor.clsp +0 -64
- chia/wallet/vc_wallet/vc_puzzles/viral_backdoor.clsp.hex +0 -1
- chia_blockchain-2.5.2rc2.dist-info/RECORD +0 -1042
- {chia_blockchain-2.5.2rc2.dist-info → chia_blockchain-2.5.3rc2.dist-info}/LICENSE +0 -0
- {chia_blockchain-2.5.2rc2.dist-info → chia_blockchain-2.5.3rc2.dist-info}/WHEEL +0 -0
- {chia_blockchain-2.5.2rc2.dist-info → chia_blockchain-2.5.3rc2.dist-info}/entry_points.txt +0 -0
chia/daemon/keychain_server.py
CHANGED
|
@@ -6,10 +6,10 @@ from pathlib import Path
|
|
|
6
6
|
from typing import Any
|
|
7
7
|
|
|
8
8
|
from chia_rs import PrivateKey
|
|
9
|
+
from chia_rs.sized_ints import uint32
|
|
9
10
|
|
|
10
11
|
from chia.cmds.init_funcs import check_keys
|
|
11
12
|
from chia.util.errors import KeychainException, KeychainFingerprintNotFound
|
|
12
|
-
from chia.util.ints import uint32
|
|
13
13
|
from chia.util.keychain import Keychain, KeyData
|
|
14
14
|
from chia.util.streamable import Streamable, streamable
|
|
15
15
|
|
chia/daemon/server.py
CHANGED
|
@@ -21,6 +21,7 @@ from types import FrameType
|
|
|
21
21
|
from typing import Any, Optional, TextIO
|
|
22
22
|
|
|
23
23
|
from chia_rs import G1Element
|
|
24
|
+
from chia_rs.sized_ints import uint32
|
|
24
25
|
from typing_extensions import Protocol
|
|
25
26
|
|
|
26
27
|
from chia import __version__
|
|
@@ -38,7 +39,6 @@ from chia.util.chia_logging import initialize_service_logging
|
|
|
38
39
|
from chia.util.chia_version import chia_short_version
|
|
39
40
|
from chia.util.config import load_config
|
|
40
41
|
from chia.util.errors import KeychainCurrentPassphraseIsInvalid
|
|
41
|
-
from chia.util.ints import uint32
|
|
42
42
|
from chia.util.json_util import dict_to_json_str
|
|
43
43
|
from chia.util.keychain import Keychain, KeyData, passphrase_requirements, supports_os_passphrase_storage
|
|
44
44
|
from chia.util.lock import Lockfile, LockfileError
|
chia/daemon/windows_signal.py
CHANGED
chia/data_layer/data_layer.py
CHANGED
|
@@ -15,6 +15,8 @@ from pathlib import Path
|
|
|
15
15
|
from typing import TYPE_CHECKING, Any, ClassVar, Optional, Union, cast, final
|
|
16
16
|
|
|
17
17
|
import aiohttp
|
|
18
|
+
from chia_rs.sized_bytes import bytes32
|
|
19
|
+
from chia_rs.sized_ints import uint32, uint64
|
|
18
20
|
|
|
19
21
|
from chia.data_layer.data_layer_errors import KeyNotFoundError
|
|
20
22
|
from chia.data_layer.data_layer_util import (
|
|
@@ -44,7 +46,7 @@ from chia.data_layer.data_layer_util import (
|
|
|
44
46
|
leaf_hash,
|
|
45
47
|
unspecified,
|
|
46
48
|
)
|
|
47
|
-
from chia.data_layer.data_layer_wallet import DataLayerWallet, Mirror,
|
|
49
|
+
from chia.data_layer.data_layer_wallet import DataLayerWallet, Mirror, verify_offer
|
|
48
50
|
from chia.data_layer.data_store import DataStore
|
|
49
51
|
from chia.data_layer.download_data import (
|
|
50
52
|
delete_full_file_if_exists,
|
|
@@ -53,15 +55,14 @@ from chia.data_layer.download_data import (
|
|
|
53
55
|
insert_from_delta_file,
|
|
54
56
|
write_files_for_root,
|
|
55
57
|
)
|
|
58
|
+
from chia.data_layer.singleton_record import SingletonRecord
|
|
56
59
|
from chia.rpc.rpc_server import StateChangedProtocol, default_get_connections
|
|
57
60
|
from chia.rpc.wallet_request_types import LogIn
|
|
58
61
|
from chia.rpc.wallet_rpc_client import WalletRpcClient
|
|
59
62
|
from chia.server.outbound_message import NodeType
|
|
60
63
|
from chia.server.server import ChiaServer
|
|
61
64
|
from chia.server.ws_connection import WSChiaConnection
|
|
62
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
63
65
|
from chia.util.async_pool import Job, QueuedAsyncPool
|
|
64
|
-
from chia.util.ints import uint32, uint64
|
|
65
66
|
from chia.util.path import path_from_root
|
|
66
67
|
from chia.util.task_referencer import create_referenced_task
|
|
67
68
|
from chia.wallet.trade_record import TradeRecord
|
|
@@ -7,15 +7,15 @@ from hashlib import sha256
|
|
|
7
7
|
from typing import TYPE_CHECKING, Any, Optional, Union
|
|
8
8
|
|
|
9
9
|
import aiosqlite
|
|
10
|
+
from chia_rs.sized_bytes import bytes32
|
|
11
|
+
from chia_rs.sized_ints import uint8, uint64
|
|
10
12
|
from typing_extensions import final
|
|
11
13
|
|
|
12
14
|
from chia.data_layer.data_layer_errors import ProofIntegrityError
|
|
13
15
|
from chia.server.ws_connection import WSChiaConnection
|
|
14
16
|
from chia.types.blockchain_format.program import Program
|
|
15
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
16
17
|
from chia.util.byte_types import hexstr_to_bytes
|
|
17
18
|
from chia.util.db_wrapper import DBWrapper2
|
|
18
|
-
from chia.util.ints import uint8, uint64
|
|
19
19
|
from chia.util.streamable import Streamable, streamable
|
|
20
20
|
from chia.wallet.db_wallet.db_wallet_puzzles import create_host_fullpuz
|
|
21
21
|
|
|
@@ -6,27 +6,28 @@ import time
|
|
|
6
6
|
from typing import TYPE_CHECKING, Any, ClassVar, Optional, cast
|
|
7
7
|
|
|
8
8
|
from chia_rs import G1Element, G2Element
|
|
9
|
+
from chia_rs.sized_bytes import bytes32
|
|
10
|
+
from chia_rs.sized_ints import uint8, uint32, uint64, uint128
|
|
9
11
|
from clvm.EvalError import EvalError
|
|
10
12
|
from typing_extensions import Unpack, final
|
|
11
13
|
|
|
12
14
|
from chia.consensus.block_record import BlockRecord
|
|
13
15
|
from chia.data_layer.data_layer_errors import LauncherCoinNotFoundError, OfferIntegrityError
|
|
14
16
|
from chia.data_layer.data_layer_util import OfferStore, ProofOfInclusion, ProofOfInclusionLayer, StoreProofs, leaf_hash
|
|
17
|
+
from chia.data_layer.singleton_record import SingletonRecord
|
|
15
18
|
from chia.protocols.wallet_protocol import CoinState
|
|
16
19
|
from chia.server.ws_connection import WSChiaConnection
|
|
17
20
|
from chia.types.blockchain_format.coin import Coin
|
|
18
21
|
from chia.types.blockchain_format.program import Program
|
|
19
22
|
from chia.types.blockchain_format.serialized_program import SerializedProgram
|
|
20
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
21
23
|
from chia.types.coin_spend import CoinSpend, compute_additions
|
|
22
24
|
from chia.types.condition_opcodes import ConditionOpcode
|
|
23
|
-
from chia.util.ints import uint8, uint32, uint64, uint128
|
|
24
|
-
from chia.util.streamable import Streamable, streamable
|
|
25
25
|
from chia.wallet.conditions import (
|
|
26
26
|
AssertAnnouncement,
|
|
27
27
|
AssertCoinAnnouncement,
|
|
28
28
|
AssertPuzzleAnnouncement,
|
|
29
29
|
Condition,
|
|
30
|
+
CreateCoin,
|
|
30
31
|
CreateCoinAnnouncement,
|
|
31
32
|
UnknownCondition,
|
|
32
33
|
parse_timelock_info,
|
|
@@ -35,7 +36,6 @@ from chia.wallet.db_wallet.db_wallet_puzzles import (
|
|
|
35
36
|
ACS_MU,
|
|
36
37
|
ACS_MU_PH,
|
|
37
38
|
GRAFTROOT_DL_OFFERS,
|
|
38
|
-
SINGLETON_LAUNCHER,
|
|
39
39
|
create_graftroot_offer_puz,
|
|
40
40
|
create_host_fullpuz,
|
|
41
41
|
create_host_layer_puzzle,
|
|
@@ -48,9 +48,8 @@ from chia.wallet.db_wallet.db_wallet_puzzles import (
|
|
|
48
48
|
from chia.wallet.derivation_record import DerivationRecord
|
|
49
49
|
from chia.wallet.lineage_proof import LineageProof
|
|
50
50
|
from chia.wallet.outer_puzzles import AssetType
|
|
51
|
-
from chia.wallet.payment import Payment
|
|
52
51
|
from chia.wallet.puzzle_drivers import PuzzleInfo, Solver
|
|
53
|
-
from chia.wallet.
|
|
52
|
+
from chia.wallet.singleton import SINGLETON_LAUNCHER_PUZZLE, SINGLETON_LAUNCHER_PUZZLE_HASH
|
|
54
53
|
from chia.wallet.trading.offer import NotarizedPayment, Offer
|
|
55
54
|
from chia.wallet.transaction_record import TransactionRecord
|
|
56
55
|
from chia.wallet.util.compute_memos import compute_memos
|
|
@@ -69,20 +68,6 @@ if TYPE_CHECKING:
|
|
|
69
68
|
from chia.wallet.wallet_state_manager import WalletStateManager
|
|
70
69
|
|
|
71
70
|
|
|
72
|
-
@streamable
|
|
73
|
-
@dataclasses.dataclass(frozen=True)
|
|
74
|
-
class SingletonRecord(Streamable):
|
|
75
|
-
coin_id: bytes32
|
|
76
|
-
launcher_id: bytes32
|
|
77
|
-
root: bytes32
|
|
78
|
-
inner_puzzle_hash: bytes32
|
|
79
|
-
confirmed: bool
|
|
80
|
-
confirmed_at_height: uint32
|
|
81
|
-
lineage_proof: LineageProof
|
|
82
|
-
generation: uint32
|
|
83
|
-
timestamp: uint64
|
|
84
|
-
|
|
85
|
-
|
|
86
71
|
@dataclasses.dataclass(frozen=True)
|
|
87
72
|
class Mirror:
|
|
88
73
|
coin_id: bytes32
|
|
@@ -182,7 +167,7 @@ class DataLayerWallet:
|
|
|
182
167
|
@staticmethod
|
|
183
168
|
async def match_dl_launcher(launcher_spend: CoinSpend) -> tuple[bool, Optional[bytes32]]:
|
|
184
169
|
# Sanity check it's a launcher
|
|
185
|
-
if launcher_spend.puzzle_reveal.to_program() !=
|
|
170
|
+
if launcher_spend.puzzle_reveal.to_program() != SINGLETON_LAUNCHER_PUZZLE:
|
|
186
171
|
return False, None
|
|
187
172
|
|
|
188
173
|
# Let's make sure the solution looks how we expect it to
|
|
@@ -210,7 +195,7 @@ class DataLayerWallet:
|
|
|
210
195
|
|
|
211
196
|
if len(coin_states) == 0:
|
|
212
197
|
raise LauncherCoinNotFoundError(f"Launcher ID {launcher_id} is not a valid coin")
|
|
213
|
-
if coin_states[0].coin.puzzle_hash !=
|
|
198
|
+
if coin_states[0].coin.puzzle_hash != SINGLETON_LAUNCHER_PUZZLE_HASH:
|
|
214
199
|
raise ValueError(f"Coin with ID {launcher_id} is not a singleton launcher")
|
|
215
200
|
if coin_states[0].created_height is None:
|
|
216
201
|
raise ValueError(f"Launcher with ID {launcher_id} has not been created (maybe reorged)")
|
|
@@ -313,7 +298,7 @@ class DataLayerWallet:
|
|
|
313
298
|
raise ValueError("Not enough coins to create new data layer singleton")
|
|
314
299
|
|
|
315
300
|
launcher_parent: Coin = next(iter(coins))
|
|
316
|
-
launcher_coin: Coin = Coin(launcher_parent.name(),
|
|
301
|
+
launcher_coin: Coin = Coin(launcher_parent.name(), SINGLETON_LAUNCHER_PUZZLE_HASH, uint64(1))
|
|
317
302
|
|
|
318
303
|
inner_puzzle: Program = await self.standard_wallet.get_puzzle(
|
|
319
304
|
new=not action_scope.config.tx_config.reuse_puzhash
|
|
@@ -327,46 +312,46 @@ class DataLayerWallet:
|
|
|
327
312
|
announcement = AssertCoinAnnouncement(asserted_id=launcher_coin.name(), asserted_msg=announcement_message)
|
|
328
313
|
|
|
329
314
|
await self.standard_wallet.generate_signed_transaction(
|
|
330
|
-
|
|
331
|
-
|
|
315
|
+
amounts=[uint64(1)],
|
|
316
|
+
puzzle_hashes=[SINGLETON_LAUNCHER_PUZZLE_HASH],
|
|
332
317
|
action_scope=action_scope,
|
|
333
318
|
fee=fee,
|
|
334
319
|
origin_id=launcher_parent.name(),
|
|
335
320
|
coins=coins,
|
|
336
|
-
primaries=None,
|
|
337
321
|
extra_conditions=(*extra_conditions, announcement),
|
|
338
322
|
)
|
|
339
323
|
|
|
340
324
|
launcher_cs: CoinSpend = CoinSpend(
|
|
341
325
|
launcher_coin,
|
|
342
|
-
SerializedProgram.from_program(
|
|
326
|
+
SerializedProgram.from_program(SINGLETON_LAUNCHER_PUZZLE),
|
|
343
327
|
SerializedProgram.from_program(genesis_launcher_solution),
|
|
344
328
|
)
|
|
345
329
|
launcher_sb = WalletSpendBundle([launcher_cs], G2Element())
|
|
330
|
+
launcher_id = launcher_coin.name()
|
|
346
331
|
|
|
347
332
|
async with action_scope.use() as interface:
|
|
348
333
|
interface.side_effects.extra_spends.append(launcher_sb)
|
|
334
|
+
interface.side_effects.singleton_records.append(
|
|
335
|
+
SingletonRecord(
|
|
336
|
+
coin_id=Coin(launcher_id, full_puzzle.get_tree_hash(), uint64(1)).name(),
|
|
337
|
+
launcher_id=launcher_id,
|
|
338
|
+
root=initial_root,
|
|
339
|
+
inner_puzzle_hash=inner_puzzle.get_tree_hash(),
|
|
340
|
+
confirmed=False,
|
|
341
|
+
confirmed_at_height=uint32(0),
|
|
342
|
+
timestamp=uint64(0),
|
|
343
|
+
lineage_proof=LineageProof(
|
|
344
|
+
launcher_id,
|
|
345
|
+
create_host_layer_puzzle(inner_puzzle, initial_root).get_tree_hash(),
|
|
346
|
+
uint64(1),
|
|
347
|
+
),
|
|
348
|
+
generation=uint32(0),
|
|
349
|
+
)
|
|
350
|
+
)
|
|
349
351
|
|
|
350
|
-
|
|
351
|
-
coin_id=Coin(launcher_coin.name(), full_puzzle.get_tree_hash(), uint64(1)).name(),
|
|
352
|
-
launcher_id=launcher_coin.name(),
|
|
353
|
-
root=initial_root,
|
|
354
|
-
inner_puzzle_hash=inner_puzzle.get_tree_hash(),
|
|
355
|
-
confirmed=False,
|
|
356
|
-
confirmed_at_height=uint32(0),
|
|
357
|
-
timestamp=uint64(0),
|
|
358
|
-
lineage_proof=LineageProof(
|
|
359
|
-
launcher_coin.name(),
|
|
360
|
-
create_host_layer_puzzle(inner_puzzle, initial_root).get_tree_hash(),
|
|
361
|
-
uint64(1),
|
|
362
|
-
),
|
|
363
|
-
generation=uint32(0),
|
|
364
|
-
)
|
|
365
|
-
|
|
366
|
-
await self.wallet_state_manager.dl_store.add_singleton_record(singleton_record)
|
|
367
|
-
await self.wallet_state_manager.add_interested_puzzle_hashes([singleton_record.launcher_id], [self.id()])
|
|
352
|
+
await self.wallet_state_manager.add_interested_puzzle_hashes([launcher_id], [self.id()])
|
|
368
353
|
|
|
369
|
-
return
|
|
354
|
+
return launcher_id
|
|
370
355
|
|
|
371
356
|
async def create_tandem_xch_tx(
|
|
372
357
|
self,
|
|
@@ -375,8 +360,8 @@ class DataLayerWallet:
|
|
|
375
360
|
action_scope: WalletActionScope,
|
|
376
361
|
) -> None:
|
|
377
362
|
await self.standard_wallet.generate_signed_transaction(
|
|
378
|
-
|
|
379
|
-
|
|
363
|
+
amounts=[],
|
|
364
|
+
puzzle_hashes=[],
|
|
380
365
|
action_scope=action_scope,
|
|
381
366
|
fee=fee,
|
|
382
367
|
negative_change_allowed=False,
|
|
@@ -391,7 +376,6 @@ class DataLayerWallet:
|
|
|
391
376
|
new_puz_hash: Optional[bytes32] = None,
|
|
392
377
|
new_amount: Optional[uint64] = None,
|
|
393
378
|
fee: uint64 = uint64(0),
|
|
394
|
-
add_pending_singleton: bool = True,
|
|
395
379
|
announce_new_state: bool = False,
|
|
396
380
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
397
381
|
) -> None:
|
|
@@ -519,7 +503,7 @@ class DataLayerWallet:
|
|
|
519
503
|
|
|
520
504
|
# Create the solution
|
|
521
505
|
primaries = [
|
|
522
|
-
|
|
506
|
+
CreateCoin(
|
|
523
507
|
announce_only.get_tree_hash() if announce_new_state else new_puz_hash,
|
|
524
508
|
singleton_record.lineage_proof.amount if new_amount is None else new_amount,
|
|
525
509
|
[
|
|
@@ -592,35 +576,32 @@ class DataLayerWallet:
|
|
|
592
576
|
action_scope,
|
|
593
577
|
)
|
|
594
578
|
|
|
595
|
-
|
|
596
|
-
|
|
579
|
+
async with action_scope.use() as interface:
|
|
580
|
+
interface.side_effects.transactions.append(dl_tx)
|
|
581
|
+
interface.side_effects.singleton_records.append(
|
|
597
582
|
new_singleton_record,
|
|
598
583
|
)
|
|
599
584
|
if announce_new_state:
|
|
600
|
-
|
|
585
|
+
interface.side_effects.singleton_records.append(
|
|
601
586
|
second_singleton_record,
|
|
602
587
|
)
|
|
603
588
|
|
|
604
|
-
async with action_scope.use() as interface:
|
|
605
|
-
interface.side_effects.transactions.append(dl_tx)
|
|
606
|
-
|
|
607
589
|
async def generate_signed_transaction(
|
|
608
590
|
self,
|
|
609
591
|
amounts: list[uint64],
|
|
610
592
|
puzzle_hashes: list[bytes32],
|
|
611
593
|
action_scope: WalletActionScope,
|
|
612
594
|
fee: uint64 = uint64(0),
|
|
613
|
-
coins: set[Coin] =
|
|
595
|
+
coins: Optional[set[Coin]] = None,
|
|
614
596
|
memos: Optional[list[list[bytes]]] = None, # ignored
|
|
615
597
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
616
598
|
**kwargs: Unpack[GSTOptionalArgs],
|
|
617
599
|
) -> None:
|
|
618
600
|
launcher_id: Optional[bytes32] = kwargs.get("launcher_id", None)
|
|
619
601
|
new_root_hash: Optional[bytes32] = kwargs.get("new_root_hash", None)
|
|
620
|
-
add_pending_singleton: bool = kwargs.get("add_pending_singleton", True)
|
|
621
602
|
announce_new_state: bool = kwargs.get("announce_new_state", False)
|
|
622
603
|
# Figure out the launcher ID
|
|
623
|
-
if len(coins) == 0:
|
|
604
|
+
if coins is None or len(coins) == 0:
|
|
624
605
|
if launcher_id is None:
|
|
625
606
|
raise ValueError("Not enough info to know which DL coin to send")
|
|
626
607
|
else:
|
|
@@ -643,7 +624,6 @@ class DataLayerWallet:
|
|
|
643
624
|
puzzle_hashes[0],
|
|
644
625
|
amounts[0],
|
|
645
626
|
fee,
|
|
646
|
-
add_pending_singleton,
|
|
647
627
|
announce_new_state,
|
|
648
628
|
extra_conditions,
|
|
649
629
|
)
|
|
@@ -712,12 +692,11 @@ class DataLayerWallet:
|
|
|
712
692
|
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
713
693
|
) -> None:
|
|
714
694
|
await self.standard_wallet.generate_signed_transaction(
|
|
715
|
-
|
|
716
|
-
|
|
695
|
+
amounts=[amount],
|
|
696
|
+
puzzle_hashes=[create_mirror_puzzle().get_tree_hash()],
|
|
717
697
|
action_scope=action_scope,
|
|
718
698
|
fee=fee,
|
|
719
|
-
|
|
720
|
-
memos=[launcher_id, *(url for url in urls)],
|
|
699
|
+
memos=[[launcher_id, *(url for url in urls)]],
|
|
721
700
|
extra_conditions=extra_conditions,
|
|
722
701
|
)
|
|
723
702
|
|
|
@@ -748,7 +727,7 @@ class DataLayerWallet:
|
|
|
748
727
|
)
|
|
749
728
|
excess_fee: int = fee - mirror_coin.amount
|
|
750
729
|
inner_sol: Program = self.standard_wallet.make_solution(
|
|
751
|
-
primaries=[
|
|
730
|
+
primaries=[CreateCoin(new_puzhash, uint64(mirror_coin.amount - fee))] if excess_fee < 0 else [],
|
|
752
731
|
conditions=(*extra_conditions, CreateCoinAnnouncement(b"$")) if excess_fee > 0 else extra_conditions,
|
|
753
732
|
)
|
|
754
733
|
mirror_spend = CoinSpend(
|
|
@@ -790,8 +769,8 @@ class DataLayerWallet:
|
|
|
790
769
|
|
|
791
770
|
if excess_fee > 0:
|
|
792
771
|
await self.wallet_state_manager.main_wallet.generate_signed_transaction(
|
|
793
|
-
uint64(1),
|
|
794
|
-
new_puzhash,
|
|
772
|
+
[uint64(1)],
|
|
773
|
+
[new_puzhash],
|
|
795
774
|
action_scope,
|
|
796
775
|
fee=uint64(excess_fee),
|
|
797
776
|
extra_conditions=(AssertCoinAnnouncement(asserted_id=mirror_coin.name(), asserted_msg=b"$"),),
|
|
@@ -998,7 +977,7 @@ class DataLayerWallet:
|
|
|
998
977
|
{
|
|
999
978
|
"type": AssetType.SINGLETON.value,
|
|
1000
979
|
"launcher_id": "0x" + launcher_id.hex(),
|
|
1001
|
-
"launcher_ph": "0x" +
|
|
980
|
+
"launcher_ph": "0x" + SINGLETON_LAUNCHER_PUZZLE_HASH.hex(),
|
|
1002
981
|
"also": {
|
|
1003
982
|
"type": AssetType.METADATA.value,
|
|
1004
983
|
"metadata": f"(0x{record.root} . ())",
|
|
@@ -1058,7 +1037,6 @@ class DataLayerWallet:
|
|
|
1058
1037
|
fee=fee_left_to_pay,
|
|
1059
1038
|
launcher_id=launcher,
|
|
1060
1039
|
new_root_hash=new_root,
|
|
1061
|
-
add_pending_singleton=False,
|
|
1062
1040
|
announce_new_state=True,
|
|
1063
1041
|
extra_conditions=extra_conditions,
|
|
1064
1042
|
)
|
chia/data_layer/data_store.py
CHANGED
|
@@ -10,6 +10,7 @@ from pathlib import Path
|
|
|
10
10
|
from typing import Any, BinaryIO, Callable, Optional, Union
|
|
11
11
|
|
|
12
12
|
import aiosqlite
|
|
13
|
+
from chia_rs.sized_bytes import bytes32
|
|
13
14
|
|
|
14
15
|
from chia.data_layer.data_layer_errors import KeyNotFoundError, NodeHashError, TreeGenerationIncrementingError
|
|
15
16
|
from chia.data_layer.data_layer_util import (
|
|
@@ -41,7 +42,6 @@ from chia.data_layer.data_layer_util import (
|
|
|
41
42
|
unspecified,
|
|
42
43
|
)
|
|
43
44
|
from chia.types.blockchain_format.program import Program
|
|
44
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
45
45
|
from chia.util.db_wrapper import SQLITE_MAX_VARIABLE_NUMBER, DBWrapper2
|
|
46
46
|
|
|
47
47
|
log = logging.getLogger(__name__)
|
|
@@ -4,12 +4,13 @@ import dataclasses
|
|
|
4
4
|
from typing import Optional, TypeVar, Union
|
|
5
5
|
|
|
6
6
|
from aiosqlite import Row
|
|
7
|
+
from chia_rs.sized_bytes import bytes32
|
|
8
|
+
from chia_rs.sized_ints import uint16, uint32, uint64
|
|
7
9
|
|
|
8
|
-
from chia.data_layer.data_layer_wallet import Mirror
|
|
10
|
+
from chia.data_layer.data_layer_wallet import Mirror
|
|
11
|
+
from chia.data_layer.singleton_record import SingletonRecord
|
|
9
12
|
from chia.types.blockchain_format.coin import Coin
|
|
10
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
11
13
|
from chia.util.db_wrapper import DBWrapper2, execute_fetchone
|
|
12
|
-
from chia.util.ints import uint16, uint32, uint64
|
|
13
14
|
from chia.wallet.lineage_proof import LineageProof
|
|
14
15
|
|
|
15
16
|
_T_DataLayerStore = TypeVar("_T_DataLayerStore", bound="DataLayerStore")
|
|
@@ -77,9 +78,7 @@ class DataLayerStore:
|
|
|
77
78
|
)
|
|
78
79
|
|
|
79
80
|
await conn.execute(
|
|
80
|
-
"CREATE TABLE IF NOT EXISTS mirror_confirmations("
|
|
81
|
-
"coin_id blob PRIMARY KEY,"
|
|
82
|
-
"confirmed_at_height int)"
|
|
81
|
+
"CREATE TABLE IF NOT EXISTS mirror_confirmations(coin_id blob PRIMARY KEY,confirmed_at_height int)"
|
|
83
82
|
)
|
|
84
83
|
|
|
85
84
|
await conn.execute(
|
chia/data_layer/download_data.py
CHANGED
|
@@ -8,11 +8,11 @@ from pathlib import Path
|
|
|
8
8
|
from typing import Optional
|
|
9
9
|
|
|
10
10
|
import aiohttp
|
|
11
|
+
from chia_rs.sized_bytes import bytes32
|
|
11
12
|
from typing_extensions import Literal
|
|
12
13
|
|
|
13
14
|
from chia.data_layer.data_layer_util import NodeType, PluginRemote, Root, SerializedNode, ServerInfo, Status
|
|
14
15
|
from chia.data_layer.data_store import DataStore
|
|
15
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def get_full_tree_filename(store_id: bytes32, node_hash: bytes32, generation: int, group_by_store: bool = False) -> str:
|
|
@@ -18,9 +18,9 @@ import boto3
|
|
|
18
18
|
import yaml
|
|
19
19
|
from aiohttp import web
|
|
20
20
|
from botocore.exceptions import ClientError
|
|
21
|
+
from chia_rs.sized_bytes import bytes32
|
|
21
22
|
|
|
22
23
|
from chia.data_layer.download_data import is_filename_valid
|
|
23
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
24
24
|
|
|
25
25
|
log = logging.getLogger(__name__)
|
|
26
26
|
plugin_name = "Chia S3 Datalayer plugin"
|
|
@@ -205,7 +205,7 @@ class S3Plugin:
|
|
|
205
205
|
target_diff_path = self.get_s3_target_from_path(store_id, diff_path, group_files_by_store)
|
|
206
206
|
|
|
207
207
|
try:
|
|
208
|
-
with concurrent.futures.ThreadPoolExecutor() as pool:
|
|
208
|
+
with concurrent.futures.ThreadPoolExecutor(thread_name_prefix="s3-upload-") as pool:
|
|
209
209
|
if full_tree_path is not None:
|
|
210
210
|
await asyncio.get_running_loop().run_in_executor(
|
|
211
211
|
pool,
|
|
@@ -284,7 +284,7 @@ class S3Plugin:
|
|
|
284
284
|
# Create folder for parent directory
|
|
285
285
|
target_filename.parent.mkdir(parents=True, exist_ok=True)
|
|
286
286
|
log.info(f"downloading {url} to {target_filename}...")
|
|
287
|
-
with concurrent.futures.ThreadPoolExecutor() as pool:
|
|
287
|
+
with concurrent.futures.ThreadPoolExecutor(thread_name_prefix="s3-download-") as pool:
|
|
288
288
|
await asyncio.get_running_loop().run_in_executor(
|
|
289
289
|
pool, functools.partial(my_bucket.download_file, filename, str(target_filename))
|
|
290
290
|
)
|
|
@@ -330,7 +330,7 @@ class S3Plugin:
|
|
|
330
330
|
log.debug(f"skip {file_name} already in bucket")
|
|
331
331
|
continue
|
|
332
332
|
|
|
333
|
-
with concurrent.futures.ThreadPoolExecutor() as pool:
|
|
333
|
+
with concurrent.futures.ThreadPoolExecutor(thread_name_prefix="s3-missing-") as pool:
|
|
334
334
|
await asyncio.get_running_loop().run_in_executor(
|
|
335
335
|
pool,
|
|
336
336
|
functools.partial(my_bucket.upload_file, file_path, target_file_name),
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import dataclasses
|
|
4
|
+
|
|
5
|
+
from chia_rs.sized_bytes import bytes32
|
|
6
|
+
from chia_rs.sized_ints import uint32, uint64
|
|
7
|
+
|
|
8
|
+
from chia.util.streamable import Streamable, streamable
|
|
9
|
+
from chia.wallet.lineage_proof import LineageProof
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@streamable
|
|
13
|
+
@dataclasses.dataclass(frozen=True)
|
|
14
|
+
class SingletonRecord(Streamable):
|
|
15
|
+
coin_id: bytes32
|
|
16
|
+
launcher_id: bytes32
|
|
17
|
+
root: bytes32
|
|
18
|
+
inner_puzzle_hash: bytes32
|
|
19
|
+
confirmed: bool
|
|
20
|
+
confirmed_at_height: uint32
|
|
21
|
+
lineage_proof: LineageProof
|
|
22
|
+
generation: uint32
|
|
23
|
+
timestamp: uint64
|
|
@@ -8,9 +8,10 @@ import time
|
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
from typing import Optional
|
|
10
10
|
|
|
11
|
+
from chia_rs.sized_bytes import bytes32
|
|
12
|
+
|
|
11
13
|
from chia.data_layer.data_layer_util import Side, TerminalNode, leaf_hash
|
|
12
14
|
from chia.data_layer.data_store import DataStore
|
|
13
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
async def generate_datastore(num_nodes: int, slow_mode: bool) -> None:
|
chia/farmer/farmer.py
CHANGED
|
@@ -14,9 +14,10 @@ from pathlib import Path
|
|
|
14
14
|
from typing import TYPE_CHECKING, Any, ClassVar, Optional, Union, cast
|
|
15
15
|
|
|
16
16
|
import aiohttp
|
|
17
|
-
from chia_rs import AugSchemeMPL, G1Element, G2Element, PrivateKey
|
|
17
|
+
from chia_rs import AugSchemeMPL, ConsensusConstants, G1Element, G2Element, PrivateKey
|
|
18
|
+
from chia_rs.sized_bytes import bytes32
|
|
19
|
+
from chia_rs.sized_ints import uint8, uint16, uint32, uint64
|
|
18
20
|
|
|
19
|
-
from chia.consensus.constants import ConsensusConstants
|
|
20
21
|
from chia.daemon.keychain_proxy import KeychainProxy, connect_to_keychain_and_validate, wrap_local_keychain
|
|
21
22
|
from chia.plot_sync.delta import Delta
|
|
22
23
|
from chia.plot_sync.receiver import Receiver
|
|
@@ -40,13 +41,11 @@ from chia.server.server import ChiaServer, ssl_context_for_root
|
|
|
40
41
|
from chia.server.ws_connection import WSChiaConnection
|
|
41
42
|
from chia.ssl.create_ssl import get_mozilla_ca_crt
|
|
42
43
|
from chia.types.blockchain_format.proof_of_space import ProofOfSpace
|
|
43
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
44
44
|
from chia.util.bech32m import decode_puzzle_hash, encode_puzzle_hash
|
|
45
45
|
from chia.util.byte_types import hexstr_to_bytes
|
|
46
46
|
from chia.util.config import config_path_for_filename, load_config, lock_and_load_config, save_config
|
|
47
47
|
from chia.util.errors import KeychainProxyConnectionFailure
|
|
48
48
|
from chia.util.hash import std_hash
|
|
49
|
-
from chia.util.ints import uint8, uint16, uint32, uint64
|
|
50
49
|
from chia.util.keychain import Keychain
|
|
51
50
|
from chia.util.logging import TimedDuplicateFilter
|
|
52
51
|
from chia.util.profiler import profile_task
|
|
@@ -635,8 +634,7 @@ class Farmer:
|
|
|
635
634
|
)
|
|
636
635
|
if post_response is not None and "error_code" not in post_response:
|
|
637
636
|
self.log.info(
|
|
638
|
-
f"Welcome message from {pool_config.pool_url}: "
|
|
639
|
-
f"{post_response['welcome_message']}"
|
|
637
|
+
f"Welcome message from {pool_config.pool_url}: {post_response['welcome_message']}"
|
|
640
638
|
)
|
|
641
639
|
# Now we should be able to update the local farmer info
|
|
642
640
|
farmer_info, farmer_is_known = await update_pool_farmer_info()
|
chia/farmer/farmer_api.py
CHANGED
|
@@ -6,7 +6,9 @@ import time
|
|
|
6
6
|
from typing import TYPE_CHECKING, Any, ClassVar, Optional, Union, cast
|
|
7
7
|
|
|
8
8
|
import aiohttp
|
|
9
|
-
from chia_rs import AugSchemeMPL, G2Element, PrivateKey
|
|
9
|
+
from chia_rs import AugSchemeMPL, G2Element, PoolTarget, PrivateKey
|
|
10
|
+
from chia_rs.sized_bytes import bytes32
|
|
11
|
+
from chia_rs.sized_ints import uint8, uint16, uint32, uint64
|
|
10
12
|
|
|
11
13
|
from chia import __version__
|
|
12
14
|
from chia.consensus.pot_iterations import calculate_iterations_quality, calculate_sp_interval_iters
|
|
@@ -35,7 +37,6 @@ from chia.server.outbound_message import Message, NodeType, make_msg
|
|
|
35
37
|
from chia.server.server import ssl_context_for_root
|
|
36
38
|
from chia.server.ws_connection import WSChiaConnection
|
|
37
39
|
from chia.ssl.create_ssl import get_mozilla_ca_crt
|
|
38
|
-
from chia.types.blockchain_format.pool_target import PoolTarget
|
|
39
40
|
from chia.types.blockchain_format.proof_of_space import (
|
|
40
41
|
calculate_prefix_bits,
|
|
41
42
|
generate_plot_public_key,
|
|
@@ -43,8 +44,6 @@ from chia.types.blockchain_format.proof_of_space import (
|
|
|
43
44
|
get_plot_id,
|
|
44
45
|
verify_and_get_quality_string,
|
|
45
46
|
)
|
|
46
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
47
|
-
from chia.util.ints import uint8, uint16, uint32, uint64
|
|
48
47
|
|
|
49
48
|
|
|
50
49
|
class FarmerAPI:
|
|
@@ -384,8 +383,7 @@ class FarmerAPI:
|
|
|
384
383
|
self.farmer.log.info(f"Pool response: {pool_response}")
|
|
385
384
|
if "error_code" in pool_response:
|
|
386
385
|
self.farmer.log.error(
|
|
387
|
-
f"Error in pooling: "
|
|
388
|
-
f"{pool_response['error_code'], pool_response['error_message']}"
|
|
386
|
+
f"Error in pooling: {pool_response['error_code'], pool_response['error_message']}"
|
|
389
387
|
)
|
|
390
388
|
|
|
391
389
|
increment_pool_stats(
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from chia_rs.sized_ints import uint32, uint64
|
|
4
|
+
|
|
3
5
|
from chia.full_node.fee_estimate_store import FeeStore
|
|
4
6
|
from chia.full_node.fee_estimation import EmptyFeeMempoolInfo, FeeBlockInfo, FeeMempoolInfo, MempoolItemInfo
|
|
5
7
|
from chia.full_node.fee_estimator import SmartFeeEstimator
|
|
@@ -7,7 +9,6 @@ from chia.full_node.fee_estimator_interface import FeeEstimatorInterface
|
|
|
7
9
|
from chia.full_node.fee_tracker import FeeTracker
|
|
8
10
|
from chia.types.clvm_cost import CLVMCost
|
|
9
11
|
from chia.types.fee_rate import FeeRateV2
|
|
10
|
-
from chia.util.ints import uint32, uint64
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
class BitcoinFeeEstimator(FeeEstimatorInterface):
|
|
@@ -6,12 +6,12 @@ from pathlib import Path
|
|
|
6
6
|
from typing import Optional
|
|
7
7
|
|
|
8
8
|
import aiofiles
|
|
9
|
+
from chia_rs.sized_bytes import bytes32
|
|
10
|
+
from chia_rs.sized_ints import uint32
|
|
9
11
|
|
|
10
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
11
12
|
from chia.types.blockchain_format.sub_epoch_summary import SubEpochSummary
|
|
12
13
|
from chia.util.db_wrapper import DBWrapper2
|
|
13
14
|
from chia.util.files import write_file_async
|
|
14
|
-
from chia.util.ints import uint32
|
|
15
15
|
from chia.util.streamable import Streamable, streamable
|
|
16
16
|
|
|
17
17
|
log = logging.getLogger(__name__)
|