Progressive data structures and tests EIP-7916, EIP-8016#8505
Progressive data structures and tests EIP-7916, EIP-8016#8505michaelsproul wants to merge 14 commits into
Conversation
|
I've made a bunch of progress on this, but it requires local checkouts of
Progressive bitlist tests are currently not passing, need to dig into why. The derive macro for progressive containers with 1 field works though 😅 |
| #[derive(Debug, Clone, PartialEq, Decode, Encode, TreeHash, Deserialize)] | ||
| #[tree_hash( | ||
| struct_behaviour = "progressive_container", | ||
| active_fields(0, 0, 0, 0, 1) | ||
| )] | ||
| #[context_deserialize(ForkName)] | ||
| struct ProgressiveSingleListContainerTestStruct { | ||
| C: ProgressiveBitList, | ||
| } |
There was a problem hiding this comment.
Looking for feedback on the UX of this.
I quite like this UX for progressive containers because it closely follows the spec. We can just copy the active_fields vec straight into the struct attributes.
|
Hi @michaelsproul (cc @macladson) !! I've been mapping SSZ progressive-type support across the Rust ecosystem for downstream EL adoption. Reading the four PRs together, the visible blockers seem to be:
If priorities pulled you elsewhere and you'd welcome help, I'd be glad to take on the rebase + spec-sync across the four PRs and close out those blockers. I'd do the work as draft PRs from a fork so you keep ownership of the design , happy to squash credit back to you and Mac on merge. Won't touch anything until you say go. Two questions before I'd start:
Happy to move this to Discord if easier. |
|
Hi @Zyra-V21 we've got it covered |
|
Closing in favour of: |
Proposed Changes
Run the EF tests for new types from EIP-7916 and EIP-8016:
ProgressiveListProgressiveBitListThe SSZ generic tests are passing if you run them without compiling the rest of Lighthouse:
Everything else is probably broken.
Additional Info
Depends on:
Known Issues
BitList<Progressive>::with_capacityhas created some type inference ambiguities causingstate_processingnot to compile. We should probably rename this method inethereum_ssz.unstablesince the types refactor nor the gloas-containers merge.