Skip to content

feat: custom container definitions#78

Merged
wemeetagain merged 1 commit into
masterfrom
feat/custom-container-types
Jul 22, 2026
Merged

feat: custom container definitions#78
wemeetagain merged 1 commit into
masterfrom
feat/custom-container-types

Conversation

@ensi321

@ensi321 ensi321 commented May 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a custom option to the FORK dropdown that reveals a Python-DSL textarea for defining ad-hoc SSZ containers (consensus-specs class Foo(Container): syntax).
  • Enables serialize/deserialize/structure-view for types from unreleased forks (e.g. Gloas) without waiting for them to land in @lodestar/types.
  • Parser supports multiple class blocks (top-down refs), generics (List/Vector/Bitlist/Bitvector/ByteList/ByteVector) with int-literal or @lodestar/params constant sizes, and built-in primitives (uint8..256, boolean). Field idents not defined locally resolve against forks.fulu.
  • DSL compiles in both main thread (for the in-memory Type instance used by the UI) and the worker (for ssz ops), debounced 300ms.
Screenshot 2026-05-26 at 7 31 29 PM

🤖 Generated with Claude Code

Add a "custom" fork option that reveals a Python-DSL textarea for defining
ad-hoc SSZ containers using consensus-specs syntax. Lets users serialize/
deserialize types from unreleased forks or one-off shapes without waiting
for them to land in @lodestar/types.

Parser accepts multiple `class Foo(Container):` blocks, resolves field
type idents against forks.fulu and built-in primitives (uint8..256,
boolean), and accepts either integer literals or @lodestar/params
constants for List/Vector/Bitlist/Bitvector/ByteList/ByteVector sizes.
Compilation runs in both main thread (for the UI Type instance) and the
worker (for serialize/deserialize), debounced 300ms.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@wemeetagain

Copy link
Copy Markdown
Member

sweet

@ensi321
ensi321 marked this pull request as ready for review May 27, 2026 19:25
@wemeetagain
wemeetagain merged commit a4cad5e into master Jul 22, 2026
5 checks passed
@wemeetagain
wemeetagain deleted the feat/custom-container-types branch July 22, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants