Commit Graph
16 Commits
Author SHA1 Message Date
Matt HauffandGitHub 40db4635a8 [LABS-245] Enable PEP604 Ruff rules (#20269)
* Enable PEP604 Ruff rules

* Fix harcoded signature in test

* Hack CLVMStreamable test with note to fast follow
2025-11-18 12:34:00 -08:00
Kyle AltendorfandGitHub fcd20ce543 more chia_rs directly (#19520)
* more `chia_rs` directly

* maybe

* undo, kinda
2025-04-21 14:05:05 -05:00
Kyle AltendorfandGitHub d50b6e0883 use chia_rs directly for sized bytes (#19326) 2025-02-28 09:35:25 -08:00
Kyle AltendorfandGitHub e446d6b726 use chia_rs directly for sized ints (#19303)
* use chia_rs directly for sized ints

* Update data_layer_rpc_api.py
2025-02-24 14:33:09 -08:00
Almog De PazandGitHub 59583e75ef Assert height to hash in contains block (#19136)
* add assertions

* use_height_if_available

* use try_block_record

* fix recursion

* handle none

* remove assert

* remove assert

* use try in wallet blockchain

* fix height o and height to hash in augmented

* get_correct_block_for_fork

* remove debug code

* use try_block_record

* check main chain againt undelying blockchain

* pass augmented in tests

* lint

* revert changes to wallet blockchain

* remove redundant comment

* lint

* remove debug message

* revert bad merge

* make height mandatory

* make height mandatory

* use try_block_record

* fix unfinished test

* remove from hh, test contains block

* fix test

* fix mock and cache
2025-02-11 07:18:52 -07:00
Kyle AltendorfandGitHub 9c8557a1f8 Remove Python 3.8 support and update source to 3.9 standards (#18687)
* manual python 3.8 removals

* poetry

* pyupgrade

* black

* isort

* manually tidy imports

* work around shadowed type

* catch up build network protocol files for pyupgrade changes

* placate pylint

* re-enable 20.04

* placate flake8
2024-10-16 14:21:15 -07:00
Arvid NorbergandGitHub d5c36e38ac BlockchainInterface cleanups (#18522)
* use ... in BlockInfo protocol

* move prev_block_hash() from BlockchainInterface into BlockRecordsProtocol to transition find_fork_point_in_chain() and lookup_fork_chain() to use the more narrow protocol to lookup the chain

* the WalletBlockchain doesn't need to implement the full BlockchainInterface, but just BlockRecordsProtocol

* remove unused GeneratorBlockCacheInterface and BlockDict

* add unit test for BlockCache
2024-08-27 23:58:19 +08:00
Arvid NorbergandGitHub 700a67344b BlockchainInterface as a protocol (#18486)
* turn BlockchainInterface into a proper Protocol, to allow mypy to check it

* split out a subset of BlockchainInterface into BlockRecordsInterface

* separate BlockCache into the (simple) production use case and the (complex) test use case of mocking a blockchain object
2024-08-23 01:02:43 +08:00
Arvid NorbergandGitHub 038f5e8fb7 Fix deep reorgs (#16594) 2023-11-15 10:51:04 -06:00
Kyle AltendorfandGitHub 7889f51e7e hint chia.util.block_cache and remove from exclusions (#16476) 2023-10-02 13:07:14 -05:00
Kyle AltendorfandGitHub 3b084a165b configure isort to add the future annotations import (#13327)
* 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
2022-09-30 03:40:22 -05:00
Mariano SorgenteandGitHub 890c7d3754 Fix remaining linting issues (#10962)
* FIx remaining linting issues

* Revert type:ignore

* Revert token_bytes change
2022-04-02 13:22:55 -07:00
89f15f591c Merge standalone wallet into main (#9793)
* wallet changes from pac

* cat changes

* pool tests

* pooling tests passing

* offers

* lint

* mempool_mode

* black

* linting

* workflow files

* flake8

* more cleanup

* renamed

* remove obsolete test, don't cast announcement

* memos are not only bytes32

* trade renames

* fix rpcs, block_record

* wallet rpc, recompile settlement clvm

* key derivation

* clvm tests

* lgtm issues and wallet peers

* stash

* rename

* mypy linting

* flake8

* bad initializer

* flaky tests

* Make CAT wallets only create on verified hints (#9651)

* fix clvm tests

* return to log lvl warn

* check puzzle unhardened

* public key, not bytes. api caching change

* precommit changes

* remove unused import

* mypy ci file, tests

* ensure balance before creating a tx

* Remove CAT logic from full node test (#9741)

* Add confirmations and sleeps for wallet (#9742)

* use pool executor

* rever merge mistakes/cleanup

* Fix trade test flakiness (#9751)

* remove precommit

* older version of black

* lint only in super linter

* Make announcements in RPC be objects instead of bytes (#9752)

* Make announcements in RPC be objects instead of bytes

* Lint

* misc hint'ish cleanup (#9753)

* misc hint'ish cleanup

* unremove some ci bits

* Use main cached_bls.py

* Fix bad merge in main_pac (#9774)

* Fix bad merge at 71da0487b9

* Remove unused ignores

* more unused ignores

* Fix bad merge at 3b143e7050

* One more byte32.from_hexstr

* Remove obsolete test

* remove commented out

* remove duplicate payment object

* remove long sync

* remove unused test, noise

* memos type

* bytes32

* make it clear it's a single state at a time

* copy over asset ids from pacr

* file endl linter

* Update chia/server/ws_connection.py

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: Matt Hauff <quexington@gmail.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2022-01-13 12:08:32 -08:00
Kyle AltendorfandGitHub 8291f0221a Make the sized bytes types hint compatible (#9369)
* Rework sized bytes for type hinting compatibility

* add a bunch of type: ignores

* this will be handled elsewhere

* noqa E501 instead of changing code

* normalize comment plurality

* @classmethod

* Revert "@classmethod"

This reverts commit 95db80e339.

* add ignore in benchmarks

* just E501 again...

* add some new type: ignores
2021-12-02 09:43:39 -08:00
Almog De PazandGitHub 3277058372 optional no_tx_filter (#4560)
* add no_tx option to get_header_blocks_in_range

* add type

* get_header_block_by_height no_tx_filter

* double negetive

* add param name

* param name

* change filter to false

* test header hash

* lint
2021-05-13 10:29:53 -07:00
Richard KissandGene Hoffman f2b577dda1 git mv src chia 2021-04-04 21:41:39 -07:00