Commit graph

1197 commits

Author SHA1 Message Date
Ignotus Peverell
7571a16d54
Config on testnet3 by default 2018-07-06 23:50:18 +01:00
Ignotus Peverell
0ab3cf29b8
Re-enable kernel history validation, re-add lost fix to validate the txhashset in a read only extension. 2018-07-06 23:48:41 +01:00
Quentin Le Sceller
6fea0ba91f
Update Dandelion Doc and Simulation (#1223)
* Update doc and simulation
2018-07-06 13:41:04 -04:00
Quentin Le Sceller
dd90aaedbc
Remove unused import and code (#1224)
* Remove unused import and code
2018-07-06 13:40:43 -04:00
Quentin Le Sceller
b5fe22dbd5 Bump to 0.3 (#1225) 2018-07-06 18:29:39 +01:00
Yeastplume
721a22b1c4
Simulnet test fix (#1222)
* remove lower time bound

* simulnet test issue

* re-introduce lower bound

* re-introduce lower bound
2018-07-06 11:42:54 +01:00
Yeastplume
f8cd5cf2a4
Initial block difficulty adjustment + difficulty adjustment scenario modification (#1217)
* Handle SIGINT and SIGTERM (#1180)

* Handle SIGINT and SIGTERM

* pin croaring to version 0.3.2 until we get the clang conflict sorted out (#1183)

* document proposals for - (#1190)

* conditional timelocked outputs, and
* conditional relative timelocked outputs

* problem with validation on rewind

* update difficulty scenarios to display much more data

* correct average sum output

* update pre-genesis block padding to just use previous block's data
2018-07-05 13:18:09 +01:00
Ignotus Peverell
26d41fefd0
Fix kernel history verification (#1218)
Only rewind kernels to avoid requiring proper bitmap extraction. Also avoids maintaining bitmap data for kernels by introducing a "prunable" flag on PMMR backend.
2018-07-05 03:31:08 +01:00
Ignotus Peverell
ece2fcc56a
Comment out kernel history check until fixed 2018-07-03 22:26:38 +01:00
Ignotus Peverell
6898b64628
Typo fix in T3 initial difficulty 2018-07-03 22:25:57 +01:00
Ignotus Peverell
1adffb5603
First config setup for T3, dummy genesis 2018-07-02 00:49:49 +01:00
Ignotus Peverell
551e9b13ad
Oops, missed one fix 2018-07-02 00:25:50 +01:00
Ignotus Peverell
1a410f115c
Cleanup a bunch of build warnings 2018-07-02 00:25:20 +01:00
Ignotus Peverell
2d4236f75b
Introduce state to track sync stages (#1210) (#1211)
* A new sync status enum encapsulated in a state struct allows tracking of where sync is at. Leveraging it in the TUI to provide more helpful messages.
* Percentage progression for most sync steps
2018-07-02 00:08:39 +01:00
Ignotus Peverell
8e1b602516
Introduce state to track sync stages (#1210)
* A new sync status enum encapsulated in a state struct allows tracking of where sync is at. Leveraging it in the TUI to provide more helpful messages.
* Percentage progression for most sync steps
2018-07-01 22:33:47 +01:00
Yeastplume
d2a84b7600
Error handling improvements (particularly in chain) (#1208)
* update error handling in chain and other modules to use error/errorkind

* sizeshift errorkind
2018-06-30 23:36:38 +01:00
Ignotus Peverell
f0d5406d0b
Fix cuckoo20 sizeshift in test 2018-06-30 05:07:24 +01:00
Ignotus Peverell
1398e0bf85
Accept multiple Cuckoo graph sizes (#1193)
* Added sizeshift to proof of work and encoding as VLQ
* Fix some loose ends to get things to compile
* Rename sizehift to min_sizeshift
  * Pipeline checks for PoW Cuckoo Cycle size shift and adjustment
factor before difficulty comparison.
  * Working delta+VLQ encoding of u64 PoW, unfortunately still a
little larger than u32, at least for Cuckoo30.
* Changed binary encoding of proof of work to a sequence of exact
compact bit representation of each nonce. Somewhat simpler,
shorter and matches the data to be hashed.
* Few fixes based on @tromp feedback:
* Max nonce is 2^(N-1)
* Need a separate constant for reference sizeshift
* Cuckoo implementation now conserves sizeshift. Test providing a
block at higher sizeshift.
* Last small overflow protection
2018-06-29 18:41:28 +01:00
Gary Yu
9654ee237b Panic on chain/outputs API (#1086) (#1089) 2018-06-29 16:03:06 +01:00
Antioch Peverell
1df409fa69
verify coinbase maturity via output_mmr_size (#1203)
* we do not need Merkle proofs to spend coinbase outputs
we only need the output_mmr_size from the block header

* tests working with no Merkle proofs in inputs
2018-06-28 21:56:07 -04:00
Antioch Peverell
d0f8d325f2
implement prune_list as a bitmap (#1179) (#1206)
* implement prune_list as a bitmap
and simplify

* cleanup prune_list, use maximum()

* handle migration of prune_list to new bitmap prun file

* legacy filename consts

* cleanup and docs
2018-06-28 20:53:00 -04:00
Yeastplume
5ac61b0bc8
fixes to wallet based on testing, ensure details file is being written properly for file wallet (#1204) 2018-06-27 16:57:40 +01:00
Yeastplume
ccf862f76b
T3 Wallet Restore fix and refactor (#1202)
* clean up wallet restore and underlying functions

* rustfmt

* refactor restore
2018-06-26 18:24:40 +01:00
Antioch Peverell
14667bfad6
cleanup path fn and add test coverage (#1201) 2018-06-26 09:42:12 -04:00
mimblewimble-robot
8ff8c8a128 fix build warning as per warning text (#1199) 2018-06-26 09:03:37 -04:00
Antioch Peverell
43540b36f6
refactor path fn to be cleaner and more readable (#1195) 2018-06-25 16:28:06 -04:00
Antioch Peverell
510a5b9016
fix build warning as per warning text (#1198) 2018-06-25 16:24:48 -04:00
mimblewimble-robot
cb0ce311dc document kernel offsets (finally) (#1197) 2018-06-25 16:14:48 -04:00
Antioch Peverell
ce2d13e8ac
document kernel offsets (finally) (#1196) 2018-06-25 15:24:26 -04:00
Antioch Peverell
ddcd9dc1d7
implement prune_list as a bitmap (#1179)
* implement prune_list as a bitmap
and simplify

* cleanup prune_list, use maximum()

* handle migration of prune_list to new bitmap prun file

* legacy filename consts

* cleanup and docs
2018-06-25 07:57:19 -04:00
mimblewimble-robot
b7b90f4c24 document proposals for - * conditional timelocked outputs, and * conditional relative timelocked outputs (#1192) 2018-06-25 07:34:49 -04:00
Yeastplume
38a7936521
Use updated bulletproof API (#1194) 2018-06-25 12:28:56 +01:00
Antioch Peverell
8c0bc013bc
document proposals for - (#1190)
* conditional timelocked outputs, and
* conditional relative timelocked outputs
2018-06-23 22:29:37 -04:00
Ignotus Peverell
dc827ebe93
Remove block markers, use header mmr pos instead (#1188)
Also fixes `spend_in_fork_and_compact` chain test.
2018-06-23 00:36:10 +01:00
Ignotus Peverell
3530b8300c
Remove redundant hashing of header before proof of work (#1118)
We used to hash the hash of the header, needlessly. This also
makes a few function signatures more explicit.

Note that this is consensus breaking and should be accompanied
with a similar change on the cuckoo-pow repository:

6fcecf516a

Fixes #1066
2018-06-22 22:59:56 +01:00
Ignotus Peverell
24cd5bc3e3
Less truncation in difficulty calculation (#1116) 2018-06-22 22:30:02 +01:00
yeastplume
a5553ebba5 rustfmt 2018-06-22 14:05:03 +01:00
yeastplume
836d5441e6 fix wallet tests, chain test output 2018-06-22 14:04:51 +01:00
yeastplume
94322c796c rustfmt 2018-06-22 11:45:25 +01:00
yeastplume
8dfc7f3b2f rework block input bitmap logic to avoid batch locks 2018-06-22 11:44:50 +01:00
yeastplume
e7c380836b rustfmt 2018-06-22 09:44:38 +01:00
yeastplume
f058b14aea Merge: Compiling at least 2018-06-22 09:33:42 +01:00
Ignotus Peverell
d189770080 Wallet LMDB backend (#1151)
* Migrate main node store to LMDB

In preparation to using LMDB as a wallet database, migrate the
node db. There's no point in having 2 key-value stores.
In addition LMDB provides a few advantages as a node db, namely a
much faster build (compared to RocksDb), lesser dependencies and
transactions.

* Migrated p2p store to lmdb, stuff compiles

* More fixes, chain tests starting to pass

* Fixed txhashset rollback messing with block save and general batch delimitation. Chain tests passing.

* rustfmt

* LMDB max map size of 10MB isn't really workable. Half TB seems reasonable.

* Fix wallet tests

* Rather crucial commit was missing

* rustfmt

* Fixing new merged tests following lmdb changes

* rustfmt

* * Make txhashset validation read-only on fast sync to avoid having
a really long open transaction.
* Fix deadlock in new block processing, batch should always be
created within a txhashset lock (when they interact).

* Comment about batch and txhashset interlacing

* Fix store tests to use batch

* Externalize wallet config and seed

* Converted direct read access to file outputs map to an iterator

* Cleaned up and simplified wallet Backend trait:

* No more direct mutable access to internal structures (HashMap)
* Batch interface for all writes
* Remove unneeded read wrapper (read_wallet)

* rustfmt

* First (incomplete) pass at wallet LMDB backend

* Progressing on lmdb backent iml

* Added batch impl for LMDB wallet backend. Pretty much done with it, but not sure how to deal with commit (owned).

* rustfmt

* Wrapping LMDB batch around a refcell to work around borrow rules

* Compilation up to grin chain
2018-06-22 09:08:06 +01:00
Antioch Peverell
3439041807
pin croaring to version 0.3.2 until we get the clang conflict sorted out (#1183) 2018-06-21 09:52:39 -04:00
mimblewimble-robot
bb95d303f5 [milestone/testnet3] Handle SIGINT and SIGTERM (#1182)
* Handle SIGINT and SIGTERM
2018-06-20 23:16:02 -04:00
Quentin Le Sceller
9f8c7cf1b4
Handle SIGINT and SIGTERM (#1180)
* Handle SIGINT and SIGTERM
2018-06-20 23:15:30 -04:00
Ignotus Peverell
0967a5302b
Kernel sum and MMR sizes in block header (#1163)
* Add kernel commitments sum and kernel and output MMR sizes to block header
* Sum a block without including previous sums, cleanup. Blocks are now summed and validated based on their own totals and not the totals since genesis. This allows to get rid of BlockSum and simplified the setting of a new block's roots, kernel sum and MMR sizes. Fixes #116
* Additional kernel MMR validation to check all prior header roots successively
* Wallet tests fix
2018-06-21 02:30:22 +01:00
Antioch Peverell
8fee3b6922
[consensus breaking] use hash_with_index(pos - 1) when checking the hash in the MMR (#1114)
* use hash_with_index(pos - 1) when checking the hash in the MMR

* fix tests, get rid of todo related to duplicate commitments
2018-06-20 16:11:46 -04:00
Antioch Peverell
c9229fa97b
[consensus breaking] apply block outputs first (simplification) and add verify_cut_through() (#1112)
* CONSENSUS BREAKING - simplification apply_block just does outputs first

* rustfmt

* add verify_cut_through to both block and transaction
2018-06-20 15:47:32 -04:00
Antioch Peverell
0ff6763ee6
[consensus breaking] New Improved Merkle Proofs (#1119)
* new improved Merkle proofs

* fix pool and chain tests

* fixup core tests after the merge
2018-06-20 15:18:52 -04:00