hashmap
0af1f13bf9
Fix IPV6 address deserialization ( #1932 )
...
Fuzz test found that we don't read IPV6 addr (as part of p2p message)
properly. The code is supposed to read 8 dwords, but [0..8] is not a
slice of 8 ints, but a slice of one Range, so we always read just one
dword
2018-11-05 20:38:41 -08:00
Antioch Peverell
d23dec73d0
PMMRable cleanup ( #1910 )
...
* cleanup pmmrable and len()
introduce FixedLength trait with a const LEN
make Hash impl FixedLength for consistency
* rustfmt
* store tests cleanup
* rustfmt
* whats going on with those comments and rustfmt?
2018-11-01 20:14:46 +00:00
Antioch Peverell
12be191ecd
validate root of header MMR when processing headers (during sync and full blocks) ( #1836 )
...
validate root of header MMR when processing headers (during sync and full blocks) (#1836 )
2018-11-01 09:51:32 +00:00
Antioch Peverell
d51522a9cd
Genesis is height 0 (not height 1) ( #1896 )
2018-10-31 13:24:21 -07:00
Ignotus Peverell
385b385456
Minor block.rs cleanup ( #1889 )
2018-10-31 13:18:59 -07:00
Ignotus Peverell
0b22789865
Cleanup and minor fixes to core after transaction.rs review ( #1854 )
2018-10-30 14:09:56 -07:00
Ignotus Peverell
46051ee174
improve minimum difficulty handling ( #1791 )
...
* rename MIN_DIFFICULTY to UNIT_DIFFICULTY; define Difficulty::unit, fix INITIAL_DIFFICULTY
* improve minimum difficulty handling
* replace all Difficulty::one by ::min
* revert secondary scaling default in HeaderInfo; rename scaling_difficulty; refactor difficulty_data_to_vector
2018-10-27 10:37:44 -07:00
Ignotus Peverell
bb5392548f
Take 2
2018-10-26 16:28:15 -07:00
Ignotus Peverell
6f3ae4563a
Small test fix
2018-10-26 16:07:12 -07:00
Ignotus Peverell
c083312ad4
Improve crate descriptors to be more cargo-friendly ( #1844 )
...
* Update secp dependency to use crates.io version
* Add more details to various Cargo.toml
* Remove use of env variables that aren't reliably provided by cargo
2018-10-25 17:44:50 -07:00
Ignotus Peverell
a42d66efff
Merge branch 'master' into unitdiff
2018-10-25 14:20:41 -07:00
Antioch Peverell
4050f7fccb
handle re-orgs in transaction_pool ( #1829 )
...
* use reorg_cache in transaction_pool to safely handle txs during a re-org
* rustfmt
* comments
2018-10-24 17:57:31 +01:00
hashmap
3efa7bdac9
Small style changes in core crate ( #1816 )
2018-10-23 21:09:16 +02:00
Antioch Peverell
38cbd6eafb
full node == fast sync (no full archival guarantees) ( #1809 )
...
* wip - fast sync only
* wip
* cleanup
* cleanup
* cleanup comments in default config file around capabilities
* fixup p2p tests
2018-10-23 13:01:19 +01:00
eupn
8f42f7306c
feat: remove expired peers from the storage ( #1794 )
...
* Initial expired peers removal
* Stop expired peers
* Simplify peer removal and remove only Defunct peers
* Make seed to check for expired peers every hour
* Get rid of unused vector of peers to remove
* Make peer deletion predicate closure immutable
2018-10-22 13:59:40 -07:00
Quentin Le Sceller
5f2e8db092
Fix shift by 1 block in TUI ( #1780 ) ( #1810 )
...
* Fix shift by 1 block in TUI (#1780 )
* Only use graph_weight
* Fix shift by 1 in block
* Remove debug logging
2018-10-22 10:44:14 -07:00
eupn
1195071f5b
Replace logging backend to log4rs and add log rotation ( #1789 )
...
* Replace logging backend to flexi-logger and add log rotation
* Changed flexi_logger to log4rs
* Disable logging level filtering in Root logger
* Support different logging levels for file and stdout
* Don't log messages from modules other than Grin-related
* Fix formatting
* Place backed up compressed log copies into log file directory
* Increase default log file size to 16 MiB
* Add comment to config file on log_max_size option
2018-10-21 13:30:56 -07:00
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
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
e24e65399b
rename MIN_DIFFICULTY to UNIT_DIFFICULTY; define Difficulty::unit, fix INITIAL_DIFFICULTY
2018-10-18 14:20:00 +02:00
yeastplume
6980278b95
merge T4 into master - rustfmt
2018-10-18 11:23:22 +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
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
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
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
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
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
yeastplume
4bb31dbdb4
update new genesis block, change p2p msg magic number
2018-10-16 10:16:54 +01: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
Ignotus Peverell
a41022f1e3
Fix last tests broken by secondary PoW factor adjustment
2018-10-15 22:53:28 +00:00
Ignotus Peverell
3c6b5a0a9c
Fix chain tests missing difficulty scaling
2018-10-15 22:24:13 +00:00
Ignotus Peverell
eeb7680981
Secondary PoW factor adjustment adjustments
2018-10-15 21:18:00 +00:00
John Tromp
45a5655cec
obsolete easiness et.al ( #1750 )
2018-10-15 20:24:36 +01:00
Antioch Peverell
86c1d7683b
The Header MMR (One MMR To Rule Them All) ( #1716 ) ( #1747 )
...
* header MMR in use within txhashset itself
works with fast sync
not yet in place for initial header sync
* add the (currently unused) sync_head mmr
* use sync MMR during fast sync
rebuild header MMR after we validate full txhashset after download
* support missing header MMR (rebuild as necessary) for legacy nodes
* rename to HashOnly
* cleanup backend.append()
* simplify vec_backend to match simpler append api
2018-10-15 19:24:01 +01:00
yeastplume
9423865f92
update cargo versioning
2018-10-15 10:34:33 +00:00
Yeastplume
13facfac4b
pre-testnet4 genesis values ( #1744 )
2018-10-15 11:14:49 +01:00
Ignotus Peverell
43f4f92730
[T4] Secondary proof of work difficulty adjustments ( #1709 )
...
* First pass at secondary proof of work difficulty adjustments
* Core and chain test fixes
* Next difficulty calc now needs a height. Scaling calculation fixes. Setting scaling on mined block.
* Change factor to u32 instead of u64.
* Cleanup structs used by next_difficulty
* Fix header size calc with u32 scaling
2018-10-13 13:57:01 -07:00