Commit Graph

45 Commits

Author SHA1 Message Date
Ignotus Peverell ea1820cff7 Fixed usages of block constructor. 2016-11-30 11:15:23 -08:00
Ignotus Peverell 55f5771a2a Avoid unecessary move of the previous block header to build a block. 2016-11-29 20:05:35 -08:00
Ignotus Peverell 2e52b13c35 Date format uses year since 1900. 2016-11-29 20:04:13 -08:00
Ignotus Peverell 1ab9001338 Target needs to be truncated after next target calculation, given that serialization in the block header does it anyway. 2016-11-29 20:03:43 -08:00
Ignotus Peverell 11b8a6222a Any size pow accesible to tests. 2016-11-29 18:46:28 -08:00
Ignotus Peverell d11c85dae1 Fixed missing previous in block header. 2016-11-29 18:42:43 -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 44545525f4 Target addition and subtraction. A little more doc. 2016-11-15 14:41:16 -08:00
Roman Zeyde 151a0150b9 Fix a small typo in documentation 2016-11-14 21:21:18 +02:00
Ignotus Peverell f7b31dc5f3 Bitcoin-style target implementation. Large 32 byte number that can be compared and serializes truncated. 2016-11-13 21:04:01 -08:00
Garrick Ollivander 956dd6b816 fix file headers: Developer -> Grin Developer 2016-11-13 12:47:09 +01:00
Ignotus Peverell 2b8faf8709 A few more consensus values. 2016-11-10 17:19:03 -08:00
Ignotus Peverell d710301833 Missing consensus file. 2016-11-10 16:02:47 -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
Ignotus Peverell 4e9aad639e Formatting fixes. 2016-11-09 11:10:02 -08:00
Ignotus Peverell 8317854b70 Slight changes to transaction signature. The transaction fee gets signed (instead of the empty string) and the fee amount is attached to the transaction proof in blocks. This allows fee accounting and the tracking of fees within a block. 2016-11-09 11:05:44 -08:00
Ignotus Peverell ea425dc614 Protocol cleanup. Tests cleanup. Additional test for transaction broadcast. 2016-11-05 16:31:45 -07:00
Ignotus Peverell edc6c62577 Fixed message serialization following changes in core. Sending of block and transaction. 2016-11-01 10:42:33 -07: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 245f0a8b56 core/ser: add default implementations for most methods of Writer 2016-11-01 13:14:26 +00:00
Merope Riddle 630c4eb6fb core/ser: replace write_vec with write_bytes, drop a bunch of clones 2016-11-01 02:14:52 +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 2efa8ce706 Merge pull request #7 from GarrickOllivander/fix_merkle_tree_malleability
Fix Merkle tree malleability.
2016-10-30 18:18:40 -07:00
Ignotus Peverell 42769c373c Re-implemented the whole interaction between server, peer and protocol to be more Rust-ish. Server maintains peer references and protocol is internally mutable. 2016-10-29 12:36:45 -07:00
Garrick Ollivander 4e11aab1ea added comment to avoid this vulnarability sneaking back 2016-10-29 18:18:32 +02:00
Garrick Ollivander ab3ffafdcd fix merkle tree malleability 2016-10-29 17:55:47 +02: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
Ignotus Peverell 4657b09c4e WIP: more p2p code, mostly interaction between peer, protocol and server as well as ser/deser for first message types. 2016-10-24 21:35:10 -07:00
Ignotus Peverell 9f780f6865 Converse of deser macro to make serialization of structs less verbose. 2016-10-24 20:41:28 -07:00
Ignotus Peverell b50e1ab038 Simple macro to remove some of the verbosity in deserialization. 2016-10-24 17:43:14 -07:00
Merope Riddle 4b51610d9a core: move remaining contents of core/ser.rs into ser.rs 2016-10-23 19:50:58 +00:00
Merope Riddle 82adc54971 core: separate Transaction into its own module 2016-10-23 19:49:35 +00:00
Merope Riddle 2ea58d4478 core: move Block and BlockHeader into their own module 2016-10-23 13:53:29 +00:00
Merope Riddle 88b07791fa core: move Hash into its own module 2016-10-23 13:23:04 +00:00
Merope Riddle 7e2b271865 add doccomments for consensus comments 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 e5e908adde Merge pull request #1 from kanzure/trivial-typo-fixes
Fix some trivial typos
2016-10-22 00:47:20 -04: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
Bryan Bishop 2fff216491 fix some trivial typos 2016-10-21 10:17:33 -05:00
Ignotus Peverell f73a308bf3 Initial import. 2016-10-20 20:06:12 -04:00