Commit Graph

2068 Commits

Author SHA1 Message Date
j01tz 09cf6de1d1 Add 4th contact to SECURITY.md (#2939) 2019-07-04 19:46:29 +02: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
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
hashmap 93bcb23f08 Add 3rd contact to SECURITY.md (#2902)
Per bi-weekly meeting agreement
2019-06-18 22:07:54 -04: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 dfb4d5afae set version number to next (possible) 1.1.x version 2019-06-05 21:37:25 +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
jaspervdm 884851cdeb Modifiy visibility for request functions (#2826) 2019-05-15 14:23:16 +01:00
Max Levy 136a4ba207 a tiny clarification about the point H (#2774)
IMHO, introducing the point _H_ explicitly makes the explanation arguably a bit more clear
2019-05-14 14:05:54 -07:00
Antioch Peverell e56cd55980 initial support for kernel data download (#2765)
* initial support for kernel data download

* fix vec backend for tests

* cleanup after rebase
2019-05-14 17:17:38 +01:00
Antioch Peverell ff1c55193f Wrap MsgHeader in MsgHeaderWrapper for Known/Unknown msg type support (#2791)
* wrap MsgHeader in MsgHeaderWrapper for Known/Unknown msg type support.
* cleanup based on feedback
2019-05-14 09:07:51 -07:00
Antioch Peverell 4ba7b0a46a make sure we use BigEndian when reading numbers via StreamingReader (#2821) 2019-05-13 15:04:14 -07:00
Quentin Le Sceller 59db5e3bd1 Evict transaction from transaction pool (#2797)
* Evict transaction from transaction pool

* Remove Result from evict function
2019-05-13 15:03:47 -07:00
Daogang Tang 15b56a97f5 docs: fix typo. (#2816)
Signed-off-by: Mike Tang <daogangtang@gmail.com>
2019-05-13 14:47:09 -07:00
Daogang Tang 9ac4143bc9 fix: try to fix issue #2585 by adding block cleanup from db directly. (#2815)
* fix: try to fix issue #2585 by adding block cleanup from db directly.

Signed-off-by: Mike Tang <daogangtang@gmail.com>

* use another effective algorithm to do old block and short-lived block cleaup.

Signed-off-by: Mike Tang <daogangtang@gmail.com>

* 1. rename iter_lived_blocks to blocks_iter;
2. comments and iterator calling optimiztions.

Signed-off-by: Mike Tang <daogangtang@gmail.com>

* Fix locking bug when calling is_on_current_chain() in batch.blocks_iter just by removing it.
Because "we want to delete block older (i.e. lower height) than tail.height".

Signed-off-by: Mike Tang <daogangtang@gmail.com>
2019-05-13 16:10:31 +01:00
Quentin Le Sceller 998824ecf3 Add Azure-pipeline badge (#2818)
* Add Azure-pipeline badge

* Fix formatting
2019-05-09 10:54:24 -07:00
Quentin Le Sceller 567ed95fc2 Set up CI with Azure Pipelines (#2744)
Set up CI with Azure Pipelines
2019-05-09 13:15:10 -04:00
Antioch Peverell fabff51dd3 Header version cleanup (#2809)
* introduce HeaderVersion (was u16) for type safety
cleanup pow ser/deser (version unused)

* fixup tests for HeaderVersion

* validate header version during header deserialization
2019-05-08 21:10:42 +01:00
Antioch Peverell 8d5f73e8f1 Protocol version type safety (#2811)
* add type safety for protocol_version

* cleanup tui for protocol version

* cleanup
2019-05-08 20:51:07 +01:00
John Tromp 4ad2ed48a3 add proofsize check in pow verify (#2805) 2019-05-05 11:51:46 +02:00
Antioch Peverell 4ef4212f1f Simplify peer connection handling (#2801)
* connection no longer wrapped in an Option in peer

* introduce peer.send()

* remove some Arc indirection

* self.send() cleanup

* extract Peer:new() from connect and accept

* fixup

* cleanup
2019-05-03 15:56:25 +01:00
Antioch Peverell 6c54c90101 remove the error_channel and simplify how we close peer connections (#2796) 2019-05-03 15:35:43 +01:00
Antioch Peverell d3b4526e03 mimblewinble -> mimblewimble (#2803) 2019-05-03 13:48:25 +01:00
hashmap 55cbdf58fe Gracefully shutdown if SIGINT was sent in TUI mode (#2784)
Fixes #2799

Also 2 Arc's were replaced by one server's instance.
It is needed for p2p thread management in #2778, currently there is no point where we could store thread handles and join them because thread::join
consume the caller, which is impossible in case of Arc.
2019-05-03 14:20:36 +02:00