Commit graph

455 commits

Author SHA1 Message Date
Yeastplume
163ca397f4
Update versioning for 5.3.0, update grin_secp256k1zkp dependency () 2024-04-18 12:31:25 +01:00
Yeastplume
d1b7ae5352
warning cleanup () 2024-01-29 09:23:38 +00:00
Yeastplume
c48ba3e365 update development version 2024-01-25 12:08:34 +00:00
Yeastplume
70d45465c3 version number update for 5.2.0 tag 2024-01-25 10:53:10 +00:00
Yeastplume
94277bba9d
update versioning to 5.2.0-beta.3 ()
* update versioning to 5.2.0-beta.3

* cargo lock
2023-08-02 10:22:25 +01:00
Yeastplume
b69f18d0a2
Update versioning for 5.2.0-beta.2 () 2023-06-28 10:46:28 +01:00
Yeastplume
fd1410ebeb
version change to 5.2.0-beta.1 for tag () 2023-06-12 10:10:42 +01:00
Yeastplume
684f0a387a
updats to warnings, cargo.lock, version number () 2022-10-21 13:17:39 +01:00
Yeastplume
030bd0e1d9
[DNM] PIBD Task / Issue Tracker ()
* [PIBD_IMPL] Introduce PIBD state into sync workflow ()

* experimental addition of pibd download state for testnet only

* fixes to bitmap number of segments calculation + conversion of bitmap accumulator to bitmap

* attempt to call a test message

* add p2p methods for receiving bitmap segment and applying to desegmenter associated with chain

* fixes to state sync

* add pibd receive messages to network, and basic calls to desegmenter from each ()

* [PIBD_IMPL] PIBD Desegmenter State ()

* add functions to desegmenter to report next desired segments, begin to add state to determine which segments have been requested

* add segmentidentifier type to id requested segments uniquely

* make a call on where to keep track of which PIBD segments have been requested

* move segmenttype definition, add functions to manipulate peer segment list

* remove desegmenter state enum

* change chain desegmenter function to provide rwlock

* trace, warning cleanup

* udpate to test compliation

* [PIBD_IMPL] Bitmap accumulator reconstruction + TxHashset set reconstruction ()

* application of received bitmap segments to local accumulator

* add all required elements to send/receive output segment requests and responses

* testing of output sync

* add special cases to pmmr segment request

* [PIBD_IMPL] PMMR Reassembly from Segments ()

* update pibd copy test to use new desgmenter structure

* begin reconstruction of output pmmr

* clean up hash/leaf insertion logic

* push pruned subtree appears to be working, now also calculates left hand hashes correctly

* factor out ordering of segment/hash order array

* refactor for pmmr application code

* test of chain copy appears to be working

* add rangeproof functions to desegmenter

* add kernel functions, attempt refactor

* small test cleanup, reconstruction of live chain working in manual copy test

* [PIBD_IMPL] PIBD tree sync via network and kill/resume functionality ()

* add functions to determing latest verifiable block height for the given pibd state

* attempting to allow for pibd to resume after killing process

* fix to ensure prune list is properly flushed during pibd sync

* removal of unneeded code

* ignore test for now (fix before full merge)

* [PIBD_IMPL] Finalize PIBD download and move state to chain validation ()

* investigations as to why a slight rewind is needed on startup during PIBD

* move validation code into desegmenter validation thread (for now)

* ensure genesis entries in pmmrs are removed if they're removed in the first segment

* validation all working except for verifying kernel sums

* remove unneeded pmmr rollbacks on resume now root cause was found

* updates to remove unpruned leaves from leaf set when rebuilding pmmr

* remove + 1 to segment traversal iter length

* [PIBD_IMPL] PIBD Stats + Retry on validation errors ()

* start to add stats and reset chain state after errors detected

* add functions to reset prune list when resetting chain pibd state

* debug statement

* remove test function

* [PIBD_IMPL] Update number of simultaneous peer requests for segments ()

* cleanup of segment request list

* allow for more simultaneous requests during state sync

* up number of simultaneous peer requests for segments

* [PIBD_IMPL] Thread simplification + More TUI Updates + Stop State Propagation ()

