3669 Commits
Author SHA1 Message Date
Arvid NorbergandGitHub 8118629e2a address issue in looking up cached block generator (#17622) 2024-03-04 10:36:04 -08:00
320d881591 Send RewardChainBlockUnfinished to third-party harvesters (#17435)
* Send RewardChainBlockUnfinished to the harvester

- Simplify data pasing in request_signed_values

* Fix instances where the rc_block_unfinished must be sent

* Lint, fix test, generate protocol messages

* Rate Limit Adjustment for RequestSignedValues (#17481)

* Further bump request_signed_values rate limit

---------

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
Co-authored-by: Luna <96448399+DaOneLuna@users.noreply.github.com>
2024-02-14 11:09:58 -08:00
Earle LoweandGitHub d3d0f1b981 Use Datalayer banning logic for HTTP download failures (#17515)
* use server_missed_file when http download fails

* Add test that we ban servers on http download failure
2024-02-14 11:09:46 -08:00
Matt HauffandGitHub fce56b9457 Fix flaky DID test (#17509) 2024-02-07 12:26:48 -08:00
Matt HauffandGitHub 7747a0ddd1 Fix flaky trade test (#17508) 2024-02-07 12:26:30 -08:00
Arvid NorbergandGitHub 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
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
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 KhaldiandGitHub a6827c2e92 Singleton fast forward (#16919)
Initial iteration of singleton fast forward.
2024-01-26 13:20:42 -08:00
Arvid NorbergandGitHub 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
Kyle AltendorfandGitHub c49cf8ca38 just use os.cpu_count() (#17379) 2024-01-25 16:49:42 -08:00
Arvid NorbergandGitHub 9a6de18394 fix typo in logging (#17401) 2024-01-25 10:14:11 -08:00
Amine KhaldiandGitHub 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
Mike WhiteandGitHub 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
Kyle AltendorfandGitHub 61055edac5 add test that chia is installed when in ci (#17223)
* add test that chia is installed when in ci

* Update test_installed.py
2024-01-23 14:50:16 -08:00
Arvid NorbergandGitHub 68e2afae21 improve mempool reorg logic when the peak is a non-transaction block (#17370) 2024-01-23 11:03:41 -08:00
Matt HauffandGitHub aac1792192 Port get_notifications RPC to RPC marshaller (#17283)
* Port get_notifications RPC to RPC marshaller

* Fix test (I hate this)

* Don't use string formatting in SQL query

* rename notification member variable

* Missed a couple?

* Suggestion by @altendky (w/ black fix >:( )
2024-01-23 10:05:39 -08:00
RigidityandGitHub f742e4e515 Add way to get coin states in batches (#17300)
* Add way to get coin states in batches

* Remove partial blocks from coin state batches

* Fix logic and improve tests

* Change state batching to have fixed limit of 15,000 and test more

* Remove unnecessary parens

* Simplify batch finalization logic

* Improve filter query logic

* Improve feature test coverage

* Cleanup code and simplify finished logic

* Fix many coin states test

* Parametrize tests

* Sort by height and ensure results are in order

* Remove unnecessary test function

* Use if instead of elif

* Improve test

* Test fixture for random coin data

* Add comment explaining 15000 limit
2024-01-23 10:05:10 -08:00
Amine KhaldiandGitHub 58bd2a90fb Annotate test_simple_sync_protocol.py (#17364)
Annotate test_simple_sync_protocol.py.
2024-01-23 10:01:38 -08:00
Amine KhaldiandGitHub 28aace130d Annotate test_singleton_lifecycle_fast.py (#17362)
Annotate test_singleton_lifecycle_fast.py.
2024-01-22 09:34:28 -08:00
Kyle AltendorfandGitHub 4711c52fcd fix duplicates file and upload name uniqueness (#17354)
* fix duplicates file name and upload artifact name uniqueness

* test it

* fix

* again

* Revert "test it"

This reverts commit b64956208d.

* add missing single quotes
2024-01-21 08:17:55 -06:00
Amine KhaldiandGitHub 2c502dea95 Compute and reuse launcher_id (#17360)
Compute and reuse launcher_id.
2024-01-19 20:51:37 -06:00
Arvid NorbergandGitHub 28942934ff extend Block validation timing logs to measure just the CLVM and conditions (#17275)
extend Block validation timing logs to measure just the CLVM and condition parsing
2024-01-19 14:12:44 -06:00
Amine KhaldiandGitHub e26c2de739 Parallelize tests up to 4 instead of 6 for Windows (#17365)
Parallelize tests up to 4 instead of 6 for Windows.
2024-01-19 14:07:34 -06:00
Arvid NorbergandGitHub 42762bcb7c use rust implementation of SerializedProgram (#17297) 2024-01-19 11:38:15 -06:00
Izumi HoshinoandGitHub d4ff6ef448 Fixed an issue where chia wallet did transfer command mistreats the type of fee (#15138)
* Fixed an issue where `did_tranfer_did` mistreated the unit of `--fee`

* Fixed test
2024-01-19 11:37:52 -06:00
Amine KhaldiandGitHub 4922f975af Simplify checking for all unspent coins' count in test_dusted_wallet (#17363)
Simplify checking for all unspent coins' count in test_dusted_wallet.
2024-01-19 11:00:09 -06:00
Amine KhaldiandGitHub 4274e89328 Annotate test_wallet_blockchain.py (#17361)
Annotate test_wallet_blockchain.py.
2024-01-19 11:00:01 -06:00
Amine KhaldiandGitHub f1d8b77704 Remove no longer needed TestSimpleSyncProtocol class (#17359)
Remove no longer needed TestSimpleSyncProtocol class.
2024-01-19 10:59:51 -06:00
Amine KhaldiandGitHub 71c8223f02 Use Monkeypatching for request_proof_of_weight and request_block_header in test_bad_peak_mismatch (#17311)
Use Monkeypatching for request_proof_of_weight and request_block_header in test_bad_peak_mismatch.
2024-01-18 12:41:10 -06:00
Amine KhaldiandGitHub a752d6d4cc Wait for wallet_node_maker to sync before creating nft_wallet_maker in test_nft_mint_from_did_rpc_no_royalties (#17353)
Wait for wallet_node_maker to sync before creating nft_wallet_maker in test_nft_mint_from_did_rpc_no_royalties.
2024-01-18 11:51:10 -06:00
Amine KhaldiandGitHub a6add85264 Wait for wallet_node_maker to sync before creating nft_wallet_maker in test_nft_mint_from_did_rpc (#17352)
Wait for wallet_node_maker to sync before creating nft_wallet_maker in test_nft_mint_from_did_rpc.
2024-01-18 11:51:03 -06:00
Amine KhaldiandGitHub 68ebec0efd Wait for wallet_node_maker to sync before creating nft_wallet_maker in test_nft_mint_from_xch_rpc (#17351)
Wait for wallet_node_maker to sync before creating nft_wallet_maker in test_nft_mint_from_xch_rpc.
2024-01-18 11:50:51 -06:00
Earle LoweandGitHub 78a793e5f2 Increase to 6 pytest threads (#17349) 2024-01-18 08:16:43 -06:00
Arvid NorbergandGitHub c6d5f7fa1e use rust types for slots, SubEpochSummary and SubEpochData (#17298)
* use rust types for slots, SubEpochSummary and SubEpochData

* use rust type for EndOfSubSlotBundle

* use rust types for SubEpochChallengeSegment, SubEpochSegments and SubSlotData
2024-01-16 11:04:49 -06:00
Amine KhaldiandGitHub f604e87bf1 Remove unneeded singleton_wallet in filter_p2_singleton (#17315)
Remove unneeded singleton_wallet in filter_p2_singleton.
2024-01-16 09:23:49 -06:00
Amine KhaldiandGitHub a2be9b7667 Clarify checking compute_memos results (#17312)
Clarify checking compute_memos results.
2024-01-16 09:23:18 -06:00
Amine KhaldiandGitHub aaa16865a6 Simplify getting wallet spendable coins' count in test_dusted_wallet (and correct its type) (#17310)
Simplify getting wallet spendable coins' count in test_dusted_wallet (and correct its type).
2024-01-16 09:22:56 -06:00
Kyle AltendorfandGitHub 78b7904fda switch transaction queue completion to a new ValuedEvent (#17305)
* switch transaction queue completion to a new `ValuedEvent`

* add tests
2024-01-16 09:22:42 -06:00
Amine KhaldiandGitHub 76ac3a8d2b Extract and reuse get_tx_count (#17309)
Extract and reuse get_tx_count.
2024-01-12 16:56:45 -06:00
Amine KhaldiandGitHub e7b41a6d73 find_interesting_singletons doesn't need to take puzzle_db (#17321)
find_interesting_singletons doesn't need to take puzzle_db.
2024-01-12 15:51:56 -06:00
Amine KhaldiandGitHub 40a7765b6a Reuse launcher_id in launcher_conditions_and_spend_bundle (#17322)
Reuse launcher_id in launcher_conditions_and_spend_bundle.
2024-01-12 15:16:00 -06:00
Matt HauffandGitHub d677140632 Fix inaccurate test (#17319) 2024-01-12 15:15:28 -06:00
Amine KhaldiandGitHub 68ce8c527c Remove no longer needed TestWalletBlockchain class (#17317)
Remove no longer needed TestWalletBlockchain class.
2024-01-12 15:15:20 -06:00
Amine KhaldiandGitHub 9280862c86 Reuse zero_ph across tests (#17314)
Reuse zero_ph across tests.
2024-01-12 15:15:12 -06:00
Amine KhaldiandGitHub 0d98352088 No need to return lineage_proof from launcher_conditions_and_spend_bundle (#17313)
No need to return lineage_proof from launcher_conditions_and_spend_bundle.
2024-01-12 15:15:02 -06:00
Matt HauffandGitHub dd26d00e22 Fix sorted for dictionary keys of both bytes/xch (#17270)
* Fix sorted for dictionary keys of both bytes/xch

* Fix parameterizations
2024-01-12 10:39:09 -06:00
Florin ChiricaandGitHub 17206eea2e Add DL mirrors test. (#17125) 2024-01-12 10:03:56 -06:00
Florin ChiricaandGitHub 38ff6657f4 Add test for DL kv_diff for upsert. (#17103) 2024-01-12 10:03:46 -06:00
Florin ChiricaandGitHub 41c69f5144 DL Compress get_keys_values output by hash. (#17243)
* DL Compress get_keys_values output by hash.

* Lint.

* Lint.

* Lint.

* Remove get_node from delete.
2024-01-12 09:41:00 -06:00