Commit Graph
14659 Commits
Author SHA1 Message Date
24019e35bb Add DID CLI (#15065)
* Add DID CLI

* minor fixes

* build fix

* resolving comments

---------

Co-authored-by: Sebastjan Trepca <trepca@gmail.com>
2023-04-24 12:44:43 -06:00
Arvid NorbergandGitHub fd8b85eb61 bump chia_rs to 0.2.7 (#15110) 2023-04-24 12:44:09 -06:00
JeffandGitHub e824332f35 Bump chia-blockchain-gui to c2707c8aa27093cf5f1deab4a4c68ce9ff5adb23 (#15085)
* Check latest GUI version on http://chia.net/downloads by @rifeljm in https://github.com/Chia-Network/chia-blockchain-gui/pull/1607
* added compareAppVersions function with tests by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1677
* Enable MintGarden offer sharing on mainnet by @greimela in https://github.com/Chia-Network/chia-blockchain-gui/pull/1676
* add checkbox to toggle launching Chia when installer exits by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1678
* nft improvements by @seeden in https://github.com/Chia-Network/chia-blockchain-gui/pull/1672

* @greimela made their first contribution in https://github.com/Chia-Network/chia-blockchain-gui/pull/1676

**Full Changelog**: https://github.com/Chia-Network/chia-blockchain-gui/compare/1.8.0-b6...1.8.0-b7
1.8.0-rc1
2023-04-19 21:34:21 -05:00
dustinfaceandGitHub d2997820b3 server: Resolve introducer right before the connection attempt (#14998) 2023-04-19 19:55:42 -05:00
Jack NelsonandGitHub 872f939132 Add Chia Simulator tools directly Into Chia Blockchain (#15005)
* add simulator tool + tests into chia blockchain

add chia dev ...

* isort

* make sim chia root use normal chia root as a part of it

* fix starting path for tests

* cleanup start and stop + cli

* add extra env message

* fix cmds

* update test

* add existing_plots arg

* change to consume_errors

* fix tests

* cleanup cmds_util.py

* cleanup click

* clean up block_tools

dataclass + logic cleanup & tests

* isort block_tools.py
2023-04-19 19:48:21 -05:00
William AllenandGitHub bc384a3a93 Adding daily full matrix test (#14927)
* Adding daily full matrix test

* Adjust indentation

* fix end of file
2023-04-19 16:32:51 -05:00
Earle LoweandGitHub 75caa352a7 New S3 plugin endpoints for add_store_id and remove_store_id (#15030)
* add_store_id and remove_store_id endpoints

* handle bucket info during add/remove

* Updated add and remove store id endpoints

* fix typo
2023-04-19 14:22:54 -05:00
Earle LoweandGitHub 7f0c338a27 Add timestamp and formatting to S3 plugin log (#15083)
* add date/time to log output

* minor comment fix

* configurable log_level
2023-04-19 14:03:37 -05:00
Matt HauffandGitHub 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
Earle LoweandGitHub 70112169d8 Removed "failed to write files" log spam from data layer (#15082)
remove log spam for datalayer
2023-04-19 12:01:58 -05:00
Matt HauffandGitHub e5dfac4708 Check for directory existence before creating offer (#14990)
Check for dir existence before creating offer
2023-04-19 10:55:17 -05:00
Arvid NorbergandGitHub 4ebd9498d1 activate the soft-fork and soft-fork2 earlier on testnet10 (#14921) 2023-04-19 10:54:30 -05:00
Arvid NorbergandGitHub 274b96e703 bump chia_rs dependency to 0.2.6 (#15077) 2023-04-19 10:54:16 -05:00
Almog De PazandGitHub a34a7dbb2a DL plugin Add missing files (#15062)
* add_missing_files

* lint

* dont error on fail to write

* use resource

* remove prints

* use dl folder and file names

* rearrange loop

* remove redundant str conversion

* dont break on failed upload
2023-04-19 10:48:06 -05:00
433a414496 Add plugin_info and healthz endpoints to s3 plugin service, add chia data plugins check cli (#15028)
* Add plugin_id and healthz endpoints to s3 plugin service

* Add `chia data plugins check` cli

* plugin_id -> plugin_info

* updates based on reviews

* Use gather to run the lookups

* Update chia/data_layer/data_layer.py

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

* Fix typo

* short_help -> help

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-04-18 18:45:35 -05:00
Arvid NorbergandGitHub 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
dustinfaceandGitHub 04abd86555 wallet: Fix, simplify and test TransactionRecord.is_valid (#15048)
* Add `minimum_send_attempts`

* Fix `MempoolInclusionStatus` check

* Fix error access

* Fix error check

* Simplify

* Test `TransactionRecord.is_valid`
2023-04-18 11:28:50 -05:00
dustinfaceandGitHub 5d514487e3 tests: Drop some unused code in test_puzzle_store.py (#15047) 2023-04-18 11:28:25 -05:00
dustinfaceandGitHub 58302968d9 server: Try to convert in known_active_capabilities (#15046) 2023-04-18 11:28:00 -05:00
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
dustinfaceandGitHub d9be2004c7 wallet: Some cleanup of WalletNode.fetch_puzzle_solution (#14896)
* wallet: Introduce `WalletNode.get_coin_spend_for_coin_state`

* Rename `fetch_puzzle_solution` and `get_coin_spend_for_coin_state`

* Free `fetch_coin_spend` and `fetch_coin_spend_for_coin_state`
2023-04-18 11:26:52 -05:00
7c719c35c7 Added some sanity checks to upload and download for S3 plugin (#15057)
* Added some sanity checks to upload and download

* Add server files path to config

* small fix

* send filenames and not paths now

* minor tweaks

* Update chia/data_layer/s3_plugin_service.py

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

* use bytes32.fromhex and other fixes

* set host to "localhost"

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
2023-04-17 22:18:56 -05:00
JeffandGitHub cbf7957d8d Bump chia-blockchain-gui to 3bac0590c5fe8514eaf35b9b054ee6dca8c2c1aa (#15064)
* added walletconnect app permissions gui by @Gaerax in https://github.com/Chia-Network/chia-blockchain-gui/pull/1561
* Add TS types for api, api-react and refactor parameters to object by @zsolt-dev in https://github.com/Chia-Network/chia-blockchain-gui/pull/1664
* preview an offer being created via WC using createOfferForIds by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1669
* Update eslint rules to allow for-of loops by @zsolt-dev in https://github.com/Chia-Network/chia-blockchain-gui/pull/1673
* added walletconnect app permissions gui by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1659
* adds a global notification toggle by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1658
* Fixed broken code by @ChiaMineJP in https://github.com/Chia-Network/chia-blockchain-gui/pull/1674
* invalidate some RTK caches when logging into a key by @paninaro in https://github.com/Chia-Network/chia-blockchain-gui/pull/1663

* @Gaerax made their first contribution in https://github.com/Chia-Network/chia-blockchain-gui/pull/1561

**Full Changelog**: https://github.com/Chia-Network/chia-blockchain-gui/compare/1.8.0-b5...1.8.0-b6
1.8.0-b6
2023-04-17 17:27:25 -05:00
Amine KhaldiandGitHub f278d9ccf8 Simplify create_bundle_from_mempool's handling of removals (#15056)
Simplify create_bundle_from_mempool's handling of removals.

They're already taken care of by aggregation.
2023-04-17 16:34:22 -05:00
Arvid NorbergandGitHub 2b62f168f6 extend mempool-benchmark (#15038) 2023-04-17 15:44:06 -05:00
Amine KhaldiandGitHub 3410cf3deb Introduce and use the ability to honor spends IDs in make_test_conds (#15060)
Introduce and use the ability to honor spends IDs in make_test_conds.
2023-04-17 15:43:50 -05:00
dustinfaceandGitHub c9f9dbd4f9 wallet: Select enough XCH to cover the fee when creating an offer (#15051)
* Partially revert 6d09a06

* Include fee amount when selecting XCH coins for offers

* Rename `get_coin_amount` -> `amount_to_select`

* Adjust comment

* No need to create a list first
2023-04-17 15:42:27 -05:00
Earle LoweandGitHub 2faa72a50a Add very basic logging support to S3 plugin (#15031)
* Add very basic logging support to plugin

* Address review comments
2023-04-17 11:16:23 -05:00
Adam KellyandGitHub 317c6461de Return fee estimates as integer mojos (#15020) 2023-04-17 01:31:20 -05:00
28a5d75506 S3 plugin config and endpoint updates (#15037)
* Addition logging for datalayer wrt plugins

* some plugin modifications to config and endpoints

* Add entry point and some minor config checking

* Improved config file reading for store_ids

* Changed to upload_bucket and download_url

* Apply suggestions from code review

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

* Code review suggestions

* uploaders and downloaders are now URLs and this was missed earlier

* Update pyinstaller.spec to include plugin binary

* updates based on code review

* Update chia/data_layer/s3_plugin_service.py

Co-authored-by: Almog De Paz <almogdepaz@gmail.com>

* minor updates

* Add boto3 to setup for s3 plugin

* Add None check

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Almog De Paz <almogdepaz@gmail.com>
2023-04-14 18:07:00 -06:00
Arvid NorbergandGitHub 9b8cdd36da limit expiring transactions (#14993)
limit the mempool size used for transactions with short expiration times. This makes it so transactions that expire in the next 15 minutes may not take more than one block worth of cost in the mempool
2023-04-14 15:23:24 -06:00
dustinfaceandGitHub d128c44079 wallet: Drop unused Wallet.create_spend_bundle_relative_chia (#15017) 2023-04-14 15:22:43 -06:00
dustinfaceandGitHub a7e7b9a290 server: Rework config peer resolving and connection handling (#14997)
merging as the snyk issue is confirmed a false positive
2023-04-14 15:22:24 -06:00
dustinfaceandGitHub 4f7e2ff8c3 util: Cleanup Tuple[Optional[Err], ..] returns in condition_tools.py (#15009) 2023-04-14 15:20:36 -06:00
dustinfaceandGitHub 20f10b4655 wallet: Reduce DB lookups in handle_did and handle_nft (#14969)
* Use the cached wallets in `handle_did`

* Use the cached wallets in `handle_nft`
2023-04-14 15:20:16 -06:00
Kyle AltendorfandGitHub 0832f211b7 cleanup connection removal from ChiaServer.all_connections (#15026) 2023-04-14 15:19:17 -06:00
dustinfaceandGitHub 3cd782be36 wallet: Some rework/cleanup of weight proof validation (#14572)
* Drop unused `List[SubEpochSummary]` return

* Drop unused `SubEpochSummary` return

* Raise in `WalletWeightProofHandler.validate_weight_proof`

* Move validation logs

* Set the new weight proof inside `fetch_and_update_weight_proof`

Which was `fetch_and_validate_the_weight_proof` before.

* Drop `WalletWeightProofHandler._weight_proof_tasks`, just await them

Doesn't seem to make a lot sense to have a list of tasks where we always 
just add a task, await it and remove it after. This happens in the long 
sync so to parent task will cancel the awaited task anyway.
2023-04-14 15:18:25 -06:00
Adam KellyandGitHub 4b594637c0 Rename singleton helper functions (#14983)
* Rename singleton helper functions

* Amend abbreviation in Singleton Puzzle creation functions
2023-04-12 11:34:08 -06:00
5b39e71842 Dl plugin service (#14883)
* generic downloader

* add s3 Downloader

* tests

* pre commit

* create uploader protocol, factor out upload code

* fix pre commit

* add s3 uploader

* add add helper for testing with real bucket

* typing

* lint

* logs

* start service separation

* working aiohttp s3 service

* lint

* multiple instances config

* break if failed to write

* better error handling

* update from conf before checking

* lint

* redundant config

* also update bucket

* improve exception handling

* remove old tests

* uae multiple uploaders

* Update chia/data_layer/data_layer.py

pr comments

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

* pr comments

* Apply typos fixes from code review

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

* Update chia/data_layer/s3_plugin_service.py

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

* scheme in conf

* use byte32 for store_ids list

* use dataclass instead of tuple for return value

* initial config handling for uploaders and downloaders

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Earle Lowe <30607889+emlowe@users.noreply.github.com>
Co-authored-by: Earle Lowe <e.lowe@chia.net>
2023-04-12 11:33:41 -06:00
dustinfaceandGitHub ed66308272 tests: Reuse puzzle_utils.make_create_coin_condition in test_puzzles (#15018) 2023-04-12 11:30:57 -06:00
Kronus91andGitHub a998ea48d8 Add new coin_type & metadata to coin_records (#15013)
* Add new coin_type & metadata to coin_records

* Remove unrelated changes

* Fix pre-commit

* Remove unrelated changes

* Fix pre-commit

* Add get_coin_records_between

* Fix field data type

* Resolve comments

* Fix unit test

* Remove unrelated changes

* Remove unrelated changes
2023-04-12 11:30:08 -06:00
dustinfaceandGitHub f0006b5353 server: peer_host + peer_port -> peer_info in WSChiaConnection (#14151) 2023-04-12 11:14:38 -06:00
Justin EnglandandGitHub c1e20688be No need to test install scripts on Mint (#14536)
Testing the install scripts on Linux Mint has very little value and
simply causes longer CI times along with more chances of flaky failure
due to network issues during OS setup.

We are transitioning away from users running the install manually to
more and more encouraging users to use the binary packages and Mint
users can use the Ubuntu DEB package.

This distro is only minimally popular and there is no rationale for
specific testing on Mint as opposed to other distros (Gentoo, etc)
2023-04-11 14:56:27 -06:00
Justin EnglandandGitHub d4a1957677 Print mypy version in CI jobs (#15011)
Sometimes, you might get output from CI like this:

```
> Run mypy
chia/wallet/puzzle_drivers.py:107: error: Unused "type: ignore" comment
chia/wallet/puzzles/prefarm/make_prefarm_ph.py:32: error: Unused "type: ignore" comment
tests/wallet/nft_wallet/test_ownership_outer_puzzle.py:24: error: Unused "type: ignore" comment
tests/core/util/test_streamable.py:658: error: Unused "type: ignore" comment
Found 4 errors in 4 files (checked 753 source files)
```

You might be confused, because `pre-commit` ran fine on YOUR machine.
"Why didn't it lint check clean in CI?", I hear you wonder.

Obviously, this has never happened to me. However, just in case you know
someone if has happened to, this one's for you.

Changes CI output only.
2023-04-11 14:56:11 -06:00
Justin EnglandandGitHub 598da60cae correct broken exit codes from manage_clvm.py (#15001)
<!-- Merging Requirements:
- Please give your PR a title that is release-note friendly
- In order to be merged, you must add the most appropriate category
Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing
functionality, improve performance, or reduce complexity?) -->
### Purpose:



<!-- Does this PR introduce a breaking change? -->
### Current Behavior:



### New Behavior:



<!-- As we aim for complete code coverage, please include details
regarding unit, and regression tests -->
### Testing Notes:



<!-- Attach any visual examples, or supporting evidence (attach any
.gif/video/console output below) -->
2023-04-11 14:55:58 -06:00
Justin EnglandandGitHub 1360383db9 more passing arguments by name in ChiaServer (#14937)
<!-- Merging Requirements:
- Please give your PR a title that is release-note friendly
- In order to be merged, you must add the most appropriate category
Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing
functionality, improve performance, or reduce complexity?) -->
### Purpose:



<!-- Does this PR introduce a breaking change? -->
### Current Behavior:



### New Behavior:



<!-- As we aim for complete code coverage, please include details
regarding unit, and regression tests -->
### Testing Notes:



<!-- Attach any visual examples, or supporting evidence (attach any
.gif/video/console output below) -->
2023-04-11 14:55:37 -06:00
Justin EnglandandGitHub 9f0a2ece07 remove unused Service(server_listen_ports=) parameter (#14928)
<!-- Merging Requirements:
- Please give your PR a title that is release-note friendly
- In order to be merged, you must add the most appropriate category
Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing
functionality, improve performance, or reduce complexity?) -->
### Purpose:

remove dead code so the remaining code is more comprehensible

<!-- Does this PR introduce a breaking change? -->
### Current Behavior:



### New Behavior:



<!-- As we aim for complete code coverage, please include details
regarding unit, and regression tests -->
### Testing Notes:



<!-- Attach any visual examples, or supporting evidence (attach any
.gif/video/console output below) -->
2023-04-11 14:55:19 -06:00
Justin EnglandandGitHub 4976017853 change self peer connection error to info, remove traceback (#14884)
<!-- Merging Requirements:
- Please give your PR a title that is release-note friendly
- In order to be merged, you must add the most appropriate category
Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing
functionality, improve performance, or reduce complexity?) -->
### Purpose:

Self connection errors don't need to be `ERROR` level in the log nor do
they need to have tracebacks. This will mostly happen when a node is
unaware of one or more of its own public IPs being used by the network.
Could be IPv4 vs. IPv6, or multiple IPs, or just being behind a NAT.

<!-- Does this PR introduce a breaking change? -->
### Current Behavior:

```python-traceback
2023-03-22T14:00:46.076 full_node full_node_server        : ERROR    Exception Trying to connect to a peer (PeerInfo(_ip=IPv4Address('<REDACTED>'), _port=58445)) with the same peer_id: <REDACTED>, exception Stack: Traceback (most recent call last):
  File "/home/ubuntu/chia-blockchain/chia/server/server.py", line 525, in start_client
    raise RuntimeError(f"Trying to connect to a peer ({target_node}) with the same peer_id: {peer_id}")
RuntimeError: Trying to connect to a peer (PeerInfo(_ip=IPv4Address('<REDACTED>'), _port=58445)) with the same peer_id: <REDACTED>
```

### New Behavior:

`INFO` level logging without a traceback

<!-- As we aim for complete code coverage, please include details
regarding unit, and regression tests -->
### Testing Notes:



<!-- Attach any visual examples, or supporting evidence (attach any
.gif/video/console output below) -->
2023-04-11 14:51:46 -06:00
Justin EnglandandGitHub 72697119b8 close daemon client even for a BaseException in acquire_connection_to_daemon() (#14867)
<!-- Merging Requirements:
- Please give your PR a title that is release-note friendly
- In order to be merged, you must add the most appropriate category
Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing
functionality, improve performance, or reduce complexity?) -->
### Purpose:

As is this would not close the daemon if a BaseException were raised.
For example `KeyboardInterrupt` or `asyncio.CancelledError` (on 3.8+).

<!-- Does this PR introduce a breaking change? -->
### Current Behavior:



### New Behavior:



<!-- As we aim for complete code coverage, please include details
regarding unit, and regression tests -->
### Testing Notes:



<!-- Attach any visual examples, or supporting evidence (attach any
.gif/video/console output below) -->
2023-04-11 14:50:45 -06:00
Justin EnglandandGitHub a1567febeb avoid FullNode.fetch_block_batches() from putting two Nones into the batch queue (#14804)
<!-- Merging Requirements:
- Please give your PR a title that is release-note friendly
- In order to be merged, you must add the most appropriate category
Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing
functionality, improve performance, or reduce complexity?) -->
### Purpose:

Please weigh in on whether this should be applied to the release or
retargeted to main.

The `finally:` clause will already result in `None` being put into the
queue. I expect that the other `None` pushed before the `return` is
unnecessarily doubling this up. I don't know if the double `None` has
any negative effect.


<!-- Does this PR introduce a breaking change? -->
### Current Behavior:



### New Behavior:



<!-- As we aim for complete code coverage, please include details
regarding unit, and regression tests -->
### Testing Notes:



<!-- Attach any visual examples, or supporting evidence (attach any
.gif/video/console output below) -->
2023-04-11 14:42:52 -06:00