Commit graph

2202 commits

Author SHA1 Message Date
eupn
56b62a319b Fill BlindingFactor with zeros on Drop ()
* 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 ()
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 ()
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 () 2019-05-29 15:35:24 -04:00
Yeastplume
bb793defa7
De/Serialize signatures (for slate consumption) to compressed format rather than raw ()
* 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 () 2019-05-28 11:02:10 -04:00
Michalis Kargakis
a745df3e40 Add commented webhook config ()
* Add commented webhook config

* Remove redundant config
2019-05-28 06:47:10 +02:00
eupn
7e57c10ec7 Remove TODO () 2019-05-27 13:15:47 -04:00
Mike Dallas
4b88a9b5bd impl Readable/Writable for PublicKey ()
* impl Readable/Writable for PublicKey

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

* rustfmt
2019-05-25 17:13:36 +01:00
eupn
f17dd5fa44 Fix warnings in tests () 2019-05-25 17:13:09 +01:00
eupn
a2a350dac7 txhashset: remove unnecessary mutability from self references in getters ()
* 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 () 2019-05-24 23:41:51 +02:00
eupn
f9c5505e9f Report reorg depth in block status ()
* 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 ()
* 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 () 2019-05-17 22:03:17 +02:00
hashmap
9ab23f6eef Implement graceful shutdown ()
* 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 () 2019-05-15 14:23:16 +01:00
Max Levy
136a4ba207 a tiny clarification about the point H ()
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 ()
* 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 ()
* 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 () 2019-05-13 15:04:14 -07:00
Quentin Le Sceller
59db5e3bd1 Evict transaction from transaction pool ()
* Evict transaction from transaction pool

* Remove Result from evict function
2019-05-13 15:03:47 -07:00
Daogang Tang
15b56a97f5 docs: fix typo. ()
Signed-off-by: Mike Tang <daogangtang@gmail.com>
2019-05-13 14:47:09 -07:00
Daogang Tang
9ac4143bc9 fix: try to fix issue by adding block cleanup from db directly. ()
* fix: try to fix issue  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 ()
* Add Azure-pipeline badge

* Fix formatting
2019-05-09 10:54:24 -07:00
Quentin Le Sceller
567ed95fc2
Set up CI with Azure Pipelines ()
Set up CI with Azure Pipelines
2019-05-09 13:15:10 -04:00
Antioch Peverell
fabff51dd3
Header version cleanup ()
* 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 ()
* 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 () 2019-05-05 11:51:46 +02:00
Antioch Peverell
4ef4212f1f
Simplify peer connection handling ()
* 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 () 2019-05-03 15:35:43 +01:00
Antioch Peverell
d3b4526e03
mimblewinble -> mimblewimble () 2019-05-03 13:48:25 +01:00
hashmap
55cbdf58fe
Gracefully shutdown if SIGINT was sent in TUI mode ()
Fixes 

Also 2 Arc's were replaced by one server's instance.
It is needed for p2p thread management in , 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
Antioch Peverell
85d06fe416
fix typo ()
single char typo - merging
2019-05-03 12:07:39 +01:00
fresheneesz
7f12b45a34 Updating the (dead) link to the transaction UML () 2019-05-02 15:16:04 -04:00
Antioch Peverell
b9db129b33 Add debug logging on startup to provide size of our leaf_set (aka UTXO set) () 2019-04-30 12:27:37 -07:00
Antioch Peverell
6352780d6a Bump rand crate to 0.6 (was 0.5) ()
shuffle was deprecated, fix this up
2019-04-30 12:25:19 -07:00
Antioch Peverell
b2b96f3f81
bucket_transactions is now fee_to_weight aware ()
* bucket_transactions is now fee_to_weight aware
bucket_transactions now returns the underlying txs

* cleanup

* simplify pool bucket sorting, no need for depth sort key
2019-04-30 12:14:02 +01:00
hashmap
3d0f9bd0d3 Set TUI FPS ()
New version of Cursive allows to set fps, the existing  set_autorefresh sets 30 fps. This change decreases CPU usage from 50-65% to 15-25% on my machine.
2019-04-30 08:04:36 +08:00
hashmap
304ae444ab
Fix peer dropping ()
It turns out that we drop connection if we fail to process a message
because of chain/store/internal error, eg we have a header already, so
we refuse it and drop the peer.
This pr doesn't forward this error to the peer error channel so the
connection will not be dropped.
2019-04-26 20:22:07 +02:00
Ignotus Peverell
81a6af9624
Increase peer max count significantly ()
* Increase peer max count significantly

* Reduce limit to 125, like bitcoin
2019-04-24 15:04:59 -07:00
Antioch Peverell
de21f0d62d Cleanup how we deal with fixed size vs variable size data files ()
introduce a SizeInfo enum (to replace two options)
2019-04-24 13:43:06 -07:00
Antioch Peverell
e72409d804 Bump the version of croaring to 0.3.9 () 2019-04-24 11:17:20 -07:00
Antioch Peverell
19106b3643 Relax our p2p rules around matching protocol versions () 2019-04-24 11:15:08 -07:00
hashmap
3c400f7e2a Fix unused import warnings () 2019-04-23 18:16:03 +08:00
David Burkett
0e6a249126 Increasing thread sleeps for socket listener thread and per-connection threads. () 2019-04-23 08:29:24 +02:00
Gary Yu
97e96e4fcf use a grin specific tmp dir instead of a system tmp dir () ()
* use a grin specific tmp dir instead of a system tmp dir

* rustfmt

* using create_new instead of create

* switch the txhashset sandbox from system tmp dir to grin specific tmp dir

* rustfmt

* adapter get_tmp_dir delegate to chain implementation

* simply the logic of protolc for get_tmpfile_pathname

* rustfmt

* fix the merge mistake
2019-04-22 16:54:36 -07:00
Antioch Peverell
d7f940e160 cleanup unused data_file_path () 2019-04-22 16:53:53 -07:00
Gary Yu
b61b773cee Get back the lost code of () 2019-04-22 16:53:24 -07:00