Commit Graph
5861 Commits
Author SHA1 Message Date
Arvid Norberg c932324ec0 Bump chia rs 0.5.2 (#17505)
* bump chia_rs to 0.5.2

* specify the correct fixed-width integer types for rust bindings
2024-02-08 09:04:26 -08:00
Amine Khaldi 654d327729 Instruct the use of coin_puzzle_hash index to get_unspent_lineage_info_for_puzzle_hash (#17512)
Instruct the use of coin_puzzle_hash index to get_unspent_lineage_info_for_puzzle_hash.
2024-02-07 12:29:14 -08:00
Kyle Altendorf 9ed9abe1d7 allow non-ssl rpc clients (2) (#17510)
* allow non-ssl rpc clients (2)

* add missing tests

* another test
2024-02-07 12:28:37 -08:00
Kyle Altendorf a64aafae6d add time out assert data collection and presentation (#16831)
* add tests.ether

* add new tests/ether.py

* go time out assert

* remove unused JunitPropertyName

* rename to `tests/process_junit.py`

* fixup

* hinting and pylint

* fixup

* after install

* handle skipped tests

* --only plot_sync/

* better relative paths

* better relative paths

* todos

* todos

* tidy

* back to full test run

* add markdown headings

* just make results an artifact

$GITHUB_STEP_SUMMARY upload aborted, supports content up to a size of 1024k, got 6067k.

* also output the top 50 to the step summary

* Update process_junit.py

* Update process_junit.py
2024-02-06 11:19:02 -08:00
Amine Khaldi 8e7eafa934 Merge commit 'cbf3d7f252e93dcb8f02c2184931f257dce4656a' into checkpoint/main_from_release_2.2.0_cbf3d7f252e93dcb8f02c2184931f257dce4656a 2024-02-06 16:35:55 +01:00
StartToaster e553c45485 checkpoint: into main from release/2.2.0 @ 63417e765a (#17494)
Source hash: 63417e765a
Remaining commits: 2
2024-02-05 15:28:36 -08:00
Amine Khaldi 07fcecd02d Remove no longer used dataclasses import (#17495)
Remove no longer used dataclasses import.
2024-02-05 13:17:54 -08:00
Matt Hauff c6f1a57c56 Unify transaction pushing (#17458)
* Don't autopush transactions by default anywhere

* Remove ignore_max_send_amount

* Use TXConfig instead of pending_transactions for coin exclusion in spend_clawback_coins

* Unify transaction pushing into a single method

* Address offline comments by @emlowe

* Rework max send amount to be based on coin quantity rather than amount

* Inadvertent changes

* Test fixes

* Inadvertent change

* Bad import?

* Inadvertent changes?

* readd missing test
2024-02-05 10:34:47 -08:00
Amine Khaldi f8777ed559 Merge commit '63417e765aaff91fb30485577f86a4af55aba029' into checkpoint/main_from_release_2.2.0_63417e765aaff91fb30485577f86a4af55aba029 2024-02-05 18:47:03 +01:00
Amine Khaldi 35ab75309e Set 10 as the maximum number of items that get skipped if they won't fit in the block we're trying to create (#17489)
Set 10 as the maximum number of items that get skipped if they won't fit in the block we're trying to create.
2024-02-05 09:43:28 -08:00
Amine Khaldi 5de7e4a338 Speedup TradeStore's add_trade_record (#17491)
Speedup TradeStore's add_trade_record.
2024-02-05 08:47:05 -08:00
Amine Khaldi a3f2f8f0d4 Speedup TradeStore's _get_new_trade_records_from_old (#17492)
Speedup TradeStore's _get_new_trade_records_from_old.
2024-02-05 08:46:50 -08:00
Arvid Norberg cbf3d7f252 bump farmer block fill rate to 60% (#17477)
* bump farmer block fill rate to 60%

* Amine's patch to fixup test_create_bundle_from_mempool_on_max_cost
2024-02-05 08:44:20 -08:00
Earle LoweandKyle Altendorf 63417e765a Add support for generating and verifying DataLayer Proofs of Inclusions (#16845)
* initial implementaion of get_proof and verify_proof for datalayer

* Add wallet RPC and stop using offer blobs

* Don't require DL wallet to validate DL proof

* Convert to dl_verify_proof to free function

* More updates to DL proofs get/verify

* More updates to DL proofs get/verify

* More updates to DL proofs get/verify

* remove some unused verification functions

* oops deleted some important things

* fix type

* Add tests for DL proofs

* WIP using streamable classes for RPC

* Tests pass with new serializable classes

* use clvm tree hash calls instead of magic numbers and std_hash

* expanded tests to include more ways to call the same thing

* minor tests updates from feedback

* add in CLI tests

* Add separate create_multiple_keys_option

* Add helper and fixup key option

* Update tests/core/data_layer/test_data_rpc.py

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

* Add layer of indirection for the proof response

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-02-05 08:35:28 -08:00
Earle Lowe 5d3eb6cc43 Daemon: use msg queue and specific task for handling status messages (#17411)
* Add msg queue for status messages

* Add some tests for keyring status messages

* Address some comments
2024-02-01 22:57:09 -08:00
Felix Brucker 23e003aaae Fix negative plot sync durations not crashing the harvester (#17444)
* Fix negative plot sync durations

* Remove unnecessary try/except
2024-02-01 22:56:49 -08:00
Florin Chirica 221dab4f8a Improve timelord skip peak logic. (#17302) 2024-01-31 17:28:36 -08:00
Amine Khaldi b846816f26 Don't convert serialized programs to programs before passing them to get_inner_puzzle_from_singleton (#17452)
Don't convert serialized programs to programs before passing them to get_inner_puzzle_from_singleton.
2024-01-31 17:28:01 -08:00
Amine Khaldi 1977c2d7c1 Augment conditions_dict_for_solution and conditions_for_solution to accept both types of programs (#17451)
Augment conditions_dict_for_solution and conditions_for_solution to accept both programs and serialized programs.

This allows us to use serialized programs without the need to convert them into programs.
2024-01-31 17:27:49 -08:00
Kyle Altendorf 2dd45157d3 ensure signal objects for signal handlers (#17123)
* ensure signal objects for signal handlers

* Update misc.py

* black
2024-01-31 13:37:10 -08:00
Matt HauffandAmine Khaldi 9bdc17868d Stop automatic transaction pushing by wallets (#17436)
* Don't autopush transactions by default anywhere

* Remove ignore_max_send_amount

* Use TXConfig instead of pending_transactions for coin exclusion in spend_clawback_coins

* Address offline comments by @emlowe

* Rework max send amount to be based on coin quantity rather than amount

* merge fixes

* Inadvertent diffs

* Inadvertent change

* Inadvertent diff.

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
2024-01-31 12:33:41 -08:00
Amine Khaldi 3f8248275d Improve Offer's from_spend_bundle (#17450)
Improve Offer's from_spend_bundle.

* Improve constructing nonce.
* Remove incorrect annotation for payment_args_list (it's an iterator not a list).
2024-01-31 12:33:35 -08:00
Kyle Altendorf 6fe2c9c58a use psutil.cpu_affinity() instead of os.cpu_count() (#17409)
* use `psutil.cpu_affinity()` instead of `os.cpu_count()`

* go simple for darwin

* assert, yay!
2024-01-31 09:28:37 -08:00
Felix Brucker 728f956804 Update pool url on redirect (#17384)
* Update pool url on redirect

* Add tests

* Only persist the new url when it's a permanent redirect

* Remove unused pool_info overrides
2024-01-31 09:28:06 -08:00
Gene Hoffman 8baead2d7a Update "Could not find parent coin" error log to print hex and not bytes (#17373)
Update "can not find parent coin" error log
2024-01-31 09:27:02 -08:00
Amine Khaldi eb5cb60318 Properly construct bytes32 values for recovery_list_hash and launcher_id in did_find_lost_did (#17427)
Properly construct bytes32 values for recovery_list_hash and launcher_id in did_find_lost_did.

recovery_list_hash.atom is optional bytes and launcher_id was bytes.
2024-01-30 09:41:32 -08:00
Amine Khaldi f6f0982b50 Improve did_get_info (#17426)
Improve did_get_info.

* Check optional values.
* Compute launcher_id only once and reuse it.
* Simplify computing solution.
* Compute coin state's coin ID only once.
* Improve constructing hints using only one dictionary lookup.
2024-01-30 09:33:48 -08:00
Amine Khaldi 9b9ded8d3b Annotate p2_puzzle_hash.py (#17424)
Annotate p2_puzzle_hash.py.
2024-01-30 09:33:15 -08:00
Amine Khaldi ecad544f0c Annotate p2_delegated_conditions.py (#17423)
Annotate p2_delegated_conditions.py.
2024-01-30 09:33:01 -08:00
Amine Khaldi 5f4b95f906 Annotate lineage_proof.py (#17422)
Annotate lineage_proof.py.
2024-01-30 09:32:43 -08:00
Amine Khaldi b885f7ebe2 ProposalInfo's passed and closed are not optional (#17420)
ProposalInfo's passed and closed are not optional.
2024-01-30 09:32:11 -08:00
Matt Hauff aeecaca663 Remove ignore_max_send_amount (#17418)
* Remove ignore_max_send_amount

* Address offline comments by @emlowe

* Rework max send amount to be based on coin quantity rather than amount
2024-01-29 14:31:42 -08:00
StartToaster c4eea85b72 Remove Announcement class in favor of Condition subclasses (#17377)
Recreation of PR #16384

checkpoint: into main from long_lived/vault @
f96aaee604
Remaining commits: 16
2024-01-29 10:49:12 -08:00
Arvid Norberg fdd480dfb3 use rust implementation of CoinSpend (#17408) 2024-01-29 10:03:57 -08:00
0ae3b2823f Support for third-party, farmer-rewarded, Harvesters (#16717)
* Begin add to support for third-party fee-based harvesters

Signed-off-by: Harold Brenes <h.brenes@chia.net>

* Return FoliageBlockData back to Farmer from FullNode

* Send FoliageBlockData all the way to the harvester, if requested

* Preparing tests for 3rd party  harvester support

* Continue writing tests for 3rd party harvester

* Some cleanup. Drafting

* Test full message chain of third-party Harvester reward overwrite.

Added test that validates messages between Farmer, Harvester and FullNode
to ensure that the correct data is used when an overwritten farmer reward
address is given by a third-party Harvester service.

* Changing Harvester signature request flow
to include original data, if requested.

This makes it so that NewSignagePoint unconditionally
always includes the source of the SP hashes.

* Fix incorrect field name

* Harvester can ask for original signing data without
 overwriting the reward address also.

* Update test_farmer_handles_farmer_reward_address_override to reflect changes.

- Correct farmer API get the correct data source for the signage point signature request.
- Trivial fixes

* Removing some obsolete stuff

* Trivial

* Fix tests in updated harvester protocol

- Fix including source data when
include_source_signature_data is set.

- Set source data fields optional.

- Update test so that a timelord is started and we get proper signage points
instead of aritficial ones. This helps us
make sure we test for all the source data
cases needed from the full node.

* Refactor harvester source signing data test

- Remove older harvester signing data test
 (had missing coverage for data)

- Add harvester fee convention logging

- Begin fee convention logging test

- Refactor fixtures for harvester enhancement protocol tests

Start harvester

* Complete test for harvester fee convention

* Update SignatureRequestSourceData message

- SignatureRequestSourceData is now serialized as enum + bytes.

- Update usage locations for SignatureRequestSourceData.

- Update tests to reflect this

* Missing test from last commit

* Revert to explicit None checks, instead of relying on truthiness

Revert scratch work

* Linting

* adjust for anyio

* Moe linting

* mypy fixes

* Documentation comments

* Move third-party harvester protocol tests

Moved to own directory in order to enable `install_timelord = True`

* mypy fixes

* checkout_blocks_and_plots = True

* Update some log messages, syntax and docs

* Bump timeout in tests

* Update protocol message types for
harvester and farmer for test_missing_messages`

* Regenerate protocol message data for protocol tests

* Remove timelord requirement for tests.

Inject pre-generated signage points and blocks instead.

* Linting

* More linting

* More linting

* Merge from main and lint again

* Remove customized test plots requirements

* Rebase fix

* Coverage update

- Update valid fee quality test to be unit, instead of pseudo-integration.
- New test for invalid fee quality.
- More explicit messaging for invalid fee qualities.
- Explicitly comment out uncovered case in test.
- Update types for mypy.

* Lint

* Lint

* Lint, better logs

* add protocol file tests

* coverage

* Update formatting in fee quality logging

* Rebase fix

* Regenerate protocol_message_bytes-v1.0

---------

Signed-off-by: Harold Brenes <h.brenes@chia.net>
Co-authored-by: Harold Brenes <h.brenes@chia.net>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Harold Brenes <152330941+haorldbchi@users.noreply.github.com>
Co-authored-by: arvidn <arvid@libtorrent.org>
2024-01-26 15:07:30 -08:00
Amine Khaldi a6827c2e92 Singleton fast forward (#16919)
Initial iteration of singleton fast forward.
2024-01-26 13:20:42 -08:00
Arvid Norberg bdfffca5ab improve handling of UnfinishedBlocks (#17247)
* update full_node_store to support multiple UnfinishedBlocks with the same reward hash

* extend full node store to support recording outstanding requests for v2 unfinished blocks

* add test for full_node_store

* simplify creation of UnfinishedBlock in test_full_node.py

* extend UnfinishedBlock protocol to support distinguishing between unfinished blocks with the same partial hash but different foliage

* add test for NewUnfinishedBlock and NewUnfinishedBlock2

* when asking the full_node_store for an unfinished block, only by its partial hash; return the highest ranking (lowest foliage tx block hash)
2024-01-26 13:20:03 -08:00
Earle Lowe cde5fc1f22 Code Cleanup: Fix overly broad exception handler (#16136)
* Fix overly broad exception handler

* try to parse metadata and continue on errors

* Update wallet_rpc_api.py
2024-01-26 09:55:47 -08:00
Kyle Altendorf c49cf8ca38 just use os.cpu_count() (#17379) 2024-01-25 16:49:42 -08:00
Amine Khaldi b3def03a63 Simplify mempool item's starting cost at create_bundle_from_mempool_items (#17403)
Simplify mempool item's starting cost at create_bundle_from_mempool_items.
2024-01-25 16:49:08 -08:00
Amine Khaldi c58baa6850 Explicitly check that mempool manager's peak (optional) is not None in SimClient's push_tx (#17404)
Explicitly check that mempool_manager's peak (optional) is not None in SimClient's push_tx.
2024-01-25 16:45:34 -08:00
Arvid Norberg 9a6de18394 fix typo in logging (#17401) 2024-01-25 10:14:11 -08:00
Amine Khaldi 8eb6d6aa5a Explore looking beyond mempool items that hit the maximum cost limit (#17346)
Explore looking beyond mempool items that hit the maximum cost/fee limits.
2024-01-25 09:59:53 -08:00
Amine Khaldi 41a09e92f0 Annotate singleton_top_layer.py (#17358)
Annotate singleton_top_layer.py.
2024-01-25 09:59:33 -08:00
Amine Khaldi a3099b03c4 Remove no longer needed remove_singleton_truth_wrapper (#17383)
Remove no longer needed remove_singleton_truth_wrapper.
2024-01-24 13:09:06 -08:00
Mike White d5188c75b5 Add additions and removals to get_offer_summary API response (#17333)
Add additions and removals to offer summary rpc
2024-01-24 13:08:48 -08:00
Matt f7ec00c152 Merge remote-tracking branch 'origin/main' into quex.remove_announcement_main 2024-01-23 12:17:31 -08:00
Arvid Norberg 68e2afae21 improve mempool reorg logic when the peak is a non-transaction block (#17370) 2024-01-23 11:03:41 -08:00
Arvid Norberg 0bf842cdef undo BlockRecord cache insert, when DB fails (#16909)
* when we fail to insert a block in the DB, we undo the insertion into the block cache in BlockStore, but we currently don't undo the insertion of the block record into the block-record cache in Blockchain.

* roll back fork-info in case we fail to add a block to the DB

* improve logging
2024-01-23 10:56:24 -08:00
Amine Khaldi a2162903a6 Annotate nft_puzzles.py (#17356)
Annotate nft_puzzles.py.
2024-01-23 10:09:21 -08:00