* change pibd stat display to show progress as a percentage of downloaded leaves

* attempt some inline rp validation

* propagate shutdown state through kernel validation

* change validation loop timing

* simplify validator threading

* add more detailed tracking of kernel history validation to tui, allow stop state during

* adding more stop state + tui progress indication

* remove progressive validate

* test fix

* revert to previous method of applying segments ()

* fix for deadlock issue ()

* update Cargo.lock for next release

* [PIBD_IMPL] Catch-Up functionality + Fixes based on testing ()

* ensure desegmenter attempts to apply correct block after a resumte

* ensure txhashset's committed implementation takes into account output bitmap for summing purposes

* remove check to de-apply outputs during segment application

* return removal of spent outputs during pibd

* remove unneeded status

* remove uneeded change to rewind function

* documentation updates + todo fixes ()

* add pibd abort timeout case ()

* [PIBD_IMPL] BitmapAccumulator Serialization Fix ()

* fix for writing / calculating incorrect length for negative indices

* update capabilities with new version of PIBD hist

* remove incorrect comment

* fix capabilities flag, trace output

* test fix

* Merge DNSSeed scope changes into pibd impl branch ()

* update Cargo.lock for next release

* visibility scope tweaks to aid seed test utilities ()

* move all PIBD-related constants into pibd_params modules ()

* remove potential double read lock during compaction
2022-10-18 09:23:29 +01:00
Yeastplume
a14a8e3123
Thiserror changeover ()
* WIP remove failure from all `Cargo.toml`

* WIP remove `extern crate failure_derive`

* Use `thiserror` to fix all errors

* StoreErr is still a tuple

* Remove another set of unnecessary `.into()`s

* update fuzz tests

* update pool/fuzz dependencies in cargo.lock

* small changes based on feedback

Co-authored-by: trevyn <trevyn-git@protonmail.com>
2022-07-14 11:08:13 +01:00
Yeastplume
9d92f34614
visibility scope tweaks to aid seed test utilities () 2022-05-12 13:59:34 +01:00
Yeastplume
63c65605bb
[SYNC PERFORMANCE] Adjust DifficultyIterator to no longer deserialize PoW proof nonces ()
* replace bitvec with more efficient bitpack algorithm

* optimise proof_unpack_len

* move proof pack length calculation

* small refactor

* first pass attempt at not deserializing proof nonces in difficulty iter

* another 10 seconds gained by not deserialising the proof from the difficulty iterator

* add new deser parameters to tests where needed

* add skip_proof variants to store

* remove hash from difficulty iterator struct, rename HeaderInfo to HeaderDifficultyInfo

* replace bitvec with more efficient bitpack algorithm

* optimise proof_unpack_len

* move proof pack length calculation

* small refactor

* first pass attempt at not deserializing proof nonces in difficulty iter

* another 10 seconds gained by not deserialising the proof from the difficulty iterator

* add new deser parameters to tests where needed

* add skip_proof variants to store

* remove hash from difficulty iterator struct, rename HeaderInfo to HeaderDifficultyInfo
2021-12-10 11:39:39 +00:00
Quentin Le Sceller
2e2149859f
bump to 5.2.0-alpha.1 on master () 2021-08-19 09:06:52 +02:00
Quentin Le Sceller
11e5efc089
Tagging v5.1.1 release () 2021-08-17 20:57:13 +02:00
Antioch Peverell
a9f1dd7bcd
bump to 5.2.0-alpha.1 on master () 2021-05-06 13:46:03 +01:00
Antioch Peverell
72a6eb81e8
bump to 5.1.0 to prep for release () 2021-05-06 13:02:01 +01:00
Antioch Peverell
87729a2227
bump crate version to 5.1.0-beta.2 to prep for release () 2021-04-29 13:05:28 +01:00
Quentin Le Sceller
0259ed23ea
Update copyright year to 2021 ()
* Update copyright year to 2021
2021-03-10 10:14:48 -05:00
Quentin Le Sceller
725622da7a
Remove imports and cleanups ()
* Remove unused import and if else chain
2021-03-08 11:09:41 -05:00
Antioch Peverell
4284458e17
more consistent handling of peers_preferred during startup () 2021-03-02 20:34:55 +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
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
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
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
Antioch Peverell
f48a23655d
bump 5.0.0-beta.2 after fixing windows release script () 2020-11-26 21:35:10 +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
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
Antioch Peverell
b5c6d24b40
default capabilities cleanup ()
* default capabilities cleanup

