Closed fxamacker closed 10 months ago
Patch coverage: 62.23%
and project coverage change: -0.40%
:warning:
Comparison is base (
74e19aa
) 65.24% compared to head (a5c7323
) 64.84%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Updates #292 https://github.com/onflow/flow-go/issues/1744
Changes:
Currently, version number uses 1 byte and flags uses 1 byte.
We don't need 255 versions but we need more flags now in order to support atree inlining.
For now, reserve the first 4 bits for version (0-15), but also reserve the 5th bit separately so in the future, we can decide if we want to use 5th bit to have more versions (0-31) or a new flag.
So the first byte has (beginning with top bit): 1-4: version (0 to 15) and version 1 only uses 4th bit. 5: reserved to provide 16 more versions or another flag 6: reserved (use this for next new flag if needed) 7: slab has next slab ID (only relevant for data slab) 8: slab has inlined slabs (for atree inlining)
Atree inlining bumps version from 0 to 1. The top bit won't be needed until version 7, so it can be used to change this layout in the future if needed.
This PR is backward compatible and simpler than alternatives (e.g. doesn't reverse top bits, etc.).
main
branchFiles changed
in the Github PR explorer