Commit graph

2388 commits

Author SHA1 Message Date
Antioch Peverell
c3b1ccff3c
Cleanup usage of legacy bitmaps. ()
The legacy bitmaps are no longer required and
have not been in use for a while.
2020-10-02 09:40:04 -04:00
Antioch Peverell
f25b7ae032
use choose_multiple to clean get_peers() up () 2020-10-01 14:42:57 -04:00
Antioch Peverell
cc4e608d1b
cleanup validate() no need to return kernel sums () 2020-10-01 14:56:37 +01:00
jaspervdm
0aec8b533b
Refactor PMMR read methods into trait () 2020-09-29 15:57:33 +02: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
4944679fb2
add test coverage around existing behavior for exists() and iter() () 2020-09-25 13:49:48 +01:00
Antioch Peverell
62783997df
refactor get_ser to use get_with internally ()
less code duplication and a cleaner code path
batch.exists() now aware of current write tx
2020-09-25 12:47:04 +01:00
Daniel Lehnberg
f40564ef34
Update Code of Conduct ()
Replace old CoC with a link to the website with the updated code of conduct.

Related:
https://github.com/mimblewimble/site/pull/222
https://github.com/mimblewimble/grin-pm/issues/309
2020-09-22 17:15:37 +01:00
Blade Doyle
dc47beda78
cleanup mining stats ()
* cleanup mining stats; make edge_bits dynamic (last size submitted), dont show bogus stats when no miners are connected

Co-authored-by: Quentin Le Sceller <q.lesceller@gmail.com>
2020-09-16 13:03:42 -04: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
06a09f25c4
bump protocol version to 1000 to facilitate deprecation of earlier versions () 2020-09-11 11:07:57 +01:00
Paouky
dfd0a649c7
Organize doc files ()
* create and occupy translations dir

* update translation links

* add mimblewimble whitepaper

* add p2p_protocol from docs

* add validation_logic from docs

Co-authored-by: Paouky <Paouky@users.noreply.github.com>
2020-09-10 09:45:14 -04:00
j01tz
3d07adb621
Remove hashmap as disclosure contact () 2020-09-09 10:09:24 +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
Antioch Peverell
133089e985
Refactor Output Identifiers ()
* refactor output to have internal output identifier

refactor to use AsRef for output identifier

make the output MMR explicit in terms of output identifiers

* put the serde deser back for rangeproof

* add json test for transactions
2020-09-03 10:59:54 +01:00
Antioch Peverell
caa6b8c747
further tweaks to block_accepted logs for clarity ()
* further tweaks to block_accepted logs for clarity

* fix tests

* depth based off prev_head
2020-08-20 17:28:35 +01:00
Antioch Peverell
1cff387f61
Use mmr sizes in header to validate header weight ()
* use mmr sizes in header to validate block weight given header only

* add global weight validaton to headers when reading them untrusted off the network

* fixup tests, one pending test

* add test for deserializing untrusted block header exceeeding weight limits

* validate header mmr sizes, must grow for each block

* remove redundant height check

* fix tests after rebase
block specific TooHeavy error
2020-08-19 09:40:56 +01:00
Antioch Peverell
78e3ec3df0
sync_all() on leaf_set and prune_list when using temp file () 2020-08-19 09:37:22 +01:00
Antioch Peverell
29cffe9b3c
verify_cut_through and test coverage ()
* fix inconsistent verify_cut_through() logic

* add test coverage for chain::process_block() and cut_through logic

* fix comment
2020-08-18 20:09:54 +01:00
Nym Seddon
6a012d7e5b
Add TransactionPool fuzz driver ()
Add fuzz driver for fuzzing adding transactions to the main and stem
TransactionPool

Co-authored-by: Nym Seddon <unseddd@shh.xyz>
2020-08-17 14:05:25 -04:00
Quentin Le Sceller
a038687d20
Fix Broken API Links () 2020-08-17 13:28:38 -04:00
Antioch Peverell
efece9e0c7
use sync pmmr for building locator () 2020-08-17 13:21:54 -04:00
Antioch Peverell
599bf22cfc
Simplify api commits ()
* simplify api with unspent by commitment

