Commit graph

715 commits

Author SHA1 Message Date
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
Ignotus Peverell
e4871065b0
Bounding block timestamp to avoid surprises. Fixes #783 2018-03-15 18:37:17 +00:00
Yeastplume
244fc8d32e
PMMR data compaction (#784)
* fix and re-introduce data file compaction

* rustfmt

* remove commented line

* test cleanup

* remove println

* fix to core test
2018-03-15 17:12:30 +00:00
Antioch Peverell
00bfc4ec38
add dump_stats so we can see pmmr sizes after compaction (#785)
* add dump_stats so we can see pmmr sizes after compaction

* rustfmt

* fix tests with dump_stats()
2018-03-15 12:53:40 -04:00
Antioch Peverell
e75eef927b
Fix test dirs to isolate the tests (#786)
* 2 tests treading on each others dirs

* rustfmt

* actually use a different dir in each test...

* conflicting dirs across different test files also
2018-03-15 11:37:48 -04:00
Yeastplume
7f67542bc9
fix mining screen output (#776) 2018-03-14 19:07:18 +00:00
Yeastplume
449cefd5c9
hook to send panics and stacktraces to logs as well as stdout (#775) 2018-03-14 18:22:18 +00:00
Yeastplume
c02309ce87
Wallet listener and server startup ambiguity fix (#774)
* unify code path for server run and create wallet seed if it doesn't exist

* rustfmt
2018-03-14 18:21:48 +00:00
Antioch Peverell
6a1a45e21f
store "total kernel offset" on block header (#769)
* move from storing per block kernel_offset in the block header
to storing the total accumulated kernel offset on each block header

* rustfmt

* cleanup
2018-03-14 11:22:09 -04:00
Yeastplume
a8226da50d
change to bulletproof interface to separate nonce from blind in unwind (#773) 2018-03-14 11:03:09 +00:00
Antioch Peverell
65633c7611
check_compact retains leaves and roots until parents are pruned (#753)
* wip

* failing test for being too eager when pruning a sibling

* commit

* rustfmt

* [WIP] modified get_shift and get_leaf_shift to account for leaving "pruned but not compacted" leaves in place
Note: this currently breaks check_compact as nothing else is aware of the modified behavior

* rustfmt

* commit

* rustfmt

* basic prune/compact/shift working

* rustfmt

* commit

* rustfmt

* next_pruned_idx working (I think)

* commit

* horizon test uncovered some subtle issues - wip

* rustfmt

* cleanup

* rustfmt

* commit

* cleanup

* cleanup

* commit

* rustfmt

* contains -> binary_search

* rustfmt

* no need for height==0 special case

* wip - works for single compact, 2nd one breaks the mmr hashes

* commit

* rustfmt

* fixed it (needs a lot of cleanup)
we were not traversing all the way up to the peak if we pruned an entire tree
so rm_log and prune list were inconsistent

* multiple compact steps are working
data file not being copmacted currently (still to investigate)

* cleanup store tests

* cleanup

* cleanup up debug

* rustfmt

* take kernel offsets into account when summing kernels and outputs for full txhashset validation
validate chain state pre and post compaction

* rustfmt

* fix wallet refresh (we need block height to be refreshed on non-coinbase outputs)
otherwise we cannot spend them...

* rustfmt
2018-03-13 14:22:34 -04:00
Yeastplume
e268993f5e
[WIP] Needs more TUI (#765)
* first explorations at attempting to integrate more user-friendly status screen/ui

* rustfmt

* adding some logo and color for visual interest

* formatting

* better integration with stdout, cleaner looking startup and shutdown

* rustfmt

* update to framework, and first collection of stats from server

* rustfmt

* commit of basic stat screen, think it's in a good enough state to share

* rustfmt

* fix to automated tests

* fix to automated tests

* grin.toml setting

* grin.toml setting

* grin.toml setting

* merge from upstream

* merge from upstream

* merging

* merging

* formatting

* adding more status screens, beginning to collect peer data

* rustfmt

* beginnings of peer info

* adding tui dir

* rustfmt

* missing table

* create title bar

* Split up UI elements into separate files, create trait for update

* Added basic mining view
2018-03-13 18:10:45 +00:00
Ignotus Peverell
65c0a4b7b0
Fee burning no more. Fixes #767 2018-03-13 02:39:22 +00:00
Ignotus Peverell
a8fcc37a36
Automatically run wallet listener
Convenience option, set to true by default in grin.toml, to
fork a wallet listener thread by default. Should make it easier
for people to get started on testnet2.

People who want to configure a password for their wallet seed,
run multiple listeners, change default address should set this
to false and manually configure and start their wallet listener.

This might break some tooling. Hopefully not.
2018-03-11 00:40:28 +00:00
Ignotus Peverell
851d7c7b9b
Turns out libncurses5w is also required 2018-03-10 21:46:34 +00:00
Ignotus Peverell
86371e66ab
Added libncurses to the dependency list 2018-03-10 21:08:52 +00:00
Æde
bbbbdc455d Use header hash for by height index (#761)
* Use header hash for by height index
* Update semantics of save_header_height
2018-03-09 18:59:15 +00:00
Yeastplume
5cf780ab98
Rm log rewind on startup (#760)
* add rewind to block height to rm_log on startup

* add rewind to block height to rm_log on startup

* flush remove log
2018-03-09 17:17:48 +00:00
Yeastplume
23ac36a834
Basic TUI Integration (#756)
* first explorations at attempting to integrate more user-friendly status screen/ui

* rustfmt

* adding some logo and color for visual interest

* formatting

* better integration with stdout, cleaner looking startup and shutdown

* rustfmt

* update to framework, and first collection of stats from server

* rustfmt

* commit of basic stat screen, think it's in a good enough state to share

* rustfmt

* fix to automated tests

* fix to automated tests

* grin.toml setting

* grin.toml setting

* grin.toml setting
2018-03-09 17:16:31 +00:00
Ignotus Peverell
ab4b2a19e3
Cleanup positional indexes for rewind, introducing block markers (#759)
* Cleanup MMRs positional indexes. Get rid of the kernel position index.
Introduced a new block marker index that keeps, for each block, the
respective positions in the output and kernel MMRs. This is now sufficient
for rewind.
* Block marker compaction
2018-03-08 21:36:51 +00:00
Adam Jonas
a059bbde0d typo fix (#754) 2018-03-07 10:45:55 -05:00
Ignotus Peverell
a9d1b76414
Compaction of pruned data for chain data structures (#746)
* Implementation of compaction for the chain. Single entry point on the chain triggers compaction of all MMRs as well as the cleanup of the positional index and full blocks.
* API endpoint, additional tests and more fixes for compaction
* Also prune PMMR metadata, minor bug fix
* PMMR store tests fix
2018-03-06 17:58:33 +00:00
Ignotus Peverell
1ab43df807
Update install instructions with rustfmt-preview 2018-03-06 00:53:08 +00:00