Commit graph

2473 commits

Author SHA1 Message Date
Antioch Peverell
72a6eb81e8
bump to 5.1.0 to prep for release (#3639) 2021-05-06 13:02:01 +01:00
Antioch Peverell
87729a2227
bump crate version to 5.1.0-beta.2 to prep for release (#3636) 2021-04-29 13:05:28 +01:00
Antioch Peverell
89c06ddab7
client invalidateheader and resetchainhead (#3618)
* wip - "reset_head" via owner api functionality

* jsonrpc pass hash in as a string

* sort of works

* not a reorg if we simply accept several blocks at once

* remember to reset header MMR separately
as it is readonly when interacting with txhashset extension

* basic client integration
needs error handling etc.

* reset sync status when reset chain head

* track "denylist" (todo) and validate headers against this via the ctx

* track denylist (header hashes) in chain itself

* header denylist in play

* expose invalidateheader as client cmd

* rework reset_chain_head - rewind txhashset then header MMR
2021-04-29 11:05:05 +01:00
trevyn
9e27e6f9d3
Add migration to config_file_version = 2 (#3634)
* Add config_file_version and migration to version 2

* Generate `config_file_version = 2` as default
2021-04-27 14:33:56 +01:00
Blade Doyle
9ed0cd65ef
fix share difficulty validation - compare stratum server minimum_share_difficulty as unscaled difficulty (#3624)
* fix for comparing scaled vs unscaled difficulty

fix mix use of scaled and unscaled, add additional comments to clarify which values are which

improved consistency - scaled and unscaled difficulty

* combine from_proof_unscaled() and  to_unscaled_difficulty{}

* code review - rust syntax
2021-04-23 09:28:29 -04:00
GeneFerneau
1b8acee72e
Update zip dependency and fix deprecation warnings (#3617)
Update zip crate to latest version, and fix deprecation warnings
using functionally equivalent APIs
2021-04-13 22:20:21 +01:00
trevyn
f8afdb5faa
Fix Windows CI cargo test silently passing (#3632)
* set env in different way for windows-release.yml
2021-04-07 10:15:34 -04:00
Antioch Peverell
34413c1cab
track sync_head on header_sync sync status (#3626)
* track sync_head on header_sync sync status
follow header fork as appropriate

* track highest_diff alongside highest_height on HeaderSync status

* cleanup

* not not
2021-04-06 11:16:20 +01:00
trevyn
df91bff0f1
Add test for duplicate rangeproof inflation bug (#3630)
* invalid range proof test

* create output with 1 million grin

* Move `output_negative` into `tests/`

So it cannot be called from outside of tests!

* Verify InvalidBlockProof & InvalidRangeProof types

Co-authored-by: Snape 479 <Severus_Snape93@protonmail.com>
2021-04-06 11:06:52 +01:00
Antioch Peverell
f6ec77a592
never speak of the verifier cache again (#3628) 2021-04-01 15:04:53 +01:00
Blade Doyle
cccaf98493
enhance comment describing how a pow is hashed (#3623)
Integrate feedback from Tromp

Some more feedback from Tromp

readability improvement
2021-03-31 14:43:04 -04:00
Antioch Peverell
09c90fc257
cleanup and stop wrapping errors in other/unfit (#3616) 2021-03-30 09:12:48 +01:00
Quentin Le Sceller
25d93c8606
Revert "Allow rest api to shutdown (#3614)" (#3625)
This reverts commit 4a09fed36c.
2021-03-29 14:11:10 -04:00
Quentin Le Sceller
0acf380320
Remove unnecessary trailing semicolom (#3619) 2021-03-29 08:55:33 +01:00
Ivan Sorokin
4a09fed36c
Allow rest api to shutdown (#3614)
Co-authored-by: Quentin Le Sceller <q.lesceller@gmail.com>
2021-03-25 14:29:24 -04:00
Quentin Le Sceller
e8b46f1409
Update ring to v0.16.20 (#3612) 2021-03-23 10:05:47 -04:00
trevyn
431e4b97b7
Defork croaring (#3596)
* Defork croaring

* Attempt to fix Windows CI

* Fix windows-release.yml too

* Use ROARING_ARCH=x86-64-v2
2021-03-22 13:31:43 -04:00
Squirrel
302c8ec928
Make of this what you will but it cargo fmt better (#3572)
* Make of this what you will but it cargo fmt better

* Reduce clippy excitement.
2021-03-22 12:43:23 +00:00
David Burkett
87ff219d37
Removing verifier caches (#3597) 2021-03-18 16:09:59 +00:00
Antioch Peverell
6690b25f05
Enable block archival sync (#3579)
* wip - body sync for full archive

* allow chain compaction during sync

* placeholder for logic to ensure archive nodes sync from archive nodes

* body sync from archival peers

* allow chain compaction during sync

* placeholder for logic to ensure archive nodes sync from archive nodes
2021-03-16 12:04:09 +00:00
Blade Doyle
846b8f82e8
fix for missing increment of stratum stats blocks_found (#3593) 2021-03-11 10:13:15 -05:00
Quentin Le Sceller
0259ed23ea
Update copyright year to 2021 (#3592)
* Update copyright year to 2021
2021-03-10 10:14:48 -05:00
Quentin Le Sceller
725622da7a
Remove imports and cleanups (#3590)
* Remove unused import and if else chain
2021-03-08 11:09:41 -05:00
Quentin Le Sceller
45f74c396d
Remove unused imports (#3589)
* Remove unused imports
2021-03-08 10:36:16 -05:00
Antioch Peverell
35740204a1
no more conversion to support v2 blocks (#3587)
get_block simply returns None if v2 support required
2021-03-06 21:40:20 +00:00
Quentin Le Sceller
e023739658
Update and do not use serve private export (#3585)
* 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 (#3584)
* 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 (#3532) (#3583)
Co-authored-by: jaspervdm <j@sper.dev>
2021-03-03 14:36:47 -05:00
Quentin Le Sceller
98e183c8b8
Update Client to v2 API (#3582)
* 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 (#3580)
* 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 (#3581) 2021-03-03 14:35:37 -05:00
Alexandre Bury
eefd0eac97
Update to cursive 0.16 (#3547)
* 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 (#3578) 2021-03-02 20:34:55 +00:00
Antioch Peverell
03b7518884
cleanup redundant sync_head and associated MMR (#3556) 2021-02-24 19:11:08 +00:00
Antioch Peverell
3583028781
Prune list iterators (#3574)
* 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 (#3575) 2021-02-24 16:17:28 +00:00
Antioch Peverell
7487ffd75b
replace subtree with pruned root (#3576)
no need to remove sibling explicitly
2021-02-24 15:04:18 +00:00
Antioch Peverell
57f4592499
Retire pruned cache (#3573)
* 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 (#3563) 2021-02-23 11:40:48 +00:00
Antioch Peverell
9c44a4d08f
Refactor prune file replace (#3571)
* 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 (#3566) (#3570)
* 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 (#3568)" (#3569)
This reverts commit 5092652b0c.
2021-02-22 14:18:23 +00:00
Antioch Peverell
5092652b0c
rework prune rewrite with iterators (#3568)
* rework prune rewrite with iterators

* fix
2021-02-19 11:59:40 +00:00
Antioch Peverell
5b9664bccf
inc quietly on small batches of headers (#3564) 2021-02-16 14:36:28 +00:00
Antioch Peverell
524dbd0170
pibd capabilities test was only relevant temporarily (#3565)
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 (#3560)
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 (#3558)
* 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 (#3555) 2021-02-09 09:13:39 +00:00
jaspervdm
61982efdd9
Safety: check length during deserialization (#3551) 2021-02-02 09:56:00 -05:00
John Tromp
4877f30e2c
override old accept_fee_base setting of 1000000 to new default 500000 (#3539)
* 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