chia-blockchain 2.5.2rc2__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 +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 +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.2rc2.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.2rc2.dist-info/RECORD +0 -1042
- {chia_blockchain-2.5.2rc2.dist-info → chia_blockchain-2.5.3rc1.dist-info}/LICENSE +0 -0
- {chia_blockchain-2.5.2rc2.dist-info → chia_blockchain-2.5.3rc1.dist-info}/WHEEL +0 -0
- {chia_blockchain-2.5.2rc2.dist-info → chia_blockchain-2.5.3rc1.dist-info}/entry_points.txt +0 -0
|
@@ -5,13 +5,13 @@ import random
|
|
|
5
5
|
from typing import Any, Optional
|
|
6
6
|
|
|
7
7
|
import pytest
|
|
8
|
+
from chia_rs.sized_bytes import bytes32
|
|
9
|
+
from chia_rs.sized_ints import uint8, uint32, uint64
|
|
8
10
|
|
|
9
11
|
from chia._tests.util.db_connection import DBConnection
|
|
10
12
|
from chia.types.blockchain_format.coin import Coin
|
|
11
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
12
13
|
from chia.types.mempool_inclusion_status import MempoolInclusionStatus
|
|
13
14
|
from chia.util.errors import Err
|
|
14
|
-
from chia.util.ints import uint8, uint32, uint64
|
|
15
15
|
from chia.wallet.conditions import ConditionValidTimes
|
|
16
16
|
from chia.wallet.transaction_record import TransactionRecord, TransactionRecordOld, minimum_send_attempts
|
|
17
17
|
from chia.wallet.util.query_filter import TransactionTypeFilter
|
chia/_tests/wallet/test_util.py
CHANGED
|
@@ -3,15 +3,15 @@ from __future__ import annotations
|
|
|
3
3
|
from typing import Any
|
|
4
4
|
|
|
5
5
|
import pytest
|
|
6
|
+
from chia_rs.sized_bytes import bytes32, bytes48
|
|
7
|
+
from chia_rs.sized_ints import uint64
|
|
6
8
|
|
|
7
9
|
from chia._tests.util.misc import CoinGenerator, coin_creation_args
|
|
8
10
|
from chia.consensus.default_constants import DEFAULT_CONSTANTS
|
|
9
11
|
from chia.types.blockchain_format.coin import Coin
|
|
10
12
|
from chia.types.blockchain_format.program import Program
|
|
11
|
-
from chia.types.blockchain_format.sized_bytes import bytes32, bytes48
|
|
12
13
|
from chia.types.coin_spend import make_spend
|
|
13
14
|
from chia.util.errors import ValidationError
|
|
14
|
-
from chia.util.ints import uint64
|
|
15
15
|
from chia.wallet.lineage_proof import LineageProof, LineageProofField
|
|
16
16
|
from chia.wallet.util.compute_hints import HintedCoin, compute_spend_hints_and_additions
|
|
17
17
|
from chia.wallet.util.merkle_utils import list_to_binary_tree
|
|
@@ -6,6 +6,8 @@ from typing import Any, Optional
|
|
|
6
6
|
|
|
7
7
|
import pytest
|
|
8
8
|
from chia_rs import AugSchemeMPL, G1Element, G2Element
|
|
9
|
+
from chia_rs.sized_bytes import bytes32
|
|
10
|
+
from chia_rs.sized_ints import uint16, uint32, uint64
|
|
9
11
|
|
|
10
12
|
from chia._tests.environments.wallet import WalletStateTransition, WalletTestFramework
|
|
11
13
|
from chia._tests.util.time_out_assert import time_out_assert
|
|
@@ -15,17 +17,14 @@ from chia.simulator.block_tools import BlockTools
|
|
|
15
17
|
from chia.simulator.full_node_simulator import FullNodeSimulator
|
|
16
18
|
from chia.simulator.simulator_protocol import ReorgProtocol
|
|
17
19
|
from chia.types.blockchain_format.program import Program
|
|
18
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
19
20
|
from chia.types.coin_spend import CoinSpend, compute_additions
|
|
20
21
|
from chia.types.peer_info import PeerInfo
|
|
21
22
|
from chia.types.signing_mode import CHIP_0002_SIGN_MESSAGE_PREFIX
|
|
22
23
|
from chia.types.spend_bundle import estimate_fees
|
|
23
24
|
from chia.util.bech32m import encode_puzzle_hash
|
|
24
25
|
from chia.util.errors import Err
|
|
25
|
-
from chia.
|
|
26
|
-
from chia.wallet.conditions import ConditionValidTimes
|
|
26
|
+
from chia.wallet.conditions import ConditionValidTimes, CreateCoin
|
|
27
27
|
from chia.wallet.derive_keys import master_sk_to_wallet_sk
|
|
28
|
-
from chia.wallet.payment import Payment
|
|
29
28
|
from chia.wallet.puzzles.clawback.metadata import AutoClaimSettings
|
|
30
29
|
from chia.wallet.transaction_record import TransactionRecord
|
|
31
30
|
from chia.wallet.util.query_filter import TransactionTypeFilter
|
|
@@ -77,8 +76,8 @@ class TestWalletSimulator:
|
|
|
77
76
|
|
|
78
77
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
79
78
|
await wallet.generate_signed_transaction(
|
|
80
|
-
uint64(tx_amount),
|
|
81
|
-
bytes32.zeros,
|
|
79
|
+
[uint64(tx_amount)],
|
|
80
|
+
[bytes32.zeros],
|
|
82
81
|
action_scope,
|
|
83
82
|
uint64(0),
|
|
84
83
|
)
|
|
@@ -132,8 +131,8 @@ class TestWalletSimulator:
|
|
|
132
131
|
DEFAULT_TX_CONFIG.override(reuse_puzhash=True), push=True
|
|
133
132
|
) as action_scope:
|
|
134
133
|
await wallet.generate_signed_transaction(
|
|
135
|
-
uint64(tx_amount),
|
|
136
|
-
bytes32.zeros,
|
|
134
|
+
[uint64(tx_amount)],
|
|
135
|
+
[bytes32.zeros],
|
|
137
136
|
action_scope,
|
|
138
137
|
uint64(0),
|
|
139
138
|
)
|
|
@@ -194,8 +193,8 @@ class TestWalletSimulator:
|
|
|
194
193
|
for _ in range(0, number_of_coins):
|
|
195
194
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
196
195
|
await wallet.generate_signed_transaction(
|
|
197
|
-
uint64(tx_amount),
|
|
198
|
-
normal_puzhash,
|
|
196
|
+
[uint64(tx_amount)],
|
|
197
|
+
[normal_puzhash],
|
|
199
198
|
action_scope,
|
|
200
199
|
uint64(0),
|
|
201
200
|
puzzle_decorator_override=[{"decorator": "CLAWBACK", "clawback_timelock": 10}],
|
|
@@ -237,8 +236,8 @@ class TestWalletSimulator:
|
|
|
237
236
|
|
|
238
237
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
239
238
|
await wallet.generate_signed_transaction(
|
|
240
|
-
uint64(tx_amount),
|
|
241
|
-
normal_puzhash,
|
|
239
|
+
[uint64(tx_amount)],
|
|
240
|
+
[normal_puzhash],
|
|
242
241
|
action_scope,
|
|
243
242
|
uint64(0),
|
|
244
243
|
puzzle_decorator_override=[{"decorator": "CLAWBACK", "clawback_timelock": 10}],
|
|
@@ -342,12 +341,12 @@ class TestWalletSimulator:
|
|
|
342
341
|
# Transfer to normal wallet
|
|
343
342
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
344
343
|
await wallet.generate_signed_transaction(
|
|
345
|
-
uint64(tx_amount),
|
|
346
|
-
normal_puzhash,
|
|
344
|
+
[uint64(tx_amount)],
|
|
345
|
+
[normal_puzhash],
|
|
347
346
|
action_scope,
|
|
348
347
|
uint64(0),
|
|
349
348
|
puzzle_decorator_override=[{"decorator": "CLAWBACK", "clawback_timelock": 500}],
|
|
350
|
-
memos=[b"Test"],
|
|
349
|
+
memos=[[b"Test"]],
|
|
351
350
|
)
|
|
352
351
|
|
|
353
352
|
await wallet_environments.process_pending_states(
|
|
@@ -484,12 +483,12 @@ class TestWalletSimulator:
|
|
|
484
483
|
# Transfer to normal wallet
|
|
485
484
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
486
485
|
await wallet.generate_signed_transaction(
|
|
487
|
-
uint64(tx_amount),
|
|
488
|
-
normal_puzhash,
|
|
486
|
+
[uint64(tx_amount)],
|
|
487
|
+
[normal_puzhash],
|
|
489
488
|
action_scope,
|
|
490
489
|
uint64(0),
|
|
491
490
|
puzzle_decorator_override=[{"decorator": "CLAWBACK", "clawback_timelock": 5}],
|
|
492
|
-
memos=[b"Test"],
|
|
491
|
+
memos=[[b"Test"]],
|
|
493
492
|
)
|
|
494
493
|
|
|
495
494
|
await wallet_environments.process_pending_states(
|
|
@@ -601,8 +600,8 @@ class TestWalletSimulator:
|
|
|
601
600
|
# Transfer to normal wallet
|
|
602
601
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
603
602
|
await wallet.generate_signed_transaction(
|
|
604
|
-
uint64(tx_amount),
|
|
605
|
-
normal_puzhash,
|
|
603
|
+
[uint64(tx_amount)],
|
|
604
|
+
[normal_puzhash],
|
|
606
605
|
action_scope,
|
|
607
606
|
uint64(0),
|
|
608
607
|
puzzle_decorator_override=[{"decorator": "CLAWBACK", "clawback_timelock": 5}],
|
|
@@ -733,8 +732,8 @@ class TestWalletSimulator:
|
|
|
733
732
|
# Transfer to normal wallet
|
|
734
733
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
735
734
|
await wallet.generate_signed_transaction(
|
|
736
|
-
uint64(tx_amount),
|
|
737
|
-
normal_puzhash,
|
|
735
|
+
[uint64(tx_amount)],
|
|
736
|
+
[normal_puzhash],
|
|
738
737
|
action_scope,
|
|
739
738
|
uint64(0),
|
|
740
739
|
puzzle_decorator_override=[{"decorator": "CLAWBACK", "clawback_timelock": 5}],
|
|
@@ -915,8 +914,8 @@ class TestWalletSimulator:
|
|
|
915
914
|
# Transfer to normal wallet
|
|
916
915
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
917
916
|
await wallet.generate_signed_transaction(
|
|
918
|
-
uint64(tx_amount),
|
|
919
|
-
bytes32.zeros,
|
|
917
|
+
[uint64(tx_amount)],
|
|
918
|
+
[bytes32.zeros],
|
|
920
919
|
action_scope,
|
|
921
920
|
uint64(0),
|
|
922
921
|
puzzle_decorator_override=[{"decorator": "CLAWBACK", "clawback_timelock": 500}],
|
|
@@ -984,8 +983,8 @@ class TestWalletSimulator:
|
|
|
984
983
|
# Transfer to normal wallet
|
|
985
984
|
async with wallet_1.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
986
985
|
await wallet_1.generate_signed_transaction(
|
|
987
|
-
uint64(tx_amount),
|
|
988
|
-
wallet_2_puzhash,
|
|
986
|
+
[uint64(tx_amount)],
|
|
987
|
+
[wallet_2_puzhash],
|
|
989
988
|
action_scope,
|
|
990
989
|
uint64(0),
|
|
991
990
|
puzzle_decorator_override=[{"decorator": "CLAWBACK", "clawback_timelock": 5}],
|
|
@@ -1031,8 +1030,8 @@ class TestWalletSimulator:
|
|
|
1031
1030
|
tx_amount2 = 700
|
|
1032
1031
|
async with wallet_1.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
1033
1032
|
await wallet_1.generate_signed_transaction(
|
|
1034
|
-
uint64(tx_amount2),
|
|
1035
|
-
wallet_1_puzhash,
|
|
1033
|
+
[uint64(tx_amount2)],
|
|
1034
|
+
[wallet_1_puzhash],
|
|
1036
1035
|
action_scope,
|
|
1037
1036
|
uint64(0),
|
|
1038
1037
|
puzzle_decorator_override=[{"decorator": "CLAWBACK", "clawback_timelock": 5}],
|
|
@@ -1304,8 +1303,8 @@ class TestWalletSimulator:
|
|
|
1304
1303
|
|
|
1305
1304
|
async with wallet_0.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
1306
1305
|
await wallet_0.wallet_state_manager.main_wallet.generate_signed_transaction(
|
|
1307
|
-
uint64(10),
|
|
1308
|
-
bytes32(32 * b"0"),
|
|
1306
|
+
[uint64(10)],
|
|
1307
|
+
[bytes32(32 * b"0")],
|
|
1309
1308
|
action_scope,
|
|
1310
1309
|
uint64(0),
|
|
1311
1310
|
)
|
|
@@ -1335,8 +1334,8 @@ class TestWalletSimulator:
|
|
|
1335
1334
|
tx_amount = 10
|
|
1336
1335
|
async with wallet_0.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
1337
1336
|
await wallet_0.generate_signed_transaction(
|
|
1338
|
-
uint64(tx_amount),
|
|
1339
|
-
await wallet_1.get_puzzle_hash(False),
|
|
1337
|
+
[uint64(tx_amount)],
|
|
1338
|
+
[await wallet_1.get_puzzle_hash(False)],
|
|
1340
1339
|
action_scope,
|
|
1341
1340
|
uint64(0),
|
|
1342
1341
|
)
|
|
@@ -1381,7 +1380,7 @@ class TestWalletSimulator:
|
|
|
1381
1380
|
tx_amount = 5
|
|
1382
1381
|
async with wallet_1.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
1383
1382
|
await wallet_1.generate_signed_transaction(
|
|
1384
|
-
uint64(tx_amount), await wallet_0.get_puzzle_hash(False), action_scope, uint64(0)
|
|
1383
|
+
[uint64(tx_amount)], [await wallet_0.get_puzzle_hash(False)], action_scope, uint64(0)
|
|
1385
1384
|
)
|
|
1386
1385
|
|
|
1387
1386
|
await wallet_environments.process_pending_states(
|
|
@@ -1438,8 +1437,8 @@ class TestWalletSimulator:
|
|
|
1438
1437
|
tx_fee = 10
|
|
1439
1438
|
async with wallet_0.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
1440
1439
|
await wallet_0.generate_signed_transaction(
|
|
1441
|
-
uint64(tx_amount),
|
|
1442
|
-
await wallet_1.get_new_puzzlehash(),
|
|
1440
|
+
[uint64(tx_amount)],
|
|
1441
|
+
[await wallet_1.get_new_puzzlehash()],
|
|
1443
1442
|
action_scope,
|
|
1444
1443
|
uint64(tx_fee),
|
|
1445
1444
|
)
|
|
@@ -1505,7 +1504,7 @@ class TestWalletSimulator:
|
|
|
1505
1504
|
ph_2 = await wallet_1.get_new_puzzlehash()
|
|
1506
1505
|
async with wallet_0.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
1507
1506
|
await wallet_0.generate_signed_transaction(
|
|
1508
|
-
uint64(tx_amount), ph_2, action_scope, uint64(tx_fee), memos=[ph_2]
|
|
1507
|
+
[uint64(tx_amount)], [ph_2], action_scope, uint64(tx_fee), memos=[[ph_2]]
|
|
1509
1508
|
)
|
|
1510
1509
|
[tx] = action_scope.side_effects.transactions
|
|
1511
1510
|
assert tx.spend_bundle is not None
|
|
@@ -1580,9 +1579,14 @@ class TestWalletSimulator:
|
|
|
1580
1579
|
wallet = env.xch_wallet
|
|
1581
1580
|
|
|
1582
1581
|
ph = await wallet.get_puzzle_hash(False)
|
|
1583
|
-
primaries = [
|
|
1582
|
+
primaries = [CreateCoin(ph, uint64(1000000000 + i)) for i in range(int(wallet.max_send_quantity) + 1)]
|
|
1584
1583
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
1585
|
-
await wallet.generate_signed_transaction(
|
|
1584
|
+
await wallet.generate_signed_transaction(
|
|
1585
|
+
[uint64(1)] + [uint64(1000000000 + i) for i in range(int(wallet.max_send_quantity) + 1)],
|
|
1586
|
+
[ph] * (wallet.max_send_quantity + 2),
|
|
1587
|
+
action_scope,
|
|
1588
|
+
uint64(0),
|
|
1589
|
+
)
|
|
1586
1590
|
|
|
1587
1591
|
await wallet_environments.process_pending_states(
|
|
1588
1592
|
[
|
|
@@ -1617,8 +1621,8 @@ class TestWalletSimulator:
|
|
|
1617
1621
|
# 1) Generate transaction that is under the limit
|
|
1618
1622
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=False) as action_scope:
|
|
1619
1623
|
await wallet.generate_signed_transaction(
|
|
1620
|
-
uint64(max_sent_amount - 1),
|
|
1621
|
-
ph,
|
|
1624
|
+
[uint64(max_sent_amount - 1)],
|
|
1625
|
+
[ph],
|
|
1622
1626
|
action_scope,
|
|
1623
1627
|
uint64(0),
|
|
1624
1628
|
)
|
|
@@ -1628,8 +1632,8 @@ class TestWalletSimulator:
|
|
|
1628
1632
|
# 2) Generate transaction that is equal to limit
|
|
1629
1633
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=False) as action_scope:
|
|
1630
1634
|
await wallet.generate_signed_transaction(
|
|
1631
|
-
uint64(max_sent_amount),
|
|
1632
|
-
ph,
|
|
1635
|
+
[uint64(max_sent_amount)],
|
|
1636
|
+
[ph],
|
|
1633
1637
|
action_scope,
|
|
1634
1638
|
uint64(0),
|
|
1635
1639
|
)
|
|
@@ -1644,8 +1648,8 @@ class TestWalletSimulator:
|
|
|
1644
1648
|
):
|
|
1645
1649
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=False) as action_scope:
|
|
1646
1650
|
await wallet.generate_signed_transaction(
|
|
1647
|
-
uint64(max_sent_amount + 1),
|
|
1648
|
-
ph,
|
|
1651
|
+
[uint64(max_sent_amount + 1)],
|
|
1652
|
+
[ph],
|
|
1649
1653
|
action_scope,
|
|
1650
1654
|
uint64(0),
|
|
1651
1655
|
)
|
|
@@ -1665,8 +1669,8 @@ class TestWalletSimulator:
|
|
|
1665
1669
|
tx_fee = 2_000_000_000_000
|
|
1666
1670
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=False) as action_scope:
|
|
1667
1671
|
await wallet.generate_signed_transaction(
|
|
1668
|
-
uint64(tx_amount),
|
|
1669
|
-
bytes32.zeros,
|
|
1672
|
+
[uint64(tx_amount)],
|
|
1673
|
+
[bytes32.zeros],
|
|
1670
1674
|
action_scope,
|
|
1671
1675
|
uint64(tx_fee),
|
|
1672
1676
|
)
|
|
@@ -1741,7 +1745,7 @@ class TestWalletSimulator:
|
|
|
1741
1745
|
|
|
1742
1746
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
1743
1747
|
await wallet.generate_signed_transaction(
|
|
1744
|
-
uint64(tx_amount), await wallet_2.get_puzzle_hash(False), action_scope, coins={coin}
|
|
1748
|
+
[uint64(tx_amount)], [await wallet_2.get_puzzle_hash(False)], action_scope, coins={coin}
|
|
1745
1749
|
)
|
|
1746
1750
|
|
|
1747
1751
|
await wallet_environments.process_pending_states(
|
|
@@ -2041,8 +2045,8 @@ class TestWalletSimulator:
|
|
|
2041
2045
|
coins = await wallet.select_coins(uint64(AMOUNT_TO_SEND), action_scope)
|
|
2042
2046
|
coin_list = list(coins)
|
|
2043
2047
|
await wallet.generate_signed_transaction(
|
|
2044
|
-
uint64(AMOUNT_TO_SEND),
|
|
2045
|
-
bytes32.zeros,
|
|
2048
|
+
[uint64(AMOUNT_TO_SEND)],
|
|
2049
|
+
[bytes32.zeros],
|
|
2046
2050
|
action_scope,
|
|
2047
2051
|
uint64(0),
|
|
2048
2052
|
coins=coins,
|
|
@@ -5,11 +5,12 @@ from typing import Optional
|
|
|
5
5
|
|
|
6
6
|
import pytest
|
|
7
7
|
from chia_rs import G2Element
|
|
8
|
+
from chia_rs.sized_bytes import bytes32
|
|
9
|
+
from chia_rs.sized_ints import uint64
|
|
8
10
|
|
|
9
11
|
from chia._tests.cmds.wallet.test_consts import STD_TX
|
|
12
|
+
from chia.data_layer.singleton_record import SingletonRecord
|
|
10
13
|
from chia.types.blockchain_format.coin import Coin
|
|
11
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
12
|
-
from chia.util.ints import uint64
|
|
13
14
|
from chia.wallet.signer_protocol import SigningResponse
|
|
14
15
|
from chia.wallet.transaction_record import TransactionRecord
|
|
15
16
|
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG
|
|
@@ -36,7 +37,15 @@ def test_back_and_forth_serialization() -> None:
|
|
|
36
37
|
@dataclass
|
|
37
38
|
class MockWalletStateManager:
|
|
38
39
|
most_recent_call: Optional[
|
|
39
|
-
tuple[
|
|
40
|
+
tuple[
|
|
41
|
+
list[TransactionRecord],
|
|
42
|
+
bool,
|
|
43
|
+
bool,
|
|
44
|
+
bool,
|
|
45
|
+
list[SigningResponse],
|
|
46
|
+
list[WalletSpendBundle],
|
|
47
|
+
list[SingletonRecord],
|
|
48
|
+
],
|
|
40
49
|
] = None
|
|
41
50
|
|
|
42
51
|
async def add_pending_transactions(
|
|
@@ -47,8 +56,17 @@ class MockWalletStateManager:
|
|
|
47
56
|
sign: bool,
|
|
48
57
|
additional_signing_responses: list[SigningResponse],
|
|
49
58
|
extra_spends: list[WalletSpendBundle],
|
|
59
|
+
singleton_records: list[SingletonRecord],
|
|
50
60
|
) -> list[TransactionRecord]:
|
|
51
|
-
self.most_recent_call = (
|
|
61
|
+
self.most_recent_call = (
|
|
62
|
+
txs,
|
|
63
|
+
push,
|
|
64
|
+
merge_spends,
|
|
65
|
+
sign,
|
|
66
|
+
additional_signing_responses,
|
|
67
|
+
extra_spends,
|
|
68
|
+
singleton_records,
|
|
69
|
+
)
|
|
52
70
|
return txs
|
|
53
71
|
|
|
54
72
|
|
|
@@ -73,7 +91,7 @@ async def test_wallet_action_scope() -> None:
|
|
|
73
91
|
action_scope.side_effects
|
|
74
92
|
|
|
75
93
|
assert action_scope.side_effects.transactions == [STD_TX]
|
|
76
|
-
assert wsm.most_recent_call == ([STD_TX], True, False, True, [], [])
|
|
94
|
+
assert wsm.most_recent_call == ([STD_TX], True, False, True, [], [], [])
|
|
77
95
|
|
|
78
96
|
async with wsm.new_action_scope( # type: ignore[attr-defined]
|
|
79
97
|
DEFAULT_TX_CONFIG, push=False, merge_spends=True, sign=True, additional_signing_responses=[], extra_spends=[]
|
|
@@ -82,4 +100,4 @@ async def test_wallet_action_scope() -> None:
|
|
|
82
100
|
interface.side_effects.transactions = []
|
|
83
101
|
|
|
84
102
|
assert action_scope.side_effects.transactions == []
|
|
85
|
-
assert wsm.most_recent_call == ([], False, True, True, [], [])
|
|
103
|
+
assert wsm.most_recent_call == ([], False, True, True, [], [], [])
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import pytest
|
|
4
|
+
from chia_rs.sized_ints import uint8, uint32
|
|
4
5
|
|
|
5
6
|
from chia._tests.util.db_connection import DBConnection
|
|
6
7
|
from chia._tests.util.setup_nodes import OldSimulatorsAndWallets
|
|
@@ -11,7 +12,6 @@ from chia.types.blockchain_format.vdf import VDFProof
|
|
|
11
12
|
from chia.types.full_block import FullBlock
|
|
12
13
|
from chia.types.header_block import HeaderBlock
|
|
13
14
|
from chia.util.generator_tools import get_block_header
|
|
14
|
-
from chia.util.ints import uint8, uint32
|
|
15
15
|
from chia.wallet.key_val_store import KeyValStore
|
|
16
16
|
from chia.wallet.wallet_blockchain import WalletBlockchain
|
|
17
17
|
|
|
@@ -5,11 +5,11 @@ from dataclasses import dataclass, field, replace
|
|
|
5
5
|
from typing import Optional
|
|
6
6
|
|
|
7
7
|
import pytest
|
|
8
|
+
from chia_rs.sized_bytes import bytes32
|
|
9
|
+
from chia_rs.sized_ints import uint8, uint16, uint32, uint64
|
|
8
10
|
|
|
9
11
|
from chia._tests.util.db_connection import DBConnection
|
|
10
12
|
from chia.types.blockchain_format.coin import Coin
|
|
11
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
12
|
-
from chia.util.ints import uint8, uint16, uint32, uint64
|
|
13
13
|
from chia.util.streamable import Streamable, UInt32Range, UInt64Range, VersionedBlob
|
|
14
14
|
from chia.wallet.puzzles.clawback.metadata import ClawbackMetadata
|
|
15
15
|
from chia.wallet.util.query_filter import AmountFilter, HashFilter
|
|
@@ -3,11 +3,11 @@ from __future__ import annotations
|
|
|
3
3
|
import random
|
|
4
4
|
|
|
5
5
|
import pytest
|
|
6
|
+
from chia_rs.sized_bytes import bytes32
|
|
7
|
+
from chia_rs.sized_ints import uint64
|
|
6
8
|
|
|
7
9
|
from chia._tests.util.db_connection import DBConnection
|
|
8
10
|
from chia.types.blockchain_format.coin import Coin
|
|
9
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
10
|
-
from chia.util.ints import uint64
|
|
11
11
|
from chia.wallet.wallet_interested_store import WalletInterestedStore
|
|
12
12
|
|
|
13
13
|
|
|
@@ -9,6 +9,8 @@ from typing import Any, Optional
|
|
|
9
9
|
|
|
10
10
|
import pytest
|
|
11
11
|
from chia_rs import G1Element, PrivateKey
|
|
12
|
+
from chia_rs.sized_bytes import bytes32
|
|
13
|
+
from chia_rs.sized_ints import uint8, uint32, uint64, uint128
|
|
12
14
|
|
|
13
15
|
from chia._tests.util.misc import CoinGenerator, patch_request_handler
|
|
14
16
|
from chia._tests.util.setup_nodes import OldSimulatorsAndWallets
|
|
@@ -21,13 +23,11 @@ from chia.server.outbound_message import Message, make_msg
|
|
|
21
23
|
from chia.simulator.add_blocks_in_batches import add_blocks_in_batches
|
|
22
24
|
from chia.simulator.block_tools import test_constants
|
|
23
25
|
from chia.types.blockchain_format.coin import Coin
|
|
24
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
25
26
|
from chia.types.full_block import FullBlock
|
|
26
27
|
from chia.types.mempool_inclusion_status import MempoolInclusionStatus
|
|
27
28
|
from chia.types.peer_info import PeerInfo
|
|
28
29
|
from chia.util.config import load_config
|
|
29
30
|
from chia.util.errors import Err
|
|
30
|
-
from chia.util.ints import uint8, uint32, uint64, uint128
|
|
31
31
|
from chia.util.keychain import Keychain, KeyData, generate_mnemonic
|
|
32
32
|
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG
|
|
33
33
|
from chia.wallet.util.wallet_sync_utils import PeerRequestException
|
|
@@ -635,7 +635,7 @@ async def test_transaction_send_cache(
|
|
|
635
635
|
with patch_request_handler(api=full_node_api.full_node._server.get_connections()[0].api, handler=send_transaction):
|
|
636
636
|
# Generate the transaction
|
|
637
637
|
async with wallet.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
638
|
-
await wallet.generate_signed_transaction(uint64(0), bytes32.zeros, action_scope)
|
|
638
|
+
await wallet.generate_signed_transaction([uint64(0)], [bytes32.zeros], action_scope)
|
|
639
639
|
[tx] = action_scope.side_effects.transactions
|
|
640
640
|
|
|
641
641
|
# Make sure it is sent to the peer
|
|
@@ -4,6 +4,8 @@ import asyncio
|
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
6
|
import pytest
|
|
7
|
+
from chia_rs.sized_bytes import bytes32
|
|
8
|
+
from chia_rs.sized_ints import uint64
|
|
7
9
|
|
|
8
10
|
from chia._tests.util.time_out_assert import time_out_assert, time_out_assert_custom_interval
|
|
9
11
|
from chia.full_node.full_node_api import FullNodeAPI
|
|
@@ -11,9 +13,7 @@ from chia.full_node.mempool import MempoolRemoveReason
|
|
|
11
13
|
from chia.simulator.block_tools import BlockTools
|
|
12
14
|
from chia.simulator.full_node_simulator import FullNodeSimulator
|
|
13
15
|
from chia.simulator.simulator_protocol import FarmNewBlockProtocol
|
|
14
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
15
16
|
from chia.types.peer_info import PeerInfo
|
|
16
|
-
from chia.util.ints import uint64
|
|
17
17
|
from chia.wallet.transaction_record import TransactionRecord
|
|
18
18
|
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG
|
|
19
19
|
from chia.wallet.wallet_node import WalletNode
|
|
@@ -55,7 +55,7 @@ async def test_wallet_tx_retry(
|
|
|
55
55
|
await full_node_1.wait_for_wallet_synced(wallet_node=wallet_node_1, timeout=wait_secs)
|
|
56
56
|
|
|
57
57
|
async with wallet_1.wallet_state_manager.new_action_scope(DEFAULT_TX_CONFIG, push=True) as action_scope:
|
|
58
|
-
await wallet_1.generate_signed_transaction(uint64(100), reward_ph, action_scope)
|
|
58
|
+
await wallet_1.generate_signed_transaction([uint64(100)], [reward_ph], action_scope)
|
|
59
59
|
[transaction] = action_scope.side_effects.transactions
|
|
60
60
|
sb1 = transaction.spend_bundle
|
|
61
61
|
assert sb1 is not None
|
|
@@ -5,6 +5,8 @@ from contextlib import asynccontextmanager
|
|
|
5
5
|
|
|
6
6
|
import pytest
|
|
7
7
|
from chia_rs import G2Element
|
|
8
|
+
from chia_rs.sized_bytes import bytes32
|
|
9
|
+
from chia_rs.sized_ints import uint32, uint64
|
|
8
10
|
|
|
9
11
|
from chia._tests.environments.wallet import WalletStateTransition, WalletTestFramework
|
|
10
12
|
from chia._tests.util.setup_nodes import OldSimulatorsAndWallets
|
|
@@ -13,10 +15,8 @@ from chia.rpc.wallet_request_types import PushTransactions
|
|
|
13
15
|
from chia.server.outbound_message import NodeType
|
|
14
16
|
from chia.types.blockchain_format.coin import Coin
|
|
15
17
|
from chia.types.blockchain_format.program import Program
|
|
16
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
17
18
|
from chia.types.coin_spend import make_spend
|
|
18
19
|
from chia.types.peer_info import PeerInfo
|
|
19
|
-
from chia.util.ints import uint32, uint64
|
|
20
20
|
from chia.wallet.derivation_record import DerivationRecord
|
|
21
21
|
from chia.wallet.derive_keys import master_sk_to_wallet_sk, master_sk_to_wallet_sk_unhardened
|
|
22
22
|
from chia.wallet.transaction_record import TransactionRecord
|
|
@@ -125,14 +125,14 @@ async def test_commit_transactions_to_db(wallet_environments: WalletTestFramewor
|
|
|
125
125
|
) as action_scope:
|
|
126
126
|
coins = list(await wsm.main_wallet.select_coins(uint64(2_000_000_000_000), action_scope))
|
|
127
127
|
await wsm.main_wallet.generate_signed_transaction(
|
|
128
|
-
uint64(0),
|
|
129
|
-
bytes32.zeros,
|
|
128
|
+
[uint64(0)],
|
|
129
|
+
[bytes32.zeros],
|
|
130
130
|
action_scope,
|
|
131
131
|
coins={coins[0]},
|
|
132
132
|
)
|
|
133
133
|
await wsm.main_wallet.generate_signed_transaction(
|
|
134
|
-
uint64(0),
|
|
135
|
-
bytes32.zeros,
|
|
134
|
+
[uint64(0)],
|
|
135
|
+
[bytes32.zeros],
|
|
136
136
|
action_scope,
|
|
137
137
|
coins={coins[1]},
|
|
138
138
|
)
|
|
@@ -220,8 +220,8 @@ async def test_confirming_txs_not_ours(wallet_environments: WalletTestFramework)
|
|
|
220
220
|
# Some transaction, doesn't matter what
|
|
221
221
|
async with env_1.wallet_state_manager.new_action_scope(wallet_environments.tx_config, push=False) as action_scope:
|
|
222
222
|
await env_1.xch_wallet.generate_signed_transaction(
|
|
223
|
-
uint64(1),
|
|
224
|
-
await env_1.xch_wallet.get_puzzle_hash(new=False),
|
|
223
|
+
[uint64(1)],
|
|
224
|
+
[await env_1.xch_wallet.get_puzzle_hash(new=False)],
|
|
225
225
|
action_scope,
|
|
226
226
|
)
|
|
227
227
|
|
|
@@ -19,7 +19,7 @@ from chia.wallet.cat_wallet.cat_wallet import CATWallet
|
|
|
19
19
|
"num_environments": 2,
|
|
20
20
|
"config_overrides": {
|
|
21
21
|
"foo": "bar", # A config value that never exists
|
|
22
|
-
"min_mainnet_k_size": 2, # A config value
|
|
22
|
+
"min_mainnet_k_size": 2, # A config value overridden
|
|
23
23
|
},
|
|
24
24
|
"blocks_needed": [1, 0],
|
|
25
25
|
}
|
|
@@ -5,11 +5,11 @@ import time
|
|
|
5
5
|
|
|
6
6
|
import pytest
|
|
7
7
|
from chia_rs import G2Element
|
|
8
|
+
from chia_rs.sized_bytes import bytes32
|
|
9
|
+
from chia_rs.sized_ints import uint32, uint64
|
|
8
10
|
|
|
9
11
|
from chia._tests.util.db_connection import DBConnection
|
|
10
12
|
from chia.types.blockchain_format.coin import Coin
|
|
11
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
12
|
-
from chia.util.ints import uint32, uint64
|
|
13
13
|
from chia.wallet.conditions import ConditionValidTimes
|
|
14
14
|
from chia.wallet.trade_record import TradeRecord, TradeRecordOld
|
|
15
15
|
from chia.wallet.trading.offer import Offer
|
|
@@ -5,9 +5,9 @@ from typing import Optional
|
|
|
5
5
|
|
|
6
6
|
import pytest
|
|
7
7
|
from chia_rs import Coin, CoinState
|
|
8
|
+
from chia_rs.sized_bytes import bytes32
|
|
9
|
+
from chia_rs.sized_ints import uint32, uint64
|
|
8
10
|
|
|
9
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
10
|
-
from chia.util.ints import uint32, uint64
|
|
11
11
|
from chia.wallet.util.peer_request_cache import PeerRequestCache
|
|
12
12
|
from chia.wallet.util.wallet_sync_utils import sort_coin_states
|
|
13
13
|
|
|
@@ -2,10 +2,11 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from typing import Optional
|
|
4
4
|
|
|
5
|
+
from chia_rs.sized_bytes import bytes32
|
|
6
|
+
from chia_rs.sized_ints import uint64
|
|
7
|
+
|
|
5
8
|
from chia.types.blockchain_format.coin import Coin
|
|
6
9
|
from chia.types.blockchain_format.program import Program
|
|
7
|
-
from chia.types.blockchain_format.sized_bytes import bytes32
|
|
8
|
-
from chia.util.ints import uint64
|
|
9
10
|
from chia.wallet.outer_puzzles import (
|
|
10
11
|
construct_puzzle,
|
|
11
12
|
create_asset_id,
|