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