Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pylint complaint about missing dataclass constructor parameters with new astroid 2.12.6+ #7425

Closed
altendky opened this issue Sep 6, 2022 · 3 comments · Fixed by pylint-dev/astroid#1771
Assignees
Labels
dataclasses Needs astroid update Needs an astroid update (probably a release too) before being mergable Regression
Milestone

Comments

@altendky
Copy link

altendky commented Sep 6, 2022

Bug description

We have some code using dataclasses, union hints, inheritance, and default factories where pylint started complaining about the parameter being missing when constructing an instance despite the default factory. This started with astroid 2.12.6 and 2.12.7.
With astroid 2.12.5, pylint does not complain. I've narrowed it down to being triggered by the inheritance and the union hint on the parent class, seemingly.

"""a docstring for pylint"""
from dataclasses import dataclass
from typing import Union

@dataclass
class BadExampleParentClass:
    """a docstring for pylint"""
    xyz: Union[str, int]

@dataclass
class BadExampleClass(BadExampleParentClass):
    """a docstring for pylint"""
    xyz: str = ""

bad_c = BadExampleClass()

@dataclass
class GoodExampleParentClass:
    """a docstring for pylint"""
    xyz: str

@dataclass
class GoodExampleClass(GoodExampleParentClass):
    """a docstring for pylint"""
    xyz: str = ""

good_c = GoodExampleClass()
$ python3.10 -m venv venv
$ venv/bin/python -m pip install --upgrade pip setuptools wheel
Requirement already satisfied: pip in ./venv/lib/python3.10/site-packages (21.2.4)
Collecting pip
  Using cached pip-22.2.2-py3-none-any.whl (2.0 MB)
Requirement already satisfied: setuptools in ./venv/lib/python3.10/site-packages (58.1.0)
Collecting setuptools
  Using cached setuptools-65.3.0-py3-none-any.whl (1.2 MB)
Collecting wheel
  Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, setuptools, pip
  Attempting uninstall: setuptools
    Found existing installation: setuptools 58.1.0
    Uninstalling setuptools-58.1.0:
      Successfully uninstalled setuptools-58.1.0
  Attempting uninstall: pip
    Found existing installation: pip 21.2.4
    Uninstalling pip-21.2.4:
      Successfully uninstalled pip-21.2.4
Successfully installed pip-22.2.2 setuptools-65.3.0 wheel-0.37.1
$ venv/bin/python -m pip install pylint==2.15.0 astroid==2.12.7
Collecting pylint==2.15.0
  Using cached pylint-2.15.0-py3-none-any.whl (505 kB)
Collecting astroid==2.12.7
  Using cached astroid-2.12.7-py3-none-any.whl (262 kB)
Collecting mccabe<0.8,>=0.6
  Using cached mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB)
Collecting isort<6,>=4.2.5
  Using cached isort-5.10.1-py3-none-any.whl (103 kB)
Collecting tomlkit>=0.10.1
  Using cached tomlkit-0.11.4-py3-none-any.whl (35 kB)
Collecting platformdirs>=2.2.0
  Using cached platformdirs-2.5.2-py3-none-any.whl (14 kB)
Collecting dill>=0.2
  Using cached dill-0.3.5.1-py2.py3-none-any.whl (95 kB)
Collecting tomli>=1.1.0
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting wrapt<2,>=1.11
  Using cached wrapt-1.14.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (77 kB)
Collecting lazy-object-proxy>=1.4.0
  Using cached lazy_object_proxy-1.7.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (62 kB)
Installing collected packages: wrapt, tomlkit, tomli, platformdirs, mccabe, lazy-object-proxy, isort, dill, astroid, pylint
Successfully installed astroid-2.12.7 dill-0.3.5.1 isort-5.10.1 lazy-object-proxy-1.7.1 mccabe-0.7.0 platformdirs-2.5.2 pylint-2.15.0 tomli-2.0.1 tomlkit-0.11.4 wrapt-1.14.1
$ cat > example.py << EOF
> """a docstring for pylint"""
> from dataclasses import dataclass
> from typing import Union
> 
> @dataclass
> class BadExampleParentClass:
>     """a docstring for pylint"""
>     xyz: Union[str, int]
> 
> @dataclass
> class BadExampleClass(BadExampleParentClass):
>     """a docstring for pylint"""
>     xyz: str = ""
> 
> bad_c = BadExampleClass()
> 
> @dataclass
> class GoodExampleParentClass:
>     """a docstring for pylint"""
>     xyz: str
> 
> @dataclass
> class GoodExampleClass(GoodExampleParentClass):
>     """a docstring for pylint"""
>     xyz: str = ""
> 
> good_c = GoodExampleClass()
> EOF
$ venv/bin/pylint example.py
************* Module example
example.py:15:8: E1120: No value for argument 'xyz' in constructor call (no-value-for-parameter)

------------------------------------------------------------------
Your code has been rated at 5.83/10 (previous run: 5.83/10, +0.00)

Configuration

No response

Command used

venv/bin/pylint example.py

Pylint output

************* Module example
example.py:15:8: E1120: No value for argument 'xyz' in constructor call (no-value-for-parameter)

------------------------------------------------------------------
Your code has been rated at 5.83/10 (previous run: 5.83/10, +0.00)

Expected behavior

No complain as happened with astroid 2.12.5.

Pylint version

pylint 2.15.0
astroid 2.12.7

OS / Environment

Ubuntu Linux 20.04

Additional dependencies

No response

@altendky altendky added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Sep 6, 2022
@altendky
Copy link
Author

altendky commented Sep 6, 2022

For reference, here are the astroid diffs.

pylint-dev/astroid@v2.12.5...v2.12.6
pylint-dev/astroid@v2.12.6...v2.12.7

@DanielNoord DanielNoord self-assigned this Sep 6, 2022
@altendky altendky changed the title pylint complaint with new astroid 2.12.6 and 2.12.7 pylint complaint about missing dataclass constructor parameters with new astroid 2.12.6+ Sep 6, 2022
altendky added a commit to Chia-Network/chia-blockchain that referenced this issue Sep 6, 2022
@DanielNoord DanielNoord added Regression Needs astroid update Needs an astroid update (probably a release too) before being mergable dataclasses and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Sep 6, 2022
@DanielNoord DanielNoord added this to the 2.15.1 milestone Sep 6, 2022
@DanielNoord
Copy link
Collaborator

Thanks for the report. I pushed a PR with a fix to astroid. We're probably going to release another patch version of astroid and include that in pylint as well.

A recent PR for dataclasses has caused a lot of unexpected regression. Sorry about that!

@altendky
Copy link
Author

altendky commented Sep 6, 2022

Yeah, I saw the effort and quick turnaround. I appreciate your time and concern. I'll make a test PR in our repo to check with pylint-dev/astroid#1771.

