Commit Graph
21 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 1911044e97 use chia_rs directly for more types (#19475)
* use chia_rs directly for more types

* more more

* undo submodule change...
2025-04-18 11:45:44 -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
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 fe89b5b782 undo some unnecessary int type casts (#17521)
* undo redundant type-casts from slots, SubEpochSummary and SubEpochData

* undo redundant type-casts from proof-of-space, reward chain and foliage types

* undo redundant type-casts from VDFInfo, VDFProof and ClassgroupElement

* remove unnecessary type annotation
2024-02-08 15:29:33 -08:00
Arvid NorbergandGitHub 51808b4ef7 Rust proof-of-space, reward chain and foliage types (#17218)
* use rust type for ProofOfSpace

* use rust types for Foliage

* use rust types for reward chain blocks
2024-01-10 15:42:31 -06:00
dustinfaceandGitHub cd1d22d29b wallet: Fix and improve untrusted race caching (#16239) 2023-09-06 13:00:25 -05:00
dustinfaceandGitHub f62f243e69 wallet: Drop async for can_use_peer_request_cache (#14472)
Make `can_use_peer_request_cache` a sync method
2023-02-08 21:27:10 -06:00
87a3e93cc4 Ms.mypy enable (#13320)
* Remove mempool.additions

* Don't re run the program, and remove program from mempool item

* Removals only stores item ids, and stores a list

* Move pending cache down to prevent cache dos

* Separate validation from adding to pool, and remove mypy exceptions

* Fix bug with replacing

* Add to mypy

* Revert cbgui

* precommit fail

* Properly update the seen dict

* lint error

* Fix mempool bug

* Enable mypy for a bunch of files

* Update after merge with main

* 99/260 remaining

* Address comments

* Enable more mypy

* Merge conflict mypy file

* More fixes

* pytest.ini and cb-gui

* One more flake8 fix

* Flake8 and tests

* More test fixes

* isort

* Make LGTM happy

* Update chia/full_node/block_store.py

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

* Update chia/full_node/full_node_store.py

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

* Update chia/wallet/util/peer_request_cache.py

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

* Apply all suggestions from PR comments

* Revert cb-gui

* 100 back to 1000, minor tweaks

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-09-08 12:57:15 -05:00
Arvid NorbergandGitHub af255a0dbf Rust coin state (#12934)
* use rust types for CoinState and RespondToPhUpdates

* improve test_network_protocol_test to support native types
2022-08-18 12:20:09 -05:00
Mariano SorgenteandGitHub 4e548545a1 Ms.peer required + sync speedup (#12889)
* 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

* Force passing in peer when fetching data

* remove debug limit

* Fix did_wallet

* Improve params

* Fix DID wallet again
2022-08-11 16:18:14 -05:00
Almog De PazandGitHub 2a51d7deaf wallet code reuse (#12310)
* validate wp from fork and fix bugs(pr #11826)
move WalletWeighProofHandler to wallet_node
remove code dupelication

* fix init bug
remove bad return path

* lint

* merge fixes
remove redundant ses_cache

* lint

* lint

* fix test

* lint

* assert state_manager is not None
2022-08-10 04:45:01 -05:00
Mariano SorgenteandGitHub a9fa0b0541 Add more optimizations (#11886)
* Add more optimizations

* Fix test and lint

* More lint

* Add a cache for additions
2022-06-13 11:40:58 -05:00
Mariano SorgenteandGitHub 7cafb2a513 Ms.optimize wallet sync (#11671)
* Start with a new cache

* Move signature aggregation

* More changes to caching

* Merge conflict and lint

* Revert hardcoded to untrusted, unused imports

* Remove old comment
2022-06-02 12:59:34 -05:00
wjblankeandGitHub 171abb03ee atomic rollback for wallet (#10799)
* atomic rollback for wallet
2022-03-22 11:35:35 -07:00
Mariano SorgenteandGitHub c844016019 Improve trusted sync performance (#10377)
* Improve trusted sync performance

* Fix broken CLI

* Decrease timestamp cache size

* Add all valid states at the right time
2022-02-22 18:37:51 -08:00
bea709d979 Ms.memory leak2 (#10287)
* Start fixing other issues

* Fork point, sync cancelling, random peer

* Reduce logging

* Improve performance and have a fallback peer for fetching

* Disconnect not synced peers

* Make sure try catch doesn't fail

* Fix memory leaks and keep track of sync target height

* Fix lint

* Update chia/wallet/wallet_node.py

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

* Pylint has a bug so ignore pylint for this line

* Fix memory leaks

* Increase cache size

* Fix flaky test

* Fix mistake

* Spawn for memory

* Revert spawn for now

Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: wjblanke <wjb98672@gmail.com>
2022-02-18 19:52:00 -08:00
98971de9d5 pre-commit: Add a new hook to run isort (#8827)
* pre-commit: Add a new hook to run `isort`

* contributing: Add hint about `isort`

* add isort to dev deps, ignore existing .py files, use black profile

* long list to lines not comma delimited

* isort: Update and sort ignore list to match latest `main`

* add bash command line to generate isort extend skip list (#3)

* add bash command line to generate extend skip list

* tidy

* isort: More files to ignore after rebase

* tests: Fix `test_wallet_user_store.py` after rebase

* Some fixes after rebase

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-02-15 07:28:53 -08:00
Mariano SorgenteandGitHub 7fa1861def Ms.wallet refactor (#10146)
* wallet fixes

* Don't show false positive synched

* Code cleanup and lint

* Fixes

* Revert issue

* Fix reorg issue

* WIP wallet node

* More wallet refactor

* More wallet changes

* More

* Fix subscription bugs

* Fix some tests

* Fix pool tests

* More tweaks

* Lint and small issues

* call update_ui at the correct points

* Small changes

* new peak queue

* Fix peer height issue

* Rollback more for safety, and tweak logging

* Small WSM style fixes

* Change fork point in long_sync

* More fixes with real world testing

* Fix reversed filter

* Fix function name

* Fix coin store bug properly

* Raise CancelledError

* Fix rollback issue

* Lint

* Small fix

* Fix CAT issue

* Fix test trades race condition

* Fix test trades race condition

* Try to reduce flakiness

* Test coin store and fix additional method

* Improve flakiness
2022-02-14 11:28:36 -08:00