Commit graph

2498 commits

Author SHA1 Message Date
Quentin Le Sceller
e023739658
Update and do not use serve private export ()
* Update serde, serde_derive, syn, failure and failure_derive

* Do not use serde private export
2021-03-06 15:25:26 -05:00
Blade Doyle
059e6ad545
Mining tui updates ()
* add column ordering, set mining workers table to sort the connected workers to the top by default

* add column ordering, set mining workers table to sort the connected workers to the top by default

* Mining TUI fixes and updates
2021-03-04 09:39:14 -05:00
Quentin Le Sceller
64b2fddbf1
[5.0.x] Fix PIBD segments () ()
Co-authored-by: jaspervdm <j@sper.dev>
2021-03-03 14:36:47 -05:00
Quentin Le Sceller
98e183c8b8
Update Client to v2 API ()
* Update Client to v2 API

* Move json-rpc file into api

* Fix json! macro
2021-03-03 14:36:16 -05:00
Quentin Le Sceller
7b51851ab4
Update Tokio, hyper versions ()
* Fix conflicts

Co-authored-by: jaspervdm <j@sper.dev>
2021-03-03 14:36:04 -05:00
Quentin Le Sceller
682c520968
Update grin-secp256k1zkp to 0.7.10 () 2021-03-03 14:35:37 -05:00
Alexandre Bury
eefd0eac97
Update to cursive 0.16 ()
* Update to cursive 0.16

* Switch to upstream table view

* Use TableView::set_items_stable

Co-authored-by: Quentin Le Sceller <q.lesceller@gmail.com>
2021-03-03 13:47:41 -05:00
Antioch Peverell
4284458e17
more consistent handling of peers_preferred during startup () 2021-03-02 20:34:55 +00:00
Antioch Peverell
03b7518884
cleanup redundant sync_head and associated MMR () 2021-02-24 19:11:08 +00:00
Antioch Peverell
3583028781
Prune list iterators ()
* wip

* use range beneath subtree for efficient is_pruned check

* various iterators over the prune list

* improved prune list iter and subtree handling

* use take_while so unpruned iterators are not infinite
2021-02-24 17:02:03 +00:00
Antioch Peverell
adddff9155
optimization for reading peak hashes from backend file () 2021-02-24 16:17:28 +00:00
Antioch Peverell
7487ffd75b
replace subtree with pruned root ()
no need to remove sibling explicitly
2021-02-24 15:04:18 +00:00
Antioch Peverell
57f4592499
Retire pruned cache ()
* use range beneath subtree for efficient is_pruned check
2021-02-23 19:34:32 +00:00
Antioch Peverell
08523b2b39
add BLOCK_HIST capabilities on startup if config archive_mode=true () 2021-02-23 11:40:48 +00:00
Antioch Peverell
9c44a4d08f
Refactor prune file replace ()
* split prune file rewrite into two steps
only one needs a mut ref to self

* write both tmp files then replace
2021-02-23 11:40:26 +00:00
Antioch Peverell
a3c9b478e2
[5.0.x] inefficient locking on recv of peers lists can result in failure to get peers lock () ()
* fix for: inefficient locking of peers lists can result in failure to get peers lock

* dont hold the peers Vec lock while writing to the peers lmdb

Co-authored-by: Blade Doyle <bladedoyle@gmail.com>
2021-02-22 15:18:09 +00:00
Antioch Peverell
4de2d92433
Revert "rework prune rewrite with iterators ()" ()
This reverts commit 5092652b0c.
2021-02-22 14:18:23 +00:00
Antioch Peverell
5092652b0c
rework prune rewrite with iterators ()
* rework prune rewrite with iterators

