chia-blockchain 2.5.2rc1__py3-none-any.whl → 2.5.3rc1__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 +25 -15
- 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 +79 -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.2rc1.dist-info → chia_blockchain-2.5.3rc1.dist-info}/METADATA +3 -2
- chia_blockchain-2.5.3rc1.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.2rc1.dist-info/RECORD +0 -1042
- {chia_blockchain-2.5.2rc1.dist-info → chia_blockchain-2.5.3rc1.dist-info}/LICENSE +0 -0
- {chia_blockchain-2.5.2rc1.dist-info → chia_blockchain-2.5.3rc1.dist-info}/WHEEL +0 -0
- {chia_blockchain-2.5.2rc1.dist-info → chia_blockchain-2.5.3rc1.dist-info}/entry_points.txt +0 -0
chia/rpc/wallet_rpc_client.py
CHANGED
|
@@ -3,8 +3,12 @@ from __future__ import annotations
|
|
|
3
3
|
from collections.abc import Sequence
|
|
4
4
|
from typing import Any, Optional, Union, cast
|
|
5
5
|
|
|
6
|
+
from chia_rs.sized_bytes import bytes32
|
|
7
|
+
from chia_rs.sized_ints import uint16, uint32, uint64
|
|
8
|
+
|
|
6
9
|
from chia.data_layer.data_layer_util import DLProof, VerifyProofResponse
|
|
7
|
-
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
|
|
8
12
|
from chia.pools.pool_wallet_info import PoolWalletInfo
|
|
9
13
|
from chia.rpc.rpc_client import RpcClient
|
|
10
14
|
from chia.rpc.wallet_request_types import (
|
|
@@ -19,16 +23,8 @@ from chia.rpc.wallet_request_types import (
|
|
|
19
23
|
CheckDeleteKeyResponse,
|
|
20
24
|
CombineCoins,
|
|
21
25
|
CombineCoinsResponse,
|
|
22
|
-
CreateNewDAOWalletResponse,
|
|
23
26
|
CreateOfferForIDsResponse,
|
|
24
27
|
CreateSignedTransactionsResponse,
|
|
25
|
-
DAOAddFundsToTreasuryResponse,
|
|
26
|
-
DAOCloseProposalResponse,
|
|
27
|
-
DAOCreateProposalResponse,
|
|
28
|
-
DAOExitLockupResponse,
|
|
29
|
-
DAOFreeCoinsFromFinishedProposalsResponse,
|
|
30
|
-
DAOSendToLockupResponse,
|
|
31
|
-
DAOVoteOnProposalResponse,
|
|
32
28
|
DeleteKey,
|
|
33
29
|
DIDGetCurrentCoinInfo,
|
|
34
30
|
DIDGetCurrentCoinInfoResponse,
|
|
@@ -103,9 +99,7 @@ from chia.rpc.wallet_request_types import (
|
|
|
103
99
|
)
|
|
104
100
|
from chia.types.blockchain_format.coin import Coin
|
|
105
101
|
from chia.types.blockchain_format.program import Program
|
|
106
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
107
102
|
from chia.types.coin_record import CoinRecord
|
|
108
|
-
from chia.util.ints import uint16, uint32, uint64
|
|
109
103
|
from chia.wallet.conditions import Condition, ConditionValidTimes, conditions_to_json_dicts
|
|
110
104
|
from chia.wallet.puzzles.clawback.metadata import AutoClaimSettings
|
|
111
105
|
from chia.wallet.trade_record import TradeRecord
|
|
@@ -1426,248 +1420,6 @@ class WalletRpcClient(RpcClient):
|
|
|
1426
1420
|
await self.fetch("get_transaction_memo", {**request.to_json_dict()})
|
|
1427
1421
|
)
|
|
1428
1422
|
|
|
1429
|
-
# DAOs
|
|
1430
|
-
async def create_new_dao_wallet(
|
|
1431
|
-
self,
|
|
1432
|
-
mode: str,
|
|
1433
|
-
tx_config: TXConfig,
|
|
1434
|
-
dao_rules: Optional[dict[str, uint64]] = None,
|
|
1435
|
-
amount_of_cats: Optional[uint64] = None,
|
|
1436
|
-
treasury_id: Optional[bytes32] = None,
|
|
1437
|
-
filter_amount: uint64 = uint64(1),
|
|
1438
|
-
name: Optional[str] = None,
|
|
1439
|
-
fee: uint64 = uint64(0),
|
|
1440
|
-
fee_for_cat: uint64 = uint64(0),
|
|
1441
|
-
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1442
|
-
push: bool = True,
|
|
1443
|
-
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1444
|
-
) -> CreateNewDAOWalletResponse:
|
|
1445
|
-
request: dict[str, Any] = {
|
|
1446
|
-
"wallet_type": "dao_wallet",
|
|
1447
|
-
"mode": mode,
|
|
1448
|
-
"treasury_id": treasury_id.hex() if treasury_id is not None else treasury_id,
|
|
1449
|
-
"dao_rules": dao_rules,
|
|
1450
|
-
"amount_of_cats": amount_of_cats,
|
|
1451
|
-
"filter_amount": filter_amount,
|
|
1452
|
-
"name": name,
|
|
1453
|
-
"fee": fee,
|
|
1454
|
-
"fee_for_cat": fee_for_cat,
|
|
1455
|
-
"extra_conditions": list(extra_conditions),
|
|
1456
|
-
"push": push,
|
|
1457
|
-
**tx_config.to_json_dict(),
|
|
1458
|
-
**timelock_info.to_json_dict(),
|
|
1459
|
-
}
|
|
1460
|
-
response = await self.fetch("create_new_wallet", request)
|
|
1461
|
-
return json_deserialize_with_clvm_streamable(response, CreateNewDAOWalletResponse)
|
|
1462
|
-
|
|
1463
|
-
async def dao_get_treasury_id(self, wallet_id: int) -> dict[str, Any]:
|
|
1464
|
-
request = {"wallet_id": wallet_id}
|
|
1465
|
-
response = await self.fetch("dao_get_treasury_id", request)
|
|
1466
|
-
return response
|
|
1467
|
-
|
|
1468
|
-
async def dao_get_rules(self, wallet_id: int) -> dict[str, Any]:
|
|
1469
|
-
request = {"wallet_id": wallet_id}
|
|
1470
|
-
response = await self.fetch("dao_get_rules", request)
|
|
1471
|
-
return response
|
|
1472
|
-
|
|
1473
|
-
async def dao_create_proposal(
|
|
1474
|
-
self,
|
|
1475
|
-
wallet_id: int,
|
|
1476
|
-
proposal_type: str,
|
|
1477
|
-
tx_config: TXConfig,
|
|
1478
|
-
additions: Optional[list[dict[str, Any]]] = None,
|
|
1479
|
-
amount: Optional[uint64] = None,
|
|
1480
|
-
inner_address: Optional[str] = None,
|
|
1481
|
-
asset_id: Optional[str] = None,
|
|
1482
|
-
cat_target_address: Optional[str] = None,
|
|
1483
|
-
vote_amount: Optional[int] = None,
|
|
1484
|
-
new_dao_rules: Optional[dict[str, Optional[uint64]]] = None,
|
|
1485
|
-
fee: uint64 = uint64(0),
|
|
1486
|
-
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1487
|
-
push: bool = True,
|
|
1488
|
-
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1489
|
-
) -> DAOCreateProposalResponse:
|
|
1490
|
-
request: dict[str, Any] = {
|
|
1491
|
-
"wallet_id": wallet_id,
|
|
1492
|
-
"proposal_type": proposal_type,
|
|
1493
|
-
"additions": additions,
|
|
1494
|
-
"amount": amount,
|
|
1495
|
-
"inner_address": inner_address,
|
|
1496
|
-
"asset_id": asset_id,
|
|
1497
|
-
"cat_target_address": cat_target_address,
|
|
1498
|
-
"vote_amount": vote_amount,
|
|
1499
|
-
"new_dao_rules": new_dao_rules,
|
|
1500
|
-
"fee": fee,
|
|
1501
|
-
"extra_conditions": list(extra_conditions),
|
|
1502
|
-
**tx_config.to_json_dict(),
|
|
1503
|
-
**timelock_info.to_json_dict(),
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
response = await self.fetch("dao_create_proposal", request)
|
|
1507
|
-
return json_deserialize_with_clvm_streamable(response, DAOCreateProposalResponse)
|
|
1508
|
-
|
|
1509
|
-
async def dao_get_proposal_state(self, wallet_id: int, proposal_id: str) -> dict[str, Any]:
|
|
1510
|
-
request = {"wallet_id": wallet_id, "proposal_id": proposal_id}
|
|
1511
|
-
response = await self.fetch("dao_get_proposal_state", request)
|
|
1512
|
-
return response
|
|
1513
|
-
|
|
1514
|
-
async def dao_parse_proposal(self, wallet_id: int, proposal_id: str) -> dict[str, Any]:
|
|
1515
|
-
request = {"wallet_id": wallet_id, "proposal_id": proposal_id}
|
|
1516
|
-
response = await self.fetch("dao_parse_proposal", request)
|
|
1517
|
-
return response
|
|
1518
|
-
|
|
1519
|
-
async def dao_vote_on_proposal(
|
|
1520
|
-
self,
|
|
1521
|
-
wallet_id: int,
|
|
1522
|
-
proposal_id: str,
|
|
1523
|
-
vote_amount: uint64,
|
|
1524
|
-
tx_config: TXConfig,
|
|
1525
|
-
is_yes_vote: bool = True,
|
|
1526
|
-
fee: uint64 = uint64(0),
|
|
1527
|
-
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1528
|
-
push: bool = True,
|
|
1529
|
-
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1530
|
-
) -> DAOVoteOnProposalResponse:
|
|
1531
|
-
request: dict[str, Any] = {
|
|
1532
|
-
"wallet_id": wallet_id,
|
|
1533
|
-
"proposal_id": proposal_id,
|
|
1534
|
-
"vote_amount": vote_amount,
|
|
1535
|
-
"is_yes_vote": is_yes_vote,
|
|
1536
|
-
"fee": fee,
|
|
1537
|
-
"extra_conditions": list(extra_conditions),
|
|
1538
|
-
"push": push,
|
|
1539
|
-
**tx_config.to_json_dict(),
|
|
1540
|
-
**timelock_info.to_json_dict(),
|
|
1541
|
-
}
|
|
1542
|
-
response = await self.fetch("dao_vote_on_proposal", request)
|
|
1543
|
-
return json_deserialize_with_clvm_streamable(response, DAOVoteOnProposalResponse)
|
|
1544
|
-
|
|
1545
|
-
async def dao_get_proposals(self, wallet_id: int, include_closed: bool = True) -> dict[str, Any]:
|
|
1546
|
-
request = {"wallet_id": wallet_id, "include_closed": include_closed}
|
|
1547
|
-
response = await self.fetch("dao_get_proposals", request)
|
|
1548
|
-
return response
|
|
1549
|
-
|
|
1550
|
-
async def dao_close_proposal(
|
|
1551
|
-
self,
|
|
1552
|
-
wallet_id: int,
|
|
1553
|
-
proposal_id: str,
|
|
1554
|
-
tx_config: TXConfig,
|
|
1555
|
-
self_destruct: Optional[bool] = None,
|
|
1556
|
-
fee: uint64 = uint64(0),
|
|
1557
|
-
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1558
|
-
push: bool = True,
|
|
1559
|
-
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1560
|
-
) -> DAOCloseProposalResponse:
|
|
1561
|
-
request: dict[str, Any] = {
|
|
1562
|
-
"wallet_id": wallet_id,
|
|
1563
|
-
"proposal_id": proposal_id,
|
|
1564
|
-
"self_destruct": self_destruct,
|
|
1565
|
-
"fee": fee,
|
|
1566
|
-
"extra_conditions": list(extra_conditions),
|
|
1567
|
-
"push": push,
|
|
1568
|
-
**tx_config.to_json_dict(),
|
|
1569
|
-
**timelock_info.to_json_dict(),
|
|
1570
|
-
}
|
|
1571
|
-
response = await self.fetch("dao_close_proposal", request)
|
|
1572
|
-
return json_deserialize_with_clvm_streamable(response, DAOCloseProposalResponse)
|
|
1573
|
-
|
|
1574
|
-
async def dao_free_coins_from_finished_proposals(
|
|
1575
|
-
self,
|
|
1576
|
-
wallet_id: int,
|
|
1577
|
-
tx_config: TXConfig,
|
|
1578
|
-
fee: uint64 = uint64(0),
|
|
1579
|
-
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1580
|
-
push: bool = True,
|
|
1581
|
-
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1582
|
-
) -> DAOFreeCoinsFromFinishedProposalsResponse:
|
|
1583
|
-
request: dict[str, Any] = {
|
|
1584
|
-
"wallet_id": wallet_id,
|
|
1585
|
-
"fee": fee,
|
|
1586
|
-
"extra_conditions": list(extra_conditions),
|
|
1587
|
-
**tx_config.to_json_dict(),
|
|
1588
|
-
**timelock_info.to_json_dict(),
|
|
1589
|
-
}
|
|
1590
|
-
response = await self.fetch("dao_free_coins_from_finished_proposals", request)
|
|
1591
|
-
return json_deserialize_with_clvm_streamable(response, DAOFreeCoinsFromFinishedProposalsResponse)
|
|
1592
|
-
|
|
1593
|
-
async def dao_get_treasury_balance(self, wallet_id: int) -> dict[str, Any]:
|
|
1594
|
-
request = {"wallet_id": wallet_id}
|
|
1595
|
-
response = await self.fetch("dao_get_treasury_balance", request)
|
|
1596
|
-
return response
|
|
1597
|
-
|
|
1598
|
-
async def dao_add_funds_to_treasury(
|
|
1599
|
-
self,
|
|
1600
|
-
wallet_id: int,
|
|
1601
|
-
funding_wallet_id: int,
|
|
1602
|
-
amount: uint64,
|
|
1603
|
-
tx_config: TXConfig,
|
|
1604
|
-
fee: uint64 = uint64(0),
|
|
1605
|
-
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1606
|
-
push: bool = True,
|
|
1607
|
-
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1608
|
-
) -> DAOAddFundsToTreasuryResponse:
|
|
1609
|
-
request: dict[str, Any] = {
|
|
1610
|
-
"wallet_id": wallet_id,
|
|
1611
|
-
"funding_wallet_id": funding_wallet_id,
|
|
1612
|
-
"amount": amount,
|
|
1613
|
-
"fee": fee,
|
|
1614
|
-
"extra_conditions": list(extra_conditions),
|
|
1615
|
-
"push": push,
|
|
1616
|
-
**tx_config.to_json_dict(),
|
|
1617
|
-
**timelock_info.to_json_dict(),
|
|
1618
|
-
}
|
|
1619
|
-
response = await self.fetch("dao_add_funds_to_treasury", request)
|
|
1620
|
-
return json_deserialize_with_clvm_streamable(response, DAOAddFundsToTreasuryResponse)
|
|
1621
|
-
|
|
1622
|
-
async def dao_send_to_lockup(
|
|
1623
|
-
self,
|
|
1624
|
-
wallet_id: int,
|
|
1625
|
-
amount: uint64,
|
|
1626
|
-
tx_config: TXConfig,
|
|
1627
|
-
fee: uint64 = uint64(0),
|
|
1628
|
-
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1629
|
-
push: bool = True,
|
|
1630
|
-
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1631
|
-
) -> DAOSendToLockupResponse:
|
|
1632
|
-
request: dict[str, Any] = {
|
|
1633
|
-
"wallet_id": wallet_id,
|
|
1634
|
-
"amount": amount,
|
|
1635
|
-
"fee": fee,
|
|
1636
|
-
"extra_conditions": list(extra_conditions),
|
|
1637
|
-
"push": push,
|
|
1638
|
-
**tx_config.to_json_dict(),
|
|
1639
|
-
**timelock_info.to_json_dict(),
|
|
1640
|
-
}
|
|
1641
|
-
response = await self.fetch("dao_send_to_lockup", request)
|
|
1642
|
-
return json_deserialize_with_clvm_streamable(response, DAOSendToLockupResponse)
|
|
1643
|
-
|
|
1644
|
-
async def dao_exit_lockup(
|
|
1645
|
-
self,
|
|
1646
|
-
wallet_id: int,
|
|
1647
|
-
tx_config: TXConfig,
|
|
1648
|
-
coins: Optional[list[dict[str, Any]]] = None,
|
|
1649
|
-
fee: uint64 = uint64(0),
|
|
1650
|
-
extra_conditions: tuple[Condition, ...] = tuple(),
|
|
1651
|
-
push: bool = True,
|
|
1652
|
-
timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
|
1653
|
-
) -> DAOExitLockupResponse:
|
|
1654
|
-
request: dict[str, Any] = {
|
|
1655
|
-
"wallet_id": wallet_id,
|
|
1656
|
-
"coins": coins,
|
|
1657
|
-
"fee": fee,
|
|
1658
|
-
"extra_conditions": list(extra_conditions),
|
|
1659
|
-
"push": push,
|
|
1660
|
-
**tx_config.to_json_dict(),
|
|
1661
|
-
**timelock_info.to_json_dict(),
|
|
1662
|
-
}
|
|
1663
|
-
response = await self.fetch("dao_exit_lockup", request)
|
|
1664
|
-
return json_deserialize_with_clvm_streamable(response, DAOExitLockupResponse)
|
|
1665
|
-
|
|
1666
|
-
async def dao_adjust_filter_level(self, wallet_id: int, filter_level: int) -> dict[str, Any]:
|
|
1667
|
-
request = {"wallet_id": wallet_id, "filter_level": filter_level}
|
|
1668
|
-
response = await self.fetch("dao_adjust_filter_level", request)
|
|
1669
|
-
return response
|
|
1670
|
-
|
|
1671
1423
|
async def vc_mint(
|
|
1672
1424
|
self,
|
|
1673
1425
|
request: VCMint,
|
chia/seeder/crawl_store.py
CHANGED
|
@@ -8,9 +8,9 @@ from dataclasses import dataclass, field, replace
|
|
|
8
8
|
from datetime import datetime, timedelta
|
|
9
9
|
|
|
10
10
|
import aiosqlite
|
|
11
|
+
from chia_rs.sized_ints import uint32, uint64
|
|
11
12
|
|
|
12
13
|
from chia.seeder.peer_record import PeerRecord, PeerReliability
|
|
13
|
-
from chia.util.ints import uint32, uint64
|
|
14
14
|
|
|
15
15
|
log = logging.getLogger(__name__)
|
|
16
16
|
|
chia/seeder/crawler.py
CHANGED
|
@@ -13,8 +13,9 @@ from pathlib import Path
|
|
|
13
13
|
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Optional, cast
|
|
14
14
|
|
|
15
15
|
import aiosqlite
|
|
16
|
+
from chia_rs import ConsensusConstants
|
|
17
|
+
from chia_rs.sized_ints import uint32, uint64
|
|
16
18
|
|
|
17
|
-
from chia.consensus.constants import ConsensusConstants
|
|
18
19
|
from chia.full_node.full_node_api import FullNodeAPI
|
|
19
20
|
from chia.protocols import full_node_protocol
|
|
20
21
|
from chia.protocols.full_node_protocol import RespondPeers
|
|
@@ -26,7 +27,6 @@ from chia.server.server import ChiaServer
|
|
|
26
27
|
from chia.server.ws_connection import WSChiaConnection
|
|
27
28
|
from chia.types.peer_info import PeerInfo
|
|
28
29
|
from chia.util.chia_version import chia_short_version
|
|
29
|
-
from chia.util.ints import uint32, uint64
|
|
30
30
|
from chia.util.network import resolve
|
|
31
31
|
from chia.util.path import path_from_root
|
|
32
32
|
from chia.util.task_referencer import create_referenced_task
|
chia/seeder/peer_record.py
CHANGED
chia/seeder/start_crawler.py
CHANGED
|
@@ -6,8 +6,10 @@ import sys
|
|
|
6
6
|
from multiprocessing import freeze_support
|
|
7
7
|
from typing import Any, Optional
|
|
8
8
|
|
|
9
|
+
from chia_rs import ConsensusConstants
|
|
10
|
+
|
|
9
11
|
from chia.apis import ApiProtocolRegistry
|
|
10
|
-
from chia.consensus.constants import
|
|
12
|
+
from chia.consensus.constants import replace_str_to_bytes
|
|
11
13
|
from chia.consensus.default_constants import DEFAULT_CONSTANTS
|
|
12
14
|
from chia.rpc.crawler_rpc_api import CrawlerRpcApi
|
|
13
15
|
from chia.seeder.crawler import Crawler
|
chia/server/address_manager.py
CHANGED
|
@@ -8,9 +8,10 @@ from random import choice, randrange
|
|
|
8
8
|
from secrets import randbits
|
|
9
9
|
from typing import Optional
|
|
10
10
|
|
|
11
|
+
from chia_rs.sized_ints import uint16, uint64
|
|
12
|
+
|
|
11
13
|
from chia.types.peer_info import PeerInfo, TimestampedPeerInfo
|
|
12
14
|
from chia.util.hash import std_hash
|
|
13
|
-
from chia.util.ints import uint16, uint64
|
|
14
15
|
|
|
15
16
|
TRIED_BUCKETS_PER_GROUP = 8
|
|
16
17
|
NEW_BUCKETS_PER_SOURCE_GROUP = 64
|
|
@@ -8,6 +8,7 @@ from timeit import default_timer as timer
|
|
|
8
8
|
from typing import Any, Optional
|
|
9
9
|
|
|
10
10
|
import aiofiles
|
|
11
|
+
from chia_rs.sized_ints import uint64
|
|
11
12
|
|
|
12
13
|
from chia.server.address_manager import (
|
|
13
14
|
BUCKET_SIZE,
|
|
@@ -17,7 +18,6 @@ from chia.server.address_manager import (
|
|
|
17
18
|
ExtendedPeerInfo,
|
|
18
19
|
)
|
|
19
20
|
from chia.util.files import write_file_async
|
|
20
|
-
from chia.util.ints import uint64
|
|
21
21
|
from chia.util.streamable import Streamable, streamable
|
|
22
22
|
|
|
23
23
|
log = logging.getLogger(__name__)
|
chia/server/capabilities.py
CHANGED
|
@@ -2,8 +2,9 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from collections.abc import Iterable
|
|
4
4
|
|
|
5
|
+
from chia_rs.sized_ints import uint16
|
|
6
|
+
|
|
5
7
|
from chia.protocols.shared_protocol import Capability
|
|
6
|
-
from chia.util.ints import uint16
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
def known_active_capabilities(values: Iterable[tuple[uint16, str]]) -> list[Capability]:
|
chia/server/introducer_peers.py
CHANGED
chia/server/node_discovery.py
CHANGED
|
@@ -12,6 +12,7 @@ from secrets import randbits
|
|
|
12
12
|
from typing import Any, Optional
|
|
13
13
|
|
|
14
14
|
import dns.asyncresolver
|
|
15
|
+
from chia_rs.sized_ints import uint16, uint64
|
|
15
16
|
|
|
16
17
|
from chia.protocols.full_node_protocol import RequestPeers, RespondPeers
|
|
17
18
|
from chia.protocols.introducer_protocol import RequestPeersIntroducer
|
|
@@ -23,7 +24,6 @@ from chia.server.server import ChiaServer
|
|
|
23
24
|
from chia.server.ws_connection import WSChiaConnection
|
|
24
25
|
from chia.types.peer_info import PeerInfo, TimestampedPeerInfo, UnresolvedPeerInfo
|
|
25
26
|
from chia.util.hash import std_hash
|
|
26
|
-
from chia.util.ints import uint16, uint64
|
|
27
27
|
from chia.util.ip_address import IPAddress
|
|
28
28
|
from chia.util.network import resolve
|
|
29
29
|
from chia.util.safe_cancel_task import cancel_task_safe
|
chia/server/outbound_message.py
CHANGED
|
@@ -4,8 +4,9 @@ from dataclasses import dataclass
|
|
|
4
4
|
from enum import IntEnum
|
|
5
5
|
from typing import Optional, SupportsBytes, Union
|
|
6
6
|
|
|
7
|
+
from chia_rs.sized_ints import uint8, uint16
|
|
8
|
+
|
|
7
9
|
from chia.protocols.protocol_message_types import ProtocolMessageTypes
|
|
8
|
-
from chia.util.ints import uint8, uint16
|
|
9
10
|
from chia.util.streamable import Streamable, streamable
|
|
10
11
|
|
|
11
12
|
|
chia/server/server.py
CHANGED
|
@@ -20,6 +20,8 @@ from aiohttp import (
|
|
|
20
20
|
client_exceptions,
|
|
21
21
|
web,
|
|
22
22
|
)
|
|
23
|
+
from chia_rs.sized_bytes import bytes32
|
|
24
|
+
from chia_rs.sized_ints import uint16
|
|
23
25
|
from cryptography import x509
|
|
24
26
|
from cryptography.hazmat.backends import default_backend
|
|
25
27
|
from cryptography.hazmat.primitives import hashes, serialization
|
|
@@ -33,10 +35,8 @@ from chia.server.introducer_peers import IntroducerPeers
|
|
|
33
35
|
from chia.server.outbound_message import Message, NodeType
|
|
34
36
|
from chia.server.ssl_context import private_ssl_paths, public_ssl_paths
|
|
35
37
|
from chia.server.ws_connection import ConnectionCallback, WSChiaConnection
|
|
36
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
37
38
|
from chia.types.peer_info import PeerInfo
|
|
38
39
|
from chia.util.errors import Err, ProtocolError
|
|
39
|
-
from chia.util.ints import uint16
|
|
40
40
|
from chia.util.network import WebServer, is_in_network, is_localhost, is_trusted_peer
|
|
41
41
|
from chia.util.ssl_check import verify_ssl_certs_and_keys
|
|
42
42
|
from chia.util.streamable import Streamable
|
chia/server/start_data_layer.py
CHANGED
|
@@ -6,6 +6,8 @@ import pathlib
|
|
|
6
6
|
import sys
|
|
7
7
|
from typing import Any, Optional, cast
|
|
8
8
|
|
|
9
|
+
from chia_rs.sized_ints import uint16
|
|
10
|
+
|
|
9
11
|
from chia.apis import ApiProtocolRegistry
|
|
10
12
|
from chia.data_layer.data_layer import DataLayer
|
|
11
13
|
from chia.data_layer.data_layer_api import DataLayerAPI
|
|
@@ -21,7 +23,6 @@ from chia.types.aliases import DataLayerService, WalletService
|
|
|
21
23
|
from chia.util.chia_logging import initialize_logging
|
|
22
24
|
from chia.util.config import load_config, load_config_cli
|
|
23
25
|
from chia.util.default_root import resolve_root_path
|
|
24
|
-
from chia.util.ints import uint16
|
|
25
26
|
from chia.util.task_timing import maybe_manage_task_instrumentation
|
|
26
27
|
|
|
27
28
|
# See: https://bugs.python.org/issue29288
|
chia/server/start_farmer.py
CHANGED
|
@@ -5,8 +5,10 @@ import pathlib
|
|
|
5
5
|
import sys
|
|
6
6
|
from typing import Any, Optional
|
|
7
7
|
|
|
8
|
+
from chia_rs import ConsensusConstants
|
|
9
|
+
|
|
8
10
|
from chia.apis import ApiProtocolRegistry
|
|
9
|
-
from chia.consensus.constants import
|
|
11
|
+
from chia.consensus.constants import replace_str_to_bytes
|
|
10
12
|
from chia.consensus.default_constants import DEFAULT_CONSTANTS, update_testnet_overrides
|
|
11
13
|
from chia.farmer.farmer import Farmer
|
|
12
14
|
from chia.farmer.farmer_api import FarmerAPI
|
chia/server/start_full_node.py
CHANGED
|
@@ -6,8 +6,11 @@ import sys
|
|
|
6
6
|
from multiprocessing import freeze_support
|
|
7
7
|
from typing import Any, Optional
|
|
8
8
|
|
|
9
|
+
from chia_rs import ConsensusConstants
|
|
10
|
+
from chia_rs.sized_ints import uint16
|
|
11
|
+
|
|
9
12
|
from chia.apis import ApiProtocolRegistry
|
|
10
|
-
from chia.consensus.constants import
|
|
13
|
+
from chia.consensus.constants import replace_str_to_bytes
|
|
11
14
|
from chia.consensus.default_constants import DEFAULT_CONSTANTS, update_testnet_overrides
|
|
12
15
|
from chia.full_node.full_node import FullNode
|
|
13
16
|
from chia.full_node.full_node_api import FullNodeAPI
|
|
@@ -19,7 +22,6 @@ from chia.types.aliases import FullNodeService
|
|
|
19
22
|
from chia.util.chia_logging import initialize_service_logging
|
|
20
23
|
from chia.util.config import get_unresolved_peer_infos, load_config, load_config_cli
|
|
21
24
|
from chia.util.default_root import resolve_root_path
|
|
22
|
-
from chia.util.ints import uint16
|
|
23
25
|
from chia.util.task_timing import maybe_manage_task_instrumentation
|
|
24
26
|
|
|
25
27
|
# See: https://bugs.python.org/issue29288
|
chia/server/start_harvester.py
CHANGED
|
@@ -5,8 +5,10 @@ import pathlib
|
|
|
5
5
|
import sys
|
|
6
6
|
from typing import Any, Optional
|
|
7
7
|
|
|
8
|
+
from chia_rs import ConsensusConstants
|
|
9
|
+
|
|
8
10
|
from chia.apis import ApiProtocolRegistry
|
|
9
|
-
from chia.consensus.constants import
|
|
11
|
+
from chia.consensus.constants import replace_str_to_bytes
|
|
10
12
|
from chia.consensus.default_constants import DEFAULT_CONSTANTS
|
|
11
13
|
from chia.harvester.harvester import Harvester
|
|
12
14
|
from chia.harvester.harvester_api import HarvesterAPI
|
chia/server/start_introducer.py
CHANGED
|
@@ -36,7 +36,18 @@ def create_introducer_service(
|
|
|
36
36
|
if advertised_port is None:
|
|
37
37
|
advertised_port = service_config["port"]
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
try:
|
|
40
|
+
default_port = service_config["network_overrides"]["config"][network_id]["default_full_node_port"]
|
|
41
|
+
except KeyError:
|
|
42
|
+
raise Exception(f"Specify default_full_node_port for network {network_id}")
|
|
43
|
+
|
|
44
|
+
dns_servers = service_config.get("dns_servers", [])
|
|
45
|
+
if dns_servers == [] and network_id == "mainnet":
|
|
46
|
+
dns_servers.append("dns-introducer.chia.net")
|
|
47
|
+
|
|
48
|
+
node = Introducer(
|
|
49
|
+
service_config["max_peers_to_send"], service_config["recent_peer_threshold"], default_port, dns_servers
|
|
50
|
+
)
|
|
40
51
|
peer_api = IntroducerAPI(node)
|
|
41
52
|
|
|
42
53
|
return Service(
|
chia/server/start_service.py
CHANGED
|
@@ -11,6 +11,8 @@ from pathlib import Path
|
|
|
11
11
|
from types import FrameType
|
|
12
12
|
from typing import Any, Callable, Generic, Optional, TypeVar, cast
|
|
13
13
|
|
|
14
|
+
from chia_rs.sized_ints import uint16
|
|
15
|
+
|
|
14
16
|
from chia.daemon.server import service_launch_lock_path
|
|
15
17
|
from chia.protocols.shared_protocol import default_capabilities
|
|
16
18
|
from chia.rpc.rpc_server import RpcApiProtocol, RpcServer, RpcServiceProtocol, start_rpc_server
|
|
@@ -24,7 +26,6 @@ from chia.server.upnp import UPnP
|
|
|
24
26
|
from chia.server.ws_connection import WSChiaConnection
|
|
25
27
|
from chia.types.peer_info import PeerInfo, UnresolvedPeerInfo
|
|
26
28
|
from chia.util.chia_version import chia_short_version
|
|
27
|
-
from chia.util.ints import uint16
|
|
28
29
|
from chia.util.lock import Lockfile, LockfileError
|
|
29
30
|
from chia.util.log_exceptions import log_exceptions
|
|
30
31
|
from chia.util.network import resolve
|
chia/server/start_timelord.py
CHANGED
|
@@ -5,8 +5,10 @@ import pathlib
|
|
|
5
5
|
import sys
|
|
6
6
|
from typing import Any, Optional
|
|
7
7
|
|
|
8
|
+
from chia_rs import ConsensusConstants
|
|
9
|
+
|
|
8
10
|
from chia.apis import ApiProtocolRegistry
|
|
9
|
-
from chia.consensus.constants import
|
|
11
|
+
from chia.consensus.constants import replace_str_to_bytes
|
|
10
12
|
from chia.consensus.default_constants import DEFAULT_CONSTANTS
|
|
11
13
|
from chia.rpc.timelord_rpc_api import TimelordRpcApi
|
|
12
14
|
from chia.server.outbound_message import NodeType
|
chia/server/start_wallet.py
CHANGED
|
@@ -6,8 +6,10 @@ import sys
|
|
|
6
6
|
from multiprocessing import freeze_support
|
|
7
7
|
from typing import Any, Optional
|
|
8
8
|
|
|
9
|
+
from chia_rs import ConsensusConstants
|
|
10
|
+
|
|
9
11
|
from chia.apis import ApiProtocolRegistry
|
|
10
|
-
from chia.consensus.constants import
|
|
12
|
+
from chia.consensus.constants import replace_str_to_bytes
|
|
11
13
|
from chia.consensus.default_constants import DEFAULT_CONSTANTS
|
|
12
14
|
from chia.rpc.wallet_rpc_api import WalletRpcApi
|
|
13
15
|
from chia.server.outbound_message import NodeType
|
chia/server/upnp.py
CHANGED
|
@@ -16,8 +16,7 @@ try:
|
|
|
16
16
|
import miniupnpc
|
|
17
17
|
except ImportError:
|
|
18
18
|
log.info(
|
|
19
|
-
"importing miniupnpc failed."
|
|
20
|
-
" This is not required to run chia, it allows incoming connections from other peers."
|
|
19
|
+
"importing miniupnpc failed. This is not required to run chia, it allows incoming connections from other peers."
|
|
21
20
|
)
|
|
22
21
|
miniupnpc = None
|
|
23
22
|
|
chia/server/ws_connection.py
CHANGED
|
@@ -12,6 +12,8 @@ from typing import Any, Callable, Optional, Union
|
|
|
12
12
|
from aiohttp import ClientSession, WebSocketError, WSCloseCode, WSMessage, WSMsgType
|
|
13
13
|
from aiohttp.client import ClientWebSocketResponse
|
|
14
14
|
from aiohttp.web import WebSocketResponse
|
|
15
|
+
from chia_rs.sized_bytes import bytes32
|
|
16
|
+
from chia_rs.sized_ints import int16, uint8, uint16
|
|
15
17
|
from packaging.version import Version
|
|
16
18
|
from typing_extensions import Protocol, final
|
|
17
19
|
|
|
@@ -29,10 +31,8 @@ from chia.server.api_protocol import ApiMetadata, ApiProtocol
|
|
|
29
31
|
from chia.server.capabilities import known_active_capabilities
|
|
30
32
|
from chia.server.outbound_message import Message, NodeType, make_msg
|
|
31
33
|
from chia.server.rate_limits import RateLimiter
|
|
32
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
33
34
|
from chia.types.peer_info import PeerInfo
|
|
34
35
|
from chia.util.errors import ApiError, ConsensusError, Err, ProtocolError, TimestampError
|
|
35
|
-
from chia.util.ints import int16, uint8, uint16
|
|
36
36
|
from chia.util.log_exceptions import log_exceptions
|
|
37
37
|
|
|
38
38
|
# Each message is prepended with LENGTH_BYTES bytes specifying the length
|
|
@@ -463,8 +463,7 @@ class WSChiaConnection:
|
|
|
463
463
|
|
|
464
464
|
response: Optional[Message] = await asyncio.wait_for(wrapped_coroutine(), timeout=timeout)
|
|
465
465
|
self.log.debug(
|
|
466
|
-
f"Time taken to process {message_type} from {self.peer_node_id} is "
|
|
467
|
-
f"{time.time() - start_time} seconds"
|
|
466
|
+
f"Time taken to process {message_type} from {self.peer_node_id} is {time.time() - start_time} seconds"
|
|
468
467
|
)
|
|
469
468
|
|
|
470
469
|
if response is not None:
|
|
@@ -2,14 +2,16 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from typing import Optional
|
|
4
4
|
|
|
5
|
+
from chia_rs.sized_ints import uint32
|
|
6
|
+
|
|
5
7
|
from chia.consensus.block_body_validation import ForkInfo
|
|
6
8
|
from chia.consensus.difficulty_adjustment import get_next_sub_slot_iters_and_difficulty
|
|
7
9
|
from chia.full_node.full_node import FullNode, PeakPostProcessingResult
|
|
8
10
|
from chia.types.full_block import FullBlock
|
|
9
11
|
from chia.types.peer_info import PeerInfo
|
|
10
12
|
from chia.types.validation_state import ValidationState
|
|
13
|
+
from chia.util.augmented_chain import AugmentedBlockchain
|
|
11
14
|
from chia.util.batches import to_batches
|
|
12
|
-
from chia.util.ints import uint32
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
async def add_blocks_in_batches(
|
|
@@ -34,14 +36,14 @@ async def add_blocks_in_batches(
|
|
|
34
36
|
fork_info = ForkInfo(fork_height, blocks[0].height - 1, peak_hash)
|
|
35
37
|
|
|
36
38
|
vs = ValidationState(ssi, diff, None)
|
|
37
|
-
|
|
39
|
+
blockchain = AugmentedBlockchain(full_node.blockchain)
|
|
38
40
|
for block_batch in to_batches(blocks, 64):
|
|
39
41
|
b = block_batch.entries[0]
|
|
40
42
|
if (b.height % 128) == 0:
|
|
41
43
|
print(f"main chain: {b.height:4} weight: {b.weight}")
|
|
42
44
|
# vs is updated by the call to add_block_batch()
|
|
43
45
|
success, state_change_summary = await full_node.add_block_batch(
|
|
44
|
-
block_batch.entries, PeerInfo("0.0.0.0", 0), fork_info, vs
|
|
46
|
+
block_batch.entries, PeerInfo("0.0.0.0", 0), fork_info, vs, blockchain
|
|
45
47
|
)
|
|
46
48
|
assert success is True
|
|
47
49
|
if state_change_summary is not None:
|