* 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`
* Update GUI back to main
* Pin specific versions of electron-package and electron-osx-sign
* Make sure ssh git urls actually use https
* Update azure pipeline to use https instead of ssh for git
* Update windows pipelines to use https instead of ssh
* Fix messed up insteadOf rules on windows + azure mac pipeline
* 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>
* Install .[dev] in CI tests
* only install pytest-monitor on linux, as before
* add -d to install.sh for dev extras
* handle invalid options to install.sh
* rebuild workflows
* Start with farmer protocol.
* Also check bytes.
* Add full node protocol.
* Remove from_bytes() in hardcoded data file.
* Add all protocol data.
* Ignore flake8.
* Run pre-commit.
* Lint.
* Add randomness to bytes32 and uints.
* Run pretest.
* 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.