Commit Graph
134 Commits
Author SHA1 Message Date
Arvid NorbergandGitHub 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 NorbergandGitHub 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 NorbergandGitHub 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 NorbergandGitHub f562d96535 uncurry the puzzle once instead of 3 times (#12781) 2022-08-04 23:16:04 -05:00
Arvid NorbergandGitHub 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 NelsonandGitHub 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 AltendorfandGitHub 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 NorbergandGitHub 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 NorbergandGitHub 969c2586f1 add checkpoint feature to test_full_sync (#11723) 2022-06-01 12:53:48 -05:00
Arvid NorbergandGitHub d346ef89f1 extend benchmark to make the db-sync mode and node-profiler configurable (#11647) 2022-05-31 15:37:20 -05:00
Arvid NorbergandGitHub 3795a52152 fix some LGTM issues (#11453) 2022-05-12 15:17:24 -07:00
Mariano SorgenteandGitHub 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 AltendorfandGitHub 34eed9a3bc more isort (#11401) 2022-05-05 08:17:38 -07:00
Arvid NorbergandGitHub 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 NorbergandGitHub 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 NorbergandGitHub 511c13e632 add tool to generate a blockchain with full blocks, as a benchmark (#11146) 2022-04-15 10:11:42 -07:00
Arvid NorbergandGitHub 21fb6f260e transition to using chia_rs module (#11094) 2022-04-08 09:37:10 -07:00
Arvid NorbergandGitHub 492503f109 print average block rate at different block height windows (#11064) 2022-04-05 16:11:03 -07:00
Arvid NorbergandGitHub b377339372 fix memory leak in test_full_sync (#11004) 2022-04-05 08:53:12 -07:00
Arvid NorbergandGitHub 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
Arvid NorbergandGitHub 8ca0633d9f fix test_full_sync.py to only feed the blocks in the main chain to the node (#10974) 2022-03-31 23:03:59 -07:00
Arvid NorbergandGitHub 1bcf409ee1 single thread executor (#10919)
* add inline executor and an option to run single-threaded

* add option to run test_full_sync in single-thread mode, to include block validation in profiles. Also attempt to speed it up by disabling db_sync
2022-03-28 12:47:46 -07: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
229eea9b55 Log slow block height (#10160)
* improve logging of blocks that are slow

* add profiler to test_full_sync

* Update tools/test_full_sync.py

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

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-02-14 12:51:21 -08:00
8aeefdec02 Fix running blocks with generators that use back-references (#10102)
* Fix running blocks with generators that use back-references

* Update tools/run_block.py

Co-authored-by: Thomas Pytleski <pytlesk4@gmail.com>

Co-authored-by: Thomas Pytleski <pytlesk4@gmail.com>
2022-02-07 16:03:56 -08:00
Kyle AltendorfandGitHub d404d0e92b just put __init__.py files where we have .py files (plus subdirectories) (#10129)
* just put __init__.py files where we have .py files

* and the rest

* remove unused ignore
2022-02-07 13:16:13 -08:00
Arvid NorbergandGitHub 13bf50833c add tool to test adding every block from a blockchain database (#10076)
* add tool to test adding every block from a blockchain database, as a sanity check for a new version of the full node

* exercise full_node in artificial sync from scratch test

* add test exercising test_full_sync.py
2022-02-03 10:31:49 -08:00
Laser CatandGitHub ec92f4b680 fix: update run_block.py (#10014)
* fix: update run_block.py

- add asset id
- add parent directory to load transactions_generator_ref_list from a directory

* fix: remove un used import

* fix: Call to function ref_list_to_args with too few arguments; should be no fewer than 2.

* core: remove unused function

* fix: missed a conflict, opps

* core: remove unused import

* fix: linting
2022-02-03 10:29:00 -08:00
Arvid NorbergandGitHub c33dc256c8 update analyze_blockchain tool to read v2 blockchain databases (#9983)
* update analyze_blockchain tool to read v2 blockchain databases and introduce option to run all generators in mempool mode. Also update to use the new clvm_rs API

* update gnuplot file for the new output from analyze_blockchain.py
2022-02-02 10:39:21 -08:00
Arvid NorbergandGitHub 3d063fea8f remove the GeneratorArgs type, and instead include the heights and generator programs as separate lists in BlockGenerator. The heights are not necessary when validating blocks, so this makes it easier to omit them in that case. The heights are only used when generating/farming a block. (#10006) 2022-01-31 18:49:39 -08:00
b8ada1ceb7 introduce restrictions on generators at a specific height (#9957)
* introduce restrictions on generators at a specific height. disallow division on negative numbers and disallow redundant leading zeros on integer condition arguments (produced by a generator)

* use SOFT_FORK_HEIGHT constant

* there is no need to specify height when validating block in block_creation

* Update tests/core/full_node/test_mempool.py

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

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2022-01-28 12:29:11 -08:00
Arvid NorbergandGitHub 5ebcd82c58 simplify run_block() (#9962)
* more tests

* only run the generator once, in run_block(). Prior to this patch, we run it once per spent coin + 1
2022-01-26 16:44:30 -08:00
Earle LoweandGitHub d7cd3fe2cb run block tool updates (#9807)
* run block tool updates

* pylint fixes

* Add tests

* Update workflows for new tests

* Updates based on comments
2022-01-25 07:44:13 -08:00
Arvid NorbergandGitHub b2ed21307b add tool to analyze the chain from the blockchain database, and run all generator programs (#9616) 2021-12-21 10:20:17 -08:00