-
Notifications
You must be signed in to change notification settings - Fork 144
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
[VM] Address logic and code restructure #21
Conversation
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.
Awesome work!
Generally I feel like this should not "support" an undefined protocol/address. Looking at go-filecoin it seems they mostly return errors for these things, although they do sometimes return the undefined address as well. From a design perspective I think their implementation choice is kind of shitty and should be avoided here.
The goal was to keep logic and capabilities the same as the other implementations because of the lack of a defined spec on the addressing but thinking about it more it probably would be better to just wrap the address in an Option anytime it is used in other modules to achieve basically the same thing |
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.
New commits LGTM
Basically what the encoding and decoding does is be able to ambiguously decode addresses for the different addressing protocols (ID, Actor, Secp, BLS) and be able to encode them back to a consistent string. Other functionality includes encoding and decoding from bytes and verifying a checksum for a given address. Some random tests can be added for addresses, but I didn't think it was necessary.