Commit graph

1592 commits

Author SHA1 Message Date
Gary Yu
0d06561a91
replace stdlib RwLock and Mutex with parking_lot (#1793)
* replace all stdlib RwLock with parking_lot RwLock

* replace stdlib Mutex with parking_lot Mutex

* rustfmt
2018-10-20 08:13:07 +08:00
John Tromp
1cfc474817 forgot to take out assert 2018-10-19 22:21:13 +02:00
John Tromp
e1b5d7f3c2 revert secondary scaling default in HeaderInfo; rename scaling_difficulty; refactor difficulty_data_to_vector 2018-10-19 21:39:54 +02:00
RJ Rybarczyk
f2949efbfd Make check_api_secret_file fn private (#1792) 2018-10-19 18:12:34 +08:00
hashmap
422b98030f
Add wallet TLS setup doc (#1786)
Add wallet TLS setup doc
2018-10-19 10:50:59 +02:00
John Tromp
b1ebfe1c73 found last few instrances of Difficulty::one 2018-10-18 23:29:32 +02:00
John Tromp
846b38308c replace all Difficulty::one by ::min 2018-10-18 21:18:16 +02:00
John Tromp
41293e9ef7 improve minimum difficulty handling 2018-10-18 20:37:33 +02:00
John Tromp
b56fae6f30 Merge remote-tracking branch 'remotes/upstream/master' into unitdiff
need fix to run my tests
2018-10-18 20:30:31 +02:00
hashmap
ecb102e442
Fix tests cleanup (#1788)
It caused test failures during switching between master and t4 branches,
also could cause other strange errors.
2018-10-18 20:07:32 +02:00
eupn
a11778bf68 fix: mark potential coinbase outputs as mining instead of unconfirmed in wallet (#1787)
* Mark unconfirmed coinbase outputs as "Mining" instead of "Unconfirmed"

* Fix formatting
2018-10-18 15:42:31 +02:00
John Tromp
e24e65399b rename MIN_DIFFICULTY to UNIT_DIFFICULTY; define Difficulty::unit, fix INITIAL_DIFFICULTY 2018-10-18 14:20:00 +02:00
yeastplume
545d9d6116 t4 merge - rustfmt on entire tree 2018-10-18 11:40:58 +01:00
yeastplume
6980278b95 merge T4 into master - rustfmt 2018-10-18 11:23:22 +01:00
yeastplume
f94ede9af3 merge T4 into master 2018-10-18 11:23:04 +01:00
Gary Yu
53b10a083c
kick stuck peer out of connected peers. (#1782)
* cherry-picking commit 7754adb8 from master for #1746
2018-10-18 10:04:05 +08:00
Ignotus Peverell
d65a9adb59
Updated seed 2018-10-17 19:59:56 +00:00
Ignotus Peverell
b5cb227322
Last genesis for T4, unless I messed up something 2018-10-17 19:36:12 +00:00
Ignotus Peverell
6db0bcefa5
Minor warning removal 2018-10-17 18:16:20 +00:00
eupn
b22fb55245 feat: add peers used bandwidth calculation and display in TUI (#1770)
* Add peers used bandwidth calculation and display in TUI
* Fix formatting
* Change Mutex to RwLock from peer's used bandwidth statistics in Tracker
* Make used bandwidth column in TUI peers list sort by sum of bytes
2018-10-17 10:01:42 -07:00
Antioch Peverell
2c5469568f cleanup build warnings (#1773) (#1775)
add docs/comments
2018-10-17 16:53:52 +01:00
Yeastplume
b43d6e4326
[T4] Set genesis block data + initial secondary scaling correctly (#1776)
* ensure genesis block+pre genesis is populated correctly with secondary scaling

* rustfmt
2018-10-17 16:53:31 +01:00
John Tromp
e9dcc143bf refactor and change difficulty calcs; use sum instead of median (#1774) 2018-10-17 16:21:59 +01:00
Antioch Peverell
a1f74441b5
cleanup build warnings (#1773)
add docs/comments
2018-10-17 16:04:33 +01:00
Quentin Le Sceller
13b2a32092
Add prev root in BlockHeaderPrintable (#1772) 2018-10-17 10:51:50 -04:00
Yeastplume
5cec885ef5
[T4] diff change (#1769)
* pre-t4 again

* rustfmt
2018-10-17 13:48:18 +01:00
Yeastplume
404165a8fd
[T4] Add sec pow info to TUI, change magic number, genesis diff to 1 (temporarily) (#1768)
* add sec scaling stats to tui

* rustfmt
2018-10-17 10:37:28 +01:00
Antioch Peverell
fbf955dd11
Commit to prev_root in block headers (#1764)
* commit to prev_root in block headers

* prev_root ready to go, mergeable onto testnet4
2018-10-17 10:06:38 +01:00
Ignotus Peverell
fffe5154d2
Secondary PoW scaling factor dampening, cleanup (#1765)
* Remove useless time median window
* Secondary PoW factor dampening
* Fix off-by-one in time window, cleanup dampening, fix tests
2018-10-16 16:55:40 -07:00
Quentin Le Sceller
67bc891455 Update stratum documentation (#1760) 2018-10-16 16:31:57 -07:00
hashmap
85433c659d Introduce a constant for peer send channel capacity (#1761)
We implicitly use it also in body_sync, so it's hard to keep it in sync.
2018-10-16 16:31:00 -07:00
John Tromp
8540e4f723 [T4] tweaks and fixes (#1766)
* refactor consensus.rs, tweaking some values
* move scale() there
* fix set_header_nonce bug
* remove maturity soft-fork code
* increase diff target precision
* fix weight comments and try resolve PR conflict
2018-10-16 16:14:22 -07:00
Quentin Le Sceller
701f0b9b60 Remove unecessary check in pipe.rs (#1763) 2018-10-16 12:04:00 -07:00
Ignotus Peverell
119b5cfc46
Fix api test in travis (#1757)
* seems to be too slow to start api server, adding retry to client. Fixes #1722
* Add sleep before retry
2018-10-16 11:55:04 -07:00
hashmap
7eb84f7675
Add sleep before retry 2018-10-16 19:43:27 +02:00
jaspervdm
85187c2a8c Update API doc (#1759) 2018-10-16 13:05:16 -04:00
jaspervdm
fdd4846f11 Add scaling difficulty field to block http api (#1758) 2018-10-16 09:19:59 -07:00
Gary Yu
7754adb834 kick stuck peer out of connected peers (#1746)
* kick stuck peer out of connected peers
* adjust kick time to 2 hours
* stuck detection take into account own difficulty compare
2018-10-16 09:14:16 -07:00
hashmap
8588b7e0aa
Fix api test in travis
It seems to be too slow to start api server, adding retry to client. Fixes #1722
2018-10-16 17:27:04 +02:00
hashmap
7290d4b93f
Merge pull request #1751 from yourowncrypto/peers-round-robin
Use round robin for peer selection in body sync
2018-10-16 16:41:04 +02:00
Yeastplume
01df981a1d
[t4] fix header test sizes (#1756) 2018-10-16 14:39:51 +01:00
yeastplume
11bed215c1 rustfmt 2018-10-16 13:19:28 +01:00
yeastplume
f38d62287f use secondary pow size for min header size calc 2018-10-16 13:19:09 +01:00
hashmap
466ce986a6
Use round robin for peer selection in body sync
We select a peer to ask a block randomly. Peer's send channel has
capacity 10. If we need too many blocks we limit number of blocks to asks as a number of peers
* 10, which means that there is some probability (pretty high) that we
will overflow send buffer capacity.
This fix freezes a peer list (which gives also some performance boost)
and create a cycle iteraror to equally distribute requests among the
peers.
There is a risk that a peer may be disconnected while we are sending a
request to the chanel, but stricltly speaking it was possible in the old
code too, perhaps with a lower probability.
Fixes #1748
2018-10-16 12:14:17 +02:00
hashmap
5bcc4508fd
Merge pull request #1755 from yeastplume/t4-test-fix-1
fix tests, update new genesis block, change p2p header magic number
2018-10-16 11:57:27 +02:00
yeastplume
4bb31dbdb4 update new genesis block, change p2p msg magic number 2018-10-16 10:16:54 +01:00
Quentin Le Sceller
da3a6bb019
Change position of seeding_type (#1754) 2018-10-15 21:25:58 -04:00
Quentin Le Sceller
ac2dba9b07
Change position of seeding_type (#1753) 2018-10-15 21:25:46 -04:00
Ignotus Peverell
d0ed5cd4a3
Minor boundary adjustments for 2nd PoW scaling 2018-10-16 00:42:32 +00:00
John Tromp
34646ddf51 [T4] Rename all shiftsize / cuckoo_size to edge_bits and change value for T4 (#1752)
* replace all size_shift / cuckoo_size by edge_bits and change some constants for T4
* replace remaining occurrences of sizeshift
2018-10-15 16:14:23 -07:00