Commit graph

257 commits

Author SHA1 Message Date
Yeastplume
301e9a6e98 Reconcile config file with command line switches (#113)
* allowing mix of command line and config file values
* rustfmt check
2017-09-05 01:34:24 +00:00
Ignotus Peverell
66255dfe83 Minor update, add link to issues 2017-09-01 03:26:26 +00:00
AntiochP
510d7fc331 git pre-commit hook to run rustfmt on modified files (#110)
* git pre-commit hook to run rustfmt on modified files
* add docs for rustfmt
* add CONTRIBUTING file
2017-09-01 00:54:15 +00:00
AntiochP
7b12746a1f Store block header hash by input and output commitment (#104)
* initial pass at indexing block header hashes by commitments
* check block height matches currently indexed block height
when getting block header for an output commit
* add some test coverage
* document get_block_header_by_output_commit
2017-08-29 16:32:45 +00:00
Yeastplume
b5e62c81c0 Switch commitments in libsecp fork (#109)
* first pass at switch committment generator
* create sage generator script
2017-08-29 16:27:01 +00:00
Seamus Finnigan
9c649edfbf Use UTC in timestamps and fix broken header test (#105)
* Fix block header timestamp UTC and fix test
* Always use UTC for timestamp as time::Tm
2017-08-26 16:31:27 +00:00
Yeastplume
3bf06ecd6a Cuckoo miner with cmake update (#103)
* updating to use cuckoo-miner latest, which uses cmake
* check on travis CI dependency
2017-08-24 21:43:11 +00:00
AntiochP
5febcb509c Add wallet to the travis build matrix (#102) 2017-08-23 08:29:22 +00:00
AntiochP
fa339f3c0b fix up wallet tests (#101)
fix wallet tests
add test to verify input commitment == output commitment on spend
2017-08-22 23:05:56 +00:00
AntiochP
babb6110c4 unit tests for coinbase flags (output and tx kernel) (#99)
* add tests around flipping COINBASE_OUTPUT and COINBASE_KERNEL flags
* add serialize_deserialize test for a minimal block
2017-08-22 18:26:13 +00:00
Yeastplume
045f5bb4da POW refactor (#100)
* Adding output stats from plugin, when available
* adding grin config
* moving pow crate from core/pow to it's own crate
* moving POW/mining stuff into pow module, and removing mining dependency from chain
* refactored most of mining into pow module...miner.rs still in server
* update grin tests
* updating genesis block mining to use configured miner, if available
* chain tests back into chain, done with pow refactor
* use tag of cuckoo-miner for pr
2017-08-22 18:23:54 +00:00
Riccardo Casatta
6772d9f516 various typos in docs (#95)
* various typos in docs
* fix a number in comments
2017-08-21 16:56:26 +00:00
Yeastplume
b61c0607c2 Fix inconsistent wallet receiver port
Fixes #96
2017-08-18 23:01:19 +00:00
AntiochP
900c52424d add "cache: cargo" to travis config (#92) 2017-08-11 21:09:30 +00:00
Yeastplume
2a275a2f87 POW Blake 2 changeover (#91)
* playing around with changing cuckoo sizes on the fly
* modifying tests to use global cuckoo parameters, and checking results
* check for pow size
* Changing global function names, and removing length from POW serialization
* changes to use blake2 for cuckoo seed generation
* updating tests to blake 2
2017-08-11 21:05:59 +00:00
AntiochP
be6b26e8f1 clean up .grin and .grin2 dirs before running the respective tests (#93) 2017-08-11 21:04:47 +00:00
AntiochP
3b4a48b2fd Cleanup build warnings (#87)
* minor cleanup - unused imports
* cleanup build warnings - unused vars
* make structs pub to get rid of the private_in_public lint warning
* missing docs on RangeProof
* add missing docs to store delete function
* cleaned up deprecation warning -
tokio_core -> tokio_io
complete() -> send()
2017-08-10 00:54:10 +00:00
Yeastplume
131ea2f799 Ci mode fixes (#86)
* playing around with changing cuckoo sizes on the fly
* modifying tests to use global cuckoo parameters, and checking results
* check for pow size
* Changing global function names, and removing length from POW serialization
2017-08-09 16:40:23 +00:00
Ignotus Peverell
d32ab967f0
Prunable and easy to store MMR impl 2017-08-05 09:32:41 +00:00
Ignotus Peverell
ae9a9c8938
Merge branch 'master' of github.com:ignopeverell/grin 2017-08-04 19:52:04 +00:00
Ignotus Peverell
95fe570187
Prunable and easy to store MMR impl 2017-08-04 19:50:32 +00:00
Yeastplume
cdf4203dd1 Cuckoo miner integration, Queue implementation (#84)
* Adding ability to serialise parts of the header, pre-nonce and post-nonce
* Some test integration of queueing functions in cuckoo-miner
* more cuckoo-miner async mode integration, now more or less working
* integrating async miner workflow
* rocksdb update
* u64 internal difficulty representation, and integration of latest Cuckoo-miner API
* change to cuckoo-miner notify function
* Issue in testing, and if use_async value is None in grin.toml
* making async mode explicit in tests - 2
* fiddle with port numbers for CI
* update tag to ensure cuckoo-miner build doesn't fail on windows
* change the order in which tests are run
2017-08-03 16:57:55 +00:00
Ignotus Peverell
c994c7cba2
Capture options with orphan block, fix #83 2017-07-28 02:21:00 +00:00
Ignotus Peverell
b3e224b439
Minor fixes to orphan handling
Fixed sync pathway in validation pipeline not returning the proper
orphan error. Reduced chain head lock span to prevent deadlock on
reentrancy.
2017-07-27 23:47:33 +00:00
Ignotus Peverell
22bff54f66
rustfmt (new version) 2017-07-27 21:13:34 +00:00
Ignotus Peverell
3c3b12b13a
Chain handles orphaned blocks and retries them
When a new block is rejected by the validation pipeline as orphan,
the chain now keeps it in a ring buffer of capped size. Anytime
a new block is accepted, all orphans in the ring buffer are
retried. This is helpful to handle all the cases where we receive
blocks out of order for networking/timing reasons.
2017-07-27 19:08:48 +00:00
Ignotus Peverell
f0044c631f
Minor warnings cleanup, rustfmt 2017-07-26 01:43:17 +00:00
Ignotus Peverell
a6047903d2
Sum tree: n_children -> n_leaves (more explicit) 2017-07-24 21:46:22 +00:00
Ignotus Peverell
20e3382785
Merkle doc: fix typos, clarify diagram 2017-07-24 21:37:14 +00:00
Ignotus Peverell
3503ba7f66
Last (hopefully) blake2 loose ends 2017-07-24 19:24:51 +00:00
Ignotus Peverell
1d68a64edc
Extend MMR doc with storage design 2017-07-24 17:41:30 +00:00
Ignotus Peverell
22f3d42b94
Simple sum tree benchmark 2017-07-23 01:19:10 +00:00
Ignotus Peverell
87fc062f9b
Last snafu (hopefully) 2017-07-22 23:32:00 +00:00
Ignotus Peverell
2261415c27
Oops. Fix blake2 dependency issues. 2017-07-20 15:03:47 +00:00
Ignotus Peverell
eb11b14cab
Minor warning cleanup in core
Remove some unused import and add missing docs.
2017-07-20 14:22:40 +00:00
Ignotus Peverell
23816d1c2b
Add missing crate dependency 2017-07-20 14:11:42 +00:00
Ignotus Peverell
929943d8b1
Sum-tree only stores hashes
Couple improvements to the sum tree implementation. First change
is to not store the data but only its hashes, assuming a higher
level layer will take care of the data (KV store).

Second minor improvement is renaming Node into NodeData and vice
versa.
2017-07-20 14:07:57 +00:00
Ignotus Peverell
01b66de437
Replace SHA3 with BLAKE2b everywhere 2017-07-20 13:52:33 +00:00
Ignotus Peverell
9703cba92a
Formatting 2017-07-20 13:52:33 +00:00
Yeastplume
26ce1d27d7 Updates to ensure multithreaded CI tests don't fail (#81)
Locks loading of miner plugins so it only ever happens once.
2017-07-19 16:40:57 +00:00
Ignotus Peverell
dca5504203
Run grin crate tests single-threaded 2017-07-18 21:22:30 +00:00
Yeastplume
42376e68bc Cuckoo-miner better merged into Grin (#80)
* Adding cuckoo-miner into grin as a proper dependency now
* Defaulting to using cuckoo-miner
* Updates to tests to use cuckoo_miner by default, (using cuckoo16)
2017-07-18 20:57:09 +00:00
Ignotus Peverell
40090fcdbc
Fix api & pool tests, add the crates to Travis 2017-07-18 17:33:49 +00:00
Yeastplume
1ede61d2a2 Addition of configuration file (#79)
* addition of configuration file to grin executable, instructions on how it's picked up are in grin.toml
* Starting to add a configuration file, and change some elements of configuration structures to make them more consistent
2017-07-13 17:30:33 +00:00
Merope Riddle
e2ebd854e1 [WIP] Implement Merkle-sum-tree (#40)
* core: partially implement sumtree; appending and pruning work
* core: add simple merkle-root-sum-calculating function. 
* core: implement replacement in sumtree
* core: implement de/serialization for sumtree
* core: make sumtree index use hashes rather than data
* core: prevent double-adds to sumtrees
* core: replace sumtree's separate sums with a Summable trait
* core: make SumTree::contains() return the index if an element exists
2017-07-12 18:59:18 +00:00
Yeastplume
12480e7310 Changes to allow for testing and playing with cuckoo-miner integration (#76)
* Refactoring to allow for different miner implementations. Added conditional support for compiling and loading the cuckoo-miner plugin project.
* Small changes to experimentally integrate with cuckoo-miner and compatibility with latest version of cuckoo-miner.
* Turning off inclusion of cuckoo_miner by default
* Disabling simulate_parallel_mining test for now
2017-07-11 17:11:03 +00:00
Jacob Payne
60705eff76 Use io::Read/Write interface instead of AsyncRead/AsyncWrite + Finish Tests (#74) 2017-07-05 18:42:55 +00:00
Ignotus Peverell
15ea8da34a
New Chain struct acting as facade for all chain operations
Introduce a new Chain struct that maintains the current head,
acts as facade to the store and the block processing pipeline
and handles all appropriate locking.

All higher level components, like the overall server, REST APIs
and miner have been update to only depend on Chain. Cleaned up
some duplication and tests now that there's a single entry point
to all blockchain operations.
2017-07-04 09:17:11 -07:00
Yeastplume
8974cbc12c POW Doc updates (#73)
* Clarifications to SHA3 hash and addition of progress-freeness concept in Pooling Capacity
* Update to cuckoo cycle details based on John Tromp's comments.
* A couple of typos
* More clarifications based on John Tromp's feedback
2017-07-03 17:39:20 +02:00
Yeastplume
efcbea3307 Clarifications to SHA3 hash and addition of progress-freeness concept in Pooling Capacity (#72) 2017-07-02 23:28:17 +02:00