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
GarrickOllivander
2e6d3d9fdb
Safer serialization of base types ( #18 )
...
* use MESSAGE_SIZE constant instead of 32
* use Hashed trait in genesis
* safer serialization of Hash
* Hashed of [u8] should send only data to hash function, not length + data
* Safer serialization of Proof
* Safer serialization of Commitment
* Safer serialization of RangeProof
* introduce read_limited_vec instead of potential panic in conversion
2016-12-17 13:44:14 -08:00
Ignotus Peverell
4b5c010b05
Rewrote most of p2p code to use futures-rs instead of mioco. Need some cleanup and support for a few more message types.
2016-12-10 19:11:49 -08:00
Ignotus Peverell
4ade3ec1b8
Moved consensus related constants to their own core module.
2016-11-09 15:51:24 -08: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
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
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
9644fb6a73
Add apache 2.0 license header to all source files
2016-10-23 13:20:39 +00:00
Ignotus Peverell
f73a308bf3
Initial import.
2016-10-20 20:06:12 -04:00