Commit graph

2385 commits

Author SHA1 Message Date
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
Mike Dallas
4b88a9b5bd impl Readable/Writable for PublicKey (#2841)
* impl Readable/Writable for PublicKey

* rustfmt
2019-05-27 10:19:24 +01:00
eupn
249fe03d5c Remove needless lifetimes (#2845)
* Remove lifetimes that could be elided

* rustfmt
2019-05-25 17:13:36 +01:00
eupn
f17dd5fa44 Fix warnings in tests (#2846) 2019-05-25 17:13:09 +01:00
eupn
a2a350dac7 txhashset: remove unnecessary mutability from self references in getters (#2844)
* txhashset.rs: make self references immutable in getters

* rustfmt
2019-05-25 17:12:32 +01:00
eupn
9f28e6aaa3 Replace S and R with corresponding ASCII arrows in bandwidth column (#2836) 2019-05-24 23:41:51 +02:00
eupn
f9c5505e9f Report reorg depth in block status (#2839)
* Calculate reorg depth in BlockStatus::Reorg enum member

* rustfmt

* Fix reorg height calculation and implement reorg test

* rustfmt

* Report reorg depth in webhook payload

* Add optional depth field to the block webhook JSON reply
2019-05-24 21:44:28 +02:00
Quentin Le Sceller
572be5d264 Update Cursive to 0.12 (#2831)
* Update Cursive to 0.12

* Update windows CI patch
2019-05-20 14:25:12 -07:00
hashmap
9c32321c57
Fix the curve name in one section of intro (#2823) 2019-05-17 22:03:17 +02:00
hashmap
9ab23f6eef Implement graceful shutdown (#2812)
* Remove stop status mutex
* remove some deadlocks
* Rewrite stop channel handling
* fix deadlock in peers object
* add missing test fixes
2019-05-15 08:51:35 -07:00