onflow / atree

Atree provides scalable arrays and scalable ordered maps.
https://onflow.org
Apache License 2.0
39 stars 16 forks source link

Element size can exceed half of slab size #196

Closed fxamacker closed 2 years ago

fxamacker commented 2 years ago

Problem

Element can take up more than half of slab size because encoding overhead, such as digest, is not accounted for in MaxInlineElementSize and maxInlineMapElementSize.

This caused a problem reported in issue #193 and resolved in PR #194 for an edge case in NewMapFromBatchData.