* spawn (not fork) for multiprocessing
* just append _worker to existing process names
* return properly in getproctitle()
* black
* ignore for unhinted getproctitle()
* Add comments about the setting of the multiprocessing start method
Due to the bug which was fixed in #9922 some pools obviously still have
incorrect authentication public keys from their farmers. This PR is to
make sure that the farmers update their authentication public key on the
pool if they get an `INVALID_SIGNATURE` response error from a `GET
/farmer`.
The create_wallet_for_cat method call accepts a "name" parameter for the new CAT being created, but we weren't passing that "name" variable here so all new wallets created via this method end up being named "CAT WALLET" (the default for name parameter in create_wallet_for_cat) even if you specified a wallet name here.
* Add info dump about how to use singletons
* Add a comment re: matt howard pointing out that the eve spend can also be simulataneous
* Fix commentary
* Add commentary according to feedback
* Add `address` param to get_transactions to enable filtering transactions by the receiving address
* move address where to the same line as the other where, so query segments are logically grouped
* Update param to `to_address` and use timeout assert in the test
* black==21.12b0 in pre-commit
Match `setup.py`.
* move black from super linter to upload workflow
* black (updated)
* configure so black . works
* --check --diff for black
* Align the wallet node's weight proof timeout with the full node's value.
* Give the wallet config its own weight_proof_timeout value.
* Apply Kyle's cleaner version.
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Apply Kyle's anchors suggestion.
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* 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>
* Add mempool_max_total_cost to RPC
* Add signage_point event
* Fix incorrect crawler RPC port lookup
* Set up initial timelord RPC server + finished_pot_challenge event
* Add new compact proof event
* Add skipping/new_peak to track when fastest or not
* Check for None on change_data
* Add skipping_peak + new_peak to changes for metrics
* Convert chain to value
* Rename iters
* Timelord RPC to 8557 - 8556 is used in simulation tests
* Make tests work with RPC server on timelord
* Change event name to finished_pot
* Use broadcast_farmer object
* Move state changed for `finished_pot` after proofs_finished.append
* Fix type on ips var + add vdf_info and vdf_proof
* fix event name on the state_changed function
* 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 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
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* optimize get_block_generator()
* add a v1 compatible get_generator() to speed up get_block_generator() with v1 databases. Add test. Add error log in case generator_from_block() fails.
* speed up test_full_block_utils
* Daemon RPCs `start_service` and `is_running` will additionally check
self.connections to determine if the service is running. When launching
services manually (e.g. when debugging), the GUI was attempting to have
the daemon relaunch an already-running service.
* Update chia/daemon/server.py
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Updates per feedback
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Announcement hash should never be None
* Allow origin ID to be anywhere in the coin set
* mypy
* Change to for/else format
* Fix comment
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Style change to loop
* tiny bad merge
* Add test
* Lint
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* shutdown the weight proof process pool
* use a context manager for the weight proof process pool executor
* record of the debug code
* mostly cleaned up
* suppress sync task cancellation propagation when awaited while closing
* breakup multi-second WeightProofHandler.validate_weight_proof with async sleeps
* move awaiting of sync task until after existing cancellation
* properly handle shutdown file with a new instance each time and a context manager
* cleanup
* 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>
* This patch enables fees for the plotnft commands - create, claim, join, and leave.
It also corrects a mismatch in the wallet code that appeared to expect Announcement objects, but actually required bytes.
* Update to using Announcement class. Publish both claim tx and fee tx for correct wallet accounting.
* Update keysearch for new wallet
* Update test for fee, and update wallet_id invariant
* Rename variable tracking coin in absorb SpendBundle
* Update RPC failure cmdline diagnostic
* Remove fee parameter in sign method. Add publish transaction method. Add entry in RPC API replies.
* Fix fee tx in absorb. Update absorb tests to test for fees
* conflict
* lint
Co-authored-by: William Blanke <wjb98672@gmail.com>
231ef6faf2/CHANGELOG.md
> Fixed issues where the wallet code would not generate enough addresses when looking for coins, which can result in missed coins due to the address not being checked. Deprecated the config setting initial_num_public_keys_new_wallet. The config setting initial_num_public_keys is now used in all cases.
* Add crawler RPC server
* Generate private keypair for crawler
* Bring over cleanup changes from the last closed PR
* Update the crawler RPC information to be its own subsection within seeder
* Add sleep before crawling to let the daemon connection get set up
* Wait for the actual callback to not be None, instead of just a random sleep interval
* Rework crawler/dns seeder to use the daemon + normal chia start process rather than the old system intended for the standalone repo
* Update configure testnet to work with seeder config
* Add back the crawler/seeder options from the standalone version
* Remove the check for none/sleep. Not needed when this is started by the daemon
* Add real data to the get_peer_counts endpoint
* Lint
* Fix calls to configure from init
* Turns out we still might sometimes move too quick before daemon/state changed callback is ready
* Add peer counts in the state_changed callback method
* Add a setting for peer_connect_timeout in the seeder: section so we can control it just for crawler
* start_seeder
* Pass config/root_path to the DNSServer so it can also use the configured crawler DB Path
* change in () instead of if/or
* Remove unnecessary return
* 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
* update db-upgrade test to run faster, and also parameterized on whether the hints table is present
* tolerate missing hints table in db conversion function
state changes may be needed in the future, but for now the GUI will be
able to refresh wallet balances in response to offer soft-cancellation
and addition.
* disonnect from untusted faster, fork point change, pool state handle
* name conflict
* deadlock
* fix inclusion validation for first sub epoch, don't fetch header blocks on every new peak
* lint
* can be none
* revert changes
* stop wallet peers if trusted peer is connected and synced
* remove pool changes
* remove cononfusing log
* 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>
conflicting with DEFAULT_ROOT_PATH when CHIA_ROOT is set. When the GUI
launches chia services, CHIA_ROOT is set, which was preventing the
wallet backend from copying existing DBs from the standalone_wallet.
* CLI support for performing an incremental keyring migration. This handles the case where new keys were created by an older client or the light wallet, and those keys then need to be moved to keyring.yaml.
* Opportunistically perform a silent incremental keyring migration when the GUI unlocks the keyring.
Track when keyring migration occurs so that we don't needlessly attempt on each GUI launch. ~/.chia_keys/.last_legacy_migration will contain the app version that last attempted migration.
* Formatting & linter fixes
* Tests for `chia keys migrate`. Missing a test for incremental migration.
* Additional keyring migration tests
* Formatting updates from black in files unrelated to this branch.
* Revert "Formatting updates from black in files unrelated to this branch."
This reverts commit a85030e8e0ea7406683efd8ae41e224c861e08ff.
* Exit loop if remaining_keys <= 0
* Linter fix? Manually making this change as black doesn't identify any issues locally.
* Linter fix again...
* Rename migrated standalone_wallet wallet db to use '_new.sqlite' suffix
* Removed unnecessary format string
* Wallet DB is now named "v2" instead of "_new"
* simplify updating of proofs (when compacting them). This also saves two database lookups before the update
* fixup
* insert or ignore duplicate blocks
* when replacing a weight proof with a compact version, we do so by height. Rather than asking for all blocks at the specific height followed by a linear search for the one with the correct header hash, we can simply lookup the correct header hash and just look up that block. This simplifies the logic by dropping the looping over blocks.
* pass in header_hash to _replace_proof() to avoid the height-to-hash lookup
```
farm/chia-blockchain/chia/wallet/wallet_node.py:1058: RuntimeWarning: coroutine 'WSChiaConnection.close' was never awaited
peer.close(9999)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
```
* Send coin_added event to metrics
* Add fingerprint to balance response
* Don't consume the exception by default, but enable for the metrics data usecases
* Pass sync_changed event to metrics
* bare raise
* trade_store: Migrated the `is_my_offer` property from the serialized
trade_record to a new `is_my_offer` column in the trade_records table.
Rewrote get_trades_between to move the query/sorting into the database.
This supports the presentation of offers in the GUI (two lists sorted by
relevance).
RPC: get_all_offers now accepts options to restrict the listing to
completed offers, my offers, taken offers. Added get_offers_count call
to return a breakdown of the number of offers (my offers, taken offers,
total).
CLI: Updated `chia wallet get_offers` to include options to exclude
created/taken offers, as well as an option to reverse the listing. The
-ia|--include-all option has been renamed -ic|--include-completed to
make sense in the context of the --exclude-[my-offers|taken-offers]
options. The full listing is now output, fixing the issue with hitting
the prior paging cap of 50 records.
* Linter fixes
* Updated trade tests. Fixed reverse sort when ordering offers by relevance.
* Make column spec explicit on insert to better support possible future migrations. If a future migration adds a new column with a default value, inserts/updates made by an older client will fail unless the insert explicitly indicates which columns are being updated. By explicitly listing the columns to update, any unspecified columns will have their default value applied.
* pool_wallet: Deterministic derivation of auth key, and only count poolWallets for indeces
* cli: Use the same limit for cli creation
* farmer: no more auth keys in config
* farmer: handle case of no authentication sk
* farmer: remove async, and fix test
* lint
* test: Add a test for many pool wallets, and user store
* test: Wait for wallet to be synced in test
* wallet: fix startup (no dns servers) and change to server checking of plotnfts
* cli: change to server checking
* tests: fix user store test
* Improve caching
* PR comments
* Remove useless class
* Try to fix test again
* 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>
* Add "metrics" as an additional destination for get_blockchain_state changes
* Add compact/uncompact blocks to get_blockchain_state
* Add total mempool cost to blockchain state
* Add hint count to blockchain state
* Add info about max cost, block_cost, and block_fees
* Add mempool min fee to blockchain state
* Add dict for mempool fee estimates
* dont start key with number
* Move max block cost to blockchain state
* Add generic exception logging util
* Catch/log any exceptions in counting hints
* Fix inconsistent key
* Assert row is not none
* Move block count metrics to a new endpoint
* report on block instead of unfinished_block for metrics
* Mark the block event with bool for if transaction block or not
* Add some basic tests for counting hints
* Add some basic tests on counting compact/uncompact blocks
* Fix lint
* Add k-size
* Add timestamp
* Add header_hash + height
* Added chia keys derive (wallet-address | child-key) to display derived wallet addresses or public keys
* Support for public key (unhardened) derivation
* Fleshed out the search command. Can perform a substring search on wallet addresses, public, and private keys.
Support for deriving private keys
* Default to unhardened derivation. Added --hardened-derivation option. HD paths denote hardened derivation with a 'h' suffix at each index.
* Added --no-progress to reduce output. Exit code indicates search success/failure. Option name cleanup.
* chia keys derive search can now search for multiple terms
* chia keys derive search can be restricted to searching pubkeys|privkeys|addresses|all
* Allow child-key derivation rooted from an arbitrary HD path
* Search derived keys rooted under an arbitrary HD path
* LGTM fixes
* Remove extra master_sk_to_wallet_sk_unhardened definition
* Cleanup and fixed search output
* Cleanup and comments
* Added tests for `chia keys` commands
* Using @pytest_asyncio.fixture to decorate empty_keyring() as suggested in pytest's output.
* Set asyncio-mode to auto to address pytest warning
* See if tests pass without checking exit status
* Added chia init step to tests that direclty invoke the `cli` function
* Explicitly add --root-path option to tests that run the `cli` function.
* Tests fix
* Re-enable checks against exit_code
* More fine tuning to address CI failures
* Changes to address naming and other feedback
* Updated tests
Saves a `Path.exists()` call in each lookup which obviously can be more
expensive in some setups + this is anyway the job of
the `PlotManager` and the existance is already implied due to the plot
being in `PlotManager.plots`.
* Try putting BLS in multiprocess
* Fix test
* Fix test again
* Fix test again ^ 2
* Don't use cache unless necessary, cleanup of unused code.
* WIP fixing tests
* Blockchain tests passing
* Remaining tests and lint
* More test fixes
* Fix full_node_rpc test
* Fix remaining tests
* Correct boolean
* Don't validate sig if CLVM fails. Also testing signature validation properly
* Simplify block prevalidation API and improve tests
* Fix logic error and remaining tests
* Update comments and change to AssertionError
* Try to improve CI performance
* Fix mempool test, try to fix test_blockchain performance
* Set default argument to fix test
* Fix DB conversion test
* Use cache for validating signatures (#9859)
* Use cache for validating signatures
* comments: fix typo
* Don't rerun the super slow part of the test (#9887)
* add limit to creation.
limit is 20 and can be overridden with --override_limit
* Fix english lint
* Update plotnft_funcs.py
* Update plotnft_funcs.py
* Add change payout address
Tested and working on testnet10
* correct small mistake
* Update plotnft_funcs.py
* Update plotnft_funcs.py
* Make code look better
Thanks for the idea Quex.
Co-Authored-By: Matt Hauff <quexington@gmail.com>
* add auto switching from central server
* Revert "add auto switching from central server"
This reverts commit 93f10a35c8.
* Update plotnft_funcs.py
Co-authored-by: Matt Hauff <quexington@gmail.com>
* wallet changes from pac
* cat changes
* pool tests
* pooling tests passing
* offers
* lint
* mempool_mode
* black
* linting
* workflow files
* flake8
* more cleanup
* renamed
* remove obsolete test, don't cast announcement
* memos are not only bytes32
* trade renames
* fix rpcs, block_record
* wallet rpc, recompile settlement clvm
* key derivation
* clvm tests
* lgtm issues and wallet peers
* stash
* rename
* mypy linting
* flake8
* bad initializer
* flaky tests
* Make CAT wallets only create on verified hints (#9651)
* fix clvm tests
* return to log lvl warn
* check puzzle unhardened
* public key, not bytes. api caching change
* precommit changes
* remove unused import
* mypy ci file, tests
* ensure balance before creating a tx
* Remove CAT logic from full node test (#9741)
* Add confirmations and sleeps for wallet (#9742)
* use pool executor
* rever merge mistakes/cleanup
* Fix trade test flakiness (#9751)
* remove precommit
* older version of black
* lint only in super linter
* Make announcements in RPC be objects instead of bytes (#9752)
* Make announcements in RPC be objects instead of bytes
* Lint
* misc hint'ish cleanup (#9753)
* misc hint'ish cleanup
* unremove some ci bits
* Use main cached_bls.py
* Fix bad merge in main_pac (#9774)
* Fix bad merge at 71da0487b9
* Remove unused ignores
* more unused ignores
* Fix bad merge at 3b143e7050
* One more byte32.from_hexstr
* Remove obsolete test
* remove commented out
* remove duplicate payment object
* remove long sync
* remove unused test, noise
* memos type
* bytes32
* make it clear it's a single state at a time
* copy over asset ids from pacr
* file endl linter
* Update chia/server/ws_connection.py
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: Matt Hauff <quexington@gmail.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Adds the total number of loaded plots to the plot refresh log of the
harvester's refresh callback and moves `started` and `batch_processed`
event logs from `INFO` to `DEBUG` level to reduce plot refresh related
logging.
* use context managers for database cursor objects, to ensure they are closed. Also stream results back from cursors, rather than reading the full list of results up-front
* Update chia/full_node/block_store.py
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* tests: Allow to use custom keys in `BlockTools.new_plot`
* tests: Create three plots with `G1Element()` as farmer/pool key
But not add them as default plots. Just to have plots in the test cache with different keys from
within and outside the keychain for plot loading tests.
create
* test|github: Bump `test-cache` version to `0.28.0`
* plotting: Drop plots from `no_key_filenames` after the keys appeared
* plotting: Drop plots from `no_key_filenames` if the plot was removed
* tests: Test loading of plots where we miss the keys
* plotting: Use `x.copy()` instead of `list(x)`
* plotting: Add a comment about the missing keys plot removal
* tests: Fix after #9595
* plotting: Fix try/except in `PlotManager._refresh_task`
* tests: Move the start refreshing call into `PlotRefreshTester` ctor
It being in `run()` before where it was called every test iteration lead
to not detecting an issue with the try/except introduced in #9409. See
ee1dd1912f4678d7b960b670473bd4b3ffbd890b for the fix.
* farmer: Run a start background task to wait if there are no keys yet
* farmer: Run the handshake in a background task if there are no keys yet
* tests: Yield the service in farmer/harvester setups
* tests: Introduce `start_service` in farmer/harvester setups
* server: Make `ChiaServer` and `Service` restartable
* tests: Test the delayed start/handshake in `test_farmer_harvester.py`
* tests: Move `test_farmer_harvester.py` to `tests/core/farmer_harvester`
Attempt to avoid issues due to the global block tools / shared keychain
between tests
* farmer: Return `bool` in `Farmer.setup_keys`
* tests: Add `__init__.py` to `tests/farmer_harvester`
* Remove initial writes to DB, since there is nothing new to write at this point
Both of these methods are called later after each crawler iteration. The lines being deleted write all the same data back to the DB right after the initial data was loaded FROM the DB in the "create" method call, which is a waste of time, especially for mainnet where there are hundreds of thousands of records to write back
* Add additional logs around DB writes
* Add a retry around writing to the DB in case something else has a lock on the DB
Metrics processes read from this DB periodically and sometimes things time out just right and we get a lock exception. Without this retry, we'd hit the other exception handler which doesn't allow the loop to continue
* unify the name we use for the special mode we run CLVM in, when accepting transactions into the mempool. We currently call this, strict mode, safe mode, safe and unsafe. Neither of these names are very descriptive. This patch renames this mode to mempool-mode
* import as
* stub SizedBytes.fromhex() until upstream is released
https://github.com/python/typeshed/pull/6201
* black
* more
* more
* more
* more
* more
* import TYPE_CHECKING via from
* more
* more
* catch up
Without this the plot manager thread silently dies on exceptions and
refreshing just stops. This change leads to refreshing reset and a error
log on exceptions.
* remove is_peak field, instead, store the peak hash in a single place
* Update chia/full_node/block_store.py
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
* Update chia/full_node/block_store.py
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Earlier in the function `peak_hash` is used and is detectible as
`bytes32`. At this location it is assigned from an `Any` hinted
value thus leaving `bytes32` as a valid, although inaccurate,
hint. Renamed to avoid this collision of uses. When we ban `Any`
we will end up dealing with this.
* chia|tests: Pass the loaded/removed plots with `PlotRefreshResult`
Instead of just the counts.
* plotting: Default to `False` for `expected_result_matched`
* tests: Validate the loaded/removed plots match the expectations
* Rework sized bytes for type hinting compatibility
* add a bunch of type: ignores
* this will be handled elsewhere
* noqa E501 instead of changing code
* normalize comment plurality
* @classmethod
* Revert "@classmethod"
This reverts commit 95db80e339.
* add ignore in benchmarks
* just E501 again...
* add some new type: ignores
* factor out map of block height to block hash and sub epoch summary from blockchain into its own class, BlockHeightMap
* save and restore the height-to-hash map and height-to-sub epoch summary map to flat files, to imrove startup time. Add unit tests
* add back assert
* ensure that the spent field is redundant. It can be deduced from (spent_index == 0)
* use spent_index instead of spent, in coin_record database
* since we don't use the spent-field, there's no need to query the database for it
* initial hack
* crawler
* add pytz
* Checkpoint.
* Catch some bugs.
* Localhost dig working.
* Checkpoint: return only high quality nodes.
* Statistics.
* Try improving finding reliable nodes.
* Bug.
* Move db to memory.
* Timestamp in the last 5 days.
* Increase crawl parameters, 180+ connections per sec.
* Bug.
* Optimize for DNS traffic.
* Prepare for hosting.
* Minimum height.
* Typo.
* Try catch everything.
* dnslib.
* Add db, format code.
* nits.
* No connections for the dns server.
* Rename src -> chia
* Fix some issues with v1.1
* Crawler task pool.
* Optimize closing connections.
* Split crawler and dns server.
* Install instructions.
* Catch startup bug.
* Try a big timeout for lock aquire.
* lint.
* Lint.
* Initial commit extended stats.
* Simplify code.
* Config.
* Correct stats.
* Be more restrictive in crawling.
* Attempt to fix stats bug.
* Add other peers port to config.
* Update README for the config.
* Simplify crawl task.
* Fix bug on restarts.
* Prevent log spamming.
* More spam prevention.
* Fix bug.
* Ipv6 (#1)
* Enable ipv6.
* Fix bug.
* Use numeric codes for QTYPE.
* ANY working.
* More spam prevention.
* Try to improve IPv6 selection.
* Log IPv6 available.
* Try to crawl more aggresive for v6.
* rename dns.py to crawler_dns.py so it doesn't conflict with imported package names
* Remove pytz package off dependencies
* Tidy-up ws_connection.py
* Fix spelling
* Reinstate chia-blockchain readme, with additional lines pertaining to the DNS introducer & crawler
* More detailed info in the README wrt Chia Seeder
* Nit
* More memetic naming of Chia Seeder
* Nit
* Add entry points
* Add entry in packages
* Patch some methods on the upstream server
* Update peer record fields
* Standard library imports first
* Crawler API check
* Reconcile crawl store
* Account for crawler_db_path in config
* Await crawl store load DB and load reliable peers
* Updates to crawler
* Rename to dns_server
* Crawler-specific overrides for the chia server
* Edit comment
* Undo changes to ChiaServer in view of crawler-specific overrides introduced in previous commit
* Nit
* Update service groups
* Expand name maps, mostly
* Fix the init config
* Remove unused import
* total_records unused at this stage
* Remove ios_reliable in peer_reliability table
* Remove row[20] entry
* Split overly long line
* Fix
* Type hint for ns_records
* Reconcile mismatch btw type int and uint64
* Type annotations in crawler
* Check whether crawl store is set
* Remove upnp_list
* Lint
* Chia Seeder CLI
* Lint
* Two white spaces
* 3rd party package import
* Cleaner way to handle overrides for ChiaServer method
* Address linter warnings
* Rename
* Nits
* Fix
* Change port #
* Most chia_seeder commands up and running
* Rename
* Progress of sorts
* Fix
* Improve legibility
* Fix naming
* Fix setup.py
* Lint
* None -> ''
* Remove whitespace
* Rename
* Log ipv6 better. (#9227)
* Log ipv6 better.
* Lint.
* -
* Undo GUI changes
* Another attempt
* GUI changes
Co-authored-by: Yostra <straya@chia.net>
Co-authored-by: Florin Chirica <fchirica96@gmail.com>
Co-authored-by: Chris Marslender <chrismarslender@gmail.com>
* plotting|util: Introduce `chia.util.generator_tools.list_to_batches`
* tests: Test `list_to_batches` in `test_list_to_batches.py`
* util|tests: Return an empty iterator for empty input lists
* tests: Test list sizes from 1-10 in `test_valid`
* make the is_peak index smaller
* condition database updates on a configuration option
* drop unused coin_spent index
* drop redundant index on primary key
Co-authored-by: neurosis69 <83925572+neurosis69@users.noreply.github.com>
* Address deficiency discussed in #8552, add ability to resolve to IPv6
addresses for hostnames.
* If there is no prefer_ipv6 in the config, set it True (per @hoffmang9)
and write it back to config.yaml
* Pass prefer_ipv6 flag to get_host_addr, which required a little digging
for it in a few places that call get_host_addr.
* Update a couple things for consistency
* Move the load_config into Wallet's __init__ so it doesn't get called so
many times as it would in has_full_node.
* Pass None into get_host_addr if there's no preference in config, so we have only that one place where the coded default lives. also fix an oversight where we were building a PeerInfo from a PeerInfo in some cases.
* Change the default here to match the default coded into util/network.py. It seems that github testers can't handle trying to use IPv6 and this may be easier for average users (sadly)
* A test to see if manually creating the server on :: (IP6_ANY) lets tests connect to localhost with IPv6 on
* Revert back to IPv4 default and remove the override inserted into
TCPSite for testing.
* Don't test for ip6-localhost, as it's not on all systems.
* Bah. Forced formatting of commented code...
* Add a type annotation for the addrset variable
* If we don't quote the socket enums, pylint gets upset because it has issues figuring out where/how they're defined. So, quote them here.
Co-authored-by: Chris Ross <cross+chia@distal.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Correct some type hints adjacent to bytes32
Note that these errors won't show up until the sized bytes are
rewritten to "support" hinting. They are too dynamic at the moment.
* drop some bytes32 hints with unneeded Optional
* Apply suggestions from code review
* remove code change, this pr is hints only
* add get_version to damon wss endpoint
* add unit test for daemon::get_version
* use fixture for get_daemon
* fix flake8 warning in test
* Update server.py
Co-authored-by: wjblanke <wjb98672@gmail.com>
```python-traceback
Traceback (most recent call last):
File "/farm/chia-blockchain/venv/bin/chia_full_node", line 33, in <module>
sys.exit(load_entry_point('chia-blockchain', 'console_scripts', 'chia_full_node')())
File "/farm/chia-blockchain/chia/server/start_full_node.py", line 60, in main
return run_service(**kwargs)
File "/farm/chia-blockchain/chia/server/start_service.py", line 255, in run_service
return asyncio.run(async_run_service(*args, **kwargs))
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete
self.run_forever()
File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
self._run_once()
File "/usr/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once
event_list = self._selector.select(timeout)
File "/usr/lib/python3.8/selectors.py", line 468, in select
fd_event_list = self._selector.poll(timeout, max_ev)
File "/farm/chia-blockchain/chia/server/start_service.py", line 193, in _accept_signal
self.stop()
File "/farm/chia-blockchain/chia/server/start_service.py", line 210, in stop
self._node._close()
File "/farm/chia-blockchain/chia/full_node/full_node.py", line 704, in _close
self._transaction_queue_task.cancel()
AttributeError: 'FullNode' object has no attribute '_transaction_queue_task'
```
* Strip IPv6 [] correctly even with non-4-character segments
For example, the existing code failed to properly strip
`[____:____:____:600:____:a2:____:____]` resulting in the trailing `]`
below. (four character segments and node id redacted with `_`)
```
FULL_NODE ____:____:____:600:____:a2:____:____] 8444/8444 ________... Nov 12 20:46:47 1.5|18.9
-SB Height: 1131954 -Hash: 344cbef3...
```
* Simply IPv6 strip
Technically this hazards stripping multiple brackets from either end or a right bracket from the left, etc. Perhaps this is ok.
* Serialize/deserialize peer data alongside existing sqlite implementation (to be removed)
* Simplified AddressManagerStore. No longer uses sqlite and is no longer async.
* Removed aiosqlite usage from AddressManagerStore.
Added PeerStoreResolver class to determine the appropriate location for "peers.dat"
Updated initial-config.yaml to include "peers_file_path" default, replacing "peer_db_path" (similar change for "wallet_peers_path")
* Minor comment changes/additions
* Added migration from sqlite peer db.
Made AddressManagerStore's serialization async as it was right at the edge of blocking for too long.
* Minor tweaks to checking for migration
* Removed AddressManagerSQLiteStore class scaffolding
* makePeerDataSerialization now returns bytes instead of a PeerDataSerialization object
* Async file I/O for write_file_async using aiofiles
Added more tests
* Separate out the synchronous part of move_file
* Renamed write_file to files since we're opening up the capabilities a bit
* Update references to write_file
* Renamed test_write_file to test_files
* Tests covering move_file and move_file_async
* Minor refinements to behavior and tests
* Use aiofiles for reading peers.dat
* Added missing mypy typing info for aiofiles. Also added types-PyYAML to dev_dependencies so that `mypy chia tests` doesn't require running with --install-types
* Add types-aiofiles to the linting workflow
* Directory perms can now be passed into write_file_async.
Added an explicit f.flush() followed by os.fsync() after writing the temp file contents.
* Fix support for --passphrase-file when using chia start
* Strip trailing CR/LFs when reading the passphrase from a file
* Improve error handling when --passphrase-file specifies a bad passphrase
* Handle case where the default passphrase is cached
* Formatting change made by black
* Escape hatch for the unlikely case that someone is using a passphrase with trailing CR/LFs
* Fixed waitforcopy when using madmax CLI
* Fixed madmax CLI usage with the tmptoggle -G option
* Don't specify a default for tmpdir2
* Removed defaults for tmp/tmp2/final dirs. Values must be provided.
* Add fees to plotnft commandline and RPCs
* Return calculated fee based on number of transactions
* Extend tests to support fees. Default fee to 0 if not present in RPC call.
* Make plotnft cmdline fees use XCH, like
* fix validator
* cmdline tests
* Remove duplicate option
* Add fees to plotnft commandline and RPCs
* Return calculated fee based on number of transactions
* Extend tests to support fees. Default fee to 0 if not present in RPC call.
* Prority locking to consensus
* Remove pstats
* Linting
* Do some stuff outside of lock
* Fix startup
* Add log timings
* Try some different locking
* Add limit
* catch excp
* CLVM inside lock
* Try using a semaphore instead
* use events for lock queue
* test
* Add logging for message types
* type
* remove seed
* check new peak waiters
* correct FullNodeAPI self.full_node.new_peak._waiters typo
* correct logging string typos
* only warn about new_peak Waiters if there is at least 1
* remove no-longer-accepted parameter to FullNode.peak_post_processing()
* only warn about respond_transaction Waiters if there is at least 1
* lint
* Change some constants
* Small fix and logging changes
* Put message types outside
* Change some log levels so we can test with info
* More logging
* Increase rate limits but decrease paralelism
* tweaks
* Log dropped tx
* Fix pool rpc test
* Test fixes
* Mempool optimization
* Remove from seen if fails
* Increase queue sizes
* Message types info
* More test and logging
* Small changes to networking just in case
* Decrease logging
* Decrease logging even further
* Decrease logging even further even further
* Decrease logging 3
* Transaction queue
* Don't cancel tasks or close connection
* Cancel tasks on disconnect (for shutdown purposed)
* Fix typo
* Catch cancelled
* Do multiple at a time
* More accurate farmer response time
* More efficiently create tasks
* Increase queue size and priority by fee
* Revert priority
* Don't re-request too many times for dropped TX
* Handle cancelled error so we don't go into a bad state
* Catch cancelled in syncing tasks
* Reduce new_peak_sem to improve performance
* Less bytes conversion
* Missing file, and 2 workers for CLVM
* Validate BLS in a new thread
* tests
* Change semaphore constants
* correct a cancellation triggered exception and assertion
* Fix send_transaction, dont use BaseException, fix tests
* Fix more tests
* only log transaction handler cancellation in debug
* typing in log
* move unfinished validation to diff proc
* it is asyncio.CancelledError
* Add a test for bad signature
* Fix more tests, reduce logging, lint
* One more lint
* blockchain tests, pass bytes directly, single call
* Try to fix rl_wallet failures
* Fix mempool test
* catch everything
* Don't test RL wallet
* Fix more tests and return error code
* Improve error handling in multiprocess
* Add pre-validation time
* Add pre-validation time in logs, and revert pytest.ini changes
* Add log correctly
* Ms.bls cache experiment (#9115)
* Logging for cache
* Less logging
* Return to original plan
* Clean up
* Remove coment
* Remove log
* formalize LockQueue shutdown
* Comments
* Fix blockchain test
* Improve cache
* Remove logs
* Fix sign_coin_spends
* Fix pool wallet
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Yostra <straya@chia.net>