* fix tests for unused pibd capabilities
2020-11-21 21:49:19 +00:00
Antioch Peverell
25fcefada2
Flexible peer filtering ()
* first pass at peers iter cleanup

* more flexible peer with diff lookups

* PeersIter with impl Iterator

* sync against outbound peers
reorder peers filters so expensive filters come later

* filter peers by capabilities during sync

* prefer outbound peers with high total difficulty

* with_difficulty now takes a fn to allow more flexible comparisons based on difficulty

* rename peers_iter() -> iter()
2020-10-27 12:36:00 +00:00
Quentin Le Sceller
cf2a65242d
Rename Floonet to Testnet ()
* Rename Floonet to Testnet

* Fix test

* Rename test and docker
2020-10-07 09:36:02 -04:00
Antioch Peverell
e7bbda81a0
migrate blocks in batches (rework db iterator impl) ()
* rework db iterator
more robust block migration based on low level iterator

* cleanup

* cleanup

* fixup
2020-10-07 11:47:25 +01:00
Antioch Peverell
f25b7ae032
use choose_multiple to clean get_peers() up () 2020-10-01 14:42:57 -04:00
jaspervdm
defc714f6e
Refactor p2p reader ()
* Refactor p2p reader

* Rename Output enum

* Consume enum takes owned values instead of references

* Deserialization in codec, remove Consume enum

* Calculate block header size

* Read headers in batches

* Remove headers type from deserializer
2020-09-28 14:43:37 +01:00
Antioch Peverell
a22d98e9d5
bump working version on master to 4.2.0-alpha.1 ()
we now have a current/4.1.x branch for 4.1.0 release
2020-09-15 17:26:44 +01:00
Antioch Peverell
655e080963
maintain preferred peer connections () 2020-09-08 08:22:19 +01:00
Antioch Peverell
7dc94576bd
Introduce CommitOnly variant of Inputs ()
* Introduce CommitOnly variant of Inputs.
Introduce CommitWrapper so we can sort commit only inputs correctly.

* rememebr to resort if converting

* write inputs based on variant and protocol version

* read and write protocol version specific inputs

* store full blocks in local db in v3
convert to v2 when relaying to v2 peers

* add debug version_str for inputs

* no assumptions about spent index sort order

* add additional version debug logs

* fix ser/deser tests for proto v3

* cleanup coinbase maturity

* rework pool to better handle v2 conversion robustly

* cleanup txpool add_to_pool

* fix nrd kernel test

* move init conversion earlier

* cleanup

* cleanup based on PR feedback
2020-09-07 16:58:41 +01:00
Nym Seddon
d78980c4c4
P2P replace DNS panic with map_err ()
Replace panic on DNS resolution error with map_err to bubble
up error to the caller

Co-authored-by: Nym Seddon <unseddd@shh.xyz>
2020-07-17 13:44:43 +01:00
Antioch Peverell
824c51a346
bump version to 4.1.0 on master (4.0.1 on 4.0.x branch) () 2020-07-13 12:16:43 +01:00
Antioch Peverell
30db9c410e
bump master to 4.0.1-alpha.1 to differentiate from 4.0.0 official tagged build () 2020-07-02 15:51:11 +01:00
Yeastplume
7abe9fcb39
Versioning for 4.0.0 release () 2020-07-02 10:29:10 +01:00
Yeastplume
098d25e569
Version bump for 4.0.0-rc.1 () 2020-06-26 13:10:42 +01:00
Antioch Peverell
55a929e214
cleanup old unused code () 2020-06-15 15:05:47 +01:00
Antioch Peverell
dd88d28a7a
bump version to 4.0.0-beta.2 () 2020-06-12 14:08:12 +01:00
Antioch Peverell
6757a3040d
this test was jamming up in azure CI ()
* this test was jamming up in azure CI

* peer handshake test requires global chain type
2020-06-10 21:56:28 +01:00