Commit graph

443 commits

Author SHA1 Message Date
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
Quentin Le Sceller
093c500fed
Cargo Update () 2020-06-08 17:15:32 -04:00
Yeastplume
c7c9a32b9b
4.0.0-beta.1 Version Bump () 2020-06-04 14:52:26 +01:00
Antioch Peverell
6faa0e8d75
thread local chain type vs global chain type ()
* Introduce GLOBAL_CHAIN_TYPE and make CHAIN_TYPE thread_local.
This makes testing more explicit and significantly more robust.

* set_local_chain_type() in tests

* cleanup - weird

* get pool tests working with explicit local chain_type config

* core tests working with explicit local chain_type

* p2p tests working with explicit local chain_type

* store tests working

* cleanup, feedback
2020-05-22 12:51:58 +01:00
hashmap
8a22fb516a
Reduce number of allocations in to_key calls ()
We have to make an extra allocation per db get request because key generation function to_key takes Vec. Taking byte slice (AsRef<[u8]> to be precise) also simplifes the code a bit.
2020-04-30 17:47:44 +02:00
hashmap
a82041d0ed
Refactor Readable trait ()
Currently Writable accepts trait Write as a type parameter but Readable
takes Read as a trait object, which is not symmetrical and also less performant. This PR changes Readable trait and all places where it's used
2020-04-30 17:42:19 +02:00
Quentin Le Sceller
be4779c923
Less cloning and pattern simplifications ()
* Cleanup 
* Pattern simplification
2020-04-24 11:19:34 +02:00
hashmap
e64e90623b
Reduce number of allocations in Headers message read ()
We allocate 17 vectors (in the heap) per 512 headers, this PR reduces the number to 1 by resuing the buffer for headers and eliminating the need in the vector of indices
2020-04-18 14:07:26 +01:00
jaspervdm
6bdf31f23d
Remove unused code in message handling () 2020-03-13 12:50:35 +01:00
Yeastplume
b73fc0bb9b
Version bump for next development release 2020-03-02 12:27:16 +00:00
Yeastplume
533da2d192
version bump for 3.1.0 release () 2020-03-02 10:38:56 +00:00
Antioch Peverell
ef755a5c49
bump to 3.1.0-beta.3 () 2020-02-28 12:42:08 +00:00
Antioch Peverell
5071084445
bump version to 3.1.0-beta.2 () 2020-02-27 09:35:44 +00:00