* bump chia_rs to 0.31.0
* integrate new pos2 API from chia_rs into V2Prover
* fixup test_harvester_api mocking of Prover
* review-comments: rename get_quality() to get_string() on Quality protocol
* reivew comments
* fixup bump chia_rs
* restore quality string to bytes32
compute plot filter on the harvester instead of passing it in the NewSignagePointHarvester protocol message. With v2 plots the plot filter will differ, so it depends on which plot we find a proof in
* bump chia_rs
* update db_graftroot test
* refactor new pos format
* fix merge
* fix import
* fix missing param in test
* merge fixes/review fixes
* test prev_tx_block
* ermove double line
* # TODO: todo_v2_plots
* fix conftests monkeypatch
* fix spelling
* remove redundant merge code
* move prev_tx test
* add not impemented test to proof of space v2
* merge duplication fix
* fix typo, raise dont assert
* bump protocol, phase out test
* integer math
* add overflow case to test
---------
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
<!-- Merging Requirements:
- Please give your PR a title that is release-note friendly
- In order to be merged, you must add the most appropriate category
Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing
functionality, improve performance, or reduce complexity?) -->
The modules `chia.protocols` and `chia.server` form a dependency loop.
This change at least removes the direct dependency of `chia.protocols`
on `chia.server`.
### Purpose:
<!-- Does this PR introduce a breaking change? -->
### Current Behavior:
### New Behavior:
<!-- As we aim for complete code coverage, please include details
regarding unit, and regression tests -->
### Testing Notes:
<!-- Attach any visual examples, or supporting evidence (attach any
.gif/video/console output below) -->
* Initial draft of mempool updates [skip ci]
* More implementation work, but capability issue [skip ci]
* Temp (will probably revert)
* Get first test passing
* Setup spent coin tests
* Add unrelated test data to make tests better
* Refactor test
* Finish testing
* Update tests
* Include removal reason and block inclusion tests
* Remove unnecessary dict
* Add missing message to test
* Fix after rebase
* Broadcast support from node for mempool updates
* Remove redundant code
* Use new_block
* Filter and early return suggestions
* Reword comments on PeakPostProcessingResult
* Improve mempool fn name and doc comment
* Bump wallet protocol version
* Add ratelimits
* Add tests for querying mempool items
* Asserts and more tests
* Add peers for spend bundle tests
* Move capabilities underneath Capability
* Split default capabilities for each service
* Make get_capabilities take in node_type
* Remove optionality
* Refactor get_capability_overrides
* New wallet sync protocol
* New updates to protocol and initial tests
* Bump new message ids
* Bump protocol version
* Update existing messages
* Implementation of TransactionAddedUpdate
* Improve unit tests
* Update protocol and tests to use previous height
* Testing tweaks
* Remove transaction subscriptions
* Update protocol tests
* Fix request_coin_state test
* Improve test suite, add min_amount, fix bugs
* Update protocol message serialization tests
* Resolve conflicting file
* Remove old hint store code
* Remove transaction added protocol type
* Make height optional for genesis challenge
* Test subscribe after initial state and dedupe ids in that case
* Forcing an empty commit.
* Fix new protocol tests
* Improve performance of clearing subscriptions
* Add more amounts to coin store test
* Lower max items for coin store test
* Fix test coverage, set lower max response items
* Remove add_puzzle_subscriptions and remove_puzzle_subscriptions from protocol
* Update protocol message list test
* Fix valid reply len
* Fix performance issue in query and add error codes
* Add missing message to regression tes
* Add rate limits
* Add test for hint store get_coin_ids_multi
* Increase max puzzle hash batch size and make it a constant
* Use actual params on to_bytes
* Fix test
* Actually check output of no puzzle hash coin state test
* 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>
* 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>
* 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>
* 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)
* replace blspy imports with chia_rs imports for BLS types
* remove blspy-stubs, since we're dropping the blspy dependency. chia_rs has type stubs already
* update passed_plot_filter() to take the filter size rather than consensus constants. This allows the filter size to change by block height. make verify_and_get_quality_string() take either the height or filter size
* Add some filter_prefix_bits tests on test blocks.
* Add some filter_prefix_bits tests on simulated farmer and harvester.
* Cache filter prefix bits by challenge chain signage point hash and use that for the the lookups. This allows us to perform plot filter validation.
* Add more cases to verify_and_get_quality_string() unit tests.
* Add some tests for Farmer's respond_signatures.
* Apply Kevin's suggestion to simplify the check for passing plot filter.
* Apply Kevin's suggestions to simplify some test checks and fix a couple typos.
* Apply Kevin's suggestion to send peak height instead of filter prefix bits as part of NewSignagePoint.
* Remove no longer needed filter prefix bit related logic and make height non optional in verify_and_get_quality_string().
---------
Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
* move SerializedProgram into its own file (to fixup type annotations)
* fix type annotations for SerializedProgram
* fixup import statements for new SerializedProgram module
* dont wait for timeout on None response
* handle return msg by type
* remove empty line
* isort
* improve reply check
* use map to check reply, add has_capability helper
* fix has_capability
* unused import
* configure isort to add the future annotations import
* apply the new isort setting
* remove type ignores for new mypy (#13539)
https://pypi.org/project/mypy/0.981/
* another
* Allow different reject message
* Sync correctly when localhost is not synced
* Remove logs
* Fix getting timestamp when local node is not synced
* Precommit
* Mypy
* Debug logging
* Is trusted
* revert gui
* Remove debug logging
* Remove more debug logs