Commit Graph

1071 Commits

Author SHA1 Message Date
matt c617cd5cfe lint fixes 2021-05-28 17:06:40 +01:00
Richard Kiss b287fccc21 Rewrite lifecycle tests faster; fix `debug_spend_bundle`. 2021-05-26 20:47:19 -07:00
Richard Kiss 5c12d4e54a Add singleton lifecycle tests. 2021-05-26 00:16:26 -07:00
Richard Kiss acf1b6fb4d Make the two pool puzzles more similar. 2021-05-26 00:09:02 -07:00
Richard Kiss e7b069a1ab Improve some names. 2021-05-25 23:04:12 -07:00
Richard Kiss def111926f Some inlining, optimizing `pool_*.clvm`. 2021-05-25 19:19:40 -07:00
matt 232e24323d added more truths 2021-05-25 21:23:42 +01:00
Richard Kiss effa92eec1 Curry in `LAUNCHER_PUZZLE_HASH`. 2021-05-25 12:10:51 -07:00
Richard Kiss f30329d7ef Rename some stuff. 2021-05-25 12:08:29 -07:00
Richard Kiss ecb9b0b58a Use "curry-and-treehash.clinc". 2021-05-25 12:05:54 -07:00
matt af46d3bb7e rewrite did wallet and did innerpuz
first few tests are passing
2021-05-25 14:26:34 +01:00
matt ed947837c9 Un-flip output list
Fix test for this list
Add delayed puzzle clvm
2021-05-24 15:18:29 +01:00
matt 18632f5395 add extra truths passed in to singleton and adjust innerpuzzles 2021-05-21 17:02:59 +01:00
matt 2432e51f0e Remove unnecessary mod_hash_hash
Fix bug in p2_singleton assert_my_coin_id
2021-05-21 14:54:30 +01:00
matt f30bd8404d remove data after x 2021-05-20 20:00:34 +01:00
matt 63bbb3a7e4 added auto-wrapping and exactly one odd output checks 2021-05-19 17:43:12 +01:00
matt 5dfdbe084b remove trailing apostrophe from file name 2021-05-17 19:37:14 +01:00
matt 130ca3b257 fix filepaths in test_clvm_compilation 2021-05-17 18:22:08 +01:00
matt 3546b38aee update and add sha256trees for singleton puzzles 2021-05-17 18:12:49 +01:00
matt 2f916a9714 lots of lint fixes 2021-05-17 17:46:45 +01:00
matt 2d8bbf0130 Fix bug where 0x00 was prepending coin_id 2021-05-17 16:33:35 +01:00
matt 36a9f02694 Fix genesis_id passing in singleton_top_layer 2021-05-17 15:46:33 +01:00
matt 5441d77495 changes to a lot of singleton related code following several meetings 2021-05-13 16:48:43 +01:00
matt ebb8f2d58b save progress before rebase 2021-05-10 14:22:46 +01:00
matt 695b12c03a create p2_singleton puzzle and add test 2021-05-10 14:21:38 +01:00
Mariano Sorgente 88310d6142
Mempool sorting and accept reverted pending transactions (#3683)
* Sort by fee/cost, and fix pending tx issue in reorgs

* Fix test name

* Bring the seen list size back to normal.
2021-05-04 11:21:27 -07:00
Mariano Sorgente c72d065f6b
Fix test (#3350) 2021-05-04 09:34:48 -07:00
Arvid Norberg 912dc84663
don't increment counters for outgoing messages blocked by the rate limit. (#3518)
This was causing a problem where outbound messages, blocked by the rate limiter,
would still increment the counters as-if they had been sent. This, in turn,
could cause other message types to get blocked becuase the rate limiter thought
we had sent a lot of the other (blocked) message type.
2021-05-03 11:18:29 -07:00
Richard Kiss a7f996b4dc
Tests skipping mempool (#3065)
* Avoid importing `test_constants` as it takes a long time.

* Some new tests that circumvents mempool.

* Fix lint problems.
2021-04-30 10:23:45 -07:00
Richard Kiss b084813b12
Improve streamable (#3031)
* Avoid importing `test_constants` as it takes a long time.

* Factor out `parse_*` functions.

* First crack at refactoring `Streamable.parse`.

* Don't add `_parse_functions` attribute to `Streamable`.

This no longer requires an extra `_parse_functions` attribute on a
`Streamable`, as it may be confusing serializers or other functions
that use `__annotations__`.

* Fix lint problems with `black`.

* Fix `parse_tuple`.

* Defer some parsing failures to parse time rather than class-creation time.

* Tidy up & remove some obsolete stuff.

* Decorate `RequestBlocks` as `streamable`.

* Fix wrong uses of Streamable class

Revert an earlier commit and error out on class creation in case a
Streamable subclass is instantiated incorrectly, e.g. containing a
non-serializable member.

Fix cases where Streamable parent class was forgotten.

* Fix wrong types when creating DerivationRecord and WalletCoinRecord

* additional unit tests for streamable parsers

* add type annotations (#3222)

Co-authored-by: Rostislav <rostislav@users.noreply.github.com>
Co-authored-by: arvidn <arvid@libtorrent.org>
2021-04-30 10:22:11 -07:00
matt-o-how 637177519a
Add announcements for standard tx (#3023)
* changed bahviour of wallet and wallet tools for standard solutions

* black formatting wallet_tools

* added a test for hypothetical stolen zero_output coin

* swap to sha256 from sha256tree for message

* fix wallet_tools version, address lint issues

* correctly int_from_bytes

* fix uninstantiated key in dict

* Comment out broken test

* Fix types (used SerializedProgram)

Co-authored-by: Mariano <sorgente711@gmail.com>
2021-04-30 03:13:00 +09:00
Mariano Sorgente 621c13c249
Improve safety of coin store (#2984)
* Improve safety of coin store

* Add test for exception

* Fix issue with fork_point_with_peak
2021-04-28 15:27:56 -04:00
Mariano Sorgente 8aed3645be
1,2,3 mojo attack prevention (#3017) 2021-04-28 10:52:22 -07:00
Almog De Paz eae1cb6220
check summaries on long sync (#2894)
* check summaries against wp on long sync

* lint

* move summary check to receive_block

* lint

* lint

* ban peer if bad response during batch sync

* fix typo
2021-04-28 10:50:16 -07:00
Yostra 92cd23cbaf
Filter test (#2980)
* reenable

* lint
2021-04-28 17:17:09 +09:00
Yostra 4ef3777119
Avoid multiple requests (#2860)
* avoid dupe requests

* move to store, clean tasks

* linting

* limit

* 10peers,5sec
2021-04-28 02:58:45 -04:00
matt-o-how c1846b0f49
Singleton improvements (#2286)
* Changed singleton to take puzzlehash as origin.
Updated DID wallet to use this

* fixed hex and sha256tree for singleton puzzle

* require more signature for DID spends

* fix singleton tests
black format did wallet

* fix broken test
fix linting
switch to inline functions

* remove unused defuns from singleton_top_layer
2021-04-27 11:25:33 -07:00
Almog De Paz 50164d16d3
Farm while syncing (#2195)
* add long sync lock

* lint

* test getting new high peak while synced

* lint

* fix logs
2021-04-27 11:05:16 -07:00
Mariano Sorgente cdf9e1aaaa
Add tests for LRU and coin store (#2925) 2021-04-27 10:58:59 -07:00
Arvid Norberg 8717ca4b02
Leave programs in SpendBundle serialized (#2380) 2021-04-27 10:52:21 -07:00
Yostra 4c98dd2b71
decorator (#2221) 2021-04-26 23:21:04 -07:00
Rostislav Skudnov 1f16bca87f
Update and re-enable Merkle set test (#2824)
Co-authored-by: Rostislav <rostislav@users.noreply.github.com>
2021-04-26 11:20:08 -07:00
Mariano Sorgente cc1aba8c3b
Ms.ph scan (#2808)
* Work on offline signing

* Fix lint
2021-04-26 11:18:29 -07:00
Rostislav 33c4529f61 Add extra tests for replacing conflicting SpendBundles in mempool 2021-04-22 10:45:22 -07:00
Mariano Sorgente b37305e85e
Fix adding double signage points (#2340) 2021-04-21 22:43:00 -07:00
Yostra 328e4cd276
Blockchain timestamps fix (#2302)
* incomplete push for debugging

* block timestamp in mempool

* rename

* farm tx block

Co-authored-by: matt <matt@chia.net>
2021-04-21 16:43:02 -07:00
Arvid Norberg e55988479b
More tests (#2295)
Co-authored-by: Mariano <sorgente711@gmail.com>
2021-04-21 11:17:21 -07:00
matt 1b81c2f14f fix broken test 2021-04-20 18:18:24 -07:00
Mariano Sorgente 9fce41cfb7
Assert small messages (#2213)
* Assert small messages

* Update condition_tools.py

Add `TODO`.

Co-authored-by: Richard Kiss <him@richardkiss.com>
2021-04-20 17:51:48 -07:00
Richard Kiss 50f9d8b4c2 Add some ROM tests. 2021-04-20 17:08:27 -07:00