altendky added a commit to Chia-Network/chia-blockchain that referenced this issue Sep 6, 2022
wallentx pushed a commit to Chia-Network/chia-blockchain that referenced this issue Sep 6, 2022
wallentx added a commit to AppleOfEnlightenment/chia-blockchain that referenced this issue Sep 7, 2022
* Fix duplicate subscriptions.

* fixup

* Bump chia-blockchain-gui to 55e776c (Chia-Network#13090)

Fixes an exception in local storage when non-existent items are accessed.

* some rpc reference data output code (commented out)

* renames

* Address linting.

* Update test to reflect the recent change in ReorgProtocol.

* include wallet maker offer rpc call in transaction rollback region

* Update data_layer.py

* Adding changelog (Chia-Network#13121)

* Adding changelog

* Fixing changelog indentation

* roll back pending roots on cancellation (but broken)

* (fixed up)

* bump data layer test timeout to 55

* util: Introduce `get_key`/`get_keys` in `Keychain` + `KeychainServer` (Chia-Network#12830)

* Generalize NFT offers (Chia-Network#12945)

* Generalize NFT offers

* Write tests for complex NFT1 offers

* Combine two loops

* isort

* Save one block farmed

* Increase timeouts

* black

* merge related fix

* avoid locking up the main thread by using an asyncio.Future to wait for the worker processes in weight proof validation (Chia-Network#13118)

* now that all uses of DBWrapper have been updated to DBWrapper2, remove the old one (Chia-Network#13116)

* Adding changelog (Chia-Network#13121) (Chia-Network#13135)

* Adding changelog

* Fixing changelog indentation

* Fix several bugs with untrusted sync, and correct sync status (Chia-Network#13133)

* Hopefully fix bug with untrusted sync

* Try removing the cache

* Add cache back, and don't rollback

* Compare to finished_sync_up_to

* Fix plotnfts, and tests

* Async function

* fix wallet blockchain tests

* Fix test, and improve detection of synced

* Correct sync status

* Fix more tests

* Fix more tests

* Fix NFT tests

* We did not await the async function (Chia-Network#13154)

* dependency-review (Chia-Network#13153)

* tweak output from task-profiler (Chia-Network#13137)

* Replace `electron-packager` with `electron-builder` (Chia-Network#12953)

* Install electron-builder

* Replaced electron-packager with electron-builder for windows

* Upgraded electron-builder version for mac

* Replaced electron-packager with electron-builder for Linux and integreated deb/rpm dir

* Updated mac installer job

* Fixed app.asar location

* Fixed dmg name for arm64 mac

* Updated installer-version.py

* Updated Linux(deb) installer CI job

* Updated Linux(rpm) installer CI job

* Fixed Linux(rpm) install CI issue

* Revert to use `electron-packager` instead of `electron-builder` for arm64 .deb installer

* Fixed lint errors

* Fixed rpm installer job issue

* Updated Windows installer CI job

* Fixed rpm installer CI job

* Simplified arm64 build

* Added -y option to `apt install` command

* Added `dmg-license` as npm build dependency for MacOS

* Attempt to set product name appropriately for each platform

* Specified productNames in commands

* Fixed arm64 installer issue

* Stopped to create link '/opt/chia/daemon'

* Updated desktop app name for linux installers

* Updated packageName for linux installers

* Abort build jobs when 'cd' fails

* Updated the GUI submodule ref (main:5e52b7f53478d4f39b4a0f0203f41e31dd53aee9)

Co-authored-by: Jeff Cruikshank <jeff@chia.net>

* update _peak_height after committing the block to the DB (Chia-Network#13157)

* When adding coins to the wallet, lookup the coin records in bulk, rather than one at a time (Chia-Network#13142)

* Revert "now that all uses of DBWrapper have been updated to DBWrapper2, remove the old one" (Chia-Network#13145)

This reverts commit 2d9672c.

* Fix comments in initial config where puzzle hash should be receive address (Chia-Network#13146)

* Add atari CLI help.

* Add atari CLI.

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Lint.

* atari - drop dead fingerprint options

* Reflect the change on datalayer related code.

* Fixup.

* Don't try to sign mac installers when secrets are unavailable (Chia-Network#13166)

* util: Implement key label support for `FileKeyring` and `KeyringWrapper` (Chia-Network#12843)

* util: Implement key label support for `FileKeyring` and `KeyringWrapper`

* Restrict trailing/leading whitespaces in the label

* Bump `MAX_LABEL_LENGTH` to 65

* Additional label tests

* Drop duplicated `KeychainFingerprintNotFound` definition

* add royalty calculation method and RPC (Chia-Network#13129)

* Generalize NFT offers

* Write tests for complex NFT1 offers

* Combine two loops

* isort

* Save one block farmed

* Increase timeouts

* black

* merge related fix

* add royalty calculation method and RPC

* flake8

* Fix the CLI for royalties

* royalty_pts -> royalty_percentage

* minor test fix

* remove all_puzzle_hashes from wallet puzzle store (Chia-Network#13159)

* simplify WalletStateManager.coin_added(). Make sure all callers ensure the coin isn't in the DB already, and always pass in the coin name (Chia-Network#13144)

* update gui for atari changes

* enable mypy for a some wallet files (Chia-Network#13185)

* enable mypy for chia/wallet/trading/offer.py

* enable mypy for chia/wallet/trade_manager.py

* track last_derivation_index in memory for each wallet (and across wallets) rather than performing DB lookups unconditionally (Chia-Network#13155)

* introduce a Protocol for puzzle drivers, for increased type checking (Chia-Network#13183)

* update gui for release/1.6.0 take 2

* core.data_layer parallel = True (Chia-Network#13197)

* don't run the get_offered_coins post-init check. It's very expensive (Chia-Network#13205)

* skip parsing (and computing) offers just to get to the involved coins, instead use the DB field for coins_of_interest (Chia-Network#13213)

* implement a more efficient Program.uncurry() (Chia-Network#13204)

* Debug get tree hash (Chia-Network#13218)

* log clvm programs with format string instead of f-string

* avoid redundant calls to get_tree_hash() in the NFT wallet

* only compute the tree hashes for debug logging when actually logging

* Fill missing services in config for data layer (Chia-Network#13220)

* fill missing services in config for data layer

* adjust

* here too

* util: Implement key label support for `Keychain` and `KeychainServer` (Chia-Network#12883)

* util: Implement key name support for `Keychain` and `KeychainServer`

* Re-raise if adding the key fails

* Call `G1Element.get_fingerprint` only once

* use rust parser for Program and SerializedProgram.to_program() (Chia-Network#13203)

* benchmark for parsing Offer (Chia-Network#13212)

* Puzzle driver type annotations (Chia-Network#13190)

* annotate CAT outer puzzle driver

* add type annotation to transfer_program_puzzle

* add type annotations to singleton_outer_puzzle

* add type annotations to ownership_outer_puzzle

* add type annotations to metadata_outer_puzzle

* remove unused _asset_id field in puzzle drivers

* Fix missing wallet `state_changed` events (Chia-Network#13200)

* Fixed an issue where some of the wallet state_changed events were not notified to subscribers

* Fixed a lint error

* Fix data Server CLI. (Chia-Network#13222)

* 🍒1 (Chia-Network#13231)

* add delayed pool config update feature (Chia-Network#12796)

* add delayed pool config update feature

* we dont talk about this commit

* We did not await the async function (Chia-Network#13154)

Co-authored-by: Jack Nelson <jack@jacknelson.xyz>
Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>

* update _peak_height after committing the block to the DB (Chia-Network#13157) (Chia-Network#13233)

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>

* fill in data layer certs at startup (Chia-Network#13225)

* fill in data layer certs at startup

* tidy

* don't overwrite

* add overwrite parameter to write_ssl_cert_and_key()

* Change override to overwrite atari add_missing_files. (Chia-Network#13224)

* clarify comment in `DataLayerServer.stop()` (Chia-Network#13216)

* data layer - remove old .gitignore (Chia-Network#13198)

* correct port reference in data layer test (Chia-Network#13193)

* Update test_data_rpc.py

* catch up hashes with fix

* introduce an UncurriedPuzzle class (Chia-Network#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()

* Calculate puzzle hashes directly, as an optimization. (Chia-Network#13034)

* Reflect the changes from main on atari related code.

* Implement generator_for_single_coin() in python instead of clvm and apply quex' optimization to only computing the puzzle hash if the parent and amount matches (Chia-Network#13237)

* Reflect the changes from main on atari related code.

* Apparently yaml.safe_dump() can't handle uint16 port (in the wallet_peer port section of data_layer's config). Propagate the port type and make this one explicitly int.

* Xch spam (Chia-Network#12878)

* Add mariano54s spam filter changes (original PR is Chia-Network#11894)

* Add new spam_filter tests

* remove get_all_coins method and query db directly in test

* Add test to include case where everything gets filtered, even the first coin

* If filter threshold is <= 1, no need to run the filter

* add test of chia.wallet.wallet_coin_store.get_all_unspent_coins

* Add test case for receiving large coin after sending dust coin

* Add NFT test to spam wallet

* resolve merge conflicts with main

* remove unneeded coin store test

* Add black formatting

* split long comments into multiple lines

* Run black, second try

* Manually add black changes

* Black

Co-authored-by: Mariano Sorgente <sorgente711@gmail.com>

* Pinning GUI to 8a52d3c - HEAD of release/1.6.0 (Chia-Network#13246)

* correct subscription ip to ipv4 localhost (Chia-Network#13243)

* data layer - wait for creation tx (Chia-Network#13240)

* DL Fix add_mirror amount -h. (Chia-Network#13221)

* unfix the test bug, we will get it later with the associated data changes

* coin interest optimization for trade records (Chia-Network#13044)

* coin interest optimization for trade records

* don't duplicate coin

* added a test

* migration test

* trade record replace test

* mypy fixes

* refactor to use coin_id

* return a set

* Get minter DID for offer (Chia-Network#13156)

* Get minter DID for offer

* Fetch minter did for all NFTs

* Resolve comments

* Fix issues

* Fix pre-commit

* Fix unit test

* update gui to checkpoint

* add wallet_id and did to state_changed (Chia-Network#13260)

* treehash optimization for DID wallet (Chia-Network#13253)

* only calculate treehash of constants once

* missed one treehash calc

* add benchmark for get_puzzle_and_solution_for_coin (Chia-Network#13301)

* fix: build_scripts/npm_linux/package.json & build_scripts/npm_linux/package-lock.json to reduce vulnerabilities (Chia-Network#13286)

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-GOT-2932019

* now when optimizations have landed, tighten the expected timing for the offer parsing benchmark (Chia-Network#13236)

* minor fixes for Serialized program (Chia-Network#13229)

* use bytearray to build a binary blob, convert it to bytes once it's done

* load the bootstrap generator rom in binary form directly, avoid conversions

* remove an insane amount of imports & add support for edge case (Chia-Network#13195)

add support for edge case

* fix flakey test (Chia-Network#12925)

* fix flakey test

* unused import

* testing flakeyness

* fix and test 200 times

* use mock to avoid running _sync

* lint

* remove unused import

* cmds: Key label support for CLI - `chia keys label` (Chia-Network#12917)

* Display minter DID in CLI (Chia-Network#13311)

* Get minter DID for offer

* Fetch minter did for all NFTs

* Resolve comments

* Fix issues

* Fix pre-commit

* Fix unit test

* Display minter did

* optimize get_block_store (Chia-Network#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

* astroid!=2.12.6, !=2.12.7 (Chia-Network#13338)

pylint-dev/pylint#7425

* Replace localhost with 127.0.0.1 for tests (Chia-Network#13324)

* Replace localhost with 127.0.0.1 in block tools config

* also make self_hostname fixture be 127.0.0.1

* Move config rewrite inside `automated_testing` conditional

* data layer - wait for creation tx (Chia-Network#13240) (Chia-Network#13335)

(cherry picked from commit 8b1a27b)

* fix wallet rpc flakes  (Chia-Network#13336)

* fix flakes and lower timeouts

* lint

* Fix complex NFT offer flakiness (Chia-Network#13337)

* Load NFT off-chain metadata on backend (Chia-Network#13018)

* Fix NFT wallet naming

* Resolve comments

* Resolve comment

* Add tests

* Load off-chain metadata & nft_get_nfts pagination

* Fix pre-commit

* Resolve comments

* Resolve comments

* Fix precommit

* Resolve comments

* Resolve comment

* Fix pre-commit

* Fix unit test

* Add tests for pagination

* Resolve comments

* Fix pre-commit

* Resolve comments

* Ms.mempool simplify (Chia-Network#13314)

* Remove mempool.additions

* Don't re run the program, and remove program from mempool item

* Removals only stores item ids, and stores a list

* Move pending cache down to prevent cache dos

* Separate validation from adding to pool, and remove mypy exceptions

* Fix bug with replacing

* Add to mypy

* Revert cbgui

* precommit fail

* Properly update the seen dict

* lint error

* Fix mempool bug

* Update after merge with main

* Address comments

* Fix bug in remove_plot_directory (Chia-Network#13332)

Revert commit c400d81

* Avoid creating a list and enable short circuit behavior in `bundle_suitable_for_compression()` (Chia-Network#13331)

This avoids the creation of the list entirely.  In so doing it also allows `all()` to return `False` on the first uncompressable spend it finds instead of analyzing all of them first.

* Remove "Total iterations since start" from chia show -s (Chia-Network#13196)

* Bumping codeQL actions to v2 (Chia-Network#13344)

* use get_puzzle_and_solution_for_coin() from chia_rs (Chia-Network#13315)

* The poor CI machine cannot go fast enough (Chia-Network#13347)

* The poor CI machine cannot go fast enough

* Also for data layer

* More increases

* Update build-linux-installer-deb.yml

* Fixing bladebit plotter conditional

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Florin Chirica <fchirica96@gmail.com>
Co-authored-by: Jeff <jeff@chia.net>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: Matt Hauff <quexington@gmail.com>
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>
Co-authored-by: Justin England <justin@chia.net>
Co-authored-by: Izumi Hoshino <admin@chiamine.jp>
Co-authored-by: hugepants <hugepants@users.noreply.github.com>
Co-authored-by: Chris Marslender <chrismarslender@gmail.com>
Co-authored-by: Jack Nelson <jack@jacknelson.xyz>
Co-authored-by: Richard Kiss <him@richardkiss.com>
Co-authored-by: Dan Perry <69756004+danieljperry@users.noreply.github.com>
Co-authored-by: Mariano Sorgente <sorgente711@gmail.com>
Co-authored-by: Sebastjan Trepca <trepca@gmail.com>
Co-authored-by: Kronus91 <t.yu@chia.net>
Co-authored-by: Snyk bot <github+bot@snyk.io>
Co-authored-by: Almog De Paz <almogdepaz@gmail.com>
Co-authored-by: joshpainter <josh@joshpainter.com>
Co-authored-by: Gene Hoffman <30377676+hoffmang9@users.noreply.github.com>
wallentx added a commit to AppleOfEnlightenment/chia-blockchain that referenced this issue Sep 15, 2022
* Fix duplicate subscriptions.

* fixup

* Bump chia-blockchain-gui to 55e776c (Chia-Network#13090)

Fixes an exception in local storage when non-existent items are accessed.

* some rpc reference data output code (commented out)

* renames

* Address linting.

* Update test to reflect the recent change in ReorgProtocol.

* include wallet maker offer rpc call in transaction rollback region

* Update data_layer.py

* Adding changelog (Chia-Network#13121)

* Adding changelog

* Fixing changelog indentation

* roll back pending roots on cancellation (but broken)

* (fixed up)

* bump data layer test timeout to 55

* util: Introduce `get_key`/`get_keys` in `Keychain` + `KeychainServer` (Chia-Network#12830)

* Generalize NFT offers (Chia-Network#12945)

* Generalize NFT offers

* Write tests for complex NFT1 offers

* Combine two loops

* isort

* Save one block farmed

* Increase timeouts

* black

* merge related fix

* avoid locking up the main thread by using an asyncio.Future to wait for the worker processes in weight proof validation (Chia-Network#13118)

* now that all uses of DBWrapper have been updated to DBWrapper2, remove the old one (Chia-Network#13116)

* Adding changelog (Chia-Network#13121) (Chia-Network#13135)

* Adding changelog

* Fixing changelog indentation

* Fix several bugs with untrusted sync, and correct sync status (Chia-Network#13133)

* Hopefully fix bug with untrusted sync

* Try removing the cache

* Add cache back, and don't rollback

* Compare to finished_sync_up_to

* Fix plotnfts, and tests

* Async function

* fix wallet blockchain tests

* Fix test, and improve detection of synced

* Correct sync status

* Fix more tests

* Fix more tests

* Fix NFT tests

* We did not await the async function (Chia-Network#13154)

* dependency-review (Chia-Network#13153)

* tweak output from task-profiler (Chia-Network#13137)

* Replace `electron-packager` with `electron-builder` (Chia-Network#12953)

* Install electron-builder

* Replaced electron-packager with electron-builder for windows

* Upgraded electron-builder version for mac

* Replaced electron-packager with electron-builder for Linux and integreated deb/rpm dir

* Updated mac installer job

* Fixed app.asar location

* Fixed dmg name for arm64 mac

* Updated installer-version.py

* Updated Linux(deb) installer CI job

* Updated Linux(rpm) installer CI job

* Fixed Linux(rpm) install CI issue

* Revert to use `electron-packager` instead of `electron-builder` for arm64 .deb installer

* Fixed lint errors

* Fixed rpm installer job issue

* Updated Windows installer CI job

* Fixed rpm installer CI job

* Simplified arm64 build

* Added -y option to `apt install` command

* Added `dmg-license` as npm build dependency for MacOS

* Attempt to set product name appropriately for each platform

* Specified productNames in commands

* Fixed arm64 installer issue

* Stopped to create link '/opt/chia/daemon'

* Updated desktop app name for linux installers

* Updated packageName for linux installers

* Abort build jobs when 'cd' fails

* Updated the GUI submodule ref (main:5e52b7f53478d4f39b4a0f0203f41e31dd53aee9)

Co-authored-by: Jeff Cruikshank <jeff@chia.net>

* update _peak_height after committing the block to the DB (Chia-Network#13157)

* When adding coins to the wallet, lookup the coin records in bulk, rather than one at a time (Chia-Network#13142)

* Revert "now that all uses of DBWrapper have been updated to DBWrapper2, remove the old one" (Chia-Network#13145)

This reverts commit 2d9672c.

* Fix comments in initial config where puzzle hash should be receive address (Chia-Network#13146)

* Add atari CLI help.

* Add atari CLI.

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Lint.

* atari - drop dead fingerprint options

* Reflect the change on datalayer related code.

* Fixup.

* Don't try to sign mac installers when secrets are unavailable (Chia-Network#13166)

* util: Implement key label support for `FileKeyring` and `KeyringWrapper` (Chia-Network#12843)

* util: Implement key label support for `FileKeyring` and `KeyringWrapper`

* Restrict trailing/leading whitespaces in the label

* Bump `MAX_LABEL_LENGTH` to 65

* Additional label tests

* Drop duplicated `KeychainFingerprintNotFound` definition

* add royalty calculation method and RPC (Chia-Network#13129)

* Generalize NFT offers

* Write tests for complex NFT1 offers

* Combine two loops

* isort

* Save one block farmed

* Increase timeouts

* black

* merge related fix

* add royalty calculation method and RPC

* flake8

* Fix the CLI for royalties

* royalty_pts -> royalty_percentage

* minor test fix

* remove all_puzzle_hashes from wallet puzzle store (Chia-Network#13159)

* simplify WalletStateManager.coin_added(). Make sure all callers ensure the coin isn't in the DB already, and always pass in the coin name (Chia-Network#13144)

* update gui for atari changes

* enable mypy for a some wallet files (Chia-Network#13185)

* enable mypy for chia/wallet/trading/offer.py

* enable mypy for chia/wallet/trade_manager.py

* track last_derivation_index in memory for each wallet (and across wallets) rather than performing DB lookups unconditionally (Chia-Network#13155)

* introduce a Protocol for puzzle drivers, for increased type checking (Chia-Network#13183)

* update gui for release/1.6.0 take 2

* core.data_layer parallel = True (Chia-Network#13197)

* don't run the get_offered_coins post-init check. It's very expensive (Chia-Network#13205)

* skip parsing (and computing) offers just to get to the involved coins, instead use the DB field for coins_of_interest (Chia-Network#13213)

* implement a more efficient Program.uncurry() (Chia-Network#13204)

* Debug get tree hash (Chia-Network#13218)

* log clvm programs with format string instead of f-string

* avoid redundant calls to get_tree_hash() in the NFT wallet

* only compute the tree hashes for debug logging when actually logging

* Fill missing services in config for data layer (Chia-Network#13220)

* fill missing services in config for data layer

* adjust

* here too

* util: Implement key label support for `Keychain` and `KeychainServer` (Chia-Network#12883)

* util: Implement key name support for `Keychain` and `KeychainServer`

* Re-raise if adding the key fails

* Call `G1Element.get_fingerprint` only once

* use rust parser for Program and SerializedProgram.to_program() (Chia-Network#13203)

* benchmark for parsing Offer (Chia-Network#13212)

* Puzzle driver type annotations (Chia-Network#13190)

* annotate CAT outer puzzle driver

* add type annotation to transfer_program_puzzle

* add type annotations to singleton_outer_puzzle

* add type annotations to ownership_outer_puzzle

* add type annotations to metadata_outer_puzzle

* remove unused _asset_id field in puzzle drivers

* Fix missing wallet `state_changed` events (Chia-Network#13200)

* Fixed an issue where some of the wallet state_changed events were not notified to subscribers

* Fixed a lint error

* Fix data Server CLI. (Chia-Network#13222)

* 🍒1 (Chia-Network#13231)

* add delayed pool config update feature (Chia-Network#12796)

* add delayed pool config update feature

* we dont talk about this commit

* We did not await the async function (Chia-Network#13154)

Co-authored-by: Jack Nelson <jack@jacknelson.xyz>
Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>

* update _peak_height after committing the block to the DB (Chia-Network#13157) (Chia-Network#13233)

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>

* fill in data layer certs at startup (Chia-Network#13225)

* fill in data layer certs at startup

* tidy

* don't overwrite

* add overwrite parameter to write_ssl_cert_and_key()

* Change override to overwrite atari add_missing_files. (Chia-Network#13224)

* clarify comment in `DataLayerServer.stop()` (Chia-Network#13216)

* data layer - remove old .gitignore (Chia-Network#13198)

* correct port reference in data layer test (Chia-Network#13193)

* Update test_data_rpc.py

* catch up hashes with fix

* introduce an UncurriedPuzzle class (Chia-Network#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()

* Calculate puzzle hashes directly, as an optimization. (Chia-Network#13034)

* Reflect the changes from main on atari related code.

* Implement generator_for_single_coin() in python instead of clvm and apply quex' optimization to only computing the puzzle hash if the parent and amount matches (Chia-Network#13237)

* Reflect the changes from main on atari related code.

* Apparently yaml.safe_dump() can't handle uint16 port (in the wallet_peer port section of data_layer's config). Propagate the port type and make this one explicitly int.

* Xch spam (Chia-Network#12878)

* Add mariano54s spam filter changes (original PR is Chia-Network#11894)

* Add new spam_filter tests

* remove get_all_coins method and query db directly in test

* Add test to include case where everything gets filtered, even the first coin

* If filter threshold is <= 1, no need to run the filter

* add test of chia.wallet.wallet_coin_store.get_all_unspent_coins

* Add test case for receiving large coin after sending dust coin

* Add NFT test to spam wallet

* resolve merge conflicts with main

* remove unneeded coin store test

* Add black formatting

* split long comments into multiple lines

* Run black, second try

* Manually add black changes

* Black

Co-authored-by: Mariano Sorgente <sorgente711@gmail.com>

* Pinning GUI to 8a52d3c - HEAD of release/1.6.0 (Chia-Network#13246)

* correct subscription ip to ipv4 localhost (Chia-Network#13243)

* data layer - wait for creation tx (Chia-Network#13240)

* DL Fix add_mirror amount -h. (Chia-Network#13221)

* unfix the test bug, we will get it later with the associated data changes

* coin interest optimization for trade records (Chia-Network#13044)

* coin interest optimization for trade records

* don't duplicate coin

* added a test

* migration test

* trade record replace test

* mypy fixes

* refactor to use coin_id

* return a set

* Get minter DID for offer (Chia-Network#13156)

* Get minter DID for offer

* Fetch minter did for all NFTs

* Resolve comments

* Fix issues

* Fix pre-commit

* Fix unit test

* update gui to checkpoint

* add wallet_id and did to state_changed (Chia-Network#13260)

* treehash optimization for DID wallet (Chia-Network#13253)

* only calculate treehash of constants once

* missed one treehash calc

* add benchmark for get_puzzle_and_solution_for_coin (Chia-Network#13301)

* fix: build_scripts/npm_linux/package.json & build_scripts/npm_linux/package-lock.json to reduce vulnerabilities (Chia-Network#13286)

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-GOT-2932019

* now when optimizations have landed, tighten the expected timing for the offer parsing benchmark (Chia-Network#13236)

* minor fixes for Serialized program (Chia-Network#13229)

* use bytearray to build a binary blob, convert it to bytes once it's done

* load the bootstrap generator rom in binary form directly, avoid conversions

* remove an insane amount of imports & add support for edge case (Chia-Network#13195)

add support for edge case

* fix flakey test (Chia-Network#12925)

* fix flakey test

* unused import

* testing flakeyness

* fix and test 200 times

* use mock to avoid running _sync

* lint

* remove unused import

* cmds: Key label support for CLI - `chia keys label` (Chia-Network#12917)

* Display minter DID in CLI (Chia-Network#13311)

* Get minter DID for offer

* Fetch minter did for all NFTs

* Resolve comments

* Fix issues

* Fix pre-commit

* Fix unit test

* Display minter did

* optimize get_block_store (Chia-Network#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

* astroid!=2.12.6, !=2.12.7 (Chia-Network#13338)

pylint-dev/pylint#7425

* Replace localhost with 127.0.0.1 for tests (Chia-Network#13324)

* Replace localhost with 127.0.0.1 in block tools config

* also make self_hostname fixture be 127.0.0.1

* Move config rewrite inside `automated_testing` conditional

* data layer - wait for creation tx (Chia-Network#13240) (Chia-Network#13335)

(cherry picked from commit 8b1a27b)

* fix wallet rpc flakes  (Chia-Network#13336)

* fix flakes and lower timeouts

* lint

* Fix complex NFT offer flakiness (Chia-Network#13337)

* Load NFT off-chain metadata on backend (Chia-Network#13018)

* Fix NFT wallet naming

* Resolve comments

* Resolve comment

* Add tests

* Load off-chain metadata & nft_get_nfts pagination

* Fix pre-commit

* Resolve comments

* Resolve comments

* Fix precommit

* Resolve comments

* Resolve comment

* Fix pre-commit

* Fix unit test

* Add tests for pagination

* Resolve comments

* Fix pre-commit

* Resolve comments

* Ms.mempool simplify (Chia-Network#13314)

* Remove mempool.additions

* Don't re run the program, and remove program from mempool item

* Removals only stores item ids, and stores a list

* Move pending cache down to prevent cache dos

* Separate validation from adding to pool, and remove mypy exceptions

* Fix bug with replacing

* Add to mypy

* Revert cbgui

* precommit fail

* Properly update the seen dict

* lint error

* Fix mempool bug

* Update after merge with main

* Address comments

* Fix bug in remove_plot_directory (Chia-Network#13332)

Revert commit c400d81

* Avoid creating a list and enable short circuit behavior in `bundle_suitable_for_compression()` (Chia-Network#13331)

This avoids the creation of the list entirely.  In so doing it also allows `all()` to return `False` on the first uncompressable spend it finds instead of analyzing all of them first.

* Remove "Total iterations since start" from chia show -s (Chia-Network#13196)

* Bumping codeQL actions to v2 (Chia-Network#13344)

* use get_puzzle_and_solution_for_coin() from chia_rs (Chia-Network#13315)

* The poor CI machine cannot go fast enough (Chia-Network#13347)

* The poor CI machine cannot go fast enough

* Also for data layer

* More increases

* Update build-linux-installer-deb.yml

* Fixing bladebit plotter conditional

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Florin Chirica <fchirica96@gmail.com>
Co-authored-by: Jeff <jeff@chia.net>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: Matt Hauff <quexington@gmail.com>
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>
Co-authored-by: Justin England <justin@chia.net>
Co-authored-by: Izumi Hoshino <admin@chiamine.jp>
Co-authored-by: hugepants <hugepants@users.noreply.github.com>
Co-authored-by: Chris Marslender <chrismarslender@gmail.com>
Co-authored-by: Jack Nelson <jack@jacknelson.xyz>
Co-authored-by: Richard Kiss <him@richardkiss.com>
Co-authored-by: Dan Perry <69756004+danieljperry@users.noreply.github.com>
Co-authored-by: Mariano Sorgente <sorgente711@gmail.com>
Co-authored-by: Sebastjan Trepca <trepca@gmail.com>
Co-authored-by: Kronus91 <t.yu@chia.net>
Co-authored-by: Snyk bot <github+bot@snyk.io>
Co-authored-by: Almog De Paz <almogdepaz@gmail.com>
Co-authored-by: joshpainter <josh@joshpainter.com>
Co-authored-by: Gene Hoffman <30377676+hoffmang9@users.noreply.github.com>
wallentx added a commit to AppleOfEnlightenment/chia-blockchain that referenced this issue Sep 15, 2022
* Adding release detection

* Fine tuning release scenario, and including conditional for bladebit

* Fixing bladebit conditional check

* Ensuring Get tag name job only runs for tagged events

* Removing double if on linux arm workflow

* Removing double if on macos workflow

* Adding newly tested changes for release/prerelease

* Fixing deb installer

* Testing windows installer change

* Update build-windows-installer.yml

* Update build-windows-installer.yml

* Update build-windows-installer.yml

* Update build-windows-installer.yml

* Update build-windows-installer.yml

* Update build-windows-installer.yml

* Update build-windows-installer.yml

* Update build-windows-installer.yml

* Update build-windows-installer.yml

* testing without setting windows version

* Wallentx/pr workflow2 (#5)

* Fix duplicate subscriptions.

* fixup

* Bump chia-blockchain-gui to 55e776c (Chia-Network#13090)

Fixes an exception in local storage when non-existent items are accessed.

* some rpc reference data output code (commented out)

* renames

* Address linting.

* Update test to reflect the recent change in ReorgProtocol.

* include wallet maker offer rpc call in transaction rollback region

* Update data_layer.py

* Adding changelog (Chia-Network#13121)

* Adding changelog

* Fixing changelog indentation

* roll back pending roots on cancellation (but broken)

* (fixed up)

* bump data layer test timeout to 55

* util: Introduce `get_key`/`get_keys` in `Keychain` + `KeychainServer` (Chia-Network#12830)

* Generalize NFT offers (Chia-Network#12945)

* Generalize NFT offers

* Write tests for complex NFT1 offers

* Combine two loops

* isort

* Save one block farmed

* Increase timeouts

* black

* merge related fix

* avoid locking up the main thread by using an asyncio.Future to wait for the worker processes in weight proof validation (Chia-Network#13118)

* now that all uses of DBWrapper have been updated to DBWrapper2, remove the old one (Chia-Network#13116)

* Adding changelog (Chia-Network#13121) (Chia-Network#13135)

* Adding changelog

* Fixing changelog indentation

* Fix several bugs with untrusted sync, and correct sync status (Chia-Network#13133)

* Hopefully fix bug with untrusted sync

* Try removing the cache

* Add cache back, and don't rollback

* Compare to finished_sync_up_to

* Fix plotnfts, and tests

* Async function

* fix wallet blockchain tests

* Fix test, and improve detection of synced

* Correct sync status

* Fix more tests

* Fix more tests

* Fix NFT tests

* We did not await the async function (Chia-Network#13154)

* dependency-review (Chia-Network#13153)

* tweak output from task-profiler (Chia-Network#13137)

* Replace `electron-packager` with `electron-builder` (Chia-Network#12953)

* Install electron-builder

* Replaced electron-packager with electron-builder for windows

* Upgraded electron-builder version for mac

* Replaced electron-packager with electron-builder for Linux and integreated deb/rpm dir

* Updated mac installer job

* Fixed app.asar location

* Fixed dmg name for arm64 mac

* Updated installer-version.py

* Updated Linux(deb) installer CI job

* Updated Linux(rpm) installer CI job

* Fixed Linux(rpm) install CI issue

* Revert to use `electron-packager` instead of `electron-builder` for arm64 .deb installer

* Fixed lint errors

* Fixed rpm installer job issue

* Updated Windows installer CI job

* Fixed rpm installer CI job

* Simplified arm64 build

* Added -y option to `apt install` command

* Added `dmg-license` as npm build dependency for MacOS

* Attempt to set product name appropriately for each platform

* Specified productNames in commands

* Fixed arm64 installer issue

* Stopped to create link '/opt/chia/daemon'

* Updated desktop app name for linux installers

* Updated packageName for linux installers

* Abort build jobs when 'cd' fails

* Updated the GUI submodule ref (main:5e52b7f53478d4f39b4a0f0203f41e31dd53aee9)

Co-authored-by: Jeff Cruikshank <jeff@chia.net>

* update _peak_height after committing the block to the DB (Chia-Network#13157)

* When adding coins to the wallet, lookup the coin records in bulk, rather than one at a time (Chia-Network#13142)

* Revert "now that all uses of DBWrapper have been updated to DBWrapper2, remove the old one" (Chia-Network#13145)

This reverts commit 2d9672c.

* Fix comments in initial config where puzzle hash should be receive address (Chia-Network#13146)

* Add atari CLI help.

* Add atari CLI.

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Update chia/cmds/data.py

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

* Lint.

* atari - drop dead fingerprint options

* Reflect the change on datalayer related code.

* Fixup.

* Don't try to sign mac installers when secrets are unavailable (Chia-Network#13166)

* util: Implement key label support for `FileKeyring` and `KeyringWrapper` (Chia-Network#12843)

* util: Implement key label support for `FileKeyring` and `KeyringWrapper`

* Restrict trailing/leading whitespaces in the label

* Bump `MAX_LABEL_LENGTH` to 65

* Additional label tests

* Drop duplicated `KeychainFingerprintNotFound` definition

* add royalty calculation method and RPC (Chia-Network#13129)

* Generalize NFT offers

* Write tests for complex NFT1 offers

* Combine two loops

* isort

* Save one block farmed

* Increase timeouts

* black

* merge related fix

* add royalty calculation method and RPC

* flake8

* Fix the CLI for royalties

* royalty_pts -> royalty_percentage

* minor test fix

* remove all_puzzle_hashes from wallet puzzle store (Chia-Network#13159)

* simplify WalletStateManager.coin_added(). Make sure all callers ensure the coin isn't in the DB already, and always pass in the coin name (Chia-Network#13144)

* update gui for atari changes

* enable mypy for a some wallet files (Chia-Network#13185)

* enable mypy for chia/wallet/trading/offer.py

* enable mypy for chia/wallet/trade_manager.py

* track last_derivation_index in memory for each wallet (and across wallets) rather than performing DB lookups unconditionally (Chia-Network#13155)

* introduce a Protocol for puzzle drivers, for increased type checking (Chia-Network#13183)

* update gui for release/1.6.0 take 2

* core.data_layer parallel = True (Chia-Network#13197)

* don't run the get_offered_coins post-init check. It's very expensive (Chia-Network#13205)

* skip parsing (and computing) offers just to get to the involved coins, instead use the DB field for coins_of_interest (Chia-Network#13213)

* implement a more efficient Program.uncurry() (Chia-Network#13204)

* Debug get tree hash (Chia-Network#13218)

* log clvm programs with format string instead of f-string

* avoid redundant calls to get_tree_hash() in the NFT wallet

* only compute the tree hashes for debug logging when actually logging

* Fill missing services in config for data layer (Chia-Network#13220)

* fill missing services in config for data layer

* adjust

* here too

* util: Implement key label support for `Keychain` and `KeychainServer` (Chia-Network#12883)

* util: Implement key name support for `Keychain` and `KeychainServer`

* Re-raise if adding the key fails

* Call `G1Element.get_fingerprint` only once

* use rust parser for Program and SerializedProgram.to_program() (Chia-Network#13203)

* benchmark for parsing Offer (Chia-Network#13212)

* Puzzle driver type annotations (Chia-Network#13190)

* annotate CAT outer puzzle driver

* add type annotation to transfer_program_puzzle

* add type annotations to singleton_outer_puzzle

* add type annotations to ownership_outer_puzzle

* add type annotations to metadata_outer_puzzle

* remove unused _asset_id field in puzzle drivers

* Fix missing wallet `state_changed` events (Chia-Network#13200)

* Fixed an issue where some of the wallet state_changed events were not notified to subscribers

* Fixed a lint error

* Fix data Server CLI. (Chia-Network#13222)

* 🍒1 (Chia-Network#13231)

* add delayed pool config update feature (Chia-Network#12796)

* add delayed pool config update feature

* we dont talk about this commit

* We did not await the async function (Chia-Network#13154)

Co-authored-by: Jack Nelson <jack@jacknelson.xyz>
Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>

* update _peak_height after committing the block to the DB (Chia-Network#13157) (Chia-Network#13233)

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>

* fill in data layer certs at startup (Chia-Network#13225)

* fill in data layer certs at startup

* tidy

* don't overwrite

* add overwrite parameter to write_ssl_cert_and_key()

* Change override to overwrite atari add_missing_files. (Chia-Network#13224)

* clarify comment in `DataLayerServer.stop()` (Chia-Network#13216)

* data layer - remove old .gitignore (Chia-Network#13198)

* correct port reference in data layer test (Chia-Network#13193)

* Update test_data_rpc.py

* catch up hashes with fix

* introduce an UncurriedPuzzle class (Chia-Network#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()

* Calculate puzzle hashes directly, as an optimization. (Chia-Network#13034)

* Reflect the changes from main on atari related code.

* Implement generator_for_single_coin() in python instead of clvm and apply quex' optimization to only computing the puzzle hash if the parent and amount matches (Chia-Network#13237)

* Reflect the changes from main on atari related code.

* Apparently yaml.safe_dump() can't handle uint16 port (in the wallet_peer port section of data_layer's config). Propagate the port type and make this one explicitly int.

* Xch spam (Chia-Network#12878)

* Add mariano54s spam filter changes (original PR is Chia-Network#11894)

* Add new spam_filter tests

* remove get_all_coins method and query db directly in test

* Add test to include case where everything gets filtered, even the first coin

* If filter threshold is <= 1, no need to run the filter

* add test of chia.wallet.wallet_coin_store.get_all_unspent_coins

* Add test case for receiving large coin after sending dust coin

* Add NFT test to spam wallet

* resolve merge conflicts with main

* remove unneeded coin store test

* Add black formatting

* split long comments into multiple lines

* Run black, second try

* Manually add black changes

* Black

Co-authored-by: Mariano Sorgente <sorgente711@gmail.com>

* Pinning GUI to 8a52d3c - HEAD of release/1.6.0 (Chia-Network#13246)

* correct subscription ip to ipv4 localhost (Chia-Network#13243)

* data layer - wait for creation tx (Chia-Network#13240)

* DL Fix add_mirror amount -h. (Chia-Network#13221)

* unfix the test bug, we will get it later with the associated data changes

* coin interest optimization for trade records (Chia-Network#13044)

* coin interest optimization for trade records

* don't duplicate coin

* added a test

* migration test

* trade record replace test

* mypy fixes

* refactor to use coin_id

* return a set

* Get minter DID for offer (Chia-Network#13156)

* Get minter DID for offer

* Fetch minter did for all NFTs

* Resolve comments

* Fix issues

* Fix pre-commit

* Fix unit test

* update gui to checkpoint

* add wallet_id and did to state_changed (Chia-Network#13260)

* treehash optimization for DID wallet (Chia-Network#13253)

* only calculate treehash of constants once

* missed one treehash calc

* add benchmark for get_puzzle_and_solution_for_coin (Chia-Network#13301)

* fix: build_scripts/npm_linux/package.json & build_scripts/npm_linux/package-lock.json to reduce vulnerabilities (Chia-Network#13286)

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-GOT-2932019

* now when optimizations have landed, tighten the expected timing for the offer parsing benchmark (Chia-Network#13236)

* minor fixes for Serialized program (Chia-Network#13229)

* use bytearray to build a binary blob, convert it to bytes once it's done

* load the bootstrap generator rom in binary form directly, avoid conversions

* remove an insane amount of imports & add support for edge case (Chia-Network#13195)

add support for edge case

* fix flakey test (Chia-Network#12925)

* fix flakey test

* unused import

* testing flakeyness

* fix and test 200 times

* use mock to avoid running _sync

* lint

* remove unused import

* cmds: Key label support for CLI - `chia keys label` (Chia-Network#12917)

* Display minter DID in CLI (Chia-Network#13311)

* Get minter DID for offer

* Fetch minter did for all NFTs

* Resolve comments

* Fix issues

* Fix pre-commit

* Fix unit test

* Display minter did

* optimize get_block_store (Chia-Network#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

* astroid!=2.12.6, !=2.12.7 (Chia-Network#13338)

pylint-dev/pylint#7425

* Replace localhost with 127.0.0.1 for tests (Chia-Network#13324)

* Replace localhost with 127.0.0.1 in block tools config

* also make self_hostname fixture be 127.0.0.1

* Move config rewrite inside `automated_testing` conditional

* data layer - wait for creation tx (Chia-Network#13240) (Chia-Network#13335)

(cherry picked from commit 8b1a27b)

* fix wallet rpc flakes  (Chia-Network#13336)

* fix flakes and lower timeouts

* lint

* Fix complex NFT offer flakiness (Chia-Network#13337)

* Load NFT off-chain metadata on backend (Chia-Network#13018)

* Fix NFT wallet naming

* Resolve comments

* Resolve comment

* Add tests

* Load off-chain metadata & nft_get_nfts pagination

* Fix pre-commit

* Resolve comments

* Resolve comments

* Fix precommit

* Resolve comments

* Resolve comment

* Fix pre-commit

* Fix unit test

* Add tests for pagination

* Resolve comments

* Fix pre-commit

* Resolve comments

* Ms.mempool simplify (Chia-Network#13314)

* Remove mempool.additions

* Don't re run the program, and remove program from mempool item

* Removals only stores item ids, and stores a list

* Move pending cache down to prevent cache dos

* Separate validation from adding to pool, and remove mypy exceptions

* Fix bug with replacing

* Add to mypy

* Revert cbgui

* precommit fail

* Properly update the seen dict

* lint error

* Fix mempool bug

* Update after merge with main

* Address comments

* Fix bug in remove_plot_directory (Chia-Network#13332)

Revert commit c400d81

* Avoid creating a list and enable short circuit behavior in `bundle_suitable_for_compression()` (Chia-Network#13331)

This avoids the creation of the list entirely.  In so doing it also allows `all()` to return `False` on the first uncompressable spend it finds instead of analyzing all of them first.

* Remove "Total iterations since start" from chia show -s (Chia-Network#13196)

* Bumping codeQL actions to v2 (Chia-Network#13344)

* use get_puzzle_and_solution_for_coin() from chia_rs (Chia-Network#13315)

* The poor CI machine cannot go fast enough (Chia-Network#13347)

* The poor CI machine cannot go fast enough

* Also for data layer

* More increases

* Update build-linux-installer-deb.yml

* Fixing bladebit plotter conditional

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Florin Chirica <fchirica96@gmail.com>
Co-authored-by: Jeff <jeff@chia.net>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: Matt Hauff <quexington@gmail.com>
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>
Co-authored-by: Justin England <justin@chia.net>
Co-authored-by: Izumi Hoshino <admin@chiamine.jp>
Co-authored-by: hugepants <hugepants@users.noreply.github.com>
Co-authored-by: Chris Marslender <chrismarslender@gmail.com>
Co-authored-by: Jack Nelson <jack@jacknelson.xyz>
Co-authored-by: Richard Kiss <him@richardkiss.com>
Co-authored-by: Dan Perry <69756004+danieljperry@users.noreply.github.com>
Co-authored-by: Mariano Sorgente <sorgente711@gmail.com>
Co-authored-by: Sebastjan Trepca <trepca@gmail.com>
Co-authored-by: Kronus91 <t.yu@chia.net>
Co-authored-by: Snyk bot <github+bot@snyk.io>
Co-authored-by: Almog De Paz <almogdepaz@gmail.com>
Co-authored-by: joshpainter <josh@joshpainter.com>
Co-authored-by: Gene Hoffman <30377676+hoffmang9@users.noreply.github.com>

* Adding installer uploads on release

* Fixing artifact upload path

* Fixing path to artifact upload

* Adding torrent uploads

* blob file matching for artifact upload

* rebasing

Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Florin Chirica <fchirica96@gmail.com>
Co-authored-by: Jeff <jeff@chia.net>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: Matt Hauff <quexington@gmail.com>
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>
Co-authored-by: Justin England <justin@chia.net>
Co-authored-by: Izumi Hoshino <admin@chiamine.jp>
Co-authored-by: hugepants <hugepants@users.noreply.github.com>
Co-authored-by: Chris Marslender <chrismarslender@gmail.com>
Co-authored-by: Jack Nelson <jack@jacknelson.xyz>
Co-authored-by: Richard Kiss <him@richardkiss.com>
Co-authored-by: Dan Perry <69756004+danieljperry@users.noreply.github.com>
Co-authored-by: Mariano Sorgente <sorgente711@gmail.com>
Co-authored-by: Sebastjan Trepca <trepca@gmail.com>
Co-authored-by: Kronus91 <t.yu@chia.net>
Co-authored-by: Snyk bot <github+bot@snyk.io>
Co-authored-by: Almog De Paz <almogdepaz@gmail.com>
Co-authored-by: joshpainter <josh@joshpainter.com>
Co-authored-by: Gene Hoffman <30377676+hoffmang9@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dataclasses Needs astroid update Needs an astroid update (probably a release too) before being mergable Regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants