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

MessageParams update and refactor #175

Merged
merged 4 commits into from
Jan 21, 2020
Merged

Conversation

austinabell
Copy link
Contributor

@austinabell austinabell commented Jan 20, 2020

  • Updated message parameter serialization and tested against messages on filecoin network. The spec previously stated that the parameters would be serialized bytes in an array, so this was the goal to deserialize as much as possible from the message so they are not just left as bytes. Now that the spec has changed and it became clear when trying to decode messages from the lotus client that this must be the format for deserialization.
    • Basically what happens now is the parameters are deserialized as cbor encoded bytes, so it's cbor encoding inside of cbor encoding (which I was trying to avoid if possible) but also this does allow for other types of byte deserialization in the future without preset parameters defined.
  • Updated and removed parts of the vm where the spec previously defined that arguments would be in this array of bytes and arguments would be popped from the stack when needed. It was removed from the spec and instead they just deserialize to predefined structures (which means we have to match the encoding format for every single parameter type, probably makes sense to make the proc macro now)

Please ask questions on the changes if things are unclear why I'm changing and removing things, I may not have explained everything

Copy link
Contributor

@dutterbutter dutterbutter left a comment

Choose a reason for hiding this comment

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

LGTM 🔥🔥

@austinabell austinabell merged commit 925d271 into master Jan 21, 2020
@austinabell austinabell deleted the austin/params/encodingformat branch January 21, 2020 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
encoding hashing and serialization Status: Needs Review VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants