Commit Graph
42 Commits
Author SHA1 Message Date
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Earle Lowe
452cbf890d build(deps): bump ruff from 0.14.6 to 0.14.13 (#20439)
* build(deps): bump ruff from 0.14.6 to 0.14.13

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.6 to 0.14.13.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.6...0.14.13)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* ruff fixes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Earle Lowe <e.lowe@chia.net>
2026-02-10 11:01:17 -08:00
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
Matt HauffandGitHub fcdb8e4925 Manual fixes for upcoming Ruff pyupgrade push (#20213)
* Manual fixes

* Revert back to variable in type expression

* Fix streamable to handle UnionType
2025-11-03 09:16:42 -07:00
joemickyandGitHub fa2acb13da chore: fix a large number of spelling issues in comments (#20068)
Signed-off-by: joemicky <joemickychang@outlook.com>
2025-10-17 06:34:54 -07:00
Kyle AltendorfandGitHub f945e8cb98 handle zero capacity for lru cache (#20080) 2025-09-19 07:12:15 -07:00
Matt 0f1d690246 Add a test for invalid enum value 2025-08-26 10:37:20 -07:00
Matt 4623d0d792 Comments by @altendky 2025-08-26 10:16:12 -07:00
Matt f3e85301c2 stop converting 2025-08-21 15:30:28 -07:00
Matt 9af0b7c97c Add Enum support to streamable 2025-08-21 15:03:35 -07:00
Matt HauffandGitHub a803dc0fa6 [CHIA-3633] August 2025 pass of Ruff linting rules (#19929)
* Enable Ruff `PLR1704` (`redefined-argument-from-local`)

* Enable Ruff `PLR5501` (`collapsible-else-if`)

* Enable Ruff `PLW2901` (`redefined-loop-name`)

* bad change

* Enable Ruff `RUF043` (`pytest-raises-ambiguous-pattern`)

* Enable Ruff `RUF046` (`unnecessary-cast-to-int`)

* Enable Ruff `RUF052` (`used-dummy-variable`)

* Remove unused ignore `UP006`

* One mis-signaled regex

* Comments by @altendky

* bad change, my bad
2025-08-11 14:39:12 -07:00
Richard KissandGitHub ddc5a73d2d Update to ruff 0.12.4 (#19852)
Upgrade `ruff` to 0.12.4.
2025-07-21 08:52:39 -07:00
Matt HauffandGitHub 0a084139b0 [CHIA-3158] Add dicts to streamable (#19719)
* Add dicts to streamable

* Make sure serialization is detemrinistic

* one more irrelevant test

* whoops fix bug and catch it with test

* Revert "Make sure serialization is detemrinistic"

This reverts commit 1c8f37743a.

* Dont allow duplicate dict keys

* optimize
2025-06-20 08:50:04 -07:00
6050235bdb [CHIA-3043] Add (hopefully) non-controversial ruff rules (#19684)
* Add (hopefully) non-controversial ruff rules

* mypy-exclusions.txt

* PIE

* Fix pre-commit?

* PYI

* RSE

* S + ignores

* Whitespace fix

* Re-add build-init-files.py

* Add comment about security ignores

* Update mypy-exclusions.txt

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

* Fix the executable status of build-init-files.py

* Set executable bit for tools/run_block.py and readd shebang

* Fix new errors

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2025-06-11 08:36:08 -07: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
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Earle Lowe
31a8715919 build(deps): bump ruff from 0.9.6 to 0.11.4 (#19482)
* build(deps): bump ruff from 0.9.6 to 0.11.4

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.6 to 0.11.4.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.9.6...0.11.4)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.11.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* ruff fixes

* ruff fixes

* ruff fixes

* Address review suggestions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Earle Lowe <e.lowe@chia.net>
2025-04-14 16:09:07 -05:00
Kyle AltendorfandGitHub d50b6e0883 use chia_rs directly for sized bytes (#19326) 2025-02-28 09:35:25 -08:00
Kyle AltendorfandGitHub 9075a50aeb use chia_rs directly for weight proof (#19315) 2025-02-26 09:27:27 -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
peicuipingandGitHub c62d20009c chore: fix 404 status URL (#19096)
Signed-off-by: peicuiping <ezc5@sina.cn>
2025-02-11 07:08:43 -07:00
Matt HauffandGitHub 8dd76e5d1c [CHIA-1731] Add comments about PLR6201 (#18963)
* Add comments about PLR6201

* Change comment

* Change comment
2024-12-03 09:45:57 -07:00
Matt HauffandGitHub 604fc1feb0 [CHIA-1732] Add Ruff specific linting rules (#18845)
* Add Ruff specific linting rules

* Further tighten ignore list

* Address comments by @altendky

* One more comment @altendky
2024-11-14 15:58:12 -07:00
6c90a76b56 Tighten up ruff ignore list (#18837)
* Tighten up ruff ignore list

* Okay that fix was indeed unsafe

* enable type-name-incorrect-variance

* enable literal-membership

* enable non-augmented-assignment

* enable useless-return

* enable global-variable-not-assigned

* -

* fixup

* Clean up roff.toml from annotations

* use ignore instead of explicit re-export

* use more descriptive names

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2024-11-12 12:19:31 -07:00
Amine KhaldiandGitHub 0d8920a942 CHIA-1684 Move obtain_current_passphrase next to KeyringWrapper (#18787)
Move obtain_current_passphrase next to KeyringWrapper.
2024-11-05 08:41:11 -07:00
Kyle AltendorfandGitHub 3b6f547d45 bytes zeros (#18475)
* `ZERO_32`

* `bytes(\d+)\(\[0\] \* \1\)`

* `bytes(\d+)\(b"\\(x00|0)" \* \1\)`

* `bytes(\d+)\(b"0" \* \1\)`

* Revert "`bytes(\d+)\(b"0" \* \1\)`"

This reverts commit 2d629dcb0a.
2024-10-22 12:07:07 -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
Amine KhaldiandGitHub 221c6e6771 CHIA-1593 Annotate test_cached_bls.py (#18678)
Annotate test_cached_bls.py.
2024-10-08 14:18:02 -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
Amine Khaldi d46076eecb Merge commit 'bcbc7a7b50cf1a3a81b7548e602412ea2167f26f' into checkpoint/main_from_release_2.4.2_bcbc7a7b50cf1a3a81b7548e602412ea2167f26f 2024-07-10 16:47:04 +01:00
Matt HauffandGitHub ebf747b3ae [CHIA-839] Refactor KeywringWrapper/FileKeyring for better ergonomics (#18275)
* `.get_passphrase` -> `.keyring.get_key()`

* `.set_password` -> `.keyring.set_key`

* `.delete_passphrase` -> `.keyring.delete_key`

* `.*_label` -> `.keyring.*_label`

* Introduce DecryptedKeyringData

* Fix bad assumption

* Fix tests

* Pre-commit

* Pivot key storage to external metadata for forwards compatibility

* typo & passphrase -> key
2024-07-09 12:17:11 -07:00
Matt HauffandGitHub bcbc7a7b50 [CHIA-819] Fix 12-word mnemonic support in keychain (#18246)
Fix 12 word mnemonic support in keychain
2024-06-26 09:22:48 -07:00
Kyle AltendorfandGitHub 3061cd83d7 remove some pylint ignores (#18140) 2024-06-18 14:24:30 -05:00
Arvid NorbergandGitHub f9375a68fa [CHIA-615] Rust BLS cache (#18085)
use the rust port of the BLS cache
2024-06-09 00:26:27 +01:00
Arvid NorbergandGitHub 605e3b8982 [CHIA-615] make BLSCache a proper class (#18053)
* make BlsCache a proper class, rather than a global dict with helper functions

* make the BLS cache a member of the FullNode, rather than a global variable

* add test for BAD_AGGREGATE_SIGNATURE when using the BLS cache
2024-05-31 13:57:20 -05:00
Matt HauffandGitHub ad3fb32d19 [CHIA-602] Add bech32m option for adding public keys (#18073)
* Add bech32m option for adding public keys

* Change bech32 prefix
2024-05-29 11:40:43 -05:00
Arvid NorbergandGitHub a4c11433f9 bump chia_rs to 0.8.0 and update G1Element handling (#18037)
* bump chia_rs to 0.8.0 and update G1Element handling

* use real keys and signatures in mempool tests
2024-05-21 13:42:21 -05:00
Kyle AltendorfandGitHub 73a7cb4687 CHIA-420 remove ignore for pkg_resources deprecation warning (#17933)
* remove ignore for `pkg_resources` deprecation warning

* replace pkg_resources usages

* fixup

* fixup

* fixup

* a couple

* imports

* cleanup

* maybe
2024-05-15 09:52:22 -05:00
Matt HauffandGitHub aefe7fdf28 Observer Mode (#17792)
* Observer Mode

* Address comments by @altendky

* Change RPC default and fix test coverage

* Add test coverage for rpc marshaller

* Fix @marshal util to return proper transactions
2024-05-07 13:39:25 -07:00
8b6f761791 Run core util tests sequential (#17871)
Co-authored-by: Earle Lowe <30607889+emlowe@users.noreply.github.com>
2024-04-16 13:39:03 -07:00
SnoppyandGitHub db8913631e chore: fix typos (#17729)
fix typos
2024-03-25 09:48:31 -07:00
Kyle AltendorfandGitHub a89222a428 move tests (#17209)
* prep

* verify source and installed tests match

* move

* remove move script
2024-03-14 10:19:20 -07:00