Skip to content

Use same type for block number #2509

Description

@PropzSaladaz

Description

  • Right now we treat block numbers as different integer types in different parts of the code, so there isn’t one clear “source of truth” for what range is actually valid
  • In practice, the system can only go as high as the most restrictive type in the path, which puts the current ceiling at roughly 4 billion blocks (about 4.29B).
  • That mismatch is risky at high block heights: values can be narrowed or collide with special marker values, which can lead to incorrect behavior across components.

Some concrete examples of block-number types currently used:

  • unsigned (via BlockNumber)
  • int (used in some parsing/temporary paths)
  • uint64_t (used in storage/progress-related code)
  • int64_t (used in some VM/execution context fields)
  • size_t (used in a few progress/callback signatures)
  • u256 (appears in error-info/metadata contexts)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions