-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix binary protocol serialisation examples to align with reality #46
Conversation
The witness is prepended wit more information than currently stated / it's unclear.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
// Full witness -> [uint32(nbPublicElements) | uint32(nbPrivateElements) | uint32(nbElements) | publicVariables | secretVariables] | ||
// Public witness -> [uint32(nbElements) | publicVariables ] | ||
``` | ||
|
||
Where: | ||
|
||
- `nbPublicElements == len(publicVariables)`. | ||
- `nbPrivateElements == len(secretVariables)`. | ||
- `nbElements == len(publicVariables) + len(secretVariables)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could probably just use len(...)
directly above TBH
Nice catch, thanks for the contribution. |
The witness is prepended with more information than currently stated / it's unclear.
NB: I am not certain if this is a documentation mistake and working as intended or if it's actually not working as intended.
As far as I can tell from the code, the docs are wrong and the "full nb of element" is only serialised by happenstance because Golang does it by default for vectors.