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

upper bound checks for integer conversion #2658

Closed
xenowits opened this issue Oct 26, 2023 · 0 comments
Closed

upper bound checks for integer conversion #2658

xenowits opened this issue Oct 26, 2023 · 0 comments
Assignees
Labels
protocol Protocol Team tickets v0.18.0

Comments

@xenowits
Copy link
Contributor

xenowits commented Oct 26, 2023

🎯 Problem to be solved

Fix codeql errors about unsafe integer conversion:

Incorrect conversion of an unsigned 64-bit integer from  to a lower bit size type int64 without an upper bound check.

See https://github.com/ObolNetwork/charon/pull/2650/checks?check_run_id=18076838602

🛠️ Proposed solution

Convert int64s to uint64s according to the ethereum specification doc.

@xenowits xenowits self-assigned this Oct 26, 2023
@github-actions github-actions bot added the protocol Protocol Team tickets label Oct 26, 2023
obol-bulldozer bot pushed a commit that referenced this issue Nov 6, 2023
Convert `Duty.Slot` from int64 to uint64.

This is recommended according to ethereum consensus specs: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types

category: feature 
ticket: #2658
@xenowits xenowits closed this as completed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol Protocol Team tickets v0.18.0
Projects
None yet
Development

No branches or pull requests

1 participant