Commit Graph

64 Commits

Author SHA1 Message Date
Adam Kelly 4b77fb3dd1
Make output of manage_clvm more readable on failure (#15658) 2023-06-30 13:42:24 -05:00
Kyle Altendorf 03943a0e51
allow tests/tools/test_full_sync.py::test_full_sync_test to run on 3.7 (#15570)
* allow tests/tools/test_full_sync.py::test_full_sync_test to run on 3.7

* drop dirs_exist_ok=

* more

* less
2023-06-21 18:14:34 -05:00
Arvid Norberg 621c75e4ba
Fork infrastructure (#15299)
* remove softfork-logic for 1.7 softfork (which has already activated)

* add new constants for soft-fork3, hard-fork and the other plot-filter adjustments
2023-05-18 20:20:11 -05:00
Matt Hauff eab43eb800
Add Chialisp pretty printer to pre-commit (#15008)
* Add chialispp port to pre-commit

* Lint files
2023-05-09 14:46:41 -05:00
Kyle Altendorf 7f7bce8677
help= not short_help= (#15076)
* help= not short_help=

* oops

* more

* more
2023-05-03 00:29:13 -05:00
Kyle Altendorf 2ed75d47f3
more mypy platforms in ci (#12299)
* more mypy platforms in ci

* check not checks

* oh yeah, activate...

* add 3.11

* adjust job names

* actually use the right python version for install

* adjust for 3.7 hinting support

* exclude macos 3.7 and macos arm 3.8

* back to 3.8 for now

* major_dot_minor

* oops

* move ignore comments for 3.7

* and more
2023-04-27 09:51:18 -05:00
Matt Hauff e2b16d4d3c
Fix manage_clvm.py hash building and std libraries (#15075)
* manage_clvm.py edge cases

* @trepca suggestion fix
2023-04-19 12:06:27 -05:00
Arvid Norberg 536830b09b
Generator mod cleanup and simplification (#15055)
* remove unused run_generator_mempool() function

* move run_generator_unsafe() into the tests, which is the only place it's used

* remove (somewhat meaningless) setup_generator_args() and create_generator_args()

* remove unused GENERATOR_MOD in mempool_check_conditions.py

* remove redundant get_generator() function

* transition analyze-chain.py to use run_block_generator() and drop dependency on GENERATOR_MOD

* fixup type hints in test_rom.py

* fixup type hints in test_compression.py

* fixup type hints in test_generator_types.py
2023-04-18 16:30:10 -05:00
Matt Hauff e5b94d34a0
Chialisp file extensions (#14996)
* Rename chialisp file extensions

* Add pre-commit check for .clvm files

* Delete sha256tree files

* remove hash files in favor of central dictionary

* Add check for missing files like hex and hash entries

* Enhance clsp pre-commit check

* Actually check hash matches

* Update tools/manage_clvm.py

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

* Update tools/manage_clvm.py

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

* Fix Windows file writing

* Fix setup.py package_data fields

* Load hash dict at runtime

* Move away from exception pattern

* Bad equality check

* Minor fixes

* remove trailing whitespace fix

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-04-18 11:27:17 -05:00
Kyle Altendorf 014a7b34d4
Update tools/manage_clvm.py
Co-authored-by: Matt Hauff <quexington@gmail.com>
2023-04-07 14:04:23 -04:00
Kyle Altendorf 4dfa8c294f
correct broken exit codes from `manage_clvm.py` 2023-04-07 12:57:13 -04:00
Kyle Altendorf ff5ef6e073
remove leading newlines from indented code blocks (#14653)
* remove leading newlines from indented code blocks

* catch another one
2023-02-23 21:53:48 -06:00
dustinface c098ee9166
full_node: Rename some `receive`/`respond` prefixes to `add` (#14458)
* full_node: Rename `FullNode.resond_block` to `FullNode.add_bock`

The naming `respond_block` is confusing here imo, we have a full node
API method called `respond_block` but here in the `FullNode` class this
method is there to try adding a block to the full nodes's chain so i
think `add_block` is the better choice?

Also change the `respond_block: full_node_protocol.RespondBlock`
parameter to `block: FullBlock` which lets us get rid of many
`full_node_protocol.RespondBlock` wrappings.

* `FullNode.receive_block_batch` -> `FullNode.add_block_batch`

* `receive_unfinished_block` -> `add_unfinished_block` + change parameter

* `FullNode.respond_transaction` -> `FullNode.add_transaction`

* `FullNode.respond_end_of_sub_slot` -> `FullNode.add_end_of_sub_slot`

* `FullNode.respond_compact_vdf` -> `FullNode.add_compact_vdf`

* `respond_compact_proof_of_time` -> `add_compact_proof_of_time`

* `respond_transaction_semaphore` -> `add_transaction_semaphore`
2023-02-23 10:28:29 -06:00
Amine Khaldi cf147458e8
Merge commit '124961a355e6175037067a06f5f2ab18600dfdf1' into catchup/main_from_release_1.7.0_124961a355e6175037067a06f5f2ab18600dfdf1 2023-02-14 21:35:36 +01:00
Arvid Norberg d315097b2a
full node optimizations (#14562)
implement async opt merge

Co-authored-by: William Allen <wallentx@users.noreply.github.com>
Co-authored-by: Florin Chirica <16658074+fchirica@users.noreply.github.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-02-13 22:34:31 -06:00
Arvid Norberg 68c9aafc0a
move SerializedProgram to its own file (#14391)
* move SerializedProgram into its own file (to fixup type annotations)

* fix type annotations for SerializedProgram

* fixup import statements for new SerializedProgram module
2023-01-27 17:20:23 -06:00
Kyle Altendorf 026d4671af
add cache to speed up manage_clvm/clvm_hex pre-commit check (#14177)
* add cache to speed up manage_clvm/clvm_hex pre-commit check

* Update tools/manage_clvm.py

* add version to cache along with handling of incorrect versions

* force skipping the cache in ci
2023-01-03 14:59:09 -06:00
Kyle Altendorf d53f249e5c
only send_to_all(), drop send_to_all_except() (#14229)
* only send_to_all(), drop send_to_all_except()

* catch up tools/ as well

* add default
2023-01-02 21:39:11 -06:00
dustinface 42f6a883ae
isort: Remove the remaining exceptions and sort the related files (#14124) 2022-12-13 17:10:55 -06:00
dustinface b916275540
tools: Implement and test `tools/legacy_keyring.py` (#13947)
* Add `-l` option to `install.sh` and use it for linux tests on CI

* Implement and test `tools/legacy_keyring.py`

* Update install.sh

Co-authored-by: Jeff <paninaro@gmail.com>

Co-authored-by: Jeff <paninaro@gmail.com>
2022-12-03 23:31:51 -06:00
Arvid Norberg 53a570ebe1
Add option to analyze-chain to validate block signatures (#13917) 2022-11-16 13:59:21 -06:00
Almog De Paz ac2203eda8
Refactor test utils for import availability outside of repo (#13880)
* refactor for import availability outside of repo

* refactor for import availability outside of repo

* small revert

* newline

* fix imports

* fix pre-commit issues

* types issort, adapt mypy ignore

* redundant imports

* move files from util to simulator

* run pre_commit

* remove setup_nodes/keyring from isort.cfg

* fix asyncio import
2022-11-15 18:51:05 -06:00
dustinface 8e2e51a8c8
Add optional `outbound` parameter to `get_connections` (#13879) 2022-11-15 17:40:16 -06:00
dustinface d3e1698cc8
util: Some cleanups for the memory profiler (#13809)
* Make `CallInfo` and `Frame` a `dataclass` and move them to the top level

* Use `click` in `memory_profiler.py`

* Move `mem_profile_task` into `chia.util.profiler`

* Move `chia.util.memory_profiler.py` to `tools/analyze_memory_profile.py`

* Implement `Frame.add`
2022-11-09 14:17:43 -06:00
dustinface 50d148eadd
Cleanup `WSChiaConnection` imports/usage (#13868) 2022-11-08 10:10:59 -06:00
Louis Bettens 5ee4c398bf
do not compile ChiaLisp at import time (#13609)
* do not compile CL at import time

Similar idea as #13478 but for the `load_serialized_clvm` function.

Fixes #11257 for me

* do not compile ChiaLisp at import time in wallet
2022-10-13 11:32:51 -07:00
Kyle Altendorf 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
Kyle Altendorf bbd032e1c9
embrace click 8 (#13559)
* click==8.1.3, black==22.8.0

* black

* click option creator hinting

* ignores for to-be-resolved issue

* remove unused import
2022-09-29 11:24:36 -05:00
Richard Kiss 42406f9e96
Recompress generators (#13376)
* Add `start`. Speed start-up. Format better.

* Add `--call` argument to invoke other python code.
2022-09-29 11:24:07 -05:00
Kyle Altendorf a20ee08fce
only compile clvm for developers (#13478)
* only compile clvm for developers

* retain existing behavior for backwards compatibility

* tests/check_clvm.py becomes tools/manage_clvm.py check (and add build subcommand)

* trigger recompilation in pytest runs
2022-09-27 11:21:54 -05:00
Arvid Norberg ddcae129d5
fix run_block to actually pass in the chialisp_deserialization program, as required by consensus (#13238) 2022-09-08 13:47:20 -05:00
Arvid Norberg 0d78058daa
optimize get_block_store (#13263)
* optimize the block_store for the get_puzzle_and_solution_for_coin to not parse the full block. We just need the block generator and generator regs.

* optimize analyze-block

* address review comments
2022-09-03 01:34:05 -05:00
Arvid Norberg 1b5f45a7d3
introduce an UncurriedPuzzle class (#13211)
* introduce an UncurriedPuzzle class, containin the mod and args from a puzzle that has already been uncurried. Pass this around to functions that want to access the uncurried puzzle, to avoid uncurrying the same puzzle multiple times.

* use UncurriedPuzzle for get_inner_puzzle()
2022-08-30 11:29:40 -05:00
Arvid Norberg f562d96535
uncurry the puzzle once instead of 3 times (#12781) 2022-08-04 23:16:04 -05:00
Arvid Norberg 92a5f38a86
remove soft fork logic at height 2300000 (#12563)
* remove soft fork logic at height 2300000. The whole chain can be validated with the post-soft-fork rules. Remove testing of pre-soft-fork rules

* fix test_full_sync
2022-08-01 17:32:53 -05:00
Jack Nelson 0bc54ae08b
Move simulator test requirements over to new module (#12521)
* create new test.simulator module

to allow other packages to use the simulator without it crashing.
also tiny QOL fixes

* change user mode sim plot filter

Now only plots matching the user set fingerprint are loaded, this decreases the chance of user error.

* fix small oops in configure

* oops

* fix lint

* isort, who dis

* move folder over to chia/simulator

also change mypy settings again
2022-07-25 14:07:38 -05:00
Kyle Altendorf 90516263aa
remove chia.util.path.mkdir() (#10842)
* remove chia.util.path.mkdir()

* remove submodule change

* less tmpdir, more tmp_path
2022-06-08 10:24:40 -05:00
Arvid Norberg 3c2fc1947d
upgrade chia-rs to streamable support (#11503)
* upgrade chia-rs to streamable support

* bump chia_rs dependency
2022-06-01 12:56:11 -05:00
Arvid Norberg 969c2586f1
add checkpoint feature to test_full_sync (#11723) 2022-06-01 12:53:48 -05:00
Arvid Norberg d346ef89f1
extend benchmark to make the db-sync mode and node-profiler configurable (#11647) 2022-05-31 15:37:20 -05:00
Arvid Norberg 3795a52152
fix some LGTM issues (#11453) 2022-05-12 15:17:24 -07:00
Mariano Sorgente e0df18f85d
Ms.hint refactor (#11222)
* Some work on hints

* More cleanup and test_generator_tools

* Change relevant calls

* More refactor and cleanup

* More refactor

* Small fix

* Create wrapper object PeakPostProcessingResult

* Lint and small fix

* Fix a hint bug

* Fix hint update_wallets

* Fix test_full_sync

* pre-commit

* Start with PR review comments

* More efficient iteration

* Remove tx_removals_additions_and_hints

* Revert mozilla ca

* Fix issue with startup
2022-05-05 08:19:57 -07:00
Kyle Altendorf 34eed9a3bc
more isort (#11401) 2022-05-05 08:17:38 -07:00
Arvid Norberg 79034bb82e
improve generate_chain (#11242)
* improve generate_chain to have proper command line options. Make it include block references by default.

* fix shell linter
2022-04-27 11:43:33 -07:00
Arvid Norberg f9c4f1f96d
add tool to measure CPU utilization of a process tree (#11264)
* add tool to measure CPU utilization of a process tree and plot it over time

* make collecing thread counters optional
2022-04-22 10:53:53 -07:00
Arvid Norberg 511c13e632
add tool to generate a blockchain with full blocks, as a benchmark (#11146) 2022-04-15 10:11:42 -07:00
Arvid Norberg 21fb6f260e
transition to using chia_rs module (#11094) 2022-04-08 09:37:10 -07:00
Arvid Norberg 492503f109
print average block rate at different block height windows (#11064) 2022-04-05 16:11:03 -07:00
Arvid Norberg b377339372
fix memory leak in test_full_sync (#11004) 2022-04-05 08:53:12 -07:00
Arvid Norberg fe77c69018
run_generator2 rust call and compact conditions data structure (#8862)
* use run_generator2 rust call and compact spend bundle conditions data structure pervasively.

* address review comments
2022-04-04 11:53:13 -07:00