Commit Graph
5861 Commits
Author SHA1 Message Date
Arvid Norberg cc4e2d83a1 add feature to profile just the block validation (#17168)
add feature to profile just the block validation. This exposes what is actually going on while we validate blocks. Sometimes the block validation times are affected by other tasks that hog the CPU, blocking the main co-routine from being scheduled
2024-01-04 10:53:13 -08:00
StartToaster a9e0d11438 cherry-pick: into main RPC marshaller (#17201)
Recreates #16865 targeting main
2024-01-04 10:15:20 -08:00
Amine Khaldi f113aa4359 Annotate did_wallet_puzzles.py (#17153)
Annotate did_wallet_puzzles.py.
2024-01-03 12:59:32 -08:00
Amine Khaldi 03d927b36b No need to return None in dl_track_new and dl_stop_tracking (#17145)
No need to return None in dl_track_new and dl_stop_tracking.
2024-01-03 12:25:19 -08:00
Amine Khaldi d317b47575 Simplify get_new_did_innerpuz (#17148)
Simplify get_new_did_innerpuz.
2024-01-03 12:23:55 -08:00
Amine Khaldi 6d1898ce12 Remove DID wallet's get_frozen_amount (#17151)
Remove DID wallet's get_frozen_amount.

It's not referenced anywhere, and it relies on get_frozen_balance from WSM which doesn't exist.
2024-01-03 12:22:39 -08:00
Matt Hauff abe5c99d4f Add a marshaller for RPC APIs (#16865)
The handling of RPC requests and responses is pretty scattered and prone
to error right now. This change proposes a way to specify concrete types
for both the request and response of an RPC and have the parsing of
dictionaries occur auto-magically due to a decorator. Something similar
exists for data layer RPCs but this proposal tries to focus heavily on
the ergonomics of writing a new API and therefore handles more behavior
behind the scenes and leans on the `Streamable` library for the business
logic.

Writing a new RPC should now look like this:
```
<in some other file probably>
@streamable
@dataclass(frozen=True)
class MyNewRPCRequest(Streamable):
  class_var_1: SomeType

@streamable
@dataclass(frozen=True)
class MyNewRPCResponse(Streamable):
  class_var_2: SomeOtherType

<in *_rpc_api.py>
@marshal
async def new_rpc(self, request: MyNewRPCRequest) -> MyNewRPCResponse:
  ...
```
2024-01-03 10:50:10 -08:00
Arvid Norberg e80ab1c275 Mempool logging (#17161)
* name worker processes based on what they are used for

* log queue length of mempool spend bundle validation

* improve logging of block validation

* log spendbundle pre-validation time for individual bundles, not the time to drain the queue
2024-01-03 09:27:32 -08:00
Kyle Altendorf b5a58e4998 enable ssl_context deprecation warning and fix it (#17127)
* enable ssl_context deprecation warning and fix it

* one case

* a few more

* yup

* one more
2024-01-02 17:07:31 -08:00
Kyle Altendorf 512f7b9fc5 make sure keyring file gets closed (#17126)
* make sure keyring file gets closed

* Update file_keyring.py
2024-01-02 17:06:39 -08:00
Matt Hauff fa02c05633 Remove coin_solutions from SpendBundle entirely (#17140)
* Remove coin_solutions from SpendBundle (nearly) entirely

* fix test
2024-01-02 10:46:12 -07:00
Arvid Norberg 57a59abde0 remove redundant cost field in NPCResults (#17167) 2024-01-02 10:45:23 -07:00
Kyle Altendorf cd78dbafdd eliminate polling in full node for processed tx (#17171) 2023-12-27 09:15:29 -06:00
Amine Khaldi 1f060d4580 Don't verify right after signing, and as a result don't re-verify the aggregated version, in sign_coin_spends (#17143)
Don't verify right after signing, and as a result don't re-verify the aggregated version, in sign_coin_spends.
2023-12-27 09:07:15 -06:00
Amine Khaldi 4a44043638 Bail out earlier if the transaction record has no spend bundle in generate_new_decentralised_id (#17129)
Bail out earlier if the transaction record has no spend bundle in generate_new_decentralised_id.
2023-12-27 09:06:57 -06:00
Amine Khaldi c431c6675c Merge commit '507899ff19b0d0bbe14bc7ed8a192f5ad0bc7aa2' into checkpoint/main_from_release_2.1.4_507899ff19b0d0bbe14bc7ed8a192f5ad0bc7aa2 2023-12-23 00:24:41 +01:00
Amine Khaldi 3a2be22c44 Merge commit 'a4cab829edd4f16dd89b29c7234ed39c23c5dcaa' into checkpoint/main_from_release_2.1.4_a4cab829edd4f16dd89b29c7234ed39c23c5dcaa 2023-12-22 23:29:59 +01:00
Arvid Norberg 507899ff19 Mempool multifetch (#17139)
* update type annotation for CoinStore.get_coin_records to support both List and Set

* update the mempool to fetch multiple coin records per query

* optimize the slow-path of updating the mempool by fetching all coin records up-front, in a single sql query
2023-12-22 16:29:39 -06:00
wjblanke a4cab829ed Performance tweaks (#17155)
* changed default peers from 80 to 40. switched auto db_sync default to NORMAL instead of FULL

* fixed default

* add defaults to config query
2023-12-22 16:28:31 -06:00
Chris Marslender 739b0d84b8 checkpoint: into main from release/2.1.4 @ 55c064a292 (#17141)
Source hash: 55c064a292
Remaining commits: 0
2023-12-22 08:32:34 -06:00
Amine Khaldi ae193db2e8 We no longer need to select cost and fee here. 2023-12-22 10:41:12 +01:00
Amine Khaldi 683ad4fee2 Remove confusing coinsol value (it's rather a coin spend) in create_spend_for_message (#17133)
Remove confusing coinsol value (it's rather a coin spend) in create_spend_for_message.
2023-12-21 21:58:09 -06:00
Amine Khaldi 23f43535cf Simplify request construction in send_transaction_multi for wallet RPC client (#17130)
Simplify request construction in send_transaction_multi for wallet RPC client.
2023-12-21 21:57:00 -06:00
Kyle Altendorf 1df7f5f8df Merge commit '55c064a29215d78393b3b37f2c3029c100560e12' into checkpoint/main_from_release_2.1.4_55c064a29215d78393b3b37f2c3029c100560e12 2023-12-21 20:41:32 -05:00
Arvid Norberg 55c064a292 improve performance of total_mempool_fees() and total_mempool_cost() (#17107)
* improve performance of total_mempool_fees() and total_mempool_cost()

* log when updating the mempool using the slow-path

* extend test to ensure total-cost and total-fee book-keeping stays in sync with the DB

* lower mempool size from 50 blocks to 10 blocks
2023-12-21 18:02:13 -06:00
Arvid Norberg 9599f40219 extend the mempool tests for timelocks, and improve error codes (#17105) 2023-12-21 14:34:11 -06:00
Amine Khaldi eb445d3a68 Explicitly name fields to improve clarity and avoid mistakes (#17119)
Explicitly name fields to improve clarity and avoid mistakes.
2023-12-21 12:24:53 -06:00
Amine Khaldi 38516f7611 Allow DID's create_innerpuz to take p2_puzzle or hash, and document the use cases (#17116)
Allow DID's create_innerpuz to take p2_puzzle or hash, and document the use cases.
2023-12-20 20:50:20 -06:00
Amine Khaldi 4763b9b4e0 Allow construct_cat_puzzle to take either inner puzzle or hash and document the use cases (#17112)
Allow construct_cat_puzzle to take inner_puzzle (Program) or hash (bytes32) and document the use cases.
2023-12-20 20:48:50 -06:00
Amine Khaldi 6383993f78 Simplify request construction in send_transaction for wallet RPC client (#17111)
Simplify request construction in send_transaction for wallet RPC client.
2023-12-20 20:38:34 -06:00
Amine Khaldi f7aed3a472 Address and remove DAO related files from flake8's exclusion list (#17109)
Address and remove DAO related files from flake8's exclusion list.
2023-12-20 20:38:02 -06:00
Arvid Norberg 2022d6e95e slight simplification to get_min_fee_rate() (#17092) 2023-12-19 12:08:54 -06:00
Florin Chirica a168093c91 Improve input for DL CLI add_missing_files. (#17060) 2023-12-19 12:04:11 -06:00
Florin Chirica 42d9048a79 DL upsert. (#17011) 2023-12-19 11:48:49 -06:00
Florin Chirica ebf0c00a21 DL: Use unsubscribe queue to relax subscriptions lock. (#17068) 2023-12-19 10:59:27 -06:00
dependabot[bot]andKyle Altendorf 1e4bb69b9a build(deps): bump concurrent-log-handler from 0.9.24 to 0.9.25 (#17046)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-12-19 10:59:00 -06:00
Arvid Norberg 18c28d6a77 initiate phasing out of the coin_solutions name in JSON structs (#17089) 2023-12-19 10:58:43 -06:00
Kyle Altendorf 5b210a4060 Merge commit 'a6730326e202c0bd6f0b013fdae357c628f28fde' into checkpoint/main_from_release_2.1.3_a6730326e202c0bd6f0b013fdae357c628f28fde 2023-12-18 17:49:10 -05:00
Chris Marslender e4c5b9e6c3 checkpoint: into main from release/2.1.3 @ 788db8bdff (#17081) 2023-12-18 16:47:13 -06:00
Arvid Norberg d52612589c bump chia_rs to 0.3.3 (#17074) 2023-12-18 12:22:39 -06:00
Amine Khaldi f14383805e Merge commit '788db8bdffdebc612fbb97973fc0312a76fe3955' into checkpoint/main_from_release_2.1.3_788db8bdffdebc612fbb97973fc0312a76fe3955 2023-12-18 18:55:16 +01:00
Kyle Altendorf a6730326e2 revert StructStream.__bytes__() to a working state instead of intentional failure (#17075) 2023-12-18 11:50:59 -06:00
Abachrombie f1fcd43434 fixed typo, it's -> its (#17076) 2023-12-18 11:12:52 -06:00
Arvid Norberg 788db8bdff Fix compressed blocks (#17071) 2023-12-18 10:48:21 -06:00
Marvin Quevedo 99ba21ab2b Verify p2 delegated conditions signatures (#17054) 2023-12-18 10:42:00 -06:00
Kyle Altendorf 22af705da6 tiny comment typo correction (#17057) 2023-12-15 09:59:53 -06:00
Arvid NorbergandKyle Altendorf 799f3b2ea2 fix type hints in data layer (#17062)
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-12-15 09:58:58 -06:00
Arvid Norberg 7a1596a7bc fix DAO type hints (#17061) 2023-12-15 09:58:47 -06:00
Arvid Norberg 2cc03be2fb SerializedProgram updates (#16926) 2023-12-14 12:53:43 -06:00
Arvid Norberg e0a218c6fb fix type annotation for solve_did_tp (#17056) 2023-12-14 09:47:54 -06:00