Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema definition and fully dynamic subschemas #68

Open
mitschabaude opened this issue Nov 5, 2024 · 0 comments
Open

Schema definition and fully dynamic subschemas #68

mitschabaude opened this issue Nov 5, 2024 · 0 comments
Assignees

Comments

@mitschabaude
Copy link
Member

We should create a well-defined way to define schemas, that feels general and not o1js-specific.

Support general data types:

  • strings (=> DynamicString), numbers (=> UInt64 or Field?), booleans (=> Bool)
  • records, (dynamic length) arrays

The above can be inferred from any JSON value!

Also, we'll need extra data types that need and annotated schema to be understood

  • Mina-specific types like Field, PublicKey
  • (add later) maybe fixed-length Arrays, Bytes, Strings
  • (add later) maybe foreign fields? whatever turns out to be useful later

Later, when creating the circuit, we should only need the rough form of the original schema that some data adhers to.

In particular:

  • need to pick a max size for strings/arrays, but don't have to know any (max) size that was picked for the original schema -- just that it's a string
  • only need partial schemas for records, and that should also work for nested records!
@mitschabaude mitschabaude self-assigned this Nov 5, 2024
This was referenced Nov 5, 2024
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

No branches or pull requests

1 participant