forked from LedgerHQ/app-tezos-legacy
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use buffer reading functions #80
Merged
ajinkyaraj-23
merged 9 commits into
main
from
palmer@functori@use-buffer-reading-functions
Mar 22, 2024
Merged
Use buffer reading functions #80
ajinkyaraj-23
merged 9 commits into
main
from
palmer@functori@use-buffer-reading-functions
Mar 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spalmer25
force-pushed
the
palmer@functori@io-standard-process
branch
3 times, most recently
from
March 21, 2024 14:56
d896d17
to
72490ac
Compare
switch magic byte only once
The parse_next_type function is used to parse a wire structure. It fills in nexttype_subparser_state.body using nexttype_subparser_state.body.raw, then casts the data with the expected type. To be able to parse a wire structure using this function, the structure must be in the body union. Otherwise, the parser may not have enough space to contain the entire structure. The largest structure in nexttype_subparser_state.body is operation_group_header (32 bytes), the nexttype_subparser_state.body can therefore contain a maximum of 32 bytes. As the size of the public key depends on the key curve, no fixed size structure was added to nexttype_subparser_state.body. But since a public key can contain 33 bytes, a byte was missed in nexttype_subparser_state.body. This commit adds a new structure to be able to parse the public key
spalmer25
force-pushed
the
palmer@functori@use-buffer-reading-functions
branch
from
March 22, 2024 10:13
2c7b7ff
to
fa77829
Compare
Can you rebase on main? it will be easier to review. |
Also if its not draft stage, please change the target branch to main |
spalmer25
changed the base branch from
palmer@functori@io-standard-process
to
main
March 22, 2024 12:03
ajinkyaraj-23
approved these changes
Mar 22, 2024
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.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR use function on buffer.
This makes the code clearer and closer to what is done in LedgerHQ/app-boilerplate
It prepares issue #74
Depends on #79