Commit Graph

4685 Commits

Author SHA1 Message Date
arvidn 158bbbea74 harden int/uint validation in constructor. add comment about int512 2021-05-21 14:08:26 +02:00
arvidn cdc68b68af terminate clean_block_record() when we reach height 0 2021-05-21 14:08:26 +02:00
arvidn ac6ce96392 fix handling of not finding a shared ancestor in wallet reorg 2021-05-21 14:08:26 +02:00
arvidn 2d1c0afdf0 handle find_fork_point_in_chain() returning -1 in wallet 2021-05-21 14:08:26 +02:00
arvidn beacf2f18d fix off-by-one in blocks-to-remove 2021-05-21 13:48:38 +02:00
arvidn f7f6989dbe don't step back sub slots beyond zero 2021-05-21 13:48:38 +02:00
arvidn 3cd198a9df validate integers in StructStream constructors 2021-05-21 13:48:38 +02:00
Gene Hoffman 9e9097b116
Chia Blockchian 1.1.6 (#5644)
* edited CHANGELOG

* Minor edits to CHANGELOG

Co-authored-by: Lipa Long <lipalong@Lipas-MacBook-Pro.local>
2021-05-20 19:28:09 -07:00
Florin Chirica bf3ffa6eeb
Initial commit. (#5627) 2021-05-20 15:03:59 -07:00
Adam Kelly c3424ba655
Update gui (#5623)
Co-authored-by: Adam Kelly <aqk@aqk.im>
2021-05-20 12:49:44 -07:00
Almog De Paz f1120d9d5d
Different lock for compact proofs (#5539)
* test

* compact proof lock

* lint

* remove wrong commit

* remove wrong commit

* check vdf info for ip and sp

* return if no proof to replace
2021-05-20 11:51:58 -07:00
Mariano Sorgente 431f15bf1a
Do not assert not spent (#5612) 2021-05-20 10:46:02 -07:00
Mariano Sorgente a76446eba9
Speedup normal sync and wallet sync (#5590)
* Correctly return from bytes without parsing

* Huge speedup for wallet sync

* Lint

* Only construct CoinRecord when necessary

* Punt on creation of coin

* Removing warning log

* Flaky test

* Finally fix flaky test
2021-05-20 10:42:22 -07:00
Florin Chirica 4ad8d9dcef
Speedup connections 2. (#5421)
* Decrease sleeps.

* Wait 30 minutes before retrying address.

* Address comments.

* Address comments.

* Sleep in node discovery if we don't need connections.

* Rename sleeps.

* Lint.

* Refactor sleeps.

* Don't query introducers at startup.
2021-05-20 10:38:35 -07:00
Adam Kelly 15d4938a8c
Please add comments (#5565)
* Please add comments

* Fix issue

* More blocks

Co-authored-by: Adam Kelly <aqk@aqk.im>
Co-authored-by: Mariano <sorgente711@gmail.com>
2021-05-20 11:40:36 +09:00
Mariano Sorgente ac59ec52c6
Fix pending transaction issue, and use a different lock to prevent ho… (#5549)
* Fix pending transaction issue, and use a different lock to prevent holding blockchain lock

* Force re-run of tests
2021-05-19 18:19:52 -07:00
Mariano Sorgente 5ce56bce6d
Don't use a global (#5553)
* Don't use a global

* Only construct once
2021-05-19 17:41:53 -07:00
Adam Kelly c9f942b5fe
Improve time_out_assert messages (#5561)
Co-authored-by: Adam Kelly <aqk@aqk.im>
2021-05-19 16:41:38 -07:00
Bill Blanke 207c83eabb tweak timeouts 2021-05-19 16:25:58 -07:00
Bill Blanke 18ccda9310 wait after farm_new_transaction_block 2021-05-19 13:44:09 -07:00
Bill Blanke 50ff07e687 wait after farm_new_transaction_block 2021-05-19 13:40:36 -07:00
Bill Blanke a0927402ac wait after farm_new_transaction_block 2021-05-19 13:30:42 -07:00
Mariano a352be20ee Fix error log and handling of reject message 2021-05-20 04:51:52 +09:00
Yostra 108647112c
Wallet (#4887)
* spent height

* handle generator reorg

* tx cache

* coin cache

* rebuild cache if write fails

* save last few messages new_peak while syncing

* don't use dupe func

* tx reorg test

* lock not needed

* lint

* lock

* modify properly

* this shouldn't hit a disk ever

* use same number

* notify wallet only once, lock when getting a balance

* lock only if unspent coin records is None

* assert spent

* lint

* Add test for prev generator

Co-authored-by: Mariano <sorgente711@gmail.com>
2021-05-19 12:06:48 -07:00
Mariano Sorgente d46cd8eb07
Revert "sets up wallet before running farm summary (#3235)" (#5546)
This reverts commit 880df53f72.
2021-05-19 12:05:12 -07:00
justinengland 55dbe2676a working false 2021-05-18 17:33:46 -06:00
justinengland f9cf76e0bc moving printed output inside of if to know if the command runs 2021-05-18 17:33:46 -06:00
justinengland 576bc017a9 == vs === 2021-05-18 17:33:46 -06:00
justinengland 5ed477ecf0 == vs is 2021-05-18 17:33:46 -06:00
justinengland 8bff69490a adding : 2021-05-18 17:33:46 -06:00
justinengland 9873679680 adding false setting to reset back to mainnet 2021-05-18 17:33:46 -06:00
Gene Hoffman 0af10068ce
Clearly prohibit root from installing the GUI (#5232)
* GUI should not build or run as root

* Use id -u instead

* shellcheck
2021-05-18 11:40:26 -07:00
Will Bendick 880df53f72
sets up wallet before running farm summary (#3235)
* sets up wallet before running farm summary

* fixes call to summary

* moves wallet peers discovery to after backup is initialized
2021-05-18 11:38:06 -07:00
Mariano Sorgente 1c808b6c29
Ms.spikes4 (Fix duplicate signage points) (#4844)
* Fix duplicate signage point spikes

* Block record not hash

* Fix bugs in signage point cache

* Fix test, and log in debug level

* Change transaction logging to info

* More logging improvements
2021-05-16 11:33:47 -07:00
Florin Chirica 7012ca9e07
Speedup outbound connections. (#5124)
* Initial commit.

* Fix typo.

* Retry each node once every 30 mins.

* Flake8.

* mypy.

* Bound number of concurrent outbound connections.

* Blank line.
2021-05-15 23:07:39 -07:00
Will Bendick 39ef69643b
release upnp ports on shutdown (#4024)
* release upnp ports on shutdown

* lint

* explicitly removes port mapping first to handle possible unclean shutdowns

* catches exception

* moves upnp setup to thread

* lint

* moves upnp logic to a message queue on a worker thread

* lint
2021-05-14 14:11:19 -07:00
Mariano Sorgente 92282fb954
Performance benchmark test (#4942)
* Performance benchmark

* dump profiles for the full node benchmarks

Co-authored-by: arvidn <arvid@libtorrent.org>
2021-05-14 14:08:18 -07:00
Arvid Norberg 5863cccf4c
a minor simplification in add_spendbundle (#5014) 2021-05-14 13:26:04 -07:00
Arvid Norberg a7d607ee90
block_store performance (#4573)
* compute header_hash once

* read header_hash from the DB instead of computing it
when adding a block to the block store, also add it to the cache. This saves an otherwise mandatory round-trip to the DB.
2021-05-14 13:23:34 -07:00
Florin Chirica bb662f27dc Address review comments. 2021-05-14 14:05:12 -06:00
Florin Chirica 07f8ed198f Make sure we don't call dns in tests. 2021-05-14 14:05:12 -06:00
Florin Chirica 3cbb5dc4d5 Fix bug. 2021-05-14 14:05:12 -06:00
Florin Chirica ca09382fe5 linter. 2021-05-14 14:05:12 -06:00
Florin Chirica 413d29083f Initial commit. 2021-05-14 14:05:12 -06:00
Xinyue Lu 5f4b56757a
Fix install.sh for Debian (#4152) (#4867) 2021-05-14 09:42:30 -07:00
Rostislav Skudnov b2800c94fa
Optimize Streamable parsing by avoiding extra post-init checks (#4714)
* Optimize Streamable parsing by avoiding extra post-init checks

A performance test indicates that this optimization makes parsing block
records from database up to 40% faster (0.66 vs 1.09 seconds for 10000
records).

* Add type annotations, remove unnecessary .keys() call in Streamable

Co-authored-by: Rostislav <rostislav@users.noreply.github.com>
2021-05-13 10:33:59 -07:00
Almog De Paz 3277058372
optional no_tx_filter (#4560)
* add no_tx option to get_header_blocks_in_range

* add type

* get_header_block_by_height no_tx_filter

* double negetive

* add param name

* param name

* change filter to false

* test header hash

* lint
2021-05-13 10:29:53 -07:00
Peter Tripp 178f63a3a3
exempt_peer_networks: allow exceeding target_peer_count. (#3234)
* exempt_peer_networks: allow exceeding target_peer_count.

* Flake8.

* Cleanup incorrect types.

* More typing.

* Added configuration examples for exempt_peer_networks.

* Be generous in the IP network definitions we allow as input.

* Correctly define 192.168.1.0/24 without host bits.

* Trivial change to re-trigger tests.

Co-authored-by: wjblanke <wjb98672@gmail.com>
2021-05-12 17:44:26 -07:00
An Long eb7b6dd243
Makes linter happy (#2483) 2021-05-12 17:31:28 -07:00
Don Kackman 56890df98d
only copy cert files for init -c (#3328)
* only copy cert files for init -c

* fix linter error on single vs double quotes

* black formatting
2021-05-12 15:34:20 -07:00