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

Do not use bitsize-dependent values in the GnoVM #3288

Open
thehowl opened this issue Dec 6, 2024 · 4 comments
Open

Do not use bitsize-dependent values in the GnoVM #3288

thehowl opened this issue Dec 6, 2024 · 4 comments
Assignees
Labels
🐞 bug Something isn't working in focus Core team is prioritizing this work 📦 🤖 gnovm Issues or PRs gnovm related

Comments

@thehowl
Copy link
Member

thehowl commented Dec 6, 2024

Like math.MinInt.

I realised while reviewing some code that values_conversions uses math.MinInt / math.MaxInt for float-integer conversion. This value will change if the GnoVM is compiled for 32-bits. We should find other similar values that depend on the integer size, and replace them to always have the value of an integer within the gnovm at 64-bits, independently of the underlying machine architecture.

@thehowl thehowl added 🐞 bug Something isn't working 📦 🤖 gnovm Issues or PRs gnovm related labels Dec 6, 2024
@thehowl thehowl added this to the 🚀 Mainnet launch milestone Dec 6, 2024
@thehowl thehowl moved this from Triage to Todo in 🧙‍♂️gno.land core team Dec 6, 2024
@thehowl thehowl moved this from Todo to Backlog in 🧙‍♂️gno.land core team Dec 6, 2024
@thehowl thehowl moved this from Backlog to Triage in 🧙‍♂️gno.land core team Dec 6, 2024
@Kouteki Kouteki moved this from Triage to Todo in 🧙‍♂️gno.land core team Dec 9, 2024
@Kouteki Kouteki added the in focus Core team is prioritizing this work label Dec 9, 2024
@petar-dambovaliev
Copy link
Contributor

I would like to hear more people's opinions. My immediate reaction is that maybe we shouldn't target 20 year old 32bit systems. Most libraries and software, including operating systems are removing that support. Why do we want to add it?

@mvertes
Copy link
Contributor

mvertes commented Dec 9, 2024

For the sake of simplicity, I think that we should not attempt to support 32 bits architectures. Gno is not meant for low-power embedded systems.

@mvertes
Copy link
Contributor

mvertes commented Dec 9, 2024

i.e. It's not the code itself, it's the cost of support. I do not see us to double the test, CI and maintenance efforts to support 32 bits systems (only armv7 relevant now).

@thehowl
Copy link
Member Author

thehowl commented Dec 9, 2024

yes, agreed; but we should still use 64-bit values everywhere under the hood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working in focus Core team is prioritizing this work 📦 🤖 gnovm Issues or PRs gnovm related
Projects
Development

No branches or pull requests

4 participants