Commit graph

737 commits

Author SHA1 Message Date
Yeastplume
80887196a8
Restore wallet restore (#843)
* adding appropriate message to bulletproofs to allow for restore

* rustfmt

* should work, now test

* rustfmt

* fix to wallet restore, works now

* fix pool tests

* fix pool tests

* rustfmt
2018-03-23 10:13:57 +00:00
Antioch Peverell
90a7f3d0f6 Validating an empty chain no longer panics (#850) 2018-03-23 01:48:05 +00:00
Ignotus Peverell
68b6bd25a4
Trying Travis building in release mode 2018-03-22 23:11:06 +00:00
Ignotus Peverell
c6761f0b18
Fix adapter compile error 2018-03-22 22:58:32 +00:00
Quentin Le Sceller
836391cc53 Dandelion relay update (#825)
* Change error logger to debug logger
* Dandelion relay update after monitor peers
* Typo + kick off Travis build
2018-03-22 22:51:09 +00:00
Antioch Peverell
155bab93a4 We only want to run chain validation in some scenarios (#842) 2018-03-22 22:44:32 +00:00
Ignotus Peverell
3dd627384a
Test cleanup 2018-03-22 22:04:22 +00:00
Ignotus Peverell
9e10943374
Fix wallet port format in grin.toml 2018-03-22 19:28:25 +00:00
Ignotus Peverell
ee678b28d0
Remove unnecessary height check in sync. (think it was only there for tests) 2018-03-22 19:26:29 +00:00
Ignotus Peverell
9beb66a75e
Don't run full validation on genesis 2018-03-22 19:25:36 +00:00
Antioch Peverell
ce2fb6ecb7 Rewind force rollback (#847)
* rewind() vs rewind_readonly()
* cleanup comments
2018-03-22 16:57:37 +00:00
Alexey Miroshkin
eb226beea8 Introduce fuzz tests for core (#844)
This PR introduces fuzz tests and address #592
2018-03-22 16:53:47 +00:00
Antioch Peverell
4b639cae5c Quieten txhashset logging (#846)
* suppress the log msg until we start fast sync, we need to be past the horizon before we do this
2018-03-22 16:52:40 +00:00
Quentin Le Sceller
675faec05d Change wallet api_listen_port format (#815)
* Change wallet api_listen_port format
* Fix tests
2018-03-22 16:49:27 +00:00
Ignotus Peverell
9d366fe492
Fix difficulty calc for short chains 2018-03-22 16:38:42 +00:00
Ignotus Peverell
054114027f
Index first when hashing nodes in MMR. Fixes #814 2018-03-22 04:58:25 +00:00
Ignotus Peverell
1300d7a745
Dummy change to testnet2 genesis 2018-03-22 04:55:34 +00:00
Ignotus Peverell
ca8447f3bd
Removed all switch commitment usages, including restore (#841)
* Removed all switch commitment usages, including restore
* Fixed pool tests
* Fix keychain tests
* Get rid of the switch key in keychain
2018-03-22 00:10:11 +00:00
Antioch Peverell
ff4d68d2be config to enable full chain validation per block (#839)
* default to full chain validation on processing each block (except during sync)
* add sample config for chain_validation_mode
* document chain_validation_mode
2018-03-21 20:50:08 +00:00
Yeastplume
fc01a33d15 Move logging config further into main (#840)
Don't swallow stdout if TUI is configured to run but only wallet is running
2018-03-21 20:48:56 +00:00
Antioch Peverell
5a47a17101
remove redundant verify_proof call (#835)
* we verify rangeproofs in sum_commitments (in verify_kernels)
remove this redundant (and expensive) rangeproof verification

* rustfmt
2018-03-21 14:55:41 -04:00
Simon B
e3601b6c8e Travis cleaner caching (#833)
* speed up Travis startup
- keep all test tempdata in target/tmp
- purge before saving target/* to S3 cache

* allow 4 minutes for cache up/download from Travis' S3 cache stores
2018-03-21 16:05:07 +00:00
metoro
ed78e1a721 Copy tweaks (#834)
* Fix typo

* Pedantic text tweaks
2018-03-21 08:30:39 -04:00
Antioch Peverell
c595a4b35c
GET /v1/chain/validate (#832)
chain.validate() now takes skip_rproof=true|false
2018-03-21 08:28:05 -04:00
Ignotus Peverell
f0a3479ea3
Sync flag fix (#830)
Sets the sync flag properly when changing to txhashset download
mode to fast-sync to full state. Fixes #827.
2018-03-21 03:06:01 +00:00
Antioch Peverell
b56f21a9ac
split out verify_rangeproofs from sum_outputs (#823)
* split out verify_rangeproofs from sum_outputs
added some timing to the debug msgs
force_rollback at start of chain.validate()

* cleanup
2018-03-20 20:34:19 -04:00
Antioch Peverell
1d7a7457fc
force rollback on txhashset extension when validating (#824) 2018-03-20 17:46:29 -04:00
Simon B
4fa9ccc4f7 Cargo.toml (#818)
* Make sure no grin crates get published by mistake: https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish--field-optional
* add missing workspace = '..', [workspace docs for interested readers](https://doc.rust-lang.org/cargo/reference/manifest.html#the-workspace-section)
* dev- or dev_ works equally well, but dev- is what's typically used
* authors = Grin Developers <maillist>
* [dependencies] keep grin-* at the end + readability
2018-03-20 18:21:29 +00:00
Ignotus Peverell
22106693f3
Still need to check if syncing before asking for orphan parent 2018-03-20 17:50:05 +00:00
Ignotus Peverell
7047930b68
Typo 2018-03-20 17:16:40 +00:00
Ignotus Peverell
99f10f6120
Added wallet config, chain type to testnet2 2018-03-20 16:54:29 +00:00
yeastplume
313fe1541d tag cursive fork 2018-03-20 09:31:09 +00:00
Quentin Le Sceller
fcfe7bc6a4 Basic Dandelion transaction routing (#719)
* Initial Dandelion Commit
* Changed stem_tx_pool to tx_stempool
* Introduction of stem memory pool and stem pool config
* Pool push now send to stem memory pool
* Add stem transaction functions
* Add stem transaction pool
* Drastically simplified code structure
* Add monitor transactions
* Add Dandelion monitor and remove transactions from stempool
* Add peer relay monitor
* Reconcile block with stempool
* Fix total size bug
* Add fluff option for pool push
* Added details on dandelion monitor
* Fix issue with missing parent
* Child transaction with stempool parent are now forced stem
* Update Dandelion Relay from outgoing peers
* Fix missing pool reconciliation
* Add the ability to fluff a transaction directly
* Fix tests for Dandelion
* Missing send_stem_transaction method...
* Add fluff handler for wallet
* Add logger when successfully updated Dandelion relay
* Launch transaction monitor last
* Fix dandelion relay misplaced
* Add logging and updating for stempool
* Additionnal check for stem transaction
* Fix 2 Locks in a row
2018-03-20 03:18:54 +00:00
Antioch Peverell
7816f35238
rewind to header as part of txhashset validation (#808)
* rewind to header as part of txhashset validation
otherwise we risk including a new block and the roots do not match

* fix bug in rm_log rewind (wants to be inclusive of provided index)

* put block marker in the index so we can rewind correctly
during validation of the new txhashset

* rustfmt
2018-03-19 21:31:57 -04:00
Ignotus Peverell
cd72be893e
Do not request orphan predecessor if we have its header. Shows we're already on it (sync). 2018-03-19 22:17:59 +00:00
Ignotus Peverell
154d52e548
Unecessary block cloning in chain 2018-03-19 21:02:02 +00:00
yeastplume
3c5dc1a29a enable tui by default 2018-03-19 19:24:21 +00:00
Yeastplume
4886fa08b2
TUI Difficulty stats for past few blocks (#805)
* added mining subview, changed main menu selection

* collecting difficulty stats from miner

* add diff calc view, separate server stats

* rustfmt

* block difficulty data output

* rustfmt

* ensure diff data is always shown

* don't write to stderr when tui running
2018-03-19 19:23:58 +00:00
Roman Zeyde
e312054714 Fix small formatting issue at dandelion.md (#811) 2018-03-19 16:55:48 +00:00
Roman Zeyde
d4eb24d16a Fix a small comment typo (#810) 2018-03-19 16:55:17 +00:00
Simon B
7c3994e521 Cleanup docs before testnet2 (#798)
* move FAQ.md to https://github.com/mimblewimble/docs/wiki/FAQ and unduplicate (Troubleshooting segment already present on its own wiki page)
* Update doc/style and move it into CONTRIBUTING.
* group up docs overview for more clarity
* link to previously unlinked content in the docs overview
* update + cleanup doc/build
* Update links to reflect troubleshooting is now only in the wiki
* More link fixes and spelling
* Remove doc/usage.md that I've faile to keep updated, and use a wiki page instead
* Last forgotten CONTRIBUTING.md fix
2018-03-17 18:08:40 +00:00
Ignotus Peverell
2fb97eb87f
Minor increase to max tx input count 2018-03-16 22:26:36 +00:00
Alexey Miroshkin
1b3541245a Fix limits for Transaction (#800)
In prevPRr I set them too high, also typos in comments were fixed.
2018-03-16 22:23:10 +00:00
Alexey Miroshkin
c96838d54d Improve bounding block timestamp (#793)
Fixes #783.
* 2^60 still fails on OSX, experimentally found safe max 2^55
* Handle negative values

I tried to use .abs(), unfortuantely fuzz test kills it with
`panicked at 'attempt to negate with overflow', /Users/travis/build/rust-lang/rust/src/libcore/num/mod.rs:1146:17`
2018-03-16 22:20:40 +00:00
Yeastplume
b53b84b0c6 Move nonce/pow to end of block header, change post-pow hash (#794)
* move nonce/pow to end of block header, update call to cuckoo-miner
* change header hash to be pow only
* fix genesis block miner and tests
2018-03-16 19:04:31 +00:00
Alexey Miroshkin
1bad7188b7 Fix Readable impl for Transaction (#795)
Fuzz test demonstrated that the current implemenation panics on reading from the network when serialized tx. Contains for example huge number of input or outputs. It allows a mailicious sender
to kill the server.
2018-03-16 19:02:22 +00:00
Antioch Peverell
cb71386097
hash with the pos for non-leaf nodes (#788)
* hash_with_index on non-leaf nodes
rework the Merkle proof to include the pos of each sibling in the path

* rustfmt

* cleanup

* cleanup

* use get_from_file in validate (children may have been "removed")

* rustfmt

* fixup store tests
2018-03-16 10:45:58 -04:00
Yeastplume
efae2d8ce6
updates to Cursive master and tying dependency to own fork (#787) 2018-03-16 09:53:02 +00:00
Simon B
198edb93dd Fixes #790 (#791) 2018-03-15 20:48:46 -04:00
Antioch Peverell
2552b34118
remove difficulty field from block_header (derive from total_difficulty) (#777)
* remove difficulty field from block_header (derive from total_difficulty)

* address feedback on PR and general cleanup

* rustfmt

* rework pow/difficulty validation in pipe::validate_header
now that we only have total_difficulty available

* cleanup various todos

* rustfmt

* rework DifficultyIterator to track header and prev_header state

* rustfmt caught some garbage syntax

* cleanup
2018-03-15 15:16:34 -04:00