Drops-of-Diamond / diamond_drops

WIP on sharding and Ethereum 2.0 with enshrined-in-consensus data availability and Rust: a fast, safe, concurrent and practical programming language
The Unlicense
57 stars 14 forks source link

Blob serialization v 5 + reorganizations #67

Closed jamesray1 closed 6 years ago

jamesray1 commented 6 years ago

Implements https://ethresear.ch/t/blob-serialisation/1705.

Uses structs for a chunk and a blob, which contain a data and indicator fields for chunks; and just one data field for blobs (for a blob of arbitrary size). Defines functions for instantiation and conversions between blobs, chunks, bytes. Has unit tests. Add constants instead of using literals.

TODO: serialization for when blobs are larger than a collation. Not a high priority for now. https://github.com/Drops-of-Diamond/diamond_drops/issues/68. This PR contains pseudocde for that. Update: serialization in #73 for blobs into new collations is added.

TODO: may need to rewrite this to not have a skip_evm flag as per https://ethresear.ch/t/blob-serialisation/1705/15.

Reorganizations