Commit Graph

3329 Commits

Author SHA1 Message Date
Arvid Norberg
f4f6cb633e
adjust timing thresholds for some benchmarks (#16068)
adjust timing thresholds for some benchmarks to make them more likely to pass
2023-08-17 10:57:09 -05:00
Jack Nelson
33dd20e6be
Fix Core Test Flake (#16055)
* upgrade and fix find avail listen port

cleanup names and logic

* Update chia/seeder/dns_server.py

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

* rewrite db test

---------

Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
2023-08-16 18:39:42 -05:00
Earle Lowe
35242224d2
Skip flaky seeder tests while a fix is being worked on (#16074) 2023-08-16 16:11:58 -05:00
Matt Hauff
a6839d233d
Add ergonomic condition classes (#15883)
* Add ergonomic condition drivers

* whoops

* Add UnknownCondition

* Test coverage for Announcement classes

* Add coverage for exceptions

* More test coverage

* Add JSON parsing

* Add timelock parsing logic

* Add test coverage

* Test coverage again

* Add a .to_program() on ConditionValidTimes

* remove **kwargs: Any

* address comments by @altendky

* coverage comment

* Use sets instead of indices

* Address comments by @arvidn
2023-08-16 15:25:31 -05:00
Arvid Norberg
d022966f6e
use unhashable interface before from_json_dict (#16064)
improve test for streamable_from_dict. use unhashable interface before from_json_dict
2023-08-16 11:47:54 -05:00
Matt Hauff
12bde8c5ee
Remove pointless outgoing TX for CR-CAT claim (#16010)
* Remove pointless outgoing TX for CR-CAT claim

* coverage
2023-08-15 12:23:01 -05:00
Amine Khaldi
54290f812a
Merge commit '17659b80396c3e87fa60415a6ff3fcc2983c0b52' into checkpoint/main_from_release_2.0.0_17659b80396c3e87fa60415a6ff3fcc2983c0b52 2023-08-15 12:09:03 +01:00
Matt Hauff
ad5e483b8a
Deprecate minting CATs via RPC (#16017)
* Deprecate minting CATs via RPC

* Test deprecated endpoint

* Change paradigm to be a little more sophisticated

* whoops

* Make 'test' optional
2023-08-14 20:02:34 -05:00
Jack Nelson
4ddd542588
Add Wallet CLI Unit tests (#15886)
* add transaction wallet tests

* add all wallet tests

fix ci

fix path for runners

Update cmd_test_utils.py

Update cmd_test_utils.py

fix ci

fix ci pls i swear

* add did command tests

* add nft and coins tests

* move cli command assert to a central place

* switch to combined string assert

* add notifications commands

* add all vc commands

* separate wallet tests

* fix coverage a tad

* switch to central no_confirm & monkey patch it

* remove problamatic options
2023-08-14 10:19:12 -05:00
Arvid Norberg
6701f77bc2
fix testnet10 sync-from-scratch (#15967)
soft-fork2 was not a smooth softfork on testnet (but it was on mainnet). This re-introduces the minimum logic for supporting syncing on testnet10
2023-08-11 19:24:15 -05:00
Arvid Norberg
b32128949f
Simplify BlockStore and CoinStore (#15936)
* simplify BlockStore, now that we only support v2

* simplify CoinStore, now that we only support v2

* add test for BlockStore.get_peak()

* remove left-over database v1 support in test_hint_store

* extend test for BlockStore

* remove residual database v2 logic from test_block_height_map
2023-08-11 12:12:16 -05:00
Jack Nelson
0d36874caa
Refactor Seeder & Crawler code + add tests (#15781)
* Cleanup seeder & mypy all files

holy crap mother of all tech debt this was horrid

* Make UDP Protocol class a dataclass & separate out functions.

* add TCP protocol class to DNS server

* Fix mypy types & other cleanup

also fix a couple bugs

* Add seeder and crawler tests

* change log levels

* re add db lock timeout

oops

* add edns & edns tests

* fix repeated shutdown on close signal

* fix binding to use both ipv6 and ipv4

whyyyyyyy

* add ipv6 and ipv4 tests + add ipv4 if windows
2023-08-11 05:25:19 -05:00
Arvid Norberg
c9e6c9d5cc
fix bug in recent BlockStore optimization patch (#16007)
fix bug in recent BlockStore optimization patch (and fix the issue with the test that allowed it through)
2023-08-10 19:12:11 -05:00
Arvid Norberg
b3fe7c4705
optimize blockchain DB for Chip-13 (#15948)
* optimize blockchain DB for Chip-13

* put plot_filter_info in its own table
2023-08-10 11:51:32 -05:00
Kronus91
17659b8039
Fix clawback sender resync issue (#15853)
* Fix clawback sender resync issue

* enhance unit test

* Fix CI

* Add comment

* Fix unit test & revert changes

* Remove prints

* Resolve comments

* Resolve comments

* Remove check
2023-08-09 10:09:41 -05:00
Amine Khaldi
a417a438ad
Merge commit '6a5bf15e9e39e6c0f27ab69fe718ba82ce007354' into checkpoint/main_from_release_2.0.0_6a5bf15e9e39e6c0f27ab69fe718ba82ce007354 2023-08-09 13:00:33 +01:00
Kyle Altendorf
603e34e9b5
simplify db connection helper (more simply) (#15959) 2023-08-08 10:14:59 -05:00
Matt Hauff
7184e53506
Skip problematic test (#15928) 2023-08-07 11:39:23 -05:00
Arvid Norberg
c4708072f0
Revert "Add fields to BlockRecord. (#15695)" (#15947)
This reverts commit e84bdb0b30.
2023-08-07 09:32:31 -05:00
Amine Khaldi
95c892dddc
Merge commit '99e4d5b41268073f691c6a745b9f924bf3ab6379' into checkpoint/main_from_release_2.0.0_99e4d5b41268073f691c6a745b9f924bf3ab6379 2023-08-07 14:58:25 +01:00
Arvid Norberg
6a5bf15e9e
bump soft-fork3 activation height (#15938) 2023-08-04 20:36:31 -05:00
Arvid Norberg
8071dc6211
introduce SOFT_FORK4_HEIGHT and tie CHIP-13 to it (#15885)
* introduce SOFT_FORK4_HEIGHT and tie CHIP-13 to it

* fix test_plot_refreshing
2023-08-04 18:41:34 -05:00
Matt Hauff
289260c374
Credential Restricted CATs (#15411)
* Allow create_tandem_xch_tx to take a set of announcements

* Create potential announcement in correct arm of create_tandem_xch_tx

* Make does_coin_belong_to_wallet more robust

* Add match_hinted_coin to wallet protocol

* Add CROuterPuzzle

* Add conditions with fee announce.clsp

* Add CRCATWallet

* Add CLI support for CR-CATs

* Fix bug in CATOuterPuzzle

* Add SOFTFORK_HEIGHTS as an exportable variable from conftest

* Allow specifying num of blocks to farm to wallets_prefarm_services

* Add potential subclasses to cat wallet creation

* Integrate CR-CATs into offers

* Address comments by @geoffwalmsley

* Add CRCAT info to get_wallets

* Changes due to (#15846)
2023-08-03 19:36:21 -05:00
Arvid Norberg
1d8d476056
drop support for database schema v1 (#15895)
* don't run tests with database schema v1

* remove support for database schema v1 from BlockStore

* remove support for database schema v1 from CoinStore

* remove support for database schema v1 from HintStore

* remove support for v1 BlockStore schema from blockchain reorg logic

* remove support for database schema v1 from BlockHeightMap

* run block store tests both with and without the cache

* add test with empty blockchain for BlockHeightMap

* fix typo
2023-08-03 14:18:33 -05:00
Matt Hauff
fe9b4aa318
Add condition opcodes for agg sigs to condition_codes.clib (#15889)
* Add condition opcodes for agg sigs to condition_codes.clib

* Add comment about hard fork

* pylint
2023-08-03 03:05:37 -05:00
Kyle Altendorf
f42394d736
allow _ProactorBasePipeTransport.__del__ failures in tests (#15908) 2023-08-03 03:01:59 -05:00
William Allen
0fa98d43ed
checkpoint: into main from release/2.0.0 @ e5431cf91e (#15909)
Source hash: e5431cf91e
Remaining commits: 8
2023-08-03 01:11:01 -05:00
Arvid Norberg
f0cb47baef
remove softfork2 logic (#15793) 2023-08-01 11:28:16 -05:00
Amine Khaldi
f0acccdb0a
Merge commit 'e5431cf91e3c4bcf01120933aeb43425a87bc4d2' into checkpoint/main_from_release_2.0.0_e5431cf91e3c4bcf01120933aeb43425a87bc4d2 2023-08-01 14:55:11 +01:00
Matt Hauff
226c601764
Remove hack_populate'ing secret keys (#15846)
* Remove hack_populate'ing secret keys

* Add an optional version of get_private_key

* test fixes

* remove pool wallet's sign method

* Move sign_transaction to wallet_state_manager

* Add test coverage

* Fix PoolWallet

* Test coverage

* remove e_msg
2023-07-31 11:16:21 -05:00
Arvid Norberg
57d1974ef3
fix flake8 warnings (#15897) 2023-07-31 09:46:49 -05:00
Amine Khaldi
39dc201564
Arvid's fix flake8 warnings (PR #15897) (#15900)
fix flake8 warnings

Co-authored-by: arvidn <arvid@libtorrent.org>
2023-07-30 22:10:16 -05:00
Amine Khaldi
0043d4bc16
Merge commit '643b3e9b727f2ce689c834096a3a8281014b7aef' into checkpoint/main_from_release_2.0.0_643b3e9b727f2ce689c834096a3a8281014b7aef 2023-07-28 20:49:25 +01:00
Felix Brucker
c5ca0978f6
Add support for multi node farmers (#15444)
* Extract `respond_signatures` logic

* Add `call_api_of_specific` method to `ChiaServer`

* Fix typehint for test fixture `farmer_one_harvester`

* Make test helper `add_dummy_connection` work with any node type

* Add `reply_types` to `request_signatures` of harvester

* Fix duplicate SP processing with multiple nodes

* Handle state in `request_signed_values`

* Add set typehint

* Add comment re `_process_respond_signatures()` usage

* Fix imports

* Fix wording to not confuse with SignedValues message
2023-07-28 14:48:32 -05:00
Arvid Norberg
cb4bade2fe
dataclasses does not allow mutable member initializers (#15879) 2023-07-27 16:05:32 -05:00
wjblanke
40134512c0
remove chip13 (#15871)
* remove chip13

* flake8

* flake8

* flake8

* isort

* Remove chip-13 test

---------

Co-authored-by: Earle Lowe <e.lowe@chia.net>
2023-07-26 21:00:55 -05:00
Arvid Norberg
99e4d5b412
bump softfork3 activation by about 2 weeks (#15861) 2023-07-26 20:26:21 -05:00
Arvid Norberg
ce8b1d43c8
fix initial-config for testnet fork points heights (#15873) 2023-07-26 19:23:31 -05:00
Earle Lowe
3a81506dc7
Update soft for height in main for testnet to 2997292 (#15872)
* Update soft for height in main for testnet

* More updates to SOFT_FORK3_HEIGHT
2023-07-26 17:52:46 -05:00
Arvid Norberg
1625d7aa92
make ConditionOpcodes not streamable (#15858)
ConditionOpcodes can be more than 1 byte now. Make it not streamable, since it doesn't have to be
2023-07-26 11:27:03 -05:00
Earle Lowe
e5431cf91e
Change test to run only once per consensus mode as a flake workaround (#15860)
Change test to run only once per consensus mode
2023-07-25 21:52:12 -05:00
Jack Nelson
ed4c5217cc
Add Click CLI Unit Tests (Proof of Concept) (#15746)
* testing utils v1

* testing utils v2

* tests for chia show

* oopsies

* fix chia root not working & rename class

* change to generated full block instead of pre-generated mess

* fix capsys, BASE_LIST and add more comments

* ignore mypy ...
2023-07-25 21:42:52 -05:00
Matt Hauff
12514717e3
Remove some old chialisp files (#15824)
* Remove some old chialisp files

* Fix mypy-exclusions.txt
2023-07-25 12:09:50 -05:00
Kronus91
643b3e9b72
Skip clawback incoming txs while deleting the unconfirmed txs (#15826)
* Remove CAT1 UX guards (#15812)

* Skip clawback incoming txs

* Add unit test

* Prevent delete clawback tx

---------

Co-authored-by: Matt Hauff <quexington@gmail.com>
2023-07-25 01:53:35 -05:00
William Allen
8224d2fd65
checkpoint: into main from release/2.0.0 @ 83192be416 (#15842)
Source hash: 83192be416
Remaining commits: 3
2023-07-24 11:22:47 -05:00
Matt Hauff
217e81f478
Move some puzzles out of chia.wallet.puzzles (#15822) 2023-07-24 10:39:16 -05:00
Matt Hauff
53502518c9
Dedup offer cancellation logic (#15804)
* Dedup offer cancellation logic

* Forgot continue

* cancel_pending_offer -> cancel_pending_offers

* Fix broken NFT test

* Fix typo

* Remove writer

* Change dl cancellation test (more efficient)

* Add a bit of coverage

* Address comment by @trepca
2023-07-24 10:38:49 -05:00
Amine Khaldi
b5fc043f48
Merge commit '83192be416bbc57d52db5e27307a1f2bccd2c22b' into checkpoint/main_from_release_2.0.0_83192be416bbc57d52db5e27307a1f2bccd2c22b 2023-07-24 13:22:17 +01:00
Matt Hauff
b565f606c8
Add uncurried args to debug_spend_bundle (#15813)
* Add uncurried args to debug_spend_bundle

* Add <curried puzzle> designator

* simplify control flow
2023-07-21 23:34:41 -05:00
Earle Lowe
83192be416
Update testnet height for SOFT_FORK3 and fix Chip-13 logic (#15831)
Update testnet height for SOFT_FORK3 and fix some logic issues in Chip-13 implementation
2023-07-21 23:34:21 -05:00