Commit Graph

3036 Commits

Author SHA1 Message Date
Kyle Altendorf
b22fe1ea8d
allow signature changes for 3.11 2023-02-15 22:45:28 -05:00
Amine Khaldi
98c412ca5a
Formatting. 2023-02-14 22:15:08 +01:00
Amine Khaldi
7d0d40d7b7
Update SpendBundleConditions use. 2023-02-14 21:56:31 +01:00
Amine Khaldi
cf147458e8
Merge commit '124961a355e6175037067a06f5f2ab18600dfdf1' into catchup/main_from_release_1.7.0_124961a355e6175037067a06f5f2ab18600dfdf1 2023-02-14 21:35:36 +01:00
Kyle Altendorf
124961a355
fixup event loop method testing (#14566)
* get pausable_server in a thread

* drop the server thread name

this is a 3.8+ feature

* enable parallel testing in ci for core.server

* bump the timeout

* strict only for windows on 3.8+

* actually bump the *job_*timeout

* actively timeout connection attempts to speed up linux tests

* skip test_limits_connections() for windows python 3.7

* back to default job timeout
2023-02-14 13:48:44 -06:00
Arvid Norberg
d315097b2a
full node optimizations (#14562)
implement async opt merge

Co-authored-by: William Allen <wallentx@users.noreply.github.com>
Co-authored-by: Florin Chirica <16658074+fchirica@users.noreply.github.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-02-13 22:34:31 -06:00
Adam Kelly
d69ecdda29
Test DID Wallet creation by blockchain singleton update (#14545) 2023-02-13 11:21:32 -06:00
Amine Khaldi
454b1cbc35
Simplify MINTING_COIN and RESERVE_FEE_CONDITION_FAILED unit tests (#14559)
* Simplify MINTING_COIN and RESERVE_FEE_CONDITION_FAILED unit tests now that they're validated in pre_validate_spendbundle.

* Add positive tests.
2023-02-13 11:03:22 -06:00
Arvid Norberg
07450b7dda
use run_block_generator() to run block generators (#14544)
use the new run_block_generator() function from chia_rs
2023-02-13 11:00:21 -06:00
Arvid Norberg
1b6201852a
bump chia_rs to 0.2.2 (#14533)
* bump chia_rs to latest version

* add new error codes for ASSERT_BEFORE_* condition failures, ASSERT_CONCURRENT_SPEND failing, ASSERT_CONCURRENT_PUZZLE_FAILED and for impossible constraints

* add new condition opcodes for ASSERT_BEFORE_*, ASSERT_CONCURRENT_SPEND and ASSERT_CONCURRENT_PUZZLE

* fixup Spend and SpendBundleCondition types

* fixup tests that otherwise fail with MINTING_COIN

* fix test that otherwise would fail with RESERVE_FEE_CONDITION_FAILED

* remove use of NO_NEG_DIV flag. It's now implied

* remove duplicate test parameters
2023-02-10 15:14:56 -06:00
Matt Hauff
59e389968e
Add cost logging to CLVM tests as fixture (#14444) 2023-02-10 15:13:45 -06:00
Kyle Altendorf
6e70868888
move wallet_is_synced/wallets_are_synced to FullNodeSimulator methods (#14403)
* move wallet_is_synced/wallets_are_synced to FullNodeSimulator methods

* black

* gotta catch 'em all
2023-02-10 15:13:23 -06:00
Amine Khaldi
5169f10e50
Merge commit '9cc25cc820accad778bf626500aedd299f62a825' into checkpoint/main_from_release_1.7.0_9cc25cc820accad778bf626500aedd299f62a825 2023-02-09 14:28:39 +01:00
Adam Kelly
d3ad991208
Ak.test nft mint from xch rpc (#14482)
* Mitigate flaky test

* Use already existing wallet_is_synced
2023-02-08 19:44:04 -06:00
Kyle Altendorf
f346de94ba
refactor test_pool_rpc (#14196)
* preliminary test_pool_rpc refactor

* remove todo

* handle some todos

* one more

* wait for wallets to sync in the fixtures

* drop an extra wallet

* drop unused function
2023-02-08 19:43:43 -06:00
Kronus91
67b42c9cc4
Fix get memo API (#14513) 2023-02-07 18:41:02 -06:00
Arvid Norberg
e397aa3abd
remove test aimed at the inital soft-fork to enable transactions (#14477)
remove test aimed at the inital soft-fork to enable transactions, way back in the beginning of time
2023-02-07 18:20:24 -06:00
Amine Khaldi
98d4436f95
Merge commit '9be3c7d00ae99105c40913aff1b07e97657609fb' into checkpoint/main_from_release_1.7.0_9be3c7d00ae99105c40913aff1b07e97657609fb 2023-02-07 21:33:21 +01:00
Amine Khaldi
4ec43caf20
Merge commit '83c864b2f099afcbf93845d9e720a523d11a3eaa' into checkpoint/main_from_release_1.7.0_83c864b2f099afcbf93845d9e720a523d11a3eaa 2023-02-07 17:13:18 +01:00
William Allen
bbf1e1e2d4
checkpoint: into main from release/1.7.0 @ d1a4c579f4 (#14502)
Source hash: d1a4c579f4
Remaining commits: 3
2023-02-07 05:58:38 -06:00
Amine Khaldi
16d76dda9b
Add unit tests for get_items_not_in_filter (#14416)
* Add unit tests for get_items_not_in_filter.

* Adapt the test cases for 0 and negative limits.
2023-02-07 04:31:46 -06:00
Matt Hauff
9cc25cc820
Quex.offer mod tests (#14478)
* add test

* do some forwards compat stuff

* Add a forwards compat example

* fix test

* Add more forwards compat tests

* Add more forwads compat tests

* Add forwards compatibility for nft1s

* add forward compatibility for nft offers

* Add forwards compatibility tests for DL offers

* Update DL test offers

* lint

* isort

* offer mod bytes

* Fix compression test

* isort again

* Add special offers for <=3.7 (CATs)

* Add special offers for <=3.7 (NFT1s)

* Add special offers for <=3.7 (NFT0s)

* Add special offers for <=3.7 (DLs)

* Check for conflicting items during aggregation

* isort

* Return created old offers properly marked
2023-02-06 22:04:39 -06:00
Amine Khaldi
88e2d79905
Merge commit 'd1a4c579f4dd2b058fcd46f2249a876a60b1dec5' into checkpoint/main_from_release_1.7.0_d1a4c579f4dd2b058fcd46f2249a876a60b1dec5 2023-02-06 21:36:02 +01:00
Adam Kelly
9be3c7d00a
Ensure fee estimates monotonically decrease with time (#14368)
* Ensure fee estimates monotonically decrease with time

* Improve function naming and document use

* type checking
2023-02-06 12:53:03 -06:00
Amine Khaldi
09a2c79898
Add unit tests for ephemeral time locks (#14433)
* Add unit tests for ephemeral time locks.

* Make the current block's height and timestamp values clearer in the test.

* Add some comments to explain some cases and opt for an explicit height and timestamp.

* Adapt the test coin timestamp so we can test the ephemeral one with the value we set.

* Document a subtle difference between ASSERT_SECONDS_RELATIVE 0 and ASSERT_HEIGHT_RELATIVE 0.
2023-02-06 03:28:16 -06:00
Arvid Norberg
cbbc8b43b8
make the tests use the real COST_PER_BYTE constant (#14470) 2023-02-04 14:14:52 -06:00
dustinface
3bd6069f04
server: Exclude some attributes from WSChiaConnection.__repr__ (#14466) 2023-02-04 14:14:27 -06:00
Arvid Norberg
2c0dd6b2c1
add unit test for mempool_check_time_locks (#14441) 2023-02-04 14:13:59 -06:00
Sebastjan Trepca
d8d8660dbc
RPC call to reset wallet sync data (#14365)
* Add resync API

* Resolve comments

* Fix precommit

* set_wallet_resync RPC call

* disable resync after reset

* Update chia/wallet/wallet_node.py

Co-authored-by: Jeff <paninaro@gmail.com>

* fixes

* fixes

* rename method

* more tests, schema test

* removed formatting changes in initial-config

* another test case

* another test case

* simplification

* rename fix

* hinting

* added notification id table

---------

Co-authored-by: ytx1991 <t.yu@chia.net>
Co-authored-by: Jeff <paninaro@gmail.com>
2023-02-04 14:12:41 -06:00
Adam Kelly
83c864b2f0
Correct fee estimate calculation to be in mojos, not millimojos (#14474) 2023-02-04 14:09:39 -06:00
Matt Hauff
97230ca3b0
Add a way to import a SpendSim and SimClient as a contextmanager (#14434) 2023-01-31 19:22:06 -06:00
Matt Hauff
d1a4c579f4
Check incoming notification hints (#14450)
* add self notification test

* add a check that hint belongs to us

* lint
2023-01-31 18:58:46 -06:00
Amine Khaldi
b546888614
Merge commit '655eaad639588819beeb8bcac1a2d1ab45acf812' into checkpoint/main_from_release_1.7.0_655eaad639588819beeb8bcac1a2d1ab45acf812 2023-01-31 12:52:52 +01:00
dustinface
c26902a6ec
wallet: Avoid duplicates in get_puzzle_hashes_to_subscribe (#14186)
* wallet: Avoid duplicates in `get_puzzle_hashes_to_subscribe`

We currently store the derived puzzle hashes in both, puzzle store and
interested store and here we combine them as list. There is some code to
mitigate duplicate subscriptions but its based on chunks here
39d733599d/chia/wallet/wallet_node.py (L662)
so if there are less than 1000 puzzle hashes it obviously still can lead
to redundant subscription calls?

* Add `test_unique_puzzle_hash_subscriptions`
2023-01-30 16:23:17 -06:00
William Allen
c1b33a0ddd
checkpoint: into main from release/1.7.0 @ 655f6c2292 (#14429)
Source hash: 655f6c2292
Remaining commits: 1
2023-01-30 16:08:18 -06:00
Arvid Norberg
e9c0fcba06
fix negative tests in test_pool_livecycle (#14425) 2023-01-30 10:55:33 -06:00
Amine Khaldi
3fe53a7acf
Merge commit '655f6c2292fe806a06d2607c5606a5a382861f92' into checkpoint/main_from_release_1.7.0_655f6c2292fe806a06d2607c5606a5a382861f92 2023-01-30 13:02:36 +01:00
Kronus91
655eaad639
Rename notification config (#14397)
* Rename notification config

* Change unit test

* Fix test

* Set minimum required notification amount

---------

Co-authored-by: Matt Hauff <quexington@gmail.com>
2023-01-27 17:20:34 -06:00
Arvid Norberg
68c9aafc0a
move SerializedProgram to its own file (#14391)
* move SerializedProgram into its own file (to fixup type annotations)

* fix type annotations for SerializedProgram

* fixup import statements for new SerializedProgram module
2023-01-27 17:20:23 -06:00
Matt Hauff
655f6c2292
Add a persitent id table to notification store (#14418)
* Add a persitent id table to notification store

* rename table

* Add a test

* lint
2023-01-27 17:20:01 -06:00
Kyle Altendorf
a063d0c224
remove args passed to super() calls (#14407) 2023-01-27 17:19:12 -06:00
Kronus91
c541d49afe
Get memo api (#14377)
* Add NFT bulk transfer API

* Fix pre-commit

* Improve unit test

* Fix precommit

* Improve unit test

* Fix response json serialization

* Fix bulk API missing transaction

* Remove print

* Add get_transaction_memo API

* Add unit test for XCH

* Cover received coins

* Revert test hack

* Remove irrelevant change

* Add parameter override

* Fix pre-commit
2023-01-27 17:16:30 -06:00
Adam Kelly
22dfc83d51
Reorganize reusable singleton wallet code (#14339) 2023-01-27 17:09:13 -06:00
Arvid Norberg
fda2163b6b
remove additions() and reserved_fee() from CoinSpend (#14394) 2023-01-26 11:16:14 -06:00
Matt Hauff
1d4700dceb
Add some extra checks for size and existence to notification backend (#14398)
* Add some extra checks for size and existence to notification backend

* mypy
2023-01-25 23:45:23 -06:00
Almog De Paz
3f97435159
dont announce none response capability to peers (#14386)
* dont announce none response capability to peers

* comment out none response handling

* skip test instead of comment out
2023-01-25 13:53:38 -06:00
Jeff
c107001334
Add SigningMode and update verify_signature RPC to work with sign_message_by_* RPCs (#14213)
* Updated `verify_signature` RPC to support signatures made by `sign_message_by_*` RPCs

* Updated RPC to use "signing_mode" param name with value "chip_0002"
Added CHIP_0002_SIGN_MESSAGE_PREFIX string constant

* Tests for verify_signature

* Update chia/wallet/wallet.py

Co-authored-by: Kyle Altendorf <sda@fstab.net>

* Adds SigningMode enum with CHIP-0002 and BLS message augmentation schemes
chia keys sign/verify support JSON output
chia keys verify now accepts the -b as_bytes option

* Fix a mypy warning

* Updated link to CHIP-0002

* isort

* Fix tests

* improve error handling

* comment how test data was generated

* Update chia/rpc/wallet_rpc_api.py

Co-authored-by: Kyle Altendorf <sda@fstab.net>

* Update chia/rpc/wallet_rpc_api.py

Co-authored-by: Kyle Altendorf <sda@fstab.net>

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-01-25 12:44:37 -06:00
Amine Khaldi
05f1d257b4
Add a unit test for sending a spend bundle twice with a different spends order (and a coin eligible for deduplication) (#14387)
Add a unit test for sending a spend bundle twice with a different spends order (and a coin eligible for deduplication).
2023-01-25 09:59:47 -06:00
Jack Nelson
99fbb056e1
Fix chia wallet coins cli bugs (#14388)
* fix fee bug

The fee should not be taken into account when dealing with CAT's or other non XCH coins.

* fix broken CAT removals

it was never implemented ...

* Update wallet_rpc_api.py
2023-01-24 19:33:25 -06:00
Amine Khaldi
69c7172152
Add a unit test for sending a spend bundle (with a coin eligible for deduplication) twice (#14374)
* Add a unit test for sending a spend bundle (with a coin eligible for deduplication) twice.

* Have spend_bundle_from_conditions take a coin that defaults to TEST_COIN.

* Improve the expected cost readability.

* Prepare get_coin_record_for_test_coins for reuse in future tests.
2023-01-24 12:04:09 -06:00
Adam Kelly
9f0220771f
Limit rate of log messages when farmer is disconnected from pool (#14344)
* Limit rate of spammy log messages when farmer is disconnected from pool

* Remove typo

* Use reliably increasing clock

* Make test faster, more reliable
2023-01-23 16:43:42 -06:00
Geoff Walmsley
b480aded31
Fix target puz hash index for bulk mint nfts with airdrop (#14370)
* fix indexing for target puzhashes in nft bulk minting

* make pylint happy
2023-01-21 13:00:31 -06:00
Kronus91
ad51c3c251
Fix bulk tx (#14372)
* Add NFT bulk transfer API

* Fix pre-commit

* Improve unit test

* Fix precommit

* Improve unit test

* Fix response json serialization

* Fix bulk API missing transaction

* Remove print
2023-01-20 12:02:17 -06:00
Adam Kelly
7bdf7dc478
Change names used to look up estimated spendbundle sizes in get_fee_estimate RPC (#14369)
* Change names used to look up estimated spendbundle sizes in get_fee_estimate RPC

* Update tests

* add test for get_spendbundle_type_cost

* add spend_count to get_fee_estimate

* Update chia/rpc/full_node_rpc_api.py

Co-authored-by: Jeff <jeff@chia.net>

Co-authored-by: Jeff <jeff@chia.net>
2023-01-20 11:59:08 -06:00
Matt Hauff
8e0cabad7e
Add the expected offer ID to some RPCs that take offer blobs (#14366)
* Add the exected offer ID to some RPCs that take offer blobs

* Add ID to client too

* black
2023-01-20 11:58:23 -06:00
Adam Kelly
0f2995e4a1
Move table of SpendBundle costs to backend (#14367) 2023-01-19 15:39:35 -06:00
dustinface
a91265ffff
tests: Drop unused PeerInfos (#14122) 2023-01-19 15:37:41 -06:00
Geoff Walmsley
443875e945
Enable setting time between blocks in full node sim (#14310)
remove the reset on time_per_block in full node sim
2023-01-19 15:32:46 -06:00
Adam Kelly
5ba71957d8
Display complete exception info in log file (#14319)
* Display complete exception info in logfile

* Update mempool tests

* Update mempool tests
2023-01-19 15:31:26 -06:00
Kronus91
35b6738c49
Nft bulk transfer (#14329)
* Add NFT bulk transfer API

* Fix pre-commit

* Improve unit test

* Fix precommit

* Improve unit test

* Fix response json serialization
2023-01-19 13:21:04 -06:00
Matt Hauff
8bb8ae5fea
Add a wallet RPC for converting heights to timestamps (#14357)
* Add a wallet RPC for converting heights to timestamps

* flake8
2023-01-18 13:55:06 -06:00
Sebastjan Trepca
c7eeaa64e6
fix offer cancel balance (#14342) 2023-01-13 18:47:07 -06:00
Adam Kelly
d83c93bb2b
It is okay to return a result in some cases when median == -1 (#14285)
* It is okay to return a result in some cases when median == -1. These cases are handled in the call to parse()

* Remove incorrect test
2023-01-13 16:09:40 -06:00
Amine Khaldi
5303c0eecc
Add a unit test for mempool unknown unspent check (#14341)
Add a unit test for mempool unknown unspent check.
2023-01-13 12:51:24 -06:00
Adam Kelly
e59666b319
Improve command line info display for fee estimation (#14336)
* Improve command line info display for fee estimation

* Update test
2023-01-13 12:23:22 -06:00
Adam Kelly
06eb18217e
Test get_bucket_index (#14294)
* Test get_bucket_index

* Apply epsilon to test constants

* Simplify get_bucket_index
2023-01-13 11:16:23 -06:00
Arvid Norberg
0f9e4ee41a
infrastructure for upcoming soft-fork (#14302)
soft-fork infrastructure
2023-01-12 03:08:59 -06:00
Amine Khaldi
2f5bbd6875
Add a unit test for mempool reserve fee check (#14323)
Add a unit test for mempool reserve fee check.
2023-01-12 01:09:53 -06:00
Arvid Norberg
0ce46bc566
disallow empty SpendBundles in the mempool (#14305)
* disallow empty SpendBundles from being added to the mempool

* Update chia/full_node/mempool_manager.py

Co-authored-by: Adam Kelly <338792+aqk@users.noreply.github.com>

Co-authored-by: Adam Kelly <338792+aqk@users.noreply.github.com>
2023-01-10 18:57:12 -06:00
Arvid Norberg
ff3bb5c72e
optimize mempool's potential cache (#14297)
split potential cache into conflict- and pending cache. The pending cache can be organized more efficiently and can have higher capacity
2023-01-10 18:56:50 -06:00
Amine Khaldi
85ff27f9fa
Add a unit test for mempool minting coin check (#14314)
Add a unit test for mempool minting coin check.
2023-01-09 15:28:31 -06:00
dustinface
390b0f677f
tests: Use set literal in test_subscriptions.py (#14311) 2023-01-09 14:41:58 -06:00
Adam Kelly
b71eaa0a8e
Call method to process transactions added to mempool in Fee Estimator (#14290) 2023-01-06 14:18:52 -06:00
Earle Lowe
0a0c8920ff
Add a daemon heartbeat setting to config.yaml (#13886)
* make daemon heartbeat configurable and increase default

* Fix up daemon rpc test

* Fix dumb error with parameters

* Restore formatting

* Various updates from feedback

* Update tests/core/test_daemon_rpc.py

use config value for heartbeat

Co-authored-by: Kyle Altendorf <sda@fstab.net>

* black fixes

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-01-06 11:55:20 -06:00
Arvid Norberg
c74689dbbe
bump chia_rs dependency to the latest version (#14289) 2023-01-06 11:45:11 -06:00
Adam Kelly
820493ffa8
Add new_block_height to FeeEstimatorInterface (#14277)
* Add new_block_height to FeeEstimatorInterface

* Fancy-up create_test_block_record, rename test

* Integrate new interface method
2023-01-05 15:34:53 -06:00
Arvid Norberg
a5397ec0c3
factor out coin- and PH subscription handling in order to add unit tests (#14222)
* factor out coin- and PH subscription handling in order to add unit tests

* address review comments

* fixup rebase. test_simple_sync_protocol.py
2023-01-05 15:24:58 -06:00
Matt Hauff
4d482f6105
Add a height timestamp for wallet notifications (#14163)
* Add a height timestamp for wallet notifications

* import sqlite3

* lint

* isort

* catch specific error

* Add a test for db backcompat

* Add a test for correct height

* mypy
2023-01-05 10:58:38 -06:00
Amine Khaldi
5974f04257
Remove redundant check for duplicate inputs (#14272)
Remove redundant check for duplicate inputs.
2023-01-04 11:17:00 -06:00
Adam Kelly
8364166de1
Add MempoolRemoveReason, which represents why we are removing a MempoolItem (#14263)
* Add MempoolRemoveReason, which represents why we are removing a MempoolItem

* Add integration tests for remove_from_pool. Generalize call count tracking in mock Fee Estimator.
2023-01-03 17:08:18 -06:00
Kyle Altendorf
559e58a47b
close websocket in ssl tests to avoid event loop closed errors (#14242) 2023-01-03 15:00:07 -06:00
Almog De Paz
18c95da752
add local max subscription config (#14188)
* add local max subscription config

* add and use trusted wallet config
tests

* lint

* unused import

* break early

* dont break because we need to iterate for hints

* fix off by one

* lint
2023-01-02 21:38:38 -06:00
Adam Kelly
d48e65e749
Fix fee estimator being re-created every block (#14175)
* Hold a ref to the fee estimator when the Mempool is destroyed and re-created. Unify the sharing of information between Mempool and MempoolManager

* Adjust tests to new Mempool create interface

* Store dynamic Mempool info in the FeeEstimator and static info in the Mempool

* Adjust tests

* Restore logging of block cost % calculation to use documented full block size

* Omit check for nil self.last_mempool_info

* Annotate Mempool members

* Add integration test for add_mempool_item

* Annotate types in BitcoinFeeEstimator class
2023-01-02 15:02:10 -06:00
Kyle Altendorf
6e315e147a
allow more sqlite thread safety than the minimum we require (#14215)
https://docs.python.org/3.11/library/sqlite3.html#sqlite3.threadsafety

extracted from https://github.com/Chia-Network/chia-blockchain/pull/11407
2022-12-23 11:34:10 -06:00
Amine Khaldi
7cba58eb00
Remove redundant check for maximum block CLVM cost (#14212)
Remove redundant check for maximum block CLVM cost.
2022-12-23 11:33:02 -06:00
Kyle Altendorf
64c57fdd78
fully hint test_pool_rpc (#14204) 2022-12-23 11:32:35 -06:00
Adam Kelly
407c0ba4a4
Fixes the case when a fee estimation request is made before the FullNode has initialized a peak (#14193)
* Fixes the case when a fee estimation request is made before the FullNode has initialized a peak

* Clarify code by setting defaults early

* Only spawn one full node in test
2022-12-23 11:31:44 -06:00
Kyle Altendorf
b8068a856d
wait for wallet sync in test_wallet_coinbase_reorg() and test_wallet_tx_reorg() (#14202) 2022-12-22 00:12:50 -06:00
Kyle Altendorf
ccfaca8060
make wallet rpc client wallet id parameters accept int, not str (#14200)
* make wallet rpc client wallet id parameters accept int, not str

* Update chia/cmds/wallet_funcs.py
2022-12-22 00:12:33 -06:00
Kyle Altendorf
cb6c5fc17f
improve adjusted_timeout() to handle floats and None (#14198) 2022-12-21 23:59:36 -06:00
Amine Khaldi
a802007936
Remove redundant check for duplicate outputs (#14195)
Remove redundant check for duplicate outputs.
2022-12-21 23:59:17 -06:00
Kyle Altendorf
1d42886721
hint RpcClient.create() return type (#14197) 2022-12-20 14:11:10 -06:00
Earle Lowe
3140c223bd
TechDebt: add get_name to WalletProtocol (#13995)
* add get_name to WalletProtocol

* remove async from did_wallet::get_name

* Return "Standard Wallet" for get_name
2022-12-20 13:26:06 -06:00
Kyle Altendorf
55f5e371b3
Block and transaction processing helpers (#11535)
* Block and transaction processing helpers

* flake8

* more and hints

* More

* separate tests of the simulator from tests using the simulator

* move fixture to conftest

* amounts are uint64

* remove unneeded while loop

* backoff instead of fixed sleep times

* .farm_blocks() only forces tx blocks when needed

* fix test_wallet_create_hit_max_send_amount

* fix test_wallet_tx_reorg

* fix test_address_sliding_window

* rename to farm_blocks_to_wallet

* rename to farm_rewards_to_wallet

* undo changes to protocol endpoints

* reword farm_blocks_to_wallet() loop

* rename process_blocks() to farm_blocks_to_puzzlehash() for now

* timeouts

* debug

* debug

* debug... for 3,7

* fix

* up timeout per block to 2 seconds

* increase transaction processing default timeout

* make debug maybe ok to leave around

* tidy

* intersperse sleeps again for wallet progression

* remove debug code

* review tidy

* cheat on uint64() type

* Update tests/simulation/test_simulator.py

* another import fix

* more fixes

* farm_blocks_to_puzzlehash

* more

* tweak

* fix the two-tx-blocks-instead-of-one dilemma

thanks to almog for figuring this out

* fix

* fixup

* rework since it was still broken on 3.7/3.8...

* oops

* yucky timeout

* more timeout

* cleanup todos

* add balance assertion after reorg before resubmission processing

* Apply suggestions from code review

* rename funds to expected_confirmed_balance

* catchup
2022-12-19 16:40:58 -06:00
Adam Kelly
2762490fd1
Create logger object in module instead of passing it in (#14173) 2022-12-16 20:52:47 -06:00
Kyle Altendorf
777295b2ad
add system and os dependent timeout adjustments (#13778)
* add system and os dependent timeout adjustments

* Update time_out_assert.py

* add adjusted_timeout() and apply

* Update connection_utils.py
2022-12-15 20:00:00 -06:00
dustinface
e2e103241a
Wrap Union[IPv4Address, IPv6Address] in the class IPAddress (#14136) 2022-12-14 17:11:08 -06:00
Amine Khaldi
7defb1ebfc
Merge commit '618f93b4c42b176659cc74c02a4dd711adc62052' into checkpoint/main_from_release_1.6.2_618f93b4c42b176659cc74c02a4dd711adc62052 2022-12-14 19:24:34 +01:00
Matt Hauff
ffd02b2f80
Return existing CAT wallet instead of raising (#14101)
* Return existing CAT wallet instead of raising

There's no reason to raise here, all the caller is looking for is an instance of the CATWallet that they're looking for and to create it if it doesn't exist.

* rename create_wallet_for_cat -> get_or_...

* Move wallet created noti inside of function

* remove redundant call
2022-12-13 22:46:16 -06:00
Amine Khaldi
cd4874c584
create_bundle_from_mempool() doesn't need to be async (#14114)
create_bundle_from_mempool() doesn't need to be async.
2022-12-13 17:11:12 -06:00