Commit Graph

19 Commits

Author SHA1 Message Date
Preston Van Loon
5adbaa2e23
Add example encoding for godoc ssz (#1687)
* Add example encoding for godoc ssz

* A bit more comments

* Add comment about fatal error
2019-02-22 12:50:28 -05:00
Ivan Martinez
0d29b2cd91 Makes test naming consistent across codebase (#1636) 2019-02-22 07:11:26 -08:00
Raul Jordan
ae13bb5c83
Use Tree Hashing Algorithm Everywhere for Block Roots and State Root (#1577)
* begin using tree hash instead of hash for state and blocks

* replace with ssz

* rem references to vote cache

* replace all instances of state/block hash with root

* goimports

* almost every test in the world fails

* goimports

* all tests pass, tree hash across repo
2019-02-14 14:04:47 -06:00
Jie Hou
d620361233 Support typed nil pointer in tree hash (#1590) 2019-02-14 09:22:12 -06:00
Jie Hou
52a21b6314 Support Encode/Decode of Nil Pointer (#1553)
* Support encoding/decoding against nil pointer

* Fix comments

* Small fix
2019-02-12 09:17:56 +05:30
Raul Jordan
cec6c8de83 Standardize Naming of Shared Packages, Remove Deprecated Packages (#1435)
* rem txpool

* standardize repo shared utils, remove deprecated items

* complete

* package lvl godoc
2019-01-31 10:53:58 +08:00
Jie Hou
4a383de5b4 More Strict Input Length Check when Decoding Struct (#1409) 2019-01-28 11:41:11 +01:00
Antoine Toulme
fde3d782ca use little endian for the data length encoding when performing a merkle hash (#1350) 2019-01-23 10:18:45 +08:00
Nishant Das
7ff544fddf
Fix travis and Other Linter Errors (#1356)
* fix travis and other linter errors

* remove megacheck
2019-01-21 13:35:34 +08:00
Jie Hou
247e8a5f8c SSZ: Switch to Little Endian (#1354)
* Change encode to little endian

* Fix decode
2019-01-21 12:44:17 +08:00
terence tsao
e313e97666
Implement Validator Rotation Logic (#1279) 2019-01-13 12:52:31 -08:00
Andrei Ivasko
b29188128d ToBytes32 (#1306) 2019-01-13 09:04:14 -05:00
Jie Hou
e5d92a5e11 Implement SSZ Tree Hash Algorithm (#1211) 2019-01-02 11:14:12 -08:00
Jie Hou
b82b80a216 Remove Struct Fields Ordering for SSZ Encoding/Decoding (#1214) 2018-12-30 17:02:06 -08:00
Raul Jordan
a4e1e8cc08
Ignore XXX Fields in XXX SSZ Encoding (#1195)
* ignore XXX fields in struct

* fix encode
2018-12-28 23:12:27 -06:00
Raul Jordan
5d26efcfaa
Deprecate types.BeaconState with pb.BeaconState Generated Proto (#1164) 2018-12-23 16:51:04 -06:00
Jie Hou
337f6ae58c SSZ: Support Pointer and Array (#1114) 2018-12-20 06:51:12 -08:00
Jie Hou
d38f3be8b9 SSZ: Support More Types (#1079)
* Add uint32 and uint64 support

* Add sample usage and its test

* BUILD file fix

* Add period in go doc comments.
2018-12-14 12:35:32 -06:00
Jie Hou
258fba8d45 Preliminary Implementation of SSZ (#1039)
* WIP: support uint8 and uint16

* WIP: Supports encode/decode for bytes

* WIP: Add encode/decode for slice

* WIP: Add struct encoding

* WIP: Add decoder for struct

* WIP: fix tests

* WIP: Aggregating tests

* WIP: data driven test

* WIP: implemented more decode tests

* WIP: Clean code and add more error check

* WIP: more polishing

* WIP: Added optional encode size calculation pass

* WIP: Improve error message reporting

* WIP: Add encoderDecoderCache

* Fix bazel

* Rearrange code

* Fix lint

* Address Nishant's comment

* Fix comments
2018-12-11 10:15:37 +08:00