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

Bytecode spec #61

Merged
merged 9 commits into from
Nov 2, 2022
Merged

Bytecode spec #61

merged 9 commits into from
Nov 2, 2022

Conversation

0rphon
Copy link
Contributor

@0rphon 0rphon commented Nov 1, 2022

this PR does 2 things:

  1. it reworks the way our IR is conveyed so that the protobuf holds as much info on instruction/type structure as possible. the gist of the issue is outlined in proto spec doesnt convey instruction structure #52, but there were a bunch of other places i found the same issues outside of just Instruction. now instead of relying on partially filled structs and enums it uses the proper oneof keyword to generate the correct structures. Not only does this make our provided IR implementation much easier to work with/understand, it also eliminated the need to do any complex decoding of the protobuf inside the IR.

  2. this pr adds a bytecode spec! this is achieved by adding comments to the .proto files then using the repo protoc-gen-doc to automatically generate documentation from it.

a bug currently exists in protoc-gen-doc that makes generating markdown files annoying as detailed in #65

closes #36 and #52

@0rphon 0rphon self-assigned this Nov 1, 2022
@Slickbird Slickbird added this to the Testnet1 milestone Nov 1, 2022
@0rphon 0rphon marked this pull request as ready for review November 1, 2022 22:28
Copy link
Contributor

@gluax gluax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small thing otherwise LGTM

snarkd_ir/proto/opcode.proto Outdated Show resolved Hide resolved
@0rphon 0rphon linked an issue Nov 1, 2022 that may be closed by this pull request
2 tasks
@0rphon 0rphon merged commit 54b7dee into main Nov 2, 2022
@0rphon 0rphon deleted the bytecode-spec branch November 2, 2022 17:21
@gluax gluax removed this from the Testnet1 milestone Nov 15, 2022
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.

proto spec doesnt convey instruction structure [docs] Bytecode Spec
3 participants