* fix
2021-02-19 11:59:40 +00:00
Antioch Peverell
5b9664bccf
inc quietly on small batches of headers () 2021-02-16 14:36:28 +00:00
Antioch Peverell
524dbd0170
pibd capabilities test was only relevant temporarily ()
while we did not enable it by default
2021-02-16 11:28:01 +00:00
Antioch Peverell
4ab72902e0
add rate limiting to outbound p2p msg sending ()
treat peers as abusive based on incoming msgs, not outgoing msg rates
2021-02-15 13:49:31 +00:00
Antioch Peverell
7649d361e4
Block sync hash traversal perf ()
* sync traversal performance improvements

* rework how body_sync determines block hashes to request
2021-02-15 13:47:59 +00:00
Antioch Peverell
a3aed4aae5
fix for missing block under certain startup conditions () 2021-02-09 09:13:39 +00:00
jaspervdm
61982efdd9
Safety: check length during deserialization () 2021-02-02 09:56:00 -05:00
John Tromp
4877f30e2c
override old accept_fee_base setting of 1000000 to new default 500000 ()
* override old accept_fee_base setting of 1000000 to new default 500000

* document exceptional accept_fee_base behaviour in grin-server.toml

* document more accurately
2021-01-06 15:24:11 +00:00
David Burkett
6f142b4c75
Downgrade CI VM to Ubuntu 18.04 () 2021-01-05 08:44:41 +00:00
jaspervdm
35ebdea967
Bump master version to 5.1.0-alpha.1 () 2021-01-04 15:29:50 +00:00
Antioch Peverell
1baa59c44d
prefer outbound peers when syncing (consistently) ()
but use inbound peer for header and body sync if necessary
sync state from inbound peer if no outbound peers to sync from
2020-12-15 19:11:51 +00:00
John Tromp
acba73bf40
reomve unused function () 2020-12-11 09:26:58 -05:00
Antioch Peverell
eaf9bcf2bf
Block migration db flag (only migrate once) ()
* rework migrate_db_v2_v3

* db flag to track block migration
2020-12-08 09:37:12 +00:00
Antioch Peverell
f48a23655d
bump 5.0.0-beta.2 after fixing windows release script () 2020-11-26 21:35:10 +00:00
Antioch Peverell
623e7d2e59
refreshenv as part of windows release script () 2020-11-26 21:27:37 +00:00
jaspervdm
64c8e0cf0a
Bump version to 5.0.0-beta.1 () 2020-11-26 18:48:16 +01:00
John Tromp
48efb693e2
Fixfees ()
* add FeeFields type

* use FeeFields with ::zero and try_into().unwrap()

* fixed tests

* avoid 0 accept_base_fee

* add aggregate_fee_fields method for transaction

* implement std::fmt::Display trait for FeeFields

* make base_fee argument non-optional in libtx::mod::tx_fee

* add global and thread local accept_fee_base; use to simplify tests

* set unusually high fee base for a change

* revert to optional base fee argument; default coming from either grin-{server,wallet}.toml

* remove optional base fee argument; can be set with global::set_local_accept_fee_base instead

* define constant global::DEFAULT_ACCEPT_FEE_BASE and set global value

* add Transaction::accept_fee() method and use

* Manual (de)ser impl on FeeFields

* fix comment bug

* Serialize FeeFields as int in tx

* allow feefields: u32:into() for tests

* try adding height args everywhere

* make FeeFields shift/fee methods height dependent

* prior to hf4 feefield testing

* rename selected fee_fields back to fee for serialization compatibility

* fix test_fee_fields test, merge conflict, and doctest use of obsolete fee_fields

* make accept_fee height dependent

* Accept any u64 in FeeFields deser

Co-authored-by: Jasper van der Maarel <j@sper.dev>
2020-11-26 18:03:06 +01:00
Antioch Peverell
14f4683ca1
enable PIBD_HIST capability by default () 2020-11-26 09:53:00 +00:00
jaspervdm
96afc766a1
PIBD segment p2p messages ()
* Define PIBD segment p2p messages

* Respond to segment requests

* Use specialized (de)ser for output bitmap segments

* Allowed segment height ranges in const
2020-11-25 21:52:09 +01:00
Quentin Le Sceller
9abb6e3e01
Disable API v1 ()
* Disable API v1

* Fix missing path in foreign_api_secret
2020-11-25 19:36:29 +00:00
Antioch Peverell
cbd6c3350d
fix, no more FULL_NODE () 2020-11-25 18:31:38 +00:00
deevope
fd5dfaaec4
reorg cache fix ()
* reorg cache period configurable

* fix comment

* u32 type

Co-authored-by: deevope <you@example.com>
2020-11-25 17:59:37 +00:00
Antioch Peverell
3efe382e9c
add peer capabilities to tui peers screen () 2020-11-25 16:29:33 +00:00
John Tromp
97425af637
make min_wtema difficulty chain type dependent ()
* make min_wtema difficulty chain type dependent

* fix bad graph weights for automated and user testing

* only mainnet can get wtema difficulty unstuck at 59s blocks
2020-11-25 15:13:43 +00:00
Antioch Peverell
6e73e00d6b
fix calls to next_diff() in tests to use next height correctly () 2020-11-25 12:47:30 +00:00
John Tromp
f86102b2a6
fixDAA; implement wtema ()
* implement wtema

* reduce FTL from 12 to 5 mins; fix inaccuracies in cuckoo doc

* rename difficulty window for DampedMovingAverage DAA

* fix FTL error msg

* secondary_scale becomes extended nonce past HF4

* secondary_scale change actually belongs in hardfork4 PR

* make future time limit configurable

* define constant global::DEFAULT_FUTURE_TIME_LIMIT and refactor a bit

* fix typos

* as_ref() feels safer than as_mut() :-)

* remove obsolete mut

* make future_time_limit non-mandatory in grin-server.toml
2020-11-25 10:58:39 +00:00
John Tromp
a5b8968826
HardFork4 ()
* HardFork4 initial commit

* HF4 obsoletes secondary_scale, which becomes an nonce extension 8->12 bytes

* fix TESTNET_FOURTH_HARD_FORK height

* improve predicted height for testnet fork on dec 8

* move local variable as suggested by antiochp
2020-11-24 16:13:28 +00:00
Antioch Peverell
2125c05020
use extend_from_slice when appending multiple hashes to hash file ()
* use extend_from_slice when appending multiple hashes to hash file

* bump
2020-11-24 14:24:19 +00:00
jaspervdm
055b684416
More efficient serialization for bitmap segments ()
* More efficient serialization for bitmap segments

* Rename a const

* Correctly count number of chunks in a segment

* Enum for BitmapBlock (de)ser mode

* Add more segments in test

* Fix duplicate function
2020-11-24 15:19:07 +01:00
Antioch Peverell
b3938de8b3
we have no patch file and nothing to patch () 2020-11-23 15:02:02 -05:00
Antioch Peverell
cba3137338
add segmenter for generating segments from txhashset with consistent rewind ()
* add segmenter for generating segments from txhashset with consistent rewind

* rework segmenter to take a txhashset wrapped in rwlock
rework our rewindable pmmr so we can convert to readonly easily

* placeholder code for rewinding readonly txhashset extension to build a rangeproof segment

* segment creation for outputs/rangeproofs/kernels/bitmaps

* placeholder segment impl

* commit

* rework segmenter to use a cached bitmap (rewind is expensive)

* cache segmenter instance based on current archive header

* integrate the real segment and segment identifier with our segmenter

* exercise the segmenter code on chain init

* wrap accumulator in an arc, no need to clone each time
2020-11-23 19:07:07 +00:00
Antioch Peverell
5282ecb12f
try and call refreshenv before running tests on windows ()
* try and call refreshenv before running tests on windows

* try again
2020-11-23 16:58:59 +00:00
Antioch Peverell
b5c6d24b40
default capabilities cleanup ()
* default capabilities cleanup

* fix tests for unused pibd capabilities
2020-11-21 21:49:19 +00:00