* fix chain tests
2020-08-17 13:19:29 -04:00
Quentin Le Sceller
d1b90f89a0
Update dockerfile with rust 1.45 and Debian Buster () 2020-08-17 12:11:27 -04:00
draz3nv
110deff702
[Docs] Revision to intro page ()
* Update intro.md

Co-authored-by: Quentin Le Sceller <q.lesceller@gmail.com>
2020-08-11 17:43:06 -04:00
John Tromp
9c517db3c3
add test cases for C32 and C33 solutions () 2020-08-10 11:05:13 -04:00
Antioch Peverell
34adaf797e
orphan check needs to handle fast sync "edge case" () 2020-08-08 11:21:38 +01:00
Antioch Peverell
4732a0b62b
convert tx for v2 compatibility on way into stempool/txpool ()
cleanup passing extra_tx around

use output identifiers when converting tx to v2
2020-08-02 13:26:28 +01:00
Nym Seddon
6a12155738
Expose max_tx_weight API ()
Add API for getting max transaction weight

Co-authored-by: Nym Seddon <unseddd@shh.xyz>
2020-08-02 08:50:59 +01:00
Antioch Peverell
880f9adcd3
use AsRef in cut_through for flexibility ()
and use fold() to get len of inputs, outputs, kernels
2020-08-01 15:19:17 +01:00
Antioch Peverell
04c8713d83
refactor apply_inputs and support converting block for v2 compatibility ()
* wip

* convert incoming block to v2, rework orphan and duplicate check earlier than conversion

* cleanup process_block_single

* cleanup block conversion

* cleanup

* leverage utxo_view when applying block inputs
2020-07-31 14:36:20 +01:00
Antioch Peverell
70c637fe4f
make cut_through significantly more useful by returning both cut-through and non-cut-through elements ()
split the slices internally rather than simply taking sub-slices
2020-07-30 15:29:20 +01:00
Antioch Peverell
83b269961a
introduce Inputs enum variants for future commit only support () 2020-07-28 21:21:57 +01:00
Antioch Peverell
b43666af80
cleanup inputs_mut, outputs_mut, kernels_mut fns () 2020-07-27 11:54:43 +01:00
Antioch Peverell
80841f16d2
pass slices around and not refs to vecs ()
* pass slices around and not refs to vecs

* use slice.swap()

* use inputs() not body.inputs
2020-07-27 11:07:18 +01:00
Antioch Peverell
105f50b26b
cleanup unused macros and error () 2020-07-27 11:06:16 +01:00
Antioch Peverell
ec3ea9c3ff
pass ref to chain around () 2020-07-27 11:05:12 +01:00
Antioch Peverell
3c06672e9b
include height even for spent outputs in get_outputs api () 2020-07-22 08:32:09 -04: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
84ad59c5be
more robust handling of min_height and max_height in get_kernel_height() ()
* more robust handling of min_height and max_height in get_kernel_height()

* cleanup
2020-07-13 11:31:52 +01:00
Antioch Peverell
32253194b5
log reorg (and fork) depth correctly ()
* log reorg (and fork) depth correctly
depth should be based on "fork point" not prev head

* correct depth for fork/reorg (0 for alternate head etc.)
2020-07-08 09:02:28 +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
John Tromp
238522a9fb
add CuckooParams::node_mask, obsolete EdgeType and sipnode shift arg () 2020-06-26 12:13:25 +01:00
Nym Seddon
39ca5d1c11
Store: error handling for file errors ()
Use existing error handling plumbing for Store file creation errors

Co-authored-by: Nym Seddon <unseddd@shh.xyz>
2020-06-25 10:20:26 +01:00
Antioch Peverell
20b4500625
make sure header PMMR is init correctly based on header_head from db ()
* make sure header PMMR is init correctly based on header_head from db

* fix to ensure header PMMR is consistent with header_head in db on chain init

* change order of operations - validate header earlier
and avoid applying header to header PMMR before validation
as this potentially leaves the PMMR in a tricky state to rewind from
2020-06-22 10:04:09 -04:00
Antioch Peverell
d3598e25eb
credit where credit is due () 2020-06-16 18:41:09 +01:00