Commit graph

2494 commits

Author SHA1 Message Date
Antioch Peverell
fb33d3af1f
make sure user_testing uses a sensible txhashset interval (#2962) 2019-07-23 13:25:34 +01:00
Quentin Le Sceller
4966dc04f7
[2.x.x] Generate txhashset archives on 720 block intervals. (#2951)
Generate txhashset archives on 720 block intervals.
2019-07-23 10:46:29 +02:00
Quentin Le Sceller
121e6c8c46
[DOC] Translate documents & fix some typo (#2952)
*  add files for translation

*  WIP translation

* finish to translate coinbase_maturity.md && fix some typo to understand easily

*  add doc link in coinbase_maturity.md

*  remove wrong file

* Fix typo and unecessary word
2019-07-18 11:42:34 +02:00
Mike Dallas
a1c7f304bd fix on_header_received hook (#2953) 2019-07-16 21:17:40 +02:00
Joseph Goulden
b8c508d255 test: Re-enabled too large block test. Block tests now use ChainTypes:AutomatedTesting (#2950) 2019-07-16 13:02:21 +02:00
hashmap
d3dbafa80b
[2.x.x] Use blocking IO in P2P to reduce CPU load (#2855)
* Use blocking IO in P2P to reduce CPU load
2019-07-12 23:17:38 +02:00
Antioch Peverell
1395074a25
[2.x.x] simplify txhashset zip creation and extraction (#2908)
* simplify how we extract files from the txhashset zip archive

* bump version of zip-rs
cleanup create_zip (was compress)
use explicit list of files when creating zip archive

* rework zip tests for our simplified impl

* periodic debug during txhashset download

* rework list_files to return something usable
2019-07-12 10:50:27 +01:00
Joseph Goulden
3a4752635a fix: One less DB call when verifying block sums (#2945) 2019-07-12 10:47:04 +01:00
Antioch Peverell
2348214719
fix our check_known check for blocks/headers (#2943) 2019-07-11 17:08:36 +01:00
lehnberg
7434eca5d0
update Dandelion documentation (2.x.x) (#2942)
* update dandelion documentation as per PR#2723
* remove dandelion simulation docs as per PR#2723
2019-07-08 15:18:21 +01:00
Antioch Peverell
d284d8f6de
[2.x.x] Writeable protocol version aware (#2856)
* introduce protocol version to deserialize and read

* thread protocol version through our reader

* cleanup

* cleanup

* streaming_reader cleanup

* Pass protocol version into BinWriter to allow for version specific serialization rules.

* rustfmt

* read and write now protocol version specific
2019-07-06 15:51:03 +01:00
j01tz
09cf6de1d1 Add 4th contact to SECURITY.md (#2939) 2019-07-04 19:46:29 +02:00
Antioch Peverell
b6daf1edfd
check for known robustly when processing header (#2834) 2019-07-04 12:30:22 +01:00
Antioch Peverell
f4eb3e3d4b
Always stem local txs if configured that way (unless explicitly fluffed) (#2876)
* always stem local txs if configured that way (unless explicitly fluff from wallet)
this overrides current epoch behavior for txs coming in via "push-api"
rename "local" to "our" txs

* TxSource is now an enum for type safety.
2019-07-04 11:56:42 +01:00
Yeastplume
b377d4cb4e
Derive --version output dynamically from cargo package version (#2937) 2019-07-02 16:02:57 +01:00
Yeastplume
e6bdc5987c
update version number for next potential beta release 2019-07-01 11:00:02 +01:00
Yeastplume
8f3be49dfa
change version to 2.0.0 for release 2019-07-01 09:24:33 +01:00
hashmap
dbd2535f42
Increase peer's send buffer (#2931) (#2934)
When we send a txhashet archive a peer's thread is busy with sending it
and can't send other messages, eg pings. If the network connection is
slow buffer capacity 10 may be not enough,  hence the peer's drop.

Safer attempt to address #2929 in 2.0.0
2019-06-30 22:26:17 +02:00
Antioch Peverell
82775164e8
take age of txs into consideraton when bucketing and sorting txs from the pool (#2878) 2019-06-27 17:50:10 +01:00
Antioch Peverell
5aaf2d058d
[2.x.x] deserialization now protocol version aware (#2824)
* introduce protocol version to deserialize and read

* thread protocol version through our reader

* example protocol version access in kernel read

* fix our StreamingReader impl (WouldBlock woes)

* debug log progress of txhashset download
2019-06-27 17:19:41 +01:00
Quentin Le Sceller
2f01274557
CI Improvements (#2928)
* Switch to Windows 2019

* use macOS 10.14 and do not install Rust when not not necessary, fix rust_flags
2019-06-27 10:31:58 -04:00
Yeastplume
1609b041b1
Master merge 2.0.0 (#2927)
* create 2.0.0 branch

* fix humansize version

* update grin.yml version

* PoW HardFork (#2866)

* allow version 2 blocks for next 6 months

* add cuckarood.rs with working tests

* switch cuckaroo to cuckarood at right heights

* reorder to reduce conditions

* remove _ prefix on used args; fix typo

* Make Valid Header Version dependant on ChainType

* Rustfmt

* Add tests, uncomment header v2

* Rustfmt

* Add FLOONET_FIRST_HARD_FORK height and simplify logic

* assume floonet stays closer to avg 60s block time

* move floonet hf forward by half a day

* update version in new block when previous no longer valid

* my next commit:-)

* micro optimization

* Support new Bulletproof rewind scheme (#2848)

* Update keychain with new rewind scheme

* Refactor: proof builder trait

* Update tests, cleanup

* rustfmt

* Move conversion of SwitchCommitmentType

* Add proof build trait to tx builders

* Cache hashes in proof builders

* Proof builder tests

* Add ViewKey struct

* Fix some warnings

* Zeroize proof builder secrets on drop

* Modify mine_block to use wallet V2 API (#2892)

* update mine_block to use V2 wallet API

* rustfmt

* Add version endpoint to node API, rename pool/push (#2897)

* add node version API, tweak pool/push parameter

* rustfmt

* Upate version api call (#2899)

* Update version number for next (potential) release

* zeroize: Upgrade to v0.9 (#2914)

* zeroize: Upgrade to v0.9

* missed Cargo.lock

* [PENDING APPROVAL] put phase outs of C32 and beyond on hold (#2714)

* put phase outs of C32 and beyond on hold

* update tests for phaseouts on hold

* Don't wait for p2p-server thread (#2917)

Currently p2p.stop() stops and wait for all peers to exit, that's
basically all we need. However we also run a TCP listener in this thread
which is blocked on `accept` most of the time. We do an attempt to stop
it but it would work only if we get an incoming connection during the
shutdown, which is a week guarantee.

This fix remove joining to p2p-server thread, it stops all peers and
makes an attempt to stop the listener.

Fixes [#2906]

* rustfmt
2019-06-27 09:19:17 +01:00
Quentin Le Sceller
fd6fe35777 Revert #2813 (#2920)
* Revert #2813

* Rustfmt
2019-06-26 10:37:34 +01:00
Yeastplume
9398578947
update version number 2019-06-25 15:43:46 +01:00
Gary Yu
41fa0e27cf zeroize: Upgrade to v0.9 (#2914)
* zeroize: Upgrade to v0.9

* missed Cargo.lock
2019-06-25 15:13:07 +01:00
hashmap
93bcb23f08 Add 3rd contact to SECURITY.md (#2902)
Per bi-weekly meeting agreement
2019-06-18 22:07:54 -04:00
Yeastplume
71d16d1b4d
Update version number for next (potential) release 2019-06-18 21:17:48 +01:00
jaspervdm
5d6defb2eb Upate version api call (#2899) 2019-06-15 19:24:12 +01:00
Yeastplume
c2153fada2
Add version endpoint to node API, rename pool/push (#2897)
* add node version API, tweak pool/push parameter

* rustfmt
2019-06-15 09:54:45 +01:00
Yeastplume
e15cffbbd0 Modify mine_block to use wallet V2 API (#2892)
* update mine_block to use V2 wallet API

* rustfmt
2019-06-13 11:14:26 +02:00
jaspervdm
e3f3064414 Support new Bulletproof rewind scheme (#2848)
* Update keychain with new rewind scheme

* Refactor: proof builder trait

* Update tests, cleanup

* rustfmt

* Move conversion of SwitchCommitmentType

* Add proof build trait to tx builders

* Cache hashes in proof builders

* Proof builder tests

* Add ViewKey struct

* Fix some warnings

* Zeroize proof builder secrets on drop
2019-06-12 10:28:55 +01:00
John Tromp
6429580b0c PoW HardFork (#2866)
* allow version 2 blocks for next 6 months

* add cuckarood.rs with working tests

* switch cuckaroo to cuckarood at right heights

* reorder to reduce conditions

* remove _ prefix on used args; fix typo

* Make Valid Header Version dependant on ChainType

* Rustfmt

* Add tests, uncomment header v2

* Rustfmt

* Add FLOONET_FIRST_HARD_FORK height and simplify logic

* assume floonet stays closer to avg 60s block time

* move floonet hf forward by half a day

* update version in new block when previous no longer valid

* my next commit:-)

* micro optimization
2019-06-12 10:28:14 +01:00
Gary Yu
d03a81f55c
commit cargo.lock (#2875)
* commit cargo.lock

* rustfmt
2019-06-06 11:34:34 +08:00
Cadmus Peverell
5ebe2aa397 Generate txhashset archives on 720 block intervals. (#2813)
* generate txhashset archives on 250 block intervals.

* moved txhashset_archive_interval to global and added a simple test.

* cleaning up the tests and adding license.

* increasing cleanup duration to 24 hours to prevent premature deletion of the current txhashset archive

* bug fixes and changing request_state to request height using archive_interval.

* removing stopstate from chain_test_helper to fix compile issue
2019-06-06 10:39:07 +08:00
Yeastplume
7a8a52eda3
update grin.yml version 2019-06-05 21:41:47 +01:00
Yeastplume
dfb4d5afae
set version number to next (possible) 1.1.x version 2019-06-05 21:37:25 +01:00
Yeastplume
f9c18a42eb
fix humansize version 2019-06-05 21:29:22 +01:00
Yeastplume
75c229ba68
create 2.0.0 branch 2019-06-05 20:36:57 +01:00
Yeastplume
a89a1024b6
update version numbers for 1.1.0 release 2019-06-05 19:39:01 +01:00
eupn
329dc82924 Fix TODO in to_edge! macro (#2853)
* Fix to_edge macro hygene TODO
2019-06-03 11:10:01 +02:00
Aleksandrov Vladimir
2cb37913ba add flag 'no_merkle_proof' to /v1/blocks api to get blocks without checking merkle proof (#2843) 2019-05-31 08:49:40 +02:00
Gary Yu
e345405201
fix: fraud peer ban doesn't work in some cases (#2867) 2019-05-31 08:02:54 +08:00
eupn
56b62a319b Fill BlindingFactor with zeros on Drop (#2847)
* Implement simple zeroing of BlindingFactor in Drop

* rustfmt

* Make Debug implementation for BlindingFactor empty

* Implement BlindingFactor zeroing unit test

* mnemonic.rs: fix deprecated warning in test_bip39_random test

* Use zeroize crate to clear BlindingFactor

* Fix comment and implement dummy Debug trait for BlindingFactor

* Fix formatter
2019-05-30 23:16:53 +02:00
hashmap
25a2ee1233 Fix unused doc warning in Rust 1.35 (#2863)
This version brings a new warning to inform that rustdoc doesn't add docs for macro
expansions
2019-05-30 08:04:17 +08:00
hashmap
2863ed67fd Speedup shutdown (#2862)
I made an suboptimal (aka stupid) decision to stop and wait for peers
one by one which makes shutdown very slow - O(n). This PR decouples sending
stop signal from waiting a thread to exit. On top of it in Peers we
first send stop signal to all peers and only after that start waiting
for them to exit. It gives us a constant time of shutdown in most of the
cases.
2019-05-30 08:03:12 +08:00
Quentin Le Sceller
a1f71deba0
Remove Travis and Gitlab CI (#2861) 2019-05-29 15:35:24 -04:00
Yeastplume
bb793defa7
De/Serialize signatures (for slate consumption) to compressed format rather than raw (#2852)
* Serialize signatures in custom secp serializer as compact format instead of raw

* rustfmt
2019-05-28 16:48:24 +01:00
Quentin Le Sceller
ee9b9fe763
Update minimum required rust version and dockerfile (#2858) 2019-05-28 11:02:10 -04:00
Michalis Kargakis
a745df3e40 Add commented webhook config (#2849)
* Add commented webhook config

* Remove redundant config
2019-05-28 06:47:10 +02:00
eupn
7e57c10ec7 Remove TODO (#2854) 2019-05-27 13:15:47 -04:00