Skip to content

feat: custom container definitions#78

Open
ensi321 wants to merge 1 commit into
masterfrom
feat/custom-container-types
Open

feat: custom container definitions#78
ensi321 wants to merge 1 commit into
masterfrom
feat/custom-container-types

Conversation

@ensi321

@ensi321 ensi321 commented May 27, 2026

Copy link
Copy Markdown
Contributor

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
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