Commit Graph

4709 Commits

Author SHA1 Message Date
Arvid Norberg dc7071f459
attempt to save time hashing PeerInfo objects in introducer (#1990)
* attempt to save time hashing PeerInfo objects in introducer, by moving attributes from hash tables into the peer object itself, where it belongs

* only remove peers after a few failures in a row, not immediately. Ensure we don't check peers too frequently.
2021-04-17 09:25:40 -07:00
Gene Hoffman cb3dab5c89 Update to reverted blspy 1.0.2 2021-04-17 02:32:07 -07:00
Mariano Sorgente 5039a09ce6
Testnet3 (#1985) 2021-04-17 16:40:51 +09:00
Mariano Sorgente a6874bd2fe
Block compression and decompression (#1959)
* squash

* rebase cleanup

* cost

* Combine adam's and straya's PRs

* Fix cost test

* Fix another test

* Improve safety in reorgs

* Improve wallet in reorgs

* Improve wallet in reorgs

* Bug in reorg handling

* Bug in reorg handling, and fix test

* Band aid

* Comment out to pass test

* Comment out test

* rebase clean

* USe a list of reference generators

* create

* Integrate Block Compression

* Fix generator argument creation

* improve test

* update block tools

* Separate CompressorArg and GeneratorArg, improve type hints

* First crack at `list_to_tree`.

* Integrate generator arguments as tree

* End to end test for generators

* Fix linting issues, hook up things, and add a test

* tidy GeneratorArg test

* Get compression and decompression working in full node

* Fix fetching block generator from DB in multiprocess

* Fix edge case in reorgs, test many combinations of reorgs

* reduce max number of generators refs allowed in a block

* Apply Straya's fix for calculating the end index for generator args

* typos

* Run test_block_compression for a transaction large enough to force multiple input coins in the transaction

* Update generator compression tests for treearg change and decompressor offset args fix

* Fix merge conflict

* Fix test

* Fix full node tests

* Don't make full blocks

* fix lint

Co-authored-by: Yostra <straya@chia.net>
Co-authored-by: Adam Kelly <aqk@aqk.im>
Co-authored-by: Richard Kiss <him@richardkiss.com>
2021-04-16 23:13:22 -07:00
Richard Kiss 9872525f80 Remove message from `(x)`. 2021-04-16 21:22:46 -07:00
Rostislav Skudnov f9ac890090
Change mempool rules for replacing conflicting SpendBundles (#1971)
Require that a conflicting SpendBundle must not only have higher fee per
cost, but also increase the total fee by at least 0.00001 XCH and spend
all coins that were spent in the set of conflicting SpendBundles.

Refactor and update tests of conflicting spends (aka double spends) in
mempool.

Co-authored-by: Rostislav <rostislav@users.noreply.github.com>
2021-04-16 18:20:21 -07:00
matt-o-how 1d6bc440c7
Deleted blockchain_check_conditions (#1966)
* deleted blockchain_check_conditions and added optional timestamp to mempool_check_conditions

* removed unnecessary code

* change back to < for block height

* time now passes on equal to condition value
2021-04-16 14:02:06 -07:00
Florin Chirica ae911f53c4
Wallet sleep before finding connections. (#1968) 2021-04-16 13:31:36 -07:00
Bill Blanke 3629b071b2 adding prefix for testnet2 2021-04-15 21:14:03 -07:00
Yostra 64b63f4ed5
lower freeze time (#1941) 2021-04-15 19:28:55 -07:00
Andrew Martin add5b3bbc9
fix typo in keys documentation (#1933) 2021-04-15 13:03:51 -07:00
matt-o-how 332d9392f9
Add test for relative seconds, and rename conditions (#1902)
* Add test for relative seconds

* rebased on top of main

* Renamed AGG_SIG to AGG_SIG_UNSAFE
Renamed height and time conditions
Changed some demo p2 puzzles to use AGG_SIG_ME

* fix merge on cost_calculator

* update hex and sha256tree of p2_delegated_conditions

* fix condition name in rl clvm

* updated the innerpuz sha256tree after careful inspection
2021-04-15 13:00:14 -07:00
Adam Kelly 24fdd378a7
Transaction matching (#1932)
Co-authored-by: Adam Kelly <aqk@aqk.im>
2021-04-16 03:23:40 +09:00
wjblanke 065a539490
reverted BLS back to GIL enforced (#1936) 2021-04-15 10:59:38 -07:00
Arvid Norberg cab78c43a6
update cost and max cost according to new plan (#1864)
* update cost and max cost according to new plan
of even split between (1) generator program size (2) generator program CPU and
memory costs (3) CREATE_COIN conditions for and archetype block with 1000
vanilla transactions, 2 inputs and 2 outputs each.

update costs of conditions to use the same unit (as CLVM). Remove CLVM_COST_RATIO_CONSTANT

Add COST_PER_BYTE constant, defining the cost for each byte of generator program.

* bump clvm and clvm_rs versions

* fix typo in setup.py
2021-04-15 20:16:52 +09:00
Gene Hoffman 16760e968a GUI updated, 1.0.5 changelog update 2021-04-14 22:45:08 -07:00
Adam Kelly 82876587ca Generator Block Decompression 2021-04-14 20:03:37 -07:00
Adam Kelly e7627c567f Change generator ref error message name 2021-04-14 20:02:10 -07:00
Adam Kelly 73d5577bec Validate Generator Reference field during block validation. Validate size in bytes of generator against MAX_GENERATOR_SIZE. Lower max generator list entries. 2021-04-14 20:02:10 -07:00
Adam Kelly 2d26934965
Add types to support Generator Back References (#1901)
* Add types to support Generator Back References

* Add test workflows

Co-authored-by: Adam Kelly <aqk@aqk.im>
2021-04-14 13:49:36 -07:00
Mariano Sorgente cbbf365dc9
Smoother netspace (#1894)
* Smoother netspace

* Change cli as well
2021-04-14 11:52:39 -07:00
matt-o-how e977bed7e4
Add Puzzle Announcement conditions (#1780)
* Specified two types of create_announcement

* Fix create_announce_with_puzhash in specific situation

* Removed unnecessary announcement functionality from a bunch of place

* Added tests for puzzle announcement and wallet features

* fix tests/clvm/coin_store.py to use new announcements

* fix test_blockchain_transactions

* update test_blockchain_transactions to use real names

* remove lingering ConditionVarPair

* Fix another lignering CVP issue

* fix broken test imports

* fix puzzle announcement test

* change announcement_names to set and rename some functions for clarity

* Rename conditions for consistency

* typing and typo fixes

* fix name conflict in test

* fix test coin_store to use sets

* renumber opcode

* force recompile and small fixes for new conditions numberings

* add sha256tree files for updated hex files
2021-04-14 11:28:18 -07:00
Almog De Paz e3676f130f
Add segments to db while synced (#1885)
* create segments on restart
cache segment on respond block

* save segments by header hash

* logs

* lint

* logs

* use hex

* add done check

* add done check
2021-04-14 11:22:25 -07:00
Adam Kelly 6946b265b9 Keep up with dependabot modifying our workflow files and Canonicalize order of tests 2021-04-14 11:07:56 -07:00
Gene Hoffman 9cc908678b
migrate/fix version info for installers now that we're semver (#1869)
* migrate/fix version info for installers now that we're semver

* black
2021-04-14 09:50:17 -07:00
Mariano Sorgente 49219ea950
Improve get_name_puzzle_conditions, add typing, avoid re-implementing… (#1846)
* Improve get_name_puzzle_conditions, add typing, avoid re-implementing sensitive serialization logic

* Lint
2021-04-14 14:03:33 +09:00
Mariano Sorgente a2ca057b49
Ms.aggsig me challenge (#1843)
* Start aggsig me

* Pass in genesis challenge

* Update DID, and remove useless functions from coinbase.py

* Unused imports

* Revert GUI

* Use a different constant so forks of chia can easily change it
2021-04-14 14:03:14 +09:00
Mariano Sorgente 0d8cfa1cff
Plot tools fixes (#1848)
* Reduce chance of race conditions, and don't throw when we don't have plots

* use cleaner initial value
2021-04-14 13:21:14 +09:00
Mariano Sorgente d2466ee822
Ms.mempool improvements (#1823)
* Remove overflow from list, and remove useless call to handle_eos

* Unindent

* Changes to mempool

* tests

* progress on tests

* Add tests for new mempool

* Fix lint and revert streamable changes

* Improve logging

* Test level warning

* Fix test

* Increase mempool size to 150x
2021-04-13 21:19:12 -07:00
dependabot[bot] 9ea6399280 Bump styfle/cancel-workflow-action from 0.8.0 to 0.9.0
Bumps [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/styfle/cancel-workflow-action/releases)
- [Commits](https://github.com/styfle/cancel-workflow-action/compare/0.8.0...89f242ee29e10c53a841bfe71cc0ce7b2f065abc)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-13 19:51:07 -07:00
dependabot[bot] 6ddce0e0f6 Bump actions/cache from v2.1.4 to v2.1.5
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.4 to v2.1.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.4...1a9e2138d905efd099035b49d8b7a3888c653ca8)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-13 19:49:54 -07:00
Gene Hoffman cd0db13a55 Nehalem 2021-04-13 19:12:28 -07:00
Gene Hoffman 357030e31e update translator handle 2021-04-13 17:43:59 -07:00
Gene Hoffman 477cfa1f98 Update GUI to skip webpack 2021-04-13 14:02:34 -07:00
Gene Hoffman 1e459d4cef Catch changelog up to 1.0.4 2021-04-13 09:24:37 -07:00
Mariano Sorgente 772e6fd440
Ms.performance (#1776)
* Improve performance of streamable

* __annotations__ instead of get_type_hints

* Fix overly strict type checker

* Lints and fix test

* Lint

* Adds support for empty streamables

* Use different strategy to fix lint and support empty Streamables

* Test for empty streamable

* Changelog
2021-04-13 16:42:26 +09:00
almog e9ca611a85 get_block_records_at get only blocks that are part of the chain 2021-04-12 10:21:05 -07:00
Jesús Espino 181f2fefa3
Add --offset flag to the wallet get_transactions command (#1802)
* Add --offset flag to the wallet get_transactions command

* Running black
2021-04-11 22:23:49 -07:00
Yostra a142f10cfd
Init as None (#1814)
* init as None

* lint

* fix import from asyncio

Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
2021-04-11 20:35:51 -07:00
Yostra 06e871c5d5 cancel safely 2021-04-11 18:42:13 -07:00
Yostra 773adfade5
Lock for all writes (#1758)
* lock for all writes

* use async  with where convinant

* wrapper

* more

* lint

* update wallet

* rl wallet

* indentation

* fix tests

* bad path merged into main

* wallet lock

* refacoted by mistake

* re-raise

* memory/disk inconsistency

* more inconsitency

* asyncio.cancelled is baseexception in 3.8 and 3.9
2021-04-10 19:07:02 -07:00
Will Bendick 7d6ea6a39d removes shared dict 2021-04-09 10:06:45 -07:00
Will Bendick 4c45451864 appease mypy 2021-04-09 10:06:45 -07:00
Will Bendick 232454f2cd returns total size instead of updating non local variable 2021-04-09 10:06:45 -07:00
Will Bendick 5cc09d8c22 bump blspy 2021-04-09 10:06:45 -07:00
Will Bendick b350065ebb lint 2021-04-09 10:06:45 -07:00
Will Bendick c62f1cea68 lint 2021-04-09 10:06:45 -07:00
Will Bendick 9d715b9a74 loads plots concurrently 2021-04-09 10:06:45 -07:00
dependabot[bot] bc2c31afd1 Bump chiapos from 1.0.0 to 1.0.1
Bumps [chiapos](https://github.com/Chia-Network/chiavdf) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/Chia-Network/chiavdf/releases)
- [Commits](https://github.com/Chia-Network/chiavdf/compare/1.0...1.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-09 10:06:18 -07:00
Richard Kiss 8c96651a78 Revert erroneous type change in `CostResult`. 2021-04-08 21:16:30 -07:00