Commit Graph
5861 Commits
Author SHA1 Message Date
Arvid NorbergandHarold Brenes f200fcf16b Separate protocol versions (#17791)
* use separate protocol versions for the different services

* Validate protocol version on handshake

* simplify checking protocol version for incoming connections

---------

Co-authored-by: Harold Brenes <h.brenes@chia.net>
2024-03-29 07:40:06 -07:00
Kyle Altendorf 286726733f less order sensitivity in test_plotter_stop_plotting() (#17794) 2024-03-28 13:17:46 -07:00
Arvid Norberg c67b8bbe5e message conditions (#17772)
* bump chia_rs to 0.6.1

* introduce soft-fork 3, to enable message conditions

* add wallet tests
2024-03-27 16:08:29 -07:00
Amine Khaldi 105f07167a Speedup clean_node_table by leveraging relaxed foreign_keys (#17769)
* Speedup clean_node_table by leveraging relaxed foreign_keys.

* Present an attempt to address the delete_store_data scenario.
2024-03-27 12:39:54 -07:00
Felix Brucker d09b61b72d Pass full version in Handshake (#15679)
* Pass full version in Handshake

* Move chia version conversion into crawler

* Rename to overloaded `chia_short_version` and always return str

* Ensure we extract major.minor.patch from invalid pep440 if available
2024-03-27 10:40:47 -07:00
Florin Chirica 1879faea40 Don't download DL existing DAT files. (#17730)
* Don't download DL existing DAT files.

* Lint.

* Try to improve coverage.
2024-03-27 09:33:26 -07:00
Matt Hauff 9bc137f0f8 Wait for synced in NFT test (#17790) 2024-03-27 09:16:11 -07:00
Amine Khaldi 22608088e1 Optimize clean_node_table's query (#17779)
Optimize clean_node_table's query.
2024-03-27 09:15:43 -07:00
Kyle Altendorf ed786e2f61 add foreign key delay (#17709)
* add foreign key delay

* handle non-`Row` foreign key error reports

* todos

* coverage

* rename to `foreign_key_enforcement_enabled=`
2024-03-27 09:14:57 -07:00
Earle Lowe 5dad9f2148 DL: stop using fee config setting and remove from initial config (#13374)
* DL: stop using fee config setting and remove from initial config

* Updates to set fee manually

* Set back explicit fee to original 0
2024-03-27 09:10:57 -07:00
Amine Khaldi 97cd5a98b4 Improve get_seconds_and_delayed_puzhash_from_p2_singleton_puzzle (#17746)
Improve get_seconds_and_delayed_puzhash_from_p2_singleton_puzzle.

* Construct delayed_puzzle_hash as a proper bytes32 object.
* Mark unused values.
* Handle atom optionality before constructing return values.
2024-03-26 12:47:36 -07:00
Amine Khaldi 3325046b16 Properly construct uint64 objects for LineageProof amounts in WalletSingletonStore's add_spend (#17747)
Properly construct uint64 objects for LineageProof amounts in WalletSingletonStore's add_spend.
2024-03-25 12:03:25 -07:00
Amine Khaldi 57c9a7d387 Handle some atoms' optionality in WalletStateManager's determine_coin_type (#17748)
Handle some atoms' optionality in WalletStateManager's determine_coin_type.
2024-03-25 12:02:01 -07:00
Amine Khaldi b1dd363256 Properly construct uint64 objects for Coin amounts (#17745)
Properly construct uint64 objects for Coin amounts.
2024-03-25 12:00:04 -07:00
Amine Khaldi d4aa31ce73 Improve UncurriedNFT construction through uncurry (#17744)
Improve UncurriedNFT construction through uncurry.

* Handle optional atoms.
* Properly construct bytes32 objects.
* Mark unused values.
2024-03-25 11:59:50 -07:00
Amine Khaldi d928ac0be7 Properly construct uint64 amounts for UnspentLineageInfo in get_unspent_lineage_info_for_puzzle_hash (#17743)
Properly construct uint64 amounts for UnspentLineageInfo in get_unspent_lineage_info_for_puzzle_hash.
2024-03-25 11:59:24 -07:00
Amine Khaldi 19b823b57e Remove no longer needed consensus_mode limits (#17742)
Remove no longer needed consensus_mode limits.
2024-03-25 11:59:03 -07:00
Amine Khaldi c40a508c9d Properly construct CATCoinData's mod and tail program hashes in CATWallet's coin_added (#17741)
Properly construct CATCoinData's mod and tail program hashes in CATWallet's coin_added.

This now handles optional values and constructs a bytes32 object on success.
2024-03-25 11:58:47 -07:00
Amine Khaldi 763e01cc68 Correct launcher_id type in singleton_puzzle, p2_singleton_puzzle and their users (#17740)
Correct launcher_id type in singleton_puzzle, p2_singleton_puzzle and their users.
2024-03-25 11:58:32 -07:00
Kyle Altendorf 6b42878ca2 update to aiohttp 3.9.2 (#17726)
* update to aiohttp 3.9.2

* correct testing of bans

* fixup

* again

* again (again)

* 🍌 ooh-ooh-aah-aah 🐒

* add back a test that banned host can not connect
2024-03-25 11:58:16 -07:00
Snoppy db8913631e chore: fix typos (#17729)
fix typos
2024-03-25 09:48:31 -07:00
Amine Khaldi 5350428eb1 Speedup leaf_hash in data_layer_util.py (#17759)
Speedup leaf_hash in data_layer_util.py.
2024-03-25 08:45:52 -07:00
Amine Khaldi cd6f4f56de Speedup key_hash in data_layer_util.py (#17758)
Speedup key_hash in data_layer_util.py.
2024-03-25 08:45:37 -07:00
Kyle Altendorf 172e28f728 correct testing of bans (#17753)
* correct testing of bans

* fixup

* again

* again (again)

* 🍌 ooh-ooh-aah-aah 🐒

* add back a test that banned host can not connect
2024-03-25 08:44:40 -07:00
Earle Lowe 08710b9acc Really fix Data layer download banning (#17664) 2024-03-25 08:30:34 -07:00
Earle LoweandAmine Khaldi f5aa40a181 Optimize insert/upsert/delete by using get_node_by_key (#17765)
* Optimize insert/upsert/delete by using get_node_for_key

* Add a unit test for insert's key already present code path.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2024-03-25 08:30:18 -07:00
Earle Lowe ab555bfb80 Some proof optimizations - use get_ancestors_optimized (#17665)
* Some proof optimizations - use get_ancestors_optimized

* avoid using ancestors_optimized in DL Offers flow
2024-03-25 08:29:54 -07:00
Matt Hauff 6428a3b5cd Add test for observance of melted CAT balance (#17764) 2024-03-25 08:28:59 -07:00
Arvid Norberg 6238fda8da improve logging of the height-to-hash and sub-epoch-summaries cache (#17731) 2024-03-20 17:42:06 -07:00
Matt Hauff 4b934b8475 Fix defaults in send_transaction_multi (#17752) 2024-03-20 17:40:20 -07:00
Kyle Altendorf 18bcc3e561 test installers find plotters main (#17646)
* test that installers find plotters

* maybe correct launching from installers

* handle noisy output

* list dmg contents

* list exe installed contents

* adjust chia path on darwin

* linux as well

* fix

* more prints and some timeouts

* resolve

* undo

* empty

* more output

* install numa

* no madmax working from rpm

* reword

* Update build-linux-installer-rpm.yml
2024-03-20 09:11:11 -07:00
Arvid Norberg 9385c40567 fix reorg from 0 (#17718)
fix lookup_fork_chain() to support starting from an empty chain (i.e. height -1 and header-hash GENESIS_CHALLENGE). There are edge cases where the node may want to do this
2024-03-20 09:08:36 -07:00
Matt HauffandAmine Khaldi 835c1f8924 Port tests/wallet/test_wallet.py to WalletTestFramework (#17687)
* Port test_wallet_coinbase

* Port test_wallet_make_transaction

* Port test_wallet_reuse_address

* Port test_wallet_clawback_claim_auto

* Port test_wallet_clawback_clawback

* Port test_wallet_clawback_sent_self

* Port test_wallet_clawback_claim_manual

* Port test_wallet_clawback_reorg

* Rebase fixes and flakiness improvements

* Port test_get_clawback_coins

* Port test_clawback_resync

* Port test_wallet_coinbase_reorg

* Port test_wallet_make_transaction_hop

* Port test_wallet_make_transaction_with_fee

* Port test_wallet_make_transaction_with_memo

* Port test_wallet_create_hit_max_send_amount

* Port test_wallet_prevent_fee_theft

* Port test_wallet_tx_reorg

* Port test_address_sliding_window

* Port test_sign_message

* Port test_wallet_transaction_options

* Remove unneeded check_balances call.

* Introduce tx_amount and use it across test_wallet_clawback_claim_auto.

* Reapply b79ecd2 (got lost in the recent merge).

* Minor improvements to test_wallet_clawback_clawback:

* Introduce tx_amount and test_fees and use them to clarify test conditions.
* Remove no longer needed json.dumps(resp) call.
* Remove unneeded dict() call on a {} constructed dictionary.

* Remove accidental change (addendum to bebc87f).

* More tx_amount and test_fees.

* Remove no longer needed json import.

* Remove unneeded dict() calls on {} constructed dictionaries.

* Introduce tx_amount2 in test_clawback_resync and clarify state transitions.

* Clarify state transitions in test_wallet_make_transaction_hop.

* Simplify transaction_has_failed.

* Just some consistency.

* Remove unneeded check_balances calls.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2024-03-20 09:08:00 -07:00
Arvid Norberg 1cee7f1e63 Rust HeaderBlock (#17694)
* use rust version of HeaderBlock

* no need to validate objects passed from the main process to worker processes
2024-03-19 11:09:47 -07:00
dependabot[bot]andKyle Altendorf db5f1e5dcc build(deps-dev): bump types-setuptools from 69.1.0.20240217 to 69.1.0.20240310 (#17692)
* build(deps-dev): bump types-setuptools

Bumps [types-setuptools](https://github.com/python/typeshed) from 69.1.0.20240217 to 69.1.0.20240310.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-setuptools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* handle no-package case in `find_vdf_client()`

* more

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-03-19 09:13:37 -07:00
Arvid Norberg f861c1ed5c remove dead code in multiprocess_validation (#17720)
we never pass HeaderBlock objects to multiprocess_validation(), only FullBlocks. Remove all code that handles HeaderBlocks in the multiprocess_validation path
2024-03-18 10:28:02 -07:00
Kyle Altendorf 2eb3633bcb json.dumps(indent=2) (#17714) 2024-03-18 10:26:13 -07:00
Izumi Hoshino 2f3fce5c85 Added chia start daemon (#17704)
* Added `chia start daemon`

* Added a test case

* Fixed lint issues

* Reverted changes in `services_for_groups`

* Fixed coverage issue
2024-03-18 09:43:55 -07:00
Chris Marslender 71ced4c783 Add get_network_info to daemon (#17717)
* its also useful to have network info available from the daemon, vs having to ask whichever service(s) happen to be up

* Add test for get_network_info on daemon

* Fix precommit
2024-03-18 08:40:06 -07:00
Felix Brucker acaf7e0a3b Add use_delta_sync option (#17573)
* Add `use_delta_sync` option

* Use fixture for `use_delta_sync` bool param

* Add note in initial-config
2024-03-15 09:22:01 -07:00
Florin ChiricaandAmine Khaldi d4948afc94 Optimize DL get key by node. (#17680)
* Optimize DL get key by node.

* Fix KeyNotFoundError case.

* Update index name.

* Improve the exception check in test_get_node_by_key_with_overlapping_keys.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2024-03-15 09:19:38 -07:00
Earle Lowe 4e90ca2a12 turned concatenation of strings to f-strings (from eukub) (#17676)
turned concatenation of strings to f-strings
2024-03-15 09:17:40 -07:00
Kyle Altendorf a89222a428 move tests (#17209)
* prep

* verify source and installed tests match

* move

* remove move script
2024-03-14 10:19:20 -07:00
wjblanke a5972b9b8b new_unfinished_block2 support in seeder (#17684)
new_unfinished_block2
2024-03-13 22:57:24 -05:00
Kyle Altendorf 774f5c0493 flake8 ignore E226 (#17700) 2024-03-13 16:40:26 -07:00
Kyle Altendorf 368f69cf11 prettier (#17396)
* add prettier to pre-commit

* apply prettier.io
2024-03-13 13:41:04 -07:00
Earle Lowe 48e4039e58 Update black to 24.1.1 and update source as needed (#17499)
* Update source to black 24 spec

* update black to 24.1.1

* update pylint to ignore multiple-statements

* update test file

* black updates

* format updates

* Update test_network_protocol_files.py

* Update test_network_protocol_files.py
2024-03-13 11:08:19 -07:00
Arvid Norberg a7724e0387 tighten up the check for duplicate UnfinishedBlocks before requesting (#17606)
* tighten up the check for duplicate UnfinishedBlocks before requesting them

* improve comment. rename private member with an underscore prefix

* improve variable names
2024-03-13 09:07:36 -07:00
58cf78de04 Wallet Block Tools (#17580)
* Remove consensus logic in part from wallet tests

* Fix simulation test

* Test coverage

* test coverage

* Improve handling of block_list_input in WalletBlockTools's get_consecutive_blocks.

* Update tests/wallet/conftest.py

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>

* Address comments by @arvidn

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
2024-03-12 13:50:21 -07:00
Kyle Altendorf 4802d70b7b Revert "Delete unconfirmed Clawback TX" (#17681)
Revert "Delete unconfirmed Clawback TX (#16454)"

This reverts commit 59e7cd8e26.
2024-03-11 12:28:03 -07:00