Paul Hauner
871163aecc
Add optimized SSZ decoding for fixed-len items ( #865 )
...
* Add custom SSZ decode for Validator
* Move efficient decode into macro
* Don't allocate SSZ offset to heap
* Use smallvec in SszDecoder
* Fix test compile error
2020-03-04 11:45:01 +11:00
Pawan Dhananjay
3ca63cfa83
Fix custom derive macros ( #621 )
2019-11-24 12:00:49 +11:00
Michael Sproul
3d559d8b41
Robustify derive macro attribute parsing ( #544 )
...
Missing whitespace in the implementation of `TokenStream::to_string` on
beta and nightly was breaking our parsing of derive macro attributes.
This change makes the parser ignore whitespace, and should make the beta
and nightly builds succeed again.
2019-09-28 14:29:14 +10:00
Paul Hauner
6a870d468c
Add ssz_fixed_len method to ssz::Encode
2019-09-08 12:23:37 -04:00
Paul Hauner
54bda210e2
Update ssz_derive for publishing to crates.io
2019-07-04 13:22:33 +10:00
Paul Hauner
027f0a539d
Prepare ssz for publishing on crates.io
2019-07-03 16:06:20 +10:00
Paul Hauner
4b753015d8
Remove commented-out code
2019-05-15 10:40:30 +10:00
Paul Hauner
a0148b5aae
Rename SSZ traits (Encodable -> Encode)
2019-05-13 15:12:19 +10:00
Paul Hauner
9f62f261c4
Run cargofmt --all
2019-05-13 12:29:26 +10:00
Paul Hauner
3ef46c03d1
Merge branch 'fixed-vec' into sos
2019-05-10 15:27:21 +10:00
Paul Hauner
5ba069c774
Implement new BeaconStateTypes
trait in types
2019-05-08 13:08:37 +10:00
Paul Hauner
759d0250c5
Clean out some occurances of SszStream
2019-05-06 19:50:05 +10:00
Paul Hauner
56fe63f78d
Improve allocations for SszEncoder
2019-05-06 09:58:31 +10:00
Paul Hauner
480c5ff160
Update SszEncoder
2019-05-06 09:26:58 +10:00
Paul Hauner
c5f00d1666
Update SSZ derive macro, create failing test
2019-05-05 12:11:25 +10:00
Paul Hauner
0bd5119f19
Replace ssz
with ssz2
, adapt ssz_derive
2019-05-04 14:11:48 +10:00
Paul Hauner
2527252248
Merge branch 'master' into 0.5.1-tests
2019-04-17 21:21:07 +10:00
Paul Hauner
b8c4c3308a
Update types
to new tree_hash crate
2019-04-16 14:14:38 +10:00
Paul Hauner
3eaa06d758
Remove tree hashing from ssz crate
2019-04-16 12:29:39 +10:00
Sean Yu
8cb6368fe6
Adding a #[signed_root(skip_hashing)] macro
...
Lets the user annotate fields of a struct to skip for signed root
hashing.
Also added tests in a `eth2/utils/tests` crate, so that we can test
whether these derived macros work as intended.
2019-04-15 09:40:45 -07:00
Paul Hauner
dffc26a466
Add field idents support to ssz_derive.
...
- Adds idents to skip ser, deser and tree hashing
2019-03-15 18:33:32 +11:00
mjkeating
d4f3bab68d
Updated TreeHash logic as per revised spec
2019-03-08 15:24:07 -08:00
Paul Hauner
15e4aabd8a
Add deposit processing, fix clippy lints
2019-03-07 16:15:38 +11:00
Paul Hauner
94122a7334
Add SignedRoot methods
2019-03-04 15:47:48 +11:00
mjkeating
8a768819b0
brought algorithm in TreeHash macro to spec
2019-03-02 09:59:01 -08:00
mjkeating
d7184345b8
renamed the macro Hashtree to TreeHash
2019-02-25 09:17:17 -08:00
mjkeating
f95a0134e6
now using the Hashtree macro for most struct types
2019-02-22 13:07:04 -08:00
Paul Hauner
59fd716286
Add extra comment to ssz_derive
2019-02-20 11:23:35 +13:00
Paul Hauner
586bb09e02
Set ssz_derive to import from ssz::
...
Previously it was expecting `Encodable`, `Decodable`, etc to be in
scope, now it uses `ssz::Encodable`.
2019-02-20 11:06:03 +13:00
Paul Hauner
abef6698b1
Fix failing doc examples in ssz_derive
2019-02-20 10:12:18 +13:00
Paul Hauner
5e67ddd498
Add docs to ssz_derive
2019-02-19 20:43:09 +13:00
Paul Hauner
b6f3156b4e
Run rustfmt on ssz_derive
2019-02-19 18:04:29 +13:00
Paul Hauner
fdfaf18dbd
Add ssz_derive
crate.
...
It appears to be fully functional at this stage.
2019-02-19 13:54:39 +11:00