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

Spec compliant HAMT keys #112

Closed
ZenGround0 opened this issue Sep 23, 2022 · 0 comments · Fixed by #113
Closed

Spec compliant HAMT keys #112

ZenGround0 opened this issue Sep 23, 2022 · 0 comments · Fixed by #113

Comments

@ZenGround0
Copy link
Collaborator

The fungible token state uses ActorIDs directly as keys in the HAMTs in its state. This is not spec compliant because ActorIDs serialize as cbor ints. This is something that the HAMT library should have caught with type checking but unfortunately this is not yet the case (filecoin-project/ref-fvm#900).

For now the right way to handle this is to wrap integer serializing keys in a byte serializing type here's an example in the power actor.

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 a pull request may close this issue.

1 participant