* Optimize Streamable parsing by avoiding extra post-init checks
A performance test indicates that this optimization makes parsing block
records from database up to 40% faster (0.66 vs 1.09 seconds for 10000
records).
* Add type annotations, remove unnecessary .keys() call in Streamable
Co-authored-by: Rostislav <rostislav@users.noreply.github.com>
* exempt_peer_networks: allow exceeding target_peer_count.
* Flake8.
* Cleanup incorrect types.
* More typing.
* Added configuration examples for exempt_peer_networks.
* Be generous in the IP network definitions we allow as input.
* Correctly define 192.168.1.0/24 without host bits.
* Trivial change to re-trigger tests.
Co-authored-by: wjblanke <wjb98672@gmail.com>
* quick fix to update out-of-date CLI reference to close issue 4397
* additional typo fixes in the cmds section
* removed old reference to incline Mnemonic inclusion in chia keys add
e Please enter the commit message for your changes. Lines starting
* Update keys_funcs.py
fixed some rogue quote changes due to a text editor flub
Co-authored-by: J. Eckert <sargonas@Js-MacBook-Air.sargonas.net>
Co-authored-by: J. Eckert <sargonas@Js-MacBook-Air.local>
This was causing a problem where outbound messages, blocked by the rate limiter,
would still increment the counters as-if they had been sent. This, in turn,
could cause other message types to get blocked becuase the rate limiter thought
we had sent a lot of the other (blocked) message type.
* 3 harvesting features:
- Debug level shows the time for every quality lookup
- Warning level if takes longer than 5 seconds
- Allow configuration of plot loading interval (default 2 minutes)
* Comment out super logging
* Avoid importing `test_constants` as it takes a long time.
* Factor out `parse_*` functions.
* First crack at refactoring `Streamable.parse`.
* Don't add `_parse_functions` attribute to `Streamable`.
This no longer requires an extra `_parse_functions` attribute on a
`Streamable`, as it may be confusing serializers or other functions
that use `__annotations__`.
* Fix lint problems with `black`.
* Fix `parse_tuple`.
* Defer some parsing failures to parse time rather than class-creation time.
* Tidy up & remove some obsolete stuff.
* Decorate `RequestBlocks` as `streamable`.
* Fix wrong uses of Streamable class
Revert an earlier commit and error out on class creation in case a
Streamable subclass is instantiated incorrectly, e.g. containing a
non-serializable member.
Fix cases where Streamable parent class was forgotten.
* Fix wrong types when creating DerivationRecord and WalletCoinRecord
* additional unit tests for streamable parsers
* add type annotations (#3222)
Co-authored-by: Rostislav <rostislav@users.noreply.github.com>
Co-authored-by: arvidn <arvid@libtorrent.org>
* changed bahviour of wallet and wallet tools for standard solutions
* black formatting wallet_tools
* added a test for hypothetical stolen zero_output coin
* swap to sha256 from sha256tree for message
* fix wallet_tools version, address lint issues
* correctly int_from_bytes
* fix uninstantiated key in dict
* Comment out broken test
* Fix types (used SerializedProgram)
Co-authored-by: Mariano <sorgente711@gmail.com>
* Fix memory bloat when displaying plot logs in GUI by sending only new changes
* Add updated lines field to plot logs message
* Send full log during service connection, and send log updates every time
* updated plot logs
fixed removing of the plots from the queue
* used message from main process
* used just one plot for serial plotting
* lint format
Co-authored-by: Adam Kelly <aqk@aqk.im>
Co-authored-by: Zlatko <zlatko@chia.net>
* check summaries against wp on long sync
* lint
* move summary check to receive_block
* lint
* lint
* ban peer if bad response during batch sync
* fix typo
* Changed singleton to take puzzlehash as origin.
Updated DID wallet to use this
* fixed hex and sha256tree for singleton puzzle
* require more signature for DID spends
* fix singleton tests
black format did wallet
* fix broken test
fix linting
switch to inline functions
* remove unused defuns from singleton_top_layer
It was removed in commit ee3dfb9eb1 for
unknown reason. A few people on keybase have learned to rely on it to
check for new coins being received by their wallet. Arguably not the
best way to do so but seems like a useful log output to have in general.
* Start block body tests
* More tests
* More tests
* Improvements and security fixes to block body validation
* Revert bad test changes
* Fix check for ref list size
* Change input to ROM to `(coin-solution-inputs . extras)`.
* Add `deserializer` to `generator_for_single_coin`.
* Fix last test.
* ROM now outputs `(coin-spends . block-level-extras)`
* rebase DID off main
* fix indentation and imports
* lint fixes
* fix test_compilation paths for new puzzles
* added _init__.py for did_wallet
* mypy typing fixes
* included did_wallet in setup.py module list
* stored pubkey & puzhash so that recovery_spend can choose not take them
* black missing comma
* add wallet id to return in get recovery info
* remove bad try statement
* fix DID recovery
* lint formatting, blacked
* use theirs for macos installer
Co-authored-by: matt <matt@chia.net>
* attempt to save time hashing PeerInfo objects in introducer, by moving attributes from hash tables into the peer object itself, where it belongs
* only remove peers after a few failures in a row, not immediately. Ensure we don't check peers too frequently.
* squash
* rebase cleanup
* cost
* Combine adam's and straya's PRs
* Fix cost test
* Fix another test
* Improve safety in reorgs
* Improve wallet in reorgs
* Improve wallet in reorgs
* Bug in reorg handling
* Bug in reorg handling, and fix test
* Band aid
* Comment out to pass test
* Comment out test
* rebase clean
* USe a list of reference generators
* create
* Integrate Block Compression
* Fix generator argument creation
* improve test
* update block tools
* Separate CompressorArg and GeneratorArg, improve type hints
* First crack at `list_to_tree`.
* Integrate generator arguments as tree
* End to end test for generators
* Fix linting issues, hook up things, and add a test
* tidy GeneratorArg test
* Get compression and decompression working in full node
* Fix fetching block generator from DB in multiprocess
* Fix edge case in reorgs, test many combinations of reorgs
* reduce max number of generators refs allowed in a block
* Apply Straya's fix for calculating the end index for generator args
* typos
* Run test_block_compression for a transaction large enough to force multiple input coins in the transaction
* Update generator compression tests for treearg change and decompressor offset args fix
* Fix merge conflict
* Fix test
* Fix full node tests
* Don't make full blocks
* fix lint
Co-authored-by: Yostra <straya@chia.net>
Co-authored-by: Adam Kelly <aqk@aqk.im>
Co-authored-by: Richard Kiss <him@richardkiss.com>
Require that a conflicting SpendBundle must not only have higher fee per
cost, but also increase the total fee by at least 0.00001 XCH and spend
all coins that were spent in the set of conflicting SpendBundles.
Refactor and update tests of conflicting spends (aka double spends) in
mempool.
Co-authored-by: Rostislav <rostislav@users.noreply.github.com>
* deleted blockchain_check_conditions and added optional timestamp to mempool_check_conditions
* removed unnecessary code
* change back to < for block height
* time now passes on equal to condition value
* Add test for relative seconds
* rebased on top of main
* Renamed AGG_SIG to AGG_SIG_UNSAFE
Renamed height and time conditions
Changed some demo p2 puzzles to use AGG_SIG_ME
* fix merge on cost_calculator
* update hex and sha256tree of p2_delegated_conditions
* fix condition name in rl clvm
* updated the innerpuz sha256tree after careful inspection
* update cost and max cost according to new plan
of even split between (1) generator program size (2) generator program CPU and
memory costs (3) CREATE_COIN conditions for and archetype block with 1000
vanilla transactions, 2 inputs and 2 outputs each.
update costs of conditions to use the same unit (as CLVM). Remove CLVM_COST_RATIO_CONSTANT
Add COST_PER_BYTE constant, defining the cost for each byte of generator program.
* bump clvm and clvm_rs versions
* fix typo in setup.py
* Specified two types of create_announcement
* Fix create_announce_with_puzhash in specific situation
* Removed unnecessary announcement functionality from a bunch of place
* Added tests for puzzle announcement and wallet features
* fix tests/clvm/coin_store.py to use new announcements
* fix test_blockchain_transactions
* update test_blockchain_transactions to use real names
* remove lingering ConditionVarPair
* Fix another lignering CVP issue
* fix broken test imports
* fix puzzle announcement test
* change announcement_names to set and rename some functions for clarity
* Rename conditions for consistency
* typing and typo fixes
* fix name conflict in test
* fix test coin_store to use sets
* renumber opcode
* force recompile and small fixes for new conditions numberings
* add sha256tree files for updated hex files
* Start aggsig me
* Pass in genesis challenge
* Update DID, and remove useless functions from coinbase.py
* Unused imports
* Revert GUI
* Use a different constant so forks of chia can easily change it
* Remove overflow from list, and remove useless call to handle_eos
* Unindent
* Changes to mempool
* tests
* progress on tests
* Add tests for new mempool
* Fix lint and revert streamable changes
* Improve logging
* Test level warning
* Fix test
* Increase mempool size to 150x
* Improve performance of streamable
* __annotations__ instead of get_type_hints
* Fix overly strict type checker
* Lints and fix test
* Lint
* Adds support for empty streamables
* Use different strategy to fix lint and support empty Streamables
* Test for empty streamable
* Changelog
* lock for all writes
* use async with where convinant
* wrapper
* more
* lint
* update wallet
* rl wallet
* indentation
* fix tests
* bad path merged into main
* wallet lock
* refacoted by mistake
* re-raise
* memory/disk inconsistency
* more inconsitency
* asyncio.cancelled is baseexception in 3.8 and 3.9
* Fix issue with error handling in timelord. Show infusion rate for all timelords (even slow ones), and fix logging for rate limiting
* Fix another issue
* Further improvements in crashes, and better counting
* Don't error if we cannot infuse
* flake8
* more flake8
* Improvements for not the fastest timelord
* Don't double count
* Don't double count (again)
* rebase DID off main
* fix indentation and imports
* lint fixes
* fix test_compilation paths for new puzzles
* added _init__.py for did_wallet
* mypy typing fixes
* included did_wallet in setup.py module list
* stored pubkey & puzhash so that recovery_spend can choose not take them
* black missing comma