Commit Graph

1071 Commits

Author SHA1 Message Date
Mariano Sorgente 1e716b5e56 Flake8 tests 2021-01-12 17:00:53 -05:00
Mariano Sorgente 1c881b55d4 Fix weight issue, and restart timelord if necessary 2021-01-12 17:00:53 -05:00
Mariano Sorgente b44a27fe5d Comment out pos test 2021-01-12 17:00:53 -05:00
Mariano Sorgente 65d722f129 Fix CI first try 2021-01-12 17:00:53 -05:00
Mariano Sorgente beaf140394 Weight proof test pass 2021-01-12 17:00:53 -05:00
Mariano Sorgente b4bf2b1715 Fix timelord issue 2021-01-12 17:00:53 -05:00
Mariano Sorgente 88cf51ad82 Mypy for src 2021-01-12 17:00:53 -05:00
almog 036bb31af2 more weight proof testing 2021-01-12 17:00:53 -05:00
Mariano Sorgente 4b1d3b42a0 Apply black formatting with line length 120 (not applied to wallet) 2021-01-12 17:00:53 -05:00
Mariano Sorgente 231bfea165 Update timelord 2021-01-12 17:00:53 -05:00
Mariano Sorgente ea3ae083a2 Comment out tests 2021-01-12 17:00:53 -05:00
Mariano Sorgente 6670f53cb2 Fix bug in converting to sub block record 2021-01-12 17:00:53 -05:00
Mariano Sorgente ba448a7a23 Comment out pot iterations test 2021-01-12 17:00:53 -05:00
almog aa69a3c2b7 fix test 2021-01-12 17:00:53 -05:00
almog 16670452c4 weight proof test refactor 2021-01-12 17:00:53 -05:00
Mariano Sorgente 0bd541fcd3 Start getting tests to pass 2021-01-12 17:00:53 -05:00
Mariano Sorgente fff9ccb026 Got simulation test to pass 2021-01-12 17:00:53 -05:00
Yostra 75598f20dc wallet simple sync 2021-01-12 17:00:53 -05:00
Yostra d6ef88fa08 wallet 2021-01-12 17:00:53 -05:00
Yostra edb08739e6 filter 2021-01-12 17:00:53 -05:00
almog 672ed04af3 use proofs in sync
add test for syncing 2 sub epochs
2021-01-12 17:00:53 -05:00
almog b38c67489c fix weight proof tests 2021-01-12 17:00:53 -05:00
almog 42955bb26b use weight proof in sync 2021-01-12 17:00:53 -05:00
Mariano Sorgente c018b26716 Coin store reorgs and mempool tests 2021-01-12 17:00:53 -05:00
Mariano Sorgente 81d523b850 Fix some tests 2021-01-12 17:00:53 -05:00
Mariano Sorgente 974edc47f1 Fix short sync test 2021-01-12 17:00:53 -05:00
Mariano Sorgente 0bb8ce3e8f Test for syncing 2021-01-12 17:00:53 -05:00
Mariano Sorgente dbdb20c93f Almost get sync working 2021-01-12 17:00:53 -05:00
almog a98255df8c send weight proof request in sync 2021-01-12 17:00:53 -05:00
almog 44c12b0896 fix tests 2021-01-12 17:00:53 -05:00
Mariano Sorgente 075498a044 Many timelord and full node fixes to difficulty and sub epochs 2021-01-12 17:00:53 -05:00
Mariano Sorgente 0f72053876 Add comments, and allow timelord to infused overflows 2021-01-12 17:00:53 -05:00
almog 9fdae7e3f0 weight proof api 2021-01-12 17:00:53 -05:00
almog 02fb5d144d BlockCache and BlockCacheMock 2021-01-12 17:00:53 -05:00
almog aa1c2c9839 avoid exception in ws_connection.py 2021-01-12 17:00:53 -05:00
almog 40bdc09b07 use sub_block_height 2021-01-12 17:00:53 -05:00
Yostra 292b04a81e sub height 2021-01-12 17:00:53 -05:00
Yostra 5eb2c2a0b1 wallet 1 2021-01-12 17:00:53 -05:00
Mariano Sorgente 37c3c2701d Include older rewards 2021-01-12 17:00:53 -05:00
almog a0fc78165e test validate_segments
fix tests
2021-01-12 17:00:53 -05:00
almog c4177ba76f test validate_segments
weight proof, add segment validation test
2021-01-12 17:00:53 -05:00
almog 8db3fb88c2 use ProofBlockHeader instead of HeaderBlock 2021-01-12 17:00:53 -05:00
almog e6c3c1471d refactor 2021-01-12 17:00:53 -05:00
Mariano Sorgente b3c6f10b38 Fix many bugs 2021-01-12 17:00:53 -05:00
Mariano Sorgente 94a3abf56f Progress with unfinished block infusions 2021-01-12 17:00:52 -05:00
Mariano Sorgente 677dabbf2f WIP infusion 2021-01-12 17:00:52 -05:00
Mariano Sorgente 8964825f37 Full node signage points and sub slots working 2021-01-12 17:00:52 -05:00
almog cfffea34c2 refactor 2021-01-12 17:00:52 -05:00
almog f7a7e8431d pass ses validation, bugs in segments vdf 2021-01-12 17:00:52 -05:00
Mariano Sorgente 1df5594e94 Timelord fixes 2021-01-12 17:00:52 -05:00
Mariano Sorgente 4fc8e4e0b3 ensure_future -> create_task, and full mempool test 2021-01-12 17:00:52 -05:00
Mariano Sorgente 9fff8e54e9 More node tests 2021-01-12 17:00:52 -05:00
Mariano Sorgente 6d8c8be087 Separate out timelord api 2021-01-12 17:00:52 -05:00
almog 45942160e3 correct end of sub epoch, bad vdfs 2021-01-12 17:00:52 -05:00
almog e990b8e264 find last ses in recent reward chain 2021-01-12 17:00:52 -05:00
almog 4dd437d443 find last ses in recent reward chain 2021-01-12 17:00:52 -05:00
Mariano Sorgente 6135a6ab77 More tests 2021-01-12 17:00:52 -05:00
Mariano Sorgente 4e0f9df075 More testing and networking fixes 2021-01-12 17:00:52 -05:00
Mariano Sorgente a501f2adff Factor out waiting for a specific response 2021-01-12 17:00:52 -05:00
Mariano Sorgente 4c575638a8 Renamings and networking fixes 2021-01-12 17:00:52 -05:00
Mariano Sorgente ab8e36e310 Allow launching service without connecting to daemon 2021-01-12 17:00:52 -05:00
almog 542c3004e3 change test params 2021-01-12 17:00:52 -05:00
almog c096e1416d change test params 2021-01-12 17:00:52 -05:00
almog e5cdbe0a9c fix bug in make_weight_proof 2021-01-12 17:00:52 -05:00
almog 47778a3ec8 weight_proofs, bug fixes, unit testing 2021-01-12 17:00:52 -05:00
almog ac8eaf70fc validate summaries, test fails 2021-01-12 17:00:52 -05:00
almog 501e90a4cd change to 400 blockchain 2021-01-12 17:00:52 -05:00
almog 357ee54886 test map_summaries 2021-01-12 17:00:52 -05:00
Mariano Sorgente b27ba1a49b More testing 2021-01-12 17:00:52 -05:00
Mariano Sorgente 273fe0355b Basic full node networking tests 2021-01-12 17:00:52 -05:00
Mariano Sorgente e1c1f6c341 Basic test to add blocks to node 2021-01-12 17:00:52 -05:00
Mariano Sorgente e874c73529 Infusion point tests 2021-01-12 17:00:52 -05:00
Mariano Sorgente 8a769ed9cb Start working on new infusion point cache 2021-01-12 17:00:52 -05:00
almog 3533b1787b fix start difficulty in test 2021-01-12 17:00:52 -05:00
almog f05e1a421a weight_proof.py tests, bug fixes, find last ses by weight 2021-01-12 17:00:52 -05:00
almog 6e9166b20c weight_proof.py tests, bug fixes 2021-01-12 17:00:52 -05:00
Mariano Sorgente 62628b3086 More test for full node store, and bug fixes 2021-01-12 17:00:52 -05:00
Mariano Sorgente 7d4c844455 Make blocks smaller by removing vdf input 2021-01-12 17:00:52 -05:00
Mariano Sorgente 883aea234c Basic full node store tests passing 2021-01-12 17:00:52 -05:00
almog 0d5c22516f dont validate blocks for weight proof tests 2021-01-12 17:00:52 -05:00
Yostra 936420f718 all tests 2021-01-12 17:00:52 -05:00
Yostra ed08e25655 flake8 tests 2021-01-12 17:00:52 -05:00
Yostra 11e59b085a fix all 2021-01-12 17:00:52 -05:00
Yostra 858d12b6a2 more tests 2021-01-12 17:00:52 -05:00
Yostra cdafa1d3e7 full node send_all_first_reply 2021-01-12 17:00:52 -05:00
Yostra ba021fcbfa setup nodes 2021-01-12 17:00:52 -05:00
Yostra de7d49fb5a stash 2021-01-12 17:00:52 -05:00
Yostra 99fa3af1a3 full node 2021-01-12 17:00:52 -05:00
Yostra db1cdf5056 more tests 2021-01-12 17:00:52 -05:00
Yostra f9319a1669 full node checkpoint 2021-01-12 17:00:52 -05:00
Yostra 6a3eafbda1 cc tests 2021-01-12 17:00:52 -05:00
Yostra f9901dabbe rl tests 2021-01-12 17:00:52 -05:00
Yostra afb83e7923 rpcs 2021-01-12 17:00:52 -05:00
Yostra c874bf3ad2 add wallet tests 2021-01-12 17:00:52 -05:00
Yostra 8a9518a320 test_wallet & peer discovery 2021-01-12 17:00:52 -05:00
Yostra 7c079cf143 networking 2021-01-12 17:00:52 -05:00
Mariano Sorgente ea52b71ff5 Fix test 2021-01-12 17:00:52 -05:00
Mariano Sorgente 0cf7eb7850 Fix issues with empty slots after epochs 2021-01-12 17:00:52 -05:00
almog eb1cddbee4 failing to validate 1000 block chain 2021-01-12 17:00:52 -05:00
almog 651e0997fd try load test blocks from disc 2021-01-12 17:00:52 -05:00
almog 500fcc486f make proof sanity, small merge fixes 2021-01-12 17:00:52 -05:00
Mariano Sorgente 66b06a6d1c Rename fields and fix iterations bug 2021-01-12 17:00:52 -05:00
almog 63e3b85fae weight proof, refactor, bigger chain for tests, logs 2021-01-12 17:00:52 -05:00
almog 1023e38331 create persistent test database copy 2021-01-12 17:00:52 -05:00
almog 44fa74c6d1 refactor finishes_sub_epoch 2021-01-12 17:00:52 -05:00
Mariano Sorgente 2d63bbbfa5 Fix long range reorg bug 2021-01-12 17:00:52 -05:00
Mariano Sorgente e9d2b1f761 IPS-> slot iters. Faster tests 2021-01-12 17:00:52 -05:00
Mariano Sorgente ad2cffd0c4 Add reorg tests and fix reorg bug 2021-01-12 17:00:52 -05:00
Mariano Sorgente bd66feb9ec More updates to farming, and fix memory leak 2021-01-12 17:00:52 -05:00
Mariano Sorgente 516d87bc16 More blockchain tests 2021-01-12 17:00:52 -05:00
Yostra bdb0a3d88f some after rebase cleanup 2021-01-12 17:00:52 -05:00
Mariano Sorgente 0c6e0f6d2c More testing 2021-01-12 17:00:52 -05:00
Mariano Sorgente 069535e52e More difficulty fixes and tests 2021-01-12 17:00:52 -05:00
Mariano Sorgente 3f064e529c Fix difficulty adjustment bug 2021-01-12 17:00:52 -05:00
Mariano Sorgente cf84a9f339 Fix genesis bad signage point rc 2021-01-12 17:00:52 -05:00
Mariano Sorgente d90d76446b Reorganize and refactor. Tests passing 2021-01-12 17:00:52 -05:00
Mariano Sorgente bf012e4eea Fixes to cc VDF and tests 2021-01-12 17:00:51 -05:00
almog 07bd1005d1 combine proofs by sub_slot, more validation logic 2021-01-12 17:00:51 -05:00
almog eafdf665da make_weight_proof fixes
tests
2021-01-12 17:00:51 -05:00
almog 1e8cab6fbc more validate_weight 2021-01-12 17:00:51 -05:00
Mariano Sorgente a55649847f Switch to signage point based iters 2021-01-12 17:00:51 -05:00
Mariano Sorgente e9f6ce4a74 More tests 2021-01-12 17:00:51 -05:00
Mariano Sorgente 0fe16fd007 Coin store tests 2021-01-12 17:00:51 -05:00
Mariano Sorgente 0bd26de3cf Update block store tests 2021-01-12 17:00:51 -05:00
almog 7a8981b637 refactor weight proof 2021-01-12 17:00:51 -05:00
almog 8d786007c8 start weight proof tests 2021-01-12 17:00:51 -05:00
Mariano Sorgente 026c4006fb More full node protocol, and difficulty fixes 2021-01-12 17:00:51 -05:00
Mariano Sorgente b1df2c7f1a Overflow blocks tests 2021-01-12 17:00:51 -05:00
Mariano Sorgente 91db5efd1d Fix empty slots issue 2021-01-12 17:00:51 -05:00
Mariano Sorgente 351b09ed23 Fix empty sub slots 2021-01-12 17:00:51 -05:00
Mariano Sorgente d5143625ff Some reorganization, full node stuff, and timelord protoc9ol 2021-01-12 17:00:51 -05:00
Mariano Sorgente cf46fb8406 Fix block tools icc issue 2021-01-12 17:00:51 -05:00
Mariano Sorgente 230ff44a4c Update timelord protocol 2021-01-12 17:00:51 -05:00
Mariano Sorgente 1f0952f848 Major progress on full node and store 2021-01-12 17:00:51 -05:00
Mariano Sorgente 2883e9942c Extract block creation 2021-01-12 17:00:51 -05:00
Mariano Sorgente b203baa2bc Fix new sub-epoch 2021-01-12 17:00:51 -05:00
Mariano Sorgente 292da475f2 Overflow sub-blocks in new sub-epoch 2021-01-12 17:00:51 -05:00
Mariano Sorgente b465b7a7cd Correct vdf for overflow 2021-01-12 17:00:51 -05:00
Mariano Sorgente dcd61d0102 Overflow blocks created 2021-01-12 17:00:51 -05:00
Mariano Sorgente 0c506abfd2 500 blocks 2021-01-12 17:00:51 -05:00
Mariano Sorgente e463782b6f Difficulty adjustment fix 2021-01-12 17:00:51 -05:00
Mariano Sorgente 88e49d6230 First sub-epoch passingh 2021-01-12 17:00:51 -05:00
Mariano Sorgente 35c01bf6b0 Fix typo 2021-01-12 17:00:51 -05:00
Mariano Sorgente 5da9dfd1ed Change to slot sub_slot 2021-01-12 17:00:51 -05:00
Mariano Sorgente aaeb726920 Remove logging 2021-01-12 17:00:51 -05:00
Mariano Sorgente 107a32077f Some vdf fixes 2021-01-12 17:00:51 -05:00
Mariano Sorgente 37308390e7 3 blocks added 2021-01-12 17:00:51 -05:00
Mariano Sorgente 0e3e12fafa Get second block added to chain 2021-01-12 17:00:51 -05:00
Mariano Sorgente 5dd586f1e6 Fix signage point validation bug 2021-01-12 17:00:51 -05:00
almog 5397a076ac more block_tools.py logic
refactor to smaller pices
2021-01-12 17:00:51 -05:00
Mariano Sorgente 5f6454927b Logic for get consecutive blocks 2021-01-12 17:00:51 -05:00
Mariano Sorgente 91775e914c Factor out block within block tools 2021-01-12 17:00:51 -05:00
almog 352369b4f4 block_tools.py refactor
test chain with 2 blocks
2021-01-12 17:00:51 -05:00
Mariano Sorgente d5de16843e Recursive replace test utility 2021-01-12 17:00:51 -05:00
Mariano Sorgente 476304b43b Simplify tests 2021-01-12 17:00:51 -05:00
Mariano Sorgente 4a14bde38d More genesis tests 2021-01-12 17:00:51 -05:00
Mariano Sorgente 2ae7960ff0 Overflow genesis block 2021-01-12 17:00:51 -05:00
Mariano Sorgente b0b7b4ee79 Genesis block validated successfully 2021-01-12 17:00:51 -05:00
Mariano Sorgente a81282e2b7 Fix reward claim validation 2021-01-12 17:00:51 -05:00
Mariano Sorgente e1877620f5 Fix VDF verification 2021-01-12 17:00:51 -05:00
almog b040990331 add test get_vdf_info_and_proof (fails)
fix genesis block filter in block_tools.py
2021-01-12 17:00:51 -05:00
Mariano Sorgente 6d8e0e0473 More progress on validation 2021-01-12 17:00:51 -05:00
Mariano Sorgente 04dee699a5 Progress on adding genesis block 2021-01-12 17:00:51 -05:00
Mariano Sorgente 42b6912829 Block store tests 2021-01-12 17:00:51 -05:00
Mariano Sorgente 8511f4d644 Almost have block_store tests running 2021-01-12 17:00:51 -05:00
Mariano Sorgente ec76b746de Start making changes to update tests 2021-01-12 17:00:51 -05:00
Mariano Sorgente d5d14f807a ICP -> SP 2021-01-12 17:00:51 -05:00
Mariano Sorgente f7d0aa3213 refactor difficulty adjustment and ips 2021-01-12 17:00:51 -05:00
Gene Hoffman b7e9f53e39 Fix MD lint, more missing imports, more black 2021-01-12 17:00:50 -05:00
Gene Hoffman ac28327101 Fix some low hanging LGTM - Black. Stay out of the way... 2021-01-12 17:00:50 -05:00
Mariano Sorgente 26ed01c4ab Start work on full node 2021-01-12 17:00:50 -05:00
Mariano Sorgente 4a894175ff Simplified mempool 2021-01-12 17:00:50 -05:00
Mariano Sorgente 218985b40f New farmer protocol and harvester 2021-01-12 17:00:50 -05:00
Mariano Sorgente 1228ecf77b Add test for iters 2021-01-12 17:00:50 -05:00
Mariano Sorgente c83f2907d9 change some test constants 2021-01-12 17:00:50 -05:00
Mariano Sorgente 453e87441b Simplify blockchain class and full node stores 2021-01-12 17:00:50 -05:00
Bill Blanke 22072e3b6e fix test 2021-01-12 17:00:50 -05:00
Will Bendick 511e99835f updates taproot to use AGGSIGME 2021-01-12 17:00:49 -05:00
Will Bendick 3d2c44fb50 fixes aggsig test in mempool 2021-01-12 17:00:49 -05:00
Will Bendick 8791c93b04 uses taproot for standard transactions 2021-01-12 17:00:49 -05:00
Richard Kiss 71ed6e6c75 Use `Program.to` instead of `Program`. 2021-01-12 17:00:49 -05:00
Matthew Howard 5f537c62e7 appeased superlinter black requests 2021-01-12 17:00:49 -05:00
Matthew Howard fe6a830c98 fixed aggsig_me bug in wallet_tool 2021-01-12 17:00:49 -05:00
Will Bendick 5bc7bffa69 rate limited chialisp update (#482)
* adds chialisp generator

* updates WHOLE_PUZZLE_WITH_CLAWBACK

* updates CLAWBACK

* updates WHOLE_PUZZLE

* updates AGGSIG_ENTIRE_SOLUTION

* fixes indentation

* updates MODE_TWO

* updates CREATE_LOCK

* updates MODE_TWO_ME_STRING

* updates CREATE_CONSOLIDATED

* updates TEMPLATE_SINGLETON_RL_2

* fixes args calculation bug

* updates TEMPLATE_MY_PARENT_ID_2

* updates RATE_LIMIT_PUZZLE

* updates CREATE_NEW_COIN

* updates CREATE_CHANGE

* updates TEMPLATE_MY_ID

* updates TEMPLATE_BLOCK_AGE

* updates TEMPLATE_MY_PARENT_RL

* updates TEMPLATE_MY_PARENT_ID

* fixes lint

* updates rl_make_aggregation_solution

* updates make_clawback_solution

* updates rl_make_solution_mode_2

* updates solution_for_rl

* updates rl_make_aggregation_puzzle

* fixes typo

* adds negative tests
2021-01-12 17:00:49 -05:00
Richard Kiss 46cce43474 Use `service_kwargs_for_wallet`. 2020-10-13 14:40:12 -07:00
Richard Kiss 421b8e1987 Some minor bug fixes. Make `bt.config` return a deep copy. 2020-10-13 13:48:14 -07:00
Richard Kiss f333def7dd Use `service_kwargs_for_full_node(_simulator)?`. 2020-10-12 17:46:40 -07:00
Richard Kiss 589d7a0621 Use `service_kwargs_for_farmer`. 2020-10-12 16:05:20 -07:00
Richard Kiss 9c6f00c3d7 Use `service_kwargs_for_[timelord|introducer]`. 2020-10-12 15:28:17 -07:00
Richard Kiss f5ff886df4 Test `service_kwargs_for_harvester`. 2020-10-12 11:54:32 -07:00
Richard Kiss 7bbf64fa18 Greatly simplify `Service`. 2020-10-09 15:56:52 -07:00
Richard Kiss c91d75058b Simplify RPC tests. 2020-10-09 11:17:10 -07:00
Richard Kiss b3cfc18765 Use config file rather than "127.0.0.1". 2020-10-09 09:22:47 -07:00
Richard Kiss ef5b8b8dab Refactor some `ConsensusConstants` stuff. 2020-10-08 15:57:50 -07:00
Richard Kiss 0749337358 Simplify an RPC test. 2020-10-08 13:31:39 -07:00
fchirica 1dd49d5bce Fix test. 2020-10-06 14:47:31 -07:00
Richard Kiss 117e08bc03 Remove many references to `get_pool_wallet_tool`. 2020-10-02 18:06:44 -07:00
Richard Kiss 72f1012adc Remove more `WalletTool` references. 2020-10-01 18:15:51 -07:00
Richard Kiss 075cea3217 Remove many `WalletTool` references. 2020-10-01 17:28:18 -07:00
Richard Kiss f42b64fb98 Don't use dummy wallet. 2020-10-01 15:09:28 -07:00
Richard Kiss d4d32c3ab1 Improve p2_delegated_puzzle_or_hidden_puzzle. 2020-10-01 15:09:28 -07:00
Gene Hoffman 81f26ca38b Fix LGTM, update CHANGELOG 2020-10-01 11:07:12 -07:00
fchirica 62dbbf7f81 Try to fix simulation test. 2020-10-01 11:07:12 -07:00
fchirica afaf077529 Lint, increase timeouts. 2020-10-01 11:07:12 -07:00
Mariano Sorgente d4051b72b9 Ms.fixtest (#432)
* New chiapos API

* Fix flake

* Move to chiapos 0.12.30 to fix segfaults

* Black

* change stripe size to 2000

* chiavdf to 0.12.25

* Revert "chiavdf to 0.12.25"

This reverts commit f7f596ce16425c8bc61af43387d6e64023d2ef5e.
chiavdf has a timelord compile error on MacOS.

* Increase default -b

* Plotter GUI test

Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
Co-authored-by: Yostra <straya@chia.net>
2020-10-01 11:07:12 -07:00
Mariano Sorgente 13b634249a Ms.plottest (#431)
* Fix harvester test
2020-10-01 11:07:12 -07:00
Will Bendick 54a4fcd6d1 fixes tests 2020-10-01 11:07:12 -07:00
Will Bendick 9070f26717 fixes lint 2020-10-01 11:07:12 -07:00
Will Bendick 38d3fcb75e adds fees to send_clawback_transaction 2020-10-01 11:07:12 -07:00
Will Bendick 8d50da67ec adds fees to add_rate_limited_funds 2020-10-01 11:07:12 -07:00
Will Bendick 4d2f3e2597 adds fees to rate limited wallet transactions 2020-10-01 11:07:12 -07:00
Will Bendick 4710409529 adds fee to admin wallet creation 2020-10-01 11:07:12 -07:00
Richard Kiss b3e157e8ca Don't use `Wallet.wallet_info` because it's private. 2020-10-01 11:07:12 -07:00
Florin Chirica 5b17e1cf23 Peer gossip. (#414)
* Initial commit.

* mypy

* Fix start service logic.

* Fix AddressManager tests.

* Experimentally increase timeout.

* Attempt to fix test.

* Flake8 typo

* Print traceback for CI build.

* Revert exception catching to gain more logs.

* Add serialization.

* Try to hack simulation test.

* Add debug info. Connect peers more often.

* Try to fix full node gossip.

* Remove introducer protocol from full node.

* Update request_peers test.

* Flake8 the test.

* Add sqlite.

* Address some review comments.

* Try to remove Peers() everywhere but introducer.

* flake8

* More linting.

* Limit other types of inbound connections.

* Initial commit new code.

* AddressManager tests working.

* flake8, mypy, some tests.

* More flake8.

* Tweak gossip protocol.

* Catch more connection failures.

* First attempt wallet gossip.

* Add wallet gossip test.

* Add back global signal handler.

* Resolve some SuperLinter issues.

* Fix some bugs.

* More linting.

* Lint.

* Attempt to improve network connectivity.

* Small fixes.

* Lint.

* Lint.

* Checkpoint address relay.

* Some fixes.

* Fix db path.

* Lint.

* Small fixes.

* Fix bugs.

* flake8, improve speed test simulation.

* py.black

* LGTM, other small fixes.

* Don't self connect.

* py.black

* Punish self connections even more.

* One more attempt to fix self connection.

* Don't connect to the introducer if I have all peers.

* Catch bugs.

* Fix typo.

* Type checking.

* Lint, catch timestamp bug.
2020-10-01 11:07:12 -07:00
Will Bendick f83e256a14 fixes lint 2020-10-01 11:07:12 -07:00
Will Bendick 3bfe892a30 fixes rebase 2020-10-01 11:07:12 -07:00
Will Bendick ebde6e8467 fixes lint 2020-10-01 11:07:12 -07:00
Will Bendick dedf422a76 cleanup 2020-10-01 11:07:12 -07:00
Yostra afbec4160f make agg work 2020-10-01 11:07:12 -07:00
Will Bendick 7ce1e44654 incomplete coinagg 2020-10-01 11:07:12 -07:00
Yostra 438a4a121c black tests 2020-10-01 11:07:12 -07:00
Yostra e2ac44d017 fix multi receive, add multi send 2020-10-01 11:07:12 -07:00
Richard Kiss a57db60697 Fix tests. 2020-10-01 11:07:12 -07:00
Richard Kiss 8505550be5 More wallet simplifications. Placeholder for looking up
secret key by public key.
2020-10-01 11:07:12 -07:00
Richard Kiss 431ab0bf70 Use `Program` instead of `src.util.clvm`. 2020-10-01 11:07:12 -07:00
Yostra f1295bf82c save block timestamp 2020-10-01 11:07:12 -07:00
Gene Hoffman 4107cbebe0 black tests/ 2020-10-01 11:07:12 -07:00
Mariano Sorgente 6f183f7eee Improve wallet sync performance 2020-10-01 11:07:12 -07:00
Mariano Sorgente 966b5bb989 Reformat using python black 2020-10-01 11:07:12 -07:00
Mariano Sorgente 7f5868a590 Fix RL test 2020-10-01 11:07:12 -07:00
Mariano Sorgente be7267021d Fix Block.js bug and slow RL wallet bug 2020-10-01 11:07:12 -07:00
Mariano Sorgente eff85763f7 Fix tests and start with chia wallet 2020-10-01 11:07:12 -07:00
Mariano Sorgente fa2fea9d79 Finish wallet rpc tests 2020-10-01 11:07:12 -07:00
Mariano Sorgente 97cbadc51f More refactoring of rpcs and wallet 2020-10-01 11:07:12 -07:00
Mariano Sorgente 08ac82001c Refactor RPCs 2020-10-01 11:07:12 -07:00
Mariano Sorgente 5303db737b Test passing 2020-10-01 11:07:12 -07:00
Mariano Sorgente b791bf1da8 Cleaner send_transaction flow and more wallet rpc testing 2020-10-01 11:07:12 -07:00
Mariano Sorgente 9ed6949099 More test 2020-10-01 11:07:12 -07:00
Gene Hoffman 8168aeda9a Breaking changes to prepare for peer gossip later (#401)
* Initial commit breaking changes.

* Import some missing types.

* mypy.

* Lint.

Co-authored-by: fchirica <fchirica96@gmail.com>
2020-09-14 15:38:55 -07:00
Richard Kiss 1fd67f9605 Simplify `tests/keys.py`. 2020-09-14 15:38:55 -07:00
Yostra 0f44dc5cff lint 2020-09-14 15:38:55 -07:00
Yostra d37a8978ce don't run in tests 2020-09-14 15:38:55 -07:00
Richard Kiss 6a85d353f7 Fix some lint problems by reformatting with `black`. 2020-09-14 15:38:55 -07:00
Matthew Howard 6e34096e10 fixed the final test 2020-09-14 15:38:55 -07:00
Matthew Howard a47649354a fix one of the tests values 2020-09-14 15:38:55 -07:00
Matthew Howard 958c597043 fixed bug where different colours were overwriting eachother in trade response 2020-09-14 15:38:55 -07:00
Yostra e1b89617e2 correct wallet id 2020-09-14 15:38:55 -07:00
Matthew Howard db5b9a9a6f added a new test which is analagous to the first test before 2020-09-14 15:38:55 -07:00
Matthew Howard 9682025a21 pass first test 2020-09-14 15:38:55 -07:00
Matthew Howard 3e4d3b8bd8 Development on trade update (not working) 2020-09-14 15:38:55 -07:00
Matthew Howard 0882821c4c first pass at updating cc_wallet
trades do not work
2020-09-14 15:38:55 -07:00
Gene Hoffman 57c5e19353 Move to Super Linter 3.9.2 - now lint Black, flake8, mypy (#390)
* Try Super Linter at 3.9.0 and add linters

* 3.9.1 and set validate all to false

* Back to 3.9.1 and use only true VALIDATE_

* Place superlint in debug mode

* Try fix from 3.9.2

* black source. Start fixing flake8 issues

* Black tests, out of debug

* Black setup.py do to merge conflict
2020-09-14 15:38:55 -07:00
Mariano Sorgente 429d7874a0 Fix lint, and catch harvester drive access failure 2020-09-14 15:38:55 -07:00
Will Bendick dcb38e8897 fixes lint 2020-09-14 15:38:55 -07:00
Will Bendick f4a8ee98c1 fixes clawback rpc 2020-09-14 15:38:55 -07:00
Will Bendick 069497f113 adds clawback tests 2020-09-14 15:38:55 -07:00
Richard Kiss fc36f8a4da A couple more refactor tweaks. 2020-09-14 15:38:55 -07:00
Richard Kiss bdddbefe70 Massively change clvm for cc wallet. 2020-09-14 15:38:55 -07:00
Mariano Sorgente 774307dce1 Changes for bls 0.2.3 (#354)
* Start of changes for bls 0.2.3
* Make remaining changes for new blspy
* Add migration for 1.0b9
Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
2020-08-18 10:59:45 -07:00
Will Bendick 0623c420f3 fixes test 2020-08-18 10:59:45 -07:00
Yostra 9667e1c783 cleanup 2020-08-18 10:59:45 -07:00
Will Bendick 5db837c06b removes broken test for incomplete clawback implementation 2020-08-18 10:59:45 -07:00
Will Bendick 472ae48e5f merge 2020-08-18 10:59:45 -07:00
Yostra bd47491903 comment last line 2020-08-18 10:59:45 -07:00
Yostra 506beae9bd fix tests 2020-08-18 10:59:45 -07:00
Yostra 7cf822864d rl changes 2020-08-18 10:59:45 -07:00
Will Bendick 05036950ad adds zero fee to test 2020-08-18 10:59:45 -07:00
Will Bendick 1728565a31 implements get_wallet_balance method rpc for rate limited wallet 2020-08-18 10:59:45 -07:00
Will Bendick c86ee0f5a5 adds test for receving coin from rl wallet 2020-08-18 10:59:45 -07:00
Will Bendick 0c2d22ccc4 fixes api to use strings instead of bytes 2020-08-18 10:59:45 -07:00
Will Bendick 54802d6971 fixes bug in rl_set_user_info expecting a Coin instead of a json dict 2020-08-18 10:59:45 -07:00
Will Bendick 4066cb7a73 finishes send transaction rpc api for rate limited wallet 2020-08-18 10:59:45 -07:00
Yostra aaa44e8a92 fix test 2020-08-18 10:59:45 -07:00
Will Bendick fa27a5d780 adds rpc tests 2020-08-18 10:59:45 -07:00
Yostra f05fd1d20c already a tx_record 2020-08-18 10:59:45 -07:00
Yostra 24bd21985f format 2020-08-18 10:59:45 -07:00
Yostra 5d53bd25d7 clean spend/sign; expose bug in clvm puzzle 2020-08-18 10:59:45 -07:00
Yostra 5bdb5e90eb tests 2020-08-18 10:59:45 -07:00
Yostra a3b678a1f0 rl wallet create walelt 2020-08-18 10:59:45 -07:00
Yostra c0622ec1d1 first take 2020-08-18 10:59:45 -07:00
Yostra 94e4afc652 add file necryption 2020-08-18 10:59:45 -07:00
Mariano Sorgente 52ecf97aba Ms.fix test (#331)
* Try to fix tests, and migrate 1.8 -> 1.9
* Stop the service after closing connections
2020-07-27 16:01:18 -07:00
Mariano Sorgente 700eaad9e0 Ms.1.8bugs3 (#326)
* harvester fixes
* Improve networking stability
* Fix wallet shutdown
* Allow chia keys sign and chia keys verify
* Dislpay the public key also
* Retry loading invalid plots, handle drive disconnection
* Confirm before deleting plots
* Improve error message WIP
* XImproved error message for importing keys
* Uncomment process.kill
* Fix merge error with restore backup
* Fixed markdown
* Switch button order, and fix request_peers
* Consolidate styles
* Set ci's to timeout after 60 minutes has elapsed
* plot directories and memory buffer
* Fix flake8
* Update chiapos, chiavdf, chiabip158, and blspy

Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
Co-authored-by: Gene Hoffman <30377676+hoffmang9@users.noreply.github.com>
2020-07-27 16:01:18 -07:00
Richard Kiss 392b21bdaf Make `MAX_COIN_AMOUNT` an int. Remove obsolete helpers. 2020-07-27 16:01:18 -07:00
Richard Kiss 470b0c8c76 Use attributes instead of dictionary keys. 2020-07-27 16:01:18 -07:00
Yostra ca27da0744 fix tests 2020-07-27 16:01:18 -07:00
Yostra b9cc0aec99 restore backup ui 2020-07-27 16:01:18 -07:00
Yostra 512c513abb generic backup 2020-07-27 16:01:18 -07:00
Yostra 4042871ae6 user setitngs 2020-07-27 16:01:18 -07:00
Richard Kiss 52091044e4 Use `constants` instead of `dic` overrides for tests set-up. 2020-07-27 16:01:18 -07:00
Richard Kiss a1bd2d945f Make a few type checks less strict. 2020-07-27 16:01:18 -07:00
Richard Kiss 423efbc448 Don't use `copy` for constants. 2020-07-27 16:01:18 -07:00
Richard Kiss afb5d32fb2 Use `ConsensusConstants` in Harvester. 2020-07-27 16:01:18 -07:00
Mariano Sorgente 550642c789 Minor repairs and fix BIP39 and add tests (#310)
* Logging of plot num, num proofs found, and fix rpc edge case
* Revert add -> append, and python black
* Fix list/set issue
* Correct BIP39 spec and test vectors
* Fix create mnemonic UI
2020-07-16 13:05:43 -07:00
Richard Kiss a263cc1c8c Use `clvm` via `src.util.clvm` to better control what API is accessed. 2020-07-16 13:05:43 -07:00
Mariano Sorgente 194e0c24ea New blspy, key formats, and new plot format (#309)
* Bump blspy-ietf
* wip lots of errors
* Respond to bram feedback, use eip 2334 for keys
* Fix most tests, use latest blspy
* Improve simulation test constants
* Fixed issue with plotting and reading plots
* Fix simulation test
* Override puzzle hash if we don't have key, for safety. Bump protocol version
* Fix superlint issue
* Switch to 1.0 proof of space format
* Temporary genesis block
* Update chiabip158, chiavdf versions

Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
Co-authored-by: Alex Wice <alex@chia.net>
2020-07-16 13:05:43 -07:00
Mariano Sorgente 8dca011f5e Change simulation constants and initialize correct height for full node (#308)
* Change simulation constants and initialize correct height for full node
2020-07-16 13:05:43 -07:00
Yostra 49deb0d93b post merge cleanup 2020-07-16 13:05:43 -07:00
Yostra a1a2242ee5 benchmark 2020-07-16 13:05:43 -07:00
Yostra b74a030d22 flake8 tests 2020-07-16 13:05:43 -07:00
Yostra 8b13aa0810 correct path 2020-07-16 13:05:43 -07:00
Yostra 1dcc13f2e2 simulator constants 2020-07-16 13:05:43 -07:00
Yostra e940bf24fe timeout 2020-07-16 13:05:43 -07:00
Yostra 900dbdc54e timeout 2020-07-16 13:05:43 -07:00
Yostra 7edc7bf660 more time 2020-07-16 13:05:43 -07:00
Yostra 6f406562b3 timeout assert 2020-07-16 13:05:43 -07:00
Yostra 24297ff26e formatting and constants for simulation 2020-07-16 13:05:43 -07:00
Yostra e90866ffa9 tests cleanup 2020-07-16 13:05:43 -07:00
Yostra ffb39ace45 block tool move 2020-07-16 13:05:43 -07:00
Yostra e6688d407f flake 2020-07-16 13:05:43 -07:00
Yostra b27eca06d4 fix trades 2020-07-16 13:05:43 -07:00
Yostra 9ebcc611ac more tests 2020-07-16 13:05:43 -07:00
Yostra b71db7219a test 2020-07-16 13:05:43 -07:00
Yostra 3f3e384f71 update trade status when farmed 2020-07-16 13:05:43 -07:00
Yostra e4775fca14 test trades 2020-07-16 13:05:43 -07:00
Yostra 39df102000 secure trade cancel: 2020-07-16 13:05:43 -07:00
Yostra bd4ed110df trade store 2020-07-16 13:05:43 -07:00
Yostra a211200bb6 cancel trades 2020-07-16 13:05:43 -07:00
Yostra bb6efc9f56 trade 2020-07-16 13:05:43 -07:00
Yostra d45f81c626 accepted offer history 2020-07-16 13:05:43 -07:00
Yostra 19b28f20fc trade history 2020-07-16 13:05:43 -07:00
Yostra 65203e9862 stashing changer remotly 2020-07-16 13:05:43 -07:00
Mariano Sorgente 04e4a6fa51 Remove logging 2020-07-16 13:05:43 -07:00
Mariano Sorgente 4ba329bd3e Remove randomness from tests 2020-07-16 13:05:43 -07:00
Mariano Sorgente 22bca02451 Don't recreate block tools in simulator 2020-07-16 13:05:43 -07:00
Mariano Sorgente f6696531e4 Reduce the calls to keychain keyring 2020-07-16 13:05:43 -07:00
Mariano Sorgente dfb1750a04 Log level warning 2020-07-16 13:05:43 -07:00
Mariano Sorgente 04edeb5255 Speed up tests 2020-07-16 13:05:43 -07:00
Mariano Sorgente 392c045e7e Attempt to fix tests 2020-07-16 13:05:43 -07:00
Mariano Sorgente ef92f2940a Move plotting code to src/plotting 2020-07-16 13:05:43 -07:00
Mariano Sorgente 2ee946c371 chia plots cli program 2020-07-16 13:05:43 -07:00
Mariano Sorgente 96480bf860 Fix flake8 lint 2020-07-16 13:05:43 -07:00
Mariano Sorgente cfcc804cea Supress pylint sorted dict warning 2020-07-16 13:05:43 -07:00
Gene Hoffman 2c3197ba46 Correctly disable erroneous pylint error 2020-07-16 13:05:43 -07:00
Gene Hoffman 074fed031f flake8 and mypy only pypi upload flow - also when linters collide... 2020-07-16 13:05:43 -07:00
Gene Hoffman b157afd03b Disable pylint in test_proof_of_space - Specify PYTHONPATH 2020-07-16 13:05:43 -07:00
Gene Hoffman 0034838ffa Modify some test clean ups - fix Ubuntu 20.04 bug in install.sh 2020-07-16 13:05:43 -07:00
Gene Hoffman 7b34716ef4 Fix test_block_store - fix self._get_fingerprint_and_entropy - pylint 2020-07-16 13:05:43 -07:00
Gene Hoffman 2e25ca131c Fix flake8 - clean up tests and add to flake8 - lint src upload to pypi 2020-07-16 13:05:43 -07:00
Mariano Sorgente 13a6434404 New genesis block, fix timeout 2020-07-16 13:05:43 -07:00
Mariano Sorgente 14f1970f8e Improve daemon 2020-07-16 13:05:43 -07:00
Mariano Sorgente 5df7a189e6 Update changelog 2020-07-16 13:05:43 -07:00
Mariano Sorgente 9212cb507f Get UI working with new format 2020-07-16 13:05:43 -07:00
Mariano Sorgente 4367ed36e7 Fix local simulation 2020-07-16 13:05:43 -07:00
Mariano Sorgente 2fc6f89603 Keychain with pbkdf2 and passphrase support 2020-07-16 13:05:43 -07:00
Mariano Sorgente a1b4392bb1 Tests passing 2020-07-16 13:05:43 -07:00
Mariano Sorgente 4ec019411a Fix more tests 2020-07-16 13:05:43 -07:00
Mariano Sorgente 1d59fee788 New Bram protocol changes and full node tests 2020-07-16 13:05:43 -07:00
Mariano Sorgente 73398e0159 Remove challenge signature 2020-07-16 13:05:43 -07:00
Mariano Sorgente 0dea6db7cd Remove raw keychain keys, update block tools with new protocol 2020-07-16 13:05:43 -07:00
Mariano Sorgente 7b5fd7d740 Validate that the hash of the signature is correct 2020-07-16 13:05:43 -07:00
Mariano Sorgente e0d55993fe Implement new farmer and harvester protocol 2020-07-16 13:05:43 -07:00
Mariano Sorgente fdee2f2d5c Replace plots.yaml with in-file keys 2020-07-16 13:05:43 -07:00
Mariano Sorgente 1055ee3ea2 Remove localhost references, and fix connection bug 2020-07-16 13:05:43 -07:00
Richard Kiss 7dd0df2a50 Use `bt.root_path` instead of global. 2020-07-16 13:05:43 -07:00
Richard Kiss 617d6896e2 Pass `starting_height` explicitly, not in `dic`. 2020-07-16 13:05:43 -07:00
Richard Kiss e83e7db3ce Pass `clvm_cost_ratio_constant` to `calculate_cost_of_program`. 2020-07-16 13:05:43 -07:00
Richard Kiss 9220b90373 Explicitly pass `discriminant_size_bits` to `TimeLord`. 2020-07-16 13:05:43 -07:00
Richard Kiss 0175cf64eb Use `constants_for_dic`. 2020-07-16 13:05:43 -07:00
Richard Kiss 97150f8abd Fix test. 2020-07-16 13:05:43 -07:00
Richard Kiss f8d06946cd Use `make_test_constants_with_genesis`. 2020-07-16 13:05:43 -07:00
Richard Kiss e4f3050667 Use `ConsensusConstants` in many more places. 2020-07-16 13:05:43 -07:00
Richard Kiss 13525e824f Pass in `consensus_constants` to `TimeLord`. 2020-07-16 13:05:43 -07:00
Richard Kiss be8f973fa2 Pass constants into `Farmer`. 2020-07-16 13:05:43 -07:00
Richard Kiss aa66d1d13d Remove `from src.consensus.constants import constants`. 2020-07-16 13:05:43 -07:00
Richard Kiss f812cdc72d Remove path never taken. 2020-07-16 13:05:43 -07:00
Mariano Sorgente 6b5e17d734 Change test log level back to WARNING 2020-07-16 13:05:43 -07:00
Mariano Sorgente 8c67ead4f4 Fix connection issues 2020-07-16 13:05:43 -07:00
Mariano Sorgente 7d87638b8b Remove localhost references, and fix connection bug 2020-07-16 13:05:43 -07:00
Mariano Sorgente 8ae737e74a Change logging level to WARNING in tests 2020-07-16 13:05:43 -07:00
Mariano Sorgente 9c748cfec4 Try to speed up with new BlockTools 2020-07-16 13:05:43 -07:00
Mariano Sorgente b0356d5810 Use setup_nodes constants everywhere 2020-07-16 13:05:43 -07:00
Mariano Sorgente 2c8efb7db2 Some more small improvements 2020-07-16 13:05:43 -07:00
Mariano Sorgente fa39350758 Fix some more tests 2020-07-16 13:05:43 -07:00
Mariano Sorgente 116ee138b8 Remove sleeps from tests 2020-07-16 13:05:43 -07:00
Mariano Sorgente c0441391b8 Start working on test speeds 2020-07-16 13:05:43 -07:00
Mariano Sorgente 51889d3601 Improve unfinish blocks load test 2020-07-16 13:05:43 -07:00
Mariano Sorgente 35822c8796 Ms.networking2 (#284)
* Improve test speed with smaller discriminants, less blocks, less keys, smaller plots
* Add new RPC files
* Refactor RPC servers and clients
* Removed websocket server
* Fixing websocket issues
* Fix more bugs
* Migration
* Try to fix introducer memory leak
* More logging
* Start client instead of open connection
* No drain
* remove testing deps
* Support timeout
* Fix python black
* Richard fixes
* Don't always auth, change testing code, fix synced display
* Don't keep connections alive introducer
* Fix more LGTM alerts
* Fix wrong import clvm_tools
* Fix spelling mistakes
* Setup nodes fully using Service code
* Log rotation and fix test
2020-07-16 13:05:43 -07:00
fchirica c6015c98aa Try to resolve the error in Ubuntu python 3.8 2020-07-16 13:05:43 -07:00
fchirica e4b5454959 Unpack all in rpc test 2020-07-16 13:05:43 -07:00
fchirica 03e0788e82 Yield sanitizer as well. 2020-07-16 13:05:43 -07:00
fchirica a9445fb8d1 Fix introducer task. 2020-07-16 13:05:43 -07:00
fchirica 284c5a50a0 Initial commit sanitizer 2020-07-16 13:05:43 -07:00
Bill Blanke bee2e7a2a8 update for new pos 2020-06-08 17:17:48 -07:00
Mariano Sorgente bff3c2ffa2 Add plots, and fix rpc full node 2020-06-08 17:17:48 -07:00
Mariano Sorgente c9bf65377f Apply black formatting 2020-06-08 17:17:48 -07:00
Richard Kiss 14792e840e Always use `~/.chia/test-plots` as test-plotting directory. 2020-06-08 17:17:48 -07:00
Richard Kiss bd8d20aeb3 Use test plots in `$CHIA_ROOT/test_plots` if it exists. Use
a temporary directory for `root_path` in `BlockTools`.
2020-06-08 17:17:48 -07:00
Richard Kiss 1c262ac77f Make `Timelord._shutdown` sync. 2020-06-08 17:17:48 -07:00
Richard Kiss fb53c59247 Factor out `DEFAULT_ROOT_PATH`. 2020-06-08 17:17:48 -07:00
Richard Kiss 0335623368 Use `Harvester.__init__` instead of `create`. 2020-06-08 17:17:48 -07:00
Richard Kiss 4f67cc2641 Have `timelord._manage_discriminant_queue` push messages into queue itself. 2020-06-08 17:17:48 -07:00
Richard Kiss 62564b998d Refactor `start_harvester` into `start_service`. 2020-06-08 17:17:48 -07:00
Richard Kiss d1f0483023 Make `start_server` return an `asyncio.AbstractServer`. Wait
on that for servers.
2020-06-08 17:17:48 -07:00
Richard Kiss c65a78fb7f Factor out `start_server`. 2020-06-08 17:17:48 -07:00
Richard Kiss fff78556ab Move config out of `Introducer`. 2020-06-08 17:17:48 -07:00
Richard Kiss 9090ef0176 Refactor some messages into `introducer_protocol`. 2020-06-08 17:17:48 -07:00
Richard Kiss 1b1ee7bc4b Factor out `_start_bg_tasks` from timelord. 2020-06-08 17:17:48 -07:00
Matthew Howard e20dfc8307 Revert "added duplicate sigs where needed"
This reverts commit 5a4b7a022aeb22a5eb34bbd0fa4fc8167578119b.
2020-06-01 08:56:59 -07:00
Matthew Howard c9f3a8cdeb added duplicate sigs where needed 2020-06-01 08:56:59 -07:00