Commit Graph

28 Commits

Author SHA1 Message Date
Henry de Valence f04f4f0b98 Apply clippy fixes 2020-02-05 12:42:32 -08:00
Deirdre Connolly 4fcb66ad3b Read and write the block header version, which is fixed at 4 2020-02-04 18:04:53 -05:00
Deirdre Connolly 9b6a9d8e86 Remove debugging variable assignments 2020-02-04 18:04:53 -05:00
Deirdre Connolly 36e9bb162f Move block type tests and proptest support impls to block::tests 2020-02-04 18:04:53 -05:00
Deirdre Connolly 6508540a92 Remove derive(Arbitrary) on BlockHeader 2020-02-04 18:04:53 -05:00
Deirdre Connolly b758a8f753 Extend blockheaderhash unit test to check a single (de)serialization case roundtrip 2020-02-04 18:04:53 -05:00
Deirdre Connolly dab99ba861 Impl Zcash(De)Serialization for Block 2020-02-04 18:04:53 -05:00
Deirdre Connolly f5c135ee1b Use updated EquihashSolution in BlockHeader 2020-02-04 18:04:53 -05:00
Deirdre Connolly e82cf0f5a8 Add BlockHeaderHash (de)serialization roundtrip proptest 2020-02-04 18:04:53 -05:00
Deirdre Connolly 69164a6943 Add test for BlockHeaderHash::from(BlockHeader) 2020-02-04 18:04:53 -05:00
Deirdre Connolly 29e1be2442 Impl Zcash(De)Serialize for BlockHeader 2020-02-04 18:04:53 -05:00
Deirdre Connolly 65d988471a Implement custom Debug for Sha256dChecksum
Relates to #63
2019-10-17 09:33:10 -07:00
Deirdre Connolly 539a16979b Implement custom Debug impl for BlockHeaderHash
Includes a testcase and write_all implementation for Sha256dWriter.

Related to #63
2019-10-17 09:33:10 -07:00
Deirdre Connolly dd1b9166b0 Implement Zcash(De)Serialize for BlockHeaderHash, use general read_list for getheaders/headers 2019-10-09 22:25:37 -04:00
Henry de Valence 47513b1ae7 Suppress warnings from stub functions.
This just replaces a bunch of variable names with underscored variants
while the function bodies are still `unimplemented!()`.
2019-09-30 21:32:57 -04:00
Deirdre Connolly 29591df47e Use the BlockHeaderHash from zebra-chain in the Inv message parsing 2019-09-27 19:22:34 -07:00
Deirdre Connolly 4e85bdb51b Explain in BlockHeaderHash docstrings block hash vs block header hash 2019-09-26 23:41:25 -04:00
Deirdre Connolly df5a5f56dd Add equihash_solution to the lib.rs, impl Zcash(De)Serialize for Block 2019-09-26 23:41:25 -04:00
Deirdre Connolly 3f2a1b4f2c Move around MerkleTree* structs 2019-09-26 23:41:25 -04:00
Deirdre Connolly 677d53897f Use Vec<u8> for the equihash solution instead of [u8; 1344] for now 2019-09-26 23:41:25 -04:00
Deirdre Connolly c4547ea806 Derive Clone, Debug, Default, Eq, and PartialEq for new structs 2019-09-26 23:41:25 -04:00
Deirdre Connolly 38015c11a6 Add stubbed-out *NoteCommitmentTree* structs 2019-09-26 23:41:25 -04:00
Deirdre Connolly 90e5ae2f4b Add improved doc comments 2019-09-26 23:41:25 -04:00
Deirdre Connolly cecbb1cc0a Fill out the Block Message type
Should we serialize out `Block` or leave explicit like so? ¯\_(ツ)_/¯
2019-09-26 23:41:25 -04:00
Deirdre Connolly 0f84a6d38e Implement Zcash(De)serialize traits specifically for MerkleTree<Transaction>
This is a general placeholder for now.
2019-09-26 23:41:25 -04:00
Deirdre Connolly 7340c7d9ce Adding BlockHeader, BlockHash, MerkleRootHash, Sha256dWriter 2019-09-26 23:41:25 -04:00
Deirdre Connolly 00494d4963 Block and BlockHeader types 2019-09-26 23:41:25 -04:00
Deirdre Connolly ac0d9732a0 WIP: Version message and various sub structures
Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
2019-09-18 17:32:06 -04:00