-
Notifications
You must be signed in to change notification settings - Fork 2
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
More int types #164
More int types #164
Conversation
0a0d542
to
4b7202a
Compare
15d9129
to
0c6f064
Compare
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.
Just for clarification, this modification now allows us to use unsupported types in our contracts, right? And the types will be handled by K as normal integers, without any special handling such as representing them using structs or tuples.
It seems clear to me, and I have no problems with it for our demos.
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.
I did some research and confirmed that u256
is not a valid type in Rust, unless you are using some external libraries.
And the documentation in MultiverseX contract uses biguint
and bigint
to represent large numbers exceeding u64
.
The rust builtin implementation of biguint
can be referenced here.
Although, we might want to take shortcuts for Devcon demo, we should still maintain rust contract legal. What do you think?
The rest of the implementation looks fine for me.
Yes. This is not a good solution in general, but it saves time for the demo. |
I know. There are two issues here:
I mostly agree. My original plan was to implement a U256 type as a struct in Rust (for which we would have to fake implementations for operators somehow, and we would need to make encoding and decoding work for structs; we would also have a choice between making However, I think that some of the leaders (Ilia or Xiaohong or both) said that adding the u256 type as a fake native type is an acceptable solution, so, while I dislike it, that's what I ended up doing.
|
@virgil-serbanuta I agree, we should work on more urgent task then. Thanks for the explanation. |
Fixes #127