* 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
* 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
* 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
* 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
* 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.
* 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>
* 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`
* Rename notification config
* Change unit test
* Fix test
* Set minimum required notification amount
---------
Co-authored-by: Matt Hauff <quexington@gmail.com>
* move SerializedProgram into its own file (to fixup type annotations)
* fix type annotations for SerializedProgram
* fixup import statements for new SerializedProgram module
* 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
* 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>
* 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
* 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.
* Limit rate of spammy log messages when farmer is disconnected from pool
* Remove typo
* Use reliably increasing clock
* Make test faster, more reliable
* 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
* 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>
* 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>
* 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>
* 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
* 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.
* 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
* 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
* 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
* 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
* 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