Yeastplume
97b7421ce0
Mining test debug output, fixes to diff. adjustment and start of POW documentation ( #69 )
...
* Beginning to add a POW description, and some minor changes to mining testing, addition of further debug information to mining output.
* Many additions to create first draft of POW documentation
* Fixes to difficult adjustments by adding a MINIMUM_DIFFICULTY consensus value. Otherwise never adjusted above 1 due to flooring.
2017-06-29 16:49:11 +02:00
Ignotus Peverell
75f19ecfab
Fix difficulty tests, forgot to rename method
2017-06-20 10:21:31 -07:00
Ignotus Peverell
e8a6b61100
Apply new difficulty algo, remove configurable cuckoo size
...
Integrate the new difficulty calculation into the block chain
validation, the miner and tests. As the difficulty calculation
doesn't use varying Cuckoo sizes anymore and we narrowed down
reasonable final Cuckoo Cycle parameters, removed all Cuckoo
Cycle sizes from block headers.
Formalized easier Cuckoo Cycle sizes for testing (and possibly
testnet) by introducing a test mode in configuration. Updated
all tests.
2017-06-19 08:59:56 -07:00
Merope Riddle
39ddeb0a2a
core: various cleanups, improvements, code comments ( #38 )
...
* core: cleanup slicing impls for Hash
* core: clean up Readable trait, implement Readable/Writeable for various integers
* core: change Hash debug output to hex
* core: correct warnings in all modules
2017-04-09 23:17:23 -07:00
Ignotus Peverell
45b134ab30
PoW only ever needs the block header, full block unnecessary.
2017-02-07 13:48:11 -08:00
Ignotus Peverell
dda223f25b
Chain logic to support multiple forks, select the most worked fork as the head. Significantly simplified from the original direction as it doesn't seem that explicitly materializing forks is necessary. Simple total difficulty accounting in block headers helping a lot there.
2017-01-09 15:16:44 -08:00
Ignotus Peverell
85e3255ee4
Removed need for a PowHeader. Directly checking serialization mode in block header serialization instead.
2017-01-09 12:07:38 -08:00
Ignotus Peverell
ce23dda6cb
Block headers maintain total difficulty up to previous. Changed all references of target to difficulty to stay consistent. Ported retargeting algo to use difficulty as well.
2016-12-26 15:39:31 -08:00
Ignotus Peverell
c1340223de
Minor API change to PoW verify, to use the size provided by the block header by default.
2016-12-20 17:32:19 -08:00
Ignotus Peverell
11b8a6222a
Any size pow accesible to tests.
2016-11-29 18:46:28 -08:00
Ignotus Peverell
9795d9e452
Miner facility, using the current chain state to build on top of.
2016-11-27 12:31:15 -08:00
Ignotus Peverell
ca26f0c3f7
Block header needs its own deserialization. Fixed pow verify to use the block target.
2016-11-16 14:08:46 -08:00
Ignotus Peverell
3c5e2b2958
Block now uses the new Target type. Consensus next_target calculation adjusting every block based on deviation and increasing Cuckoo size gradually. Block time of a minute until we learn more from mining ecosystem, so enough PoW attempts can be made even on CPUs.
2016-11-15 14:41:16 -08:00
Ignotus Peverell
baeae7d1a5
Merged master.
2016-11-10 15:54:47 -08:00
Ignotus Peverell
4ade3ec1b8
Moved consensus related constants to their own core module.
2016-11-09 15:51:24 -08:00
Ignotus Peverell
6e2a232ca3
Cleaned up total fees from block header. Unnecessary now.
2016-11-09 13:25:40 -08:00
Merope Riddle
33ccfe3b65
core: remove several unused imports
2016-11-01 13:19:38 +00:00
Merope Riddle
ca89dae7e1
core: unify Hashed and Writeable to simplify things and remove allocations
2016-11-01 13:19:28 +00:00
Merope Riddle
bc38016385
core/ser: change serialization trait to use Result<(), Error> in place of Option<Error>
2016-11-01 02:14:52 +00:00
Ignotus Peverell
b1762cb5f4
p2p module getting close to first integration test allowing 2 peers to connect. Fleshed out handshake and protocol use. Fixed most errors, just need to make the borrow checker happy.
2016-10-25 22:06:13 -07:00
Merope Riddle
88b07791fa
core: move Hash into its own module
2016-10-23 13:23:04 +00:00
Merope Riddle
9644fb6a73
Add apache 2.0 license header to all source files
2016-10-23 13:20:39 +00:00
Ignotus Peverell
d3e4ecc100
Corrected spelling of Cuckoo Cycle here and there and updated easiness to 50% following @tromp feedback.
2016-10-21 18:02:20 -04:00
Ignotus Peverell
f73a308bf3
Initial import.
2016-10-20 20:06:12 -04:00