-
Notifications
You must be signed in to change notification settings - Fork 16
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
Merge feature/array-map-inlining
(atree inlining feature branch) to main
#429
Merge feature/array-map-inlining
(atree inlining feature branch) to main
#429
Commits on Sep 14, 2023
-
Inline child array/map data slab into parent slab
Currently, every array or map are stored in its own slab and parent slab refers to child array or map by SlabID. The current approach can lead to many small slabs, especially for Cadence data structures with multiple nested levels. This commit inlines child array/map in parent slab when: - child array/map fits in one slab (root slab is data slab) - encoded size of inlined child array/map is less than the max inline size limit enforced by parent This commit optimizes encoding size by: - reusing inlined array types - reusing seed, digests, and field names of inlined composite types Also update debugging code to handle inlined array/map element.
Configuration menu - View commit details
-
Copy full SHA for d6f3daa - Browse repository at this point
Copy the full SHA d6f3daaView commit details
Commits on Sep 17, 2023
-
Check overwritten value in parentUpdater callback
Currently, in parentUpdater callback, parent array/map resets same child value. Child value ID should match overwritten SlabIDStorable or Slab.SlabID(). This commit adds check to make sure same child value is being reset.
Configuration menu - View commit details
-
Copy full SHA for 6f25137 - Browse repository at this point
Copy the full SHA 6f25137View commit details
Commits on Sep 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 399684a - Browse repository at this point
Copy the full SHA 399684aView commit details
Commits on Sep 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c178a72 - Browse repository at this point
Copy the full SHA c178a72View commit details -
Configuration menu - View commit details
-
Copy full SHA for efc46e6 - Browse repository at this point
Copy the full SHA efc46e6View commit details
Commits on Sep 20, 2023
-
Add notification in Set and Insert in Array
This commit adds callback notification in the set or inserted child element in array. So if child element is modified after Array.Set() or Array.Insert(), changes to child element is properly reflected in the parent array. This commit doesn't appear to be needed by current version of Cadence but it helps reduce Atree's dependence on an implementation detail of Cadence.
Configuration menu - View commit details
-
Copy full SHA for 1664e36 - Browse repository at this point
Copy the full SHA 1664e36View commit details -
Add notification in Set in OrderedMap
This commit adds callback notification in the set child element in map. So if child element is modified after OrderedMap.Set() , changes to child element is properly reflected in the parent map. This commit doesn't appear to be needed by current version of Cadence but it helps reduce Atree's dependence on an implementation detail of Cadence.
Configuration menu - View commit details
-
Copy full SHA for feb6adf - Browse repository at this point
Copy the full SHA feb6adfView commit details
Commits on Sep 21, 2023
-
Deduplicate composite by type ID and field names
Currently, deduplication feature in PR 342 (not merged yet) does not support Cadence attachments. Add support for Cadence attachments and other future use cases by using type ID and sorted field names instead of field count. While at it, also refactor encoding composite type to reduce traversal and type assertion.
2Configuration menu - View commit details
-
Copy full SHA for 0d57f80 - Browse repository at this point
Copy the full SHA 0d57f80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1643589 - Browse repository at this point
Copy the full SHA 1643589View commit details -
Use new ExtraData for inlined slab during decoding
Decoded ExtraData (including TypeInfo) can be shared by all inlined slabs. This commit creates a new ExtraData with copied TypeInfo for inlined slabs to prevent accidental mutation.
Configuration menu - View commit details
-
Copy full SHA for 72d3614 - Browse repository at this point
Copy the full SHA 72d3614View commit details -
Copy key for inlined composite during decoding
Decoded ExtraData (including keys) can be shared by all inlined composite referring to the same type. This commit copies key for inlined composite to prevent accidental mutation.
Configuration menu - View commit details
-
Copy full SHA for f66a85b - Browse repository at this point
Copy the full SHA f66a85bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f8e0992 - Browse repository at this point
Copy the full SHA f8e0992View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3584952 - Browse repository at this point
Copy the full SHA 3584952View commit details -
Configuration menu - View commit details
-
Copy full SHA for dc8a567 - Browse repository at this point
Copy the full SHA dc8a567View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5194eee - Browse repository at this point
Copy the full SHA 5194eeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7375b82 - Browse repository at this point
Copy the full SHA 7375b82View commit details -
Add more comments for Array and OrderedMap
Some of the comments were taken from Atree's README which was originally authored by Ramtin. Co-authored-by: Ramtin M. Seraj <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d49d6b4 - Browse repository at this point
Copy the full SHA d49d6b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f56232f - Browse repository at this point
Copy the full SHA f56232fView commit details
Commits on Sep 22, 2023
-
Validate map key/value size <= max limit in tests
While at it, also refactored validMapSlab().
Configuration menu - View commit details
-
Copy full SHA for 24aa117 - Browse repository at this point
Copy the full SHA 24aa117View commit details -
Validate ValueID and SlabID for arrays in tests
While at it, also refactored validArraySlab().
Configuration menu - View commit details
-
Copy full SHA for 15bde12 - Browse repository at this point
Copy the full SHA 15bde12View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27aa4cb - Browse repository at this point
Copy the full SHA 27aa4cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d8ff98 - Browse repository at this point
Copy the full SHA 5d8ff98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cd8c0c - Browse repository at this point
Copy the full SHA 6cd8c0cView commit details
Commits on Sep 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 43edeca - Browse repository at this point
Copy the full SHA 43edecaView commit details -
Test inlined array slabs are not in storage
Currently, ValidArray() doesn't verify that inlined array slabs are in not storage. It is called by tests in Atree and Cadence, so update it to check if inlined array slabs are in storage.
Configuration menu - View commit details
-
Copy full SHA for 119f6c5 - Browse repository at this point
Copy the full SHA 119f6c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for efcb2a2 - Browse repository at this point
Copy the full SHA efcb2a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5af0bc4 - Browse repository at this point
Copy the full SHA 5af0bc4View commit details -
Configuration menu - View commit details
-
Copy full SHA for a71e7f8 - Browse repository at this point
Copy the full SHA a71e7f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d8a4e8 - Browse repository at this point
Copy the full SHA 2d8a4e8View commit details
Commits on Sep 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for ed36d65 - Browse repository at this point
Copy the full SHA ed36d65View commit details
Commits on Sep 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 04f93a2 - Browse repository at this point
Copy the full SHA 04f93a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 00a6df8 - Browse repository at this point
Copy the full SHA 00a6df8View commit details
Commits on Sep 27, 2023
-
Add ReadOnly iterators and refactor other iterators
This change: - Adds ReadOnly iterators that match current iterator API (except for the "ReadOnly" suffix added to some function names). - Refactors API of non-Readonly iterators because register inlining will require more parameters for MapIterator. For ReadOnly iterators, the caller is responsible for preventing changes to child containers during iteration because mutations of child containers are not guaranteed to persist. For non-ReadOnly iterators, two additional parameters are needed to update child container in parent map when child container is modified.
Configuration menu - View commit details
-
Copy full SHA for d3de291 - Browse repository at this point
Copy the full SHA d3de291View commit details
Commits on Sep 29, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e88a73e - Browse repository at this point
Copy the full SHA e88a73eView commit details
Commits on Oct 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a75e388 - Browse repository at this point
Copy the full SHA a75e388View commit details -
Uninline slab when it is overwritten or removed
Currently, Set() and Remove() return overwritten or removed storable. If storable is inlined slab, it is not stored in storage (because it is removed from its parent slab which is in storage), so any future changes to it would be lost. On the other hand, if overwritten or removed storable is SlabIDStorable, any future changes to it can still be persisted because it is in its own slab in storage. This inconsistency (not merged or deployed yet) can cause potential data loss or unexpected behavior if deployed. This commit uninlines inlined slabs that is overwritten or removed, stores them in storage, and returns their SlabID as storable to caller.
Configuration menu - View commit details
-
Copy full SHA for 042eb68 - Browse repository at this point
Copy the full SHA 042eb68View commit details
Commits on Oct 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f17354c - Browse repository at this point
Copy the full SHA f17354cView commit details -
Prune Array.mutableElementIndex in Set and Remove
This commit prunes Array.mutableElementIndex by: - deleting overwritten element from mutableElementIndex - deleting removed element from mutableElementIndex While at it, add more checks for index in mutableElementIndex: - can't exceed number of array elements - can't be less than 0 For context, Array.mutableElementIndex contains mutable element's updated index in parent array. When parent array is modified, index in mutableElementIndex is updated.
Configuration menu - View commit details
-
Copy full SHA for 1a2e69f - Browse repository at this point
Copy the full SHA 1a2e69fView commit details -
No-op on parentUpdater() if child isn't in parent
This commit checks if child is in parent container at adjusted index or under the same key in parentUpdater() before modifying parent container. If child is no longer part of parent, parentUpdater() returns with no-op, and this callback is set to nil. This is to handle outdated child reference modifying parent after it is removed.
Configuration menu - View commit details
-
Copy full SHA for 63ea7a7 - Browse repository at this point
Copy the full SHA 63ea7a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 53a716f - Browse repository at this point
Copy the full SHA 53a716fView commit details -
Use unsafe.Sizeof instead of magic number
Previously, the constant expression used hardcoded numbers.
Configuration menu - View commit details
-
Copy full SHA for 7a2aeb1 - Browse repository at this point
Copy the full SHA 7a2aeb1View commit details -
Add comment for potential overlapping tag nums in Cadence
Currently, Atree uses CBOR tag numbers [247, 255] and grows downwards. Cadence uses CBOR tag numbers [128, 224] and grows upwards. There MUST not be any overlap. This commit adds comment to warning about overlapping. We can be more proactive about this by dividing up the remaining available tag numbers between Cadence and Atree. NOTE: A similar comment will be added to Cadence repo at github.com/onflow/cadence when the next atree-cadence integration PR is opened.
Configuration menu - View commit details
-
Copy full SHA for e6fa347 - Browse repository at this point
Copy the full SHA e6fa347View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03acd49 - Browse repository at this point
Copy the full SHA 03acd49View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90be7ac - Browse repository at this point
Copy the full SHA 90be7acView commit details -
Configuration menu - View commit details
-
Copy full SHA for f3fdb2d - Browse repository at this point
Copy the full SHA f3fdb2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2775ff5 - Browse repository at this point
Copy the full SHA 2775ff5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 836eb70 - Browse repository at this point
Copy the full SHA 836eb70View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b3c26c - Browse repository at this point
Copy the full SHA 4b3c26cView commit details
Commits on Oct 3, 2023
-
Check duplicate SlabID in inlined slabs in tests
This commit adds an extra check in exported validation functions that are only used for tests in Atree but can also be used by Cadence.
Configuration menu - View commit details
-
Copy full SHA for 3f87ec5 - Browse repository at this point
Copy the full SHA 3f87ec5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 903fc13 - Browse repository at this point
Copy the full SHA 903fc13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d02bbc - Browse repository at this point
Copy the full SHA 8d02bbcView commit details -
Merge branch 'fxamacker/inline-array-and-map' into fxamacker/add-keyc…
…omparator-and-hashinputprovider-to-mapiterator
Configuration menu - View commit details
-
Copy full SHA for 5df8b16 - Browse repository at this point
Copy the full SHA 5df8b16View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a6091a - Browse repository at this point
Copy the full SHA 2a6091aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c07907d - Browse repository at this point
Copy the full SHA c07907dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f671189 - Browse repository at this point
Copy the full SHA f671189View commit details
Commits on Oct 4, 2023
-
Merge pull request #345 from onflow/fxamacker/add-keycomparator-and-h…
…ashinputprovider-to-mapiterator Add readonly iterators and support value mutations only from non-readonly iterators
Configuration menu - View commit details
-
Copy full SHA for 5f1de0a - Browse repository at this point
Copy the full SHA 5f1de0aView commit details -
Merge pull request #342 from onflow/fxamacker/inline-array-and-map
Inline child array and map data slab into parent slab
Configuration menu - View commit details
-
Copy full SHA for 0fc8f74 - Browse repository at this point
Copy the full SHA 0fc8f74View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5eb2db8 - Browse repository at this point
Copy the full SHA 5eb2db8View commit details -
Configuration menu - View commit details
-
Copy full SHA for e61ba40 - Browse repository at this point
Copy the full SHA e61ba40View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c6f631 - Browse repository at this point
Copy the full SHA 0c6f631View commit details -
Configuration menu - View commit details
-
Copy full SHA for c59afb8 - Browse repository at this point
Copy the full SHA c59afb8View commit details
Commits on Oct 5, 2023
-
Add "slabcheck" flag to smoke test
This commit adds flag "slabcheck" to enable checking in-memory and serialized slabs. This flag is off by default because it can take a long time to run.
Configuration menu - View commit details
-
Copy full SHA for acf4b70 - Browse repository at this point
Copy the full SHA acf4b70View commit details -
Configuration menu - View commit details
-
Copy full SHA for b739b50 - Browse repository at this point
Copy the full SHA b739b50View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff9d5a9 - Browse repository at this point
Copy the full SHA ff9d5a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for a10af61 - Browse repository at this point
Copy the full SHA a10af61View commit details -
Configuration menu - View commit details
-
Copy full SHA for e38ad5a - Browse repository at this point
Copy the full SHA e38ad5aView commit details
Commits on Oct 6, 2023
-
Make smoke test support child array/map mutation
This commit smoke tests mutation of child container: - existing child retrieved from parent array/map - new child appened/inserted to parent array - existing child set in parent array/map - new child set in parent map
Configuration menu - View commit details
-
Copy full SHA for 25dbc3e - Browse repository at this point
Copy the full SHA 25dbc3eView commit details
Commits on Oct 9, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 11f0faa - Browse repository at this point
Copy the full SHA 11f0faaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3145ef4 - Browse repository at this point
Copy the full SHA 3145ef4View commit details
Commits on Oct 10, 2023
-
Merge pull request #348 from onflow/fxamacker/update-smoke-test-for-a…
…rray-map-inlining Update smoke test for atree inlining
Configuration menu - View commit details
-
Copy full SHA for 9b14a71 - Browse repository at this point
Copy the full SHA 9b14a71View commit details -
Configuration menu - View commit details
-
Copy full SHA for 108dc31 - Browse repository at this point
Copy the full SHA 108dc31View commit details
Commits on Oct 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for aaa47cc - Browse repository at this point
Copy the full SHA aaa47ccView commit details -
Change array encoding error type
Some errors that should be returned as external error are being returned as fatal error. This caused a problem that was detected during Cadence integration. This commit resolves the problem by returning these fatal errors as external errors.
Configuration menu - View commit details
-
Copy full SHA for f56c2e7 - Browse repository at this point
Copy the full SHA f56c2e7View commit details -
Change map encoding error type
Some errors that should be returned as external error are being returned as fatal error. This caused a problem that was detected during Cadence integration. This commit resolves the problem by returning these fatal errors as external errors.
Configuration menu - View commit details
-
Copy full SHA for c7ae147 - Browse repository at this point
Copy the full SHA c7ae147View commit details -
Add InlinedExtraData interface
Cadence integration requires InlinedExtraData interface.
Configuration menu - View commit details
-
Copy full SHA for 945826b - Browse repository at this point
Copy the full SHA 945826bView commit details -
Add ContainerStorable interface
ContainerStorable interface supports encoding container storable (storable containing other storables) as element. This is needed for integration with Cadence.
Configuration menu - View commit details
-
Copy full SHA for 2e86400 - Browse repository at this point
Copy the full SHA 2e86400View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d5e4a4 - Browse repository at this point
Copy the full SHA 2d5e4a4View commit details -
This is needed for integration with Cadence because map key can be Cadence enums.
Configuration menu - View commit details
-
Copy full SHA for 485b800 - Browse repository at this point
Copy the full SHA 485b800View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5eb10f1 - Browse repository at this point
Copy the full SHA 5eb10f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5be1f94 - Browse repository at this point
Copy the full SHA 5be1f94View commit details -
Configuration menu - View commit details
-
Copy full SHA for 800a44a - Browse repository at this point
Copy the full SHA 800a44aView commit details -
Configuration menu - View commit details
-
Copy full SHA for eecb91a - Browse repository at this point
Copy the full SHA eecb91aView commit details
Commits on Oct 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for eb9a503 - Browse repository at this point
Copy the full SHA eb9a503View commit details
Commits on Oct 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c8f01db - Browse repository at this point
Copy the full SHA c8f01dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 25c4d5e - Browse repository at this point
Copy the full SHA 25c4d5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3688e89 - Browse repository at this point
Copy the full SHA 3688e89View commit details -
Configuration menu - View commit details
-
Copy full SHA for 87e6b6b - Browse repository at this point
Copy the full SHA 87e6b6bView commit details -
Merge pull request #352 from onflow/fxamacker/array-map-inlining-tweaks
Update for Cadence integration for atree inlining and deduplication
Configuration menu - View commit details
-
Copy full SHA for 81a8e2d - Browse repository at this point
Copy the full SHA 81a8e2dView commit details -
Merge pull request #350 from onflow/fxamacker/add-composite-type-to-s…
…moke-test Make smoke tests check recently added data deduplication feature
Configuration menu - View commit details
-
Copy full SHA for 7ab6f5e - Browse repository at this point
Copy the full SHA 7ab6f5eView commit details
Commits on Oct 22, 2023
-
Remove ContainerStorable.EncodeAsElement
Currently, EncodeAsElement is used to encode inlined array and map, while Encode is used to encode standalone array and map. This commit simplifies encoding API by using Encode() to encode both inlined/standalone array/map.
Configuration menu - View commit details
-
Copy full SHA for d718306 - Browse repository at this point
Copy the full SHA d718306View commit details
Commits on Oct 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for d88bd12 - Browse repository at this point
Copy the full SHA d88bd12View commit details -
Fail StorableSlab.Encode() with inlined array/map
This commit makes StorableSlab.Encode() return error if it contains inlined array or inlined map.
Configuration menu - View commit details
-
Copy full SHA for acdb685 - Browse repository at this point
Copy the full SHA acdb685View commit details -
Merge pull request #354 from onflow/fxamacker/refactor-encoding-API
Remove ContainerStorable.EncodeAsElement
Configuration menu - View commit details
-
Copy full SHA for cb82995 - Browse repository at this point
Copy the full SHA cb82995View commit details
Commits on Nov 30, 2023
-
Support mutable iterator for array and map
Mutable iterator for array and map supports: - indirect element mutation, such as modifying nested container - direct element mutation, such as overwriting existing element with new element Mutable iterator for array and map doesn't support: - inserting new elements into the array/map - removing existing elements from the array/map NOTE: use readonly iterator if mutation is not needed for better performance. This commit: - adds new interfaces ArrayIterator and MapIterator - decouples implementation of mutable and readonly iterators - refactors related functions
Configuration menu - View commit details
-
Copy full SHA for 9171a72 - Browse repository at this point
Copy the full SHA 9171a72View commit details
Commits on Dec 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1624f6d - Browse repository at this point
Copy the full SHA 1624f6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20d7796 - Browse repository at this point
Copy the full SHA 20d7796View commit details -
Configuration menu - View commit details
-
Copy full SHA for bcae77e - Browse repository at this point
Copy the full SHA bcae77eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a0e7907 - Browse repository at this point
Copy the full SHA a0e7907View commit details
Commits on Dec 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bbee1cc - Browse repository at this point
Copy the full SHA bbee1ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b0ec40 - Browse repository at this point
Copy the full SHA 4b0ec40View commit details -
While at it, also reduce matrix of OS and Go versions given the duration of tests.
Configuration menu - View commit details
-
Copy full SHA for b3e41ec - Browse repository at this point
Copy the full SHA b3e41ecView commit details
Commits on Dec 4, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 5e67357 - Browse repository at this point
Copy the full SHA 5e67357View commit details
Commits on Jan 24, 2024
-
Merge pull request #359 from onflow/fxamacker/handle-slab-operation-f…
…or-mutable-iterators Add feature to support mutation for array and map iterators
Configuration menu - View commit details
-
Copy full SHA for 2fbf860 - Browse repository at this point
Copy the full SHA 2fbf860View commit details
Commits on Feb 28, 2024
-
Deduplicate inlined dict type info to reduce RAM
This change deduplicates Cadence dictionary type and composite type info, resulting in reduced memory and also persistent storage. More specifically, this encodes inlined atree slab extra data section as two-element array: - array of deduplicated type info - array of deduplicated extra data with type info index
Configuration menu - View commit details
-
Copy full SHA for 83d8870 - Browse repository at this point
Copy the full SHA 83d8870View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6825950 - Browse repository at this point
Copy the full SHA 6825950View commit details
Commits on Mar 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e029e43 - Browse repository at this point
Copy the full SHA e029e43View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9be1712 - Browse repository at this point
Copy the full SHA 9be1712View commit details
Commits on Mar 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a05f97e - Browse repository at this point
Copy the full SHA a05f97eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c7c31e - Browse repository at this point
Copy the full SHA 8c7c31eView commit details -
Merge pull request #376 from onflow/fxamacker/add-inlining-array-settype
Add support for changing type info of atree arrays (atree inlining branch)
Configuration menu - View commit details
-
Copy full SHA for 36e70a5 - Browse repository at this point
Copy the full SHA 36e70a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 57de859 - Browse repository at this point
Copy the full SHA 57de859View commit details -
Configuration menu - View commit details
-
Copy full SHA for 95dad1c - Browse repository at this point
Copy the full SHA 95dad1cView commit details -
Merge pull request #377 from onflow/fxamacker/add-inlining-map-settype
Add support for changing type info of atree maps (atree inlining branch)
Configuration menu - View commit details
-
Copy full SHA for 43b2a0d - Browse repository at this point
Copy the full SHA 43b2a0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 35fdb7e - Browse repository at this point
Copy the full SHA 35fdb7eView commit details
Commits on Mar 14, 2024
-
Merge pull request #369 from onflow/fxamacker/deduplicate-dict-type-info
Reduce RAM and persistent storage by deduplicating inlined dict type info
Configuration menu - View commit details
-
Copy full SHA for 92714ca - Browse repository at this point
Copy the full SHA 92714caView commit details
Commits on Apr 2, 2024
-
Use encoded type info to deduplicate extra data
Currently, we use TypeInfo.Identifier() to deduplicate extra data and type info. However, TypeInfo.Identifier() is implemented in another package and we can't enforce its uniqueness for different types. If TypeInfo.Identifier() returns same ID for different types, different types is wrongly deduplicated. This commit uses encoded type info via TypeInfo.Encode() to deduplicate extra data. This prevents differently encoded type info from being deduplicated by mistake. This commit also uses sync.Pool to reuse buffer for type info encoding.
Configuration menu - View commit details
-
Copy full SHA for 83c99b3 - Browse repository at this point
Copy the full SHA 83c99b3View commit details
Commits on Apr 4, 2024
-
Merge pull request #381 from onflow/fxamacker/replace-typeinfo-identi…
…fier Use encoded type info to deduplicate extra data
Configuration menu - View commit details
-
Copy full SHA for 92fcde4 - Browse repository at this point
Copy the full SHA 92fcde4View commit details
Commits on Apr 5, 2024
-
Fix error type for external errors during serialization
The wrong error type was returned when an external error was encountered. This commit returns the correct error type.
Configuration menu - View commit details
-
Copy full SHA for 661c07f - Browse repository at this point
Copy the full SHA 661c07fView commit details -
Merge pull request #382 from onflow/fxamacker/fix-encoding-error-type
Fix error type for external errors during serialization
Configuration menu - View commit details
-
Copy full SHA for c6c951d - Browse repository at this point
Copy the full SHA c6c951dView commit details
Commits on Apr 11, 2024
-
Add feature to fix refs to non-existent registers
In testnet, broken references seem to have resulted from a bug that was fixed 2 years ago by onflow/cadence#1565. A broken reference is a `StorageID` referencing a non-existent register. So far, only 10 registers in testnet (none on mainnet) were found to contain broken references. This commit adds a feature to enable migration programs in onflow/flow-go to fix broken references in maps. `FixLoadedBrokenReferences()` traverses loaded slabs and replaces broken map (if any) with empty map having the same StorageID and also removes all slabs in the old map. Limitations: - only fix broken references in map (this is intentional) - only traverse loaded slabs in deltas and cache IMPORTANT: This should not be used to silently fix unknown problems. It should only be used by migration programs to fix known problems which were determined to be appropriate to fix in this manner.
Configuration menu - View commit details
-
Copy full SHA for 30dad00 - Browse repository at this point
Copy the full SHA 30dad00View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a71edc - Browse repository at this point
Copy the full SHA 2a71edcView commit details
Commits on Apr 17, 2024
-
Co-authored-by: Bastian Müller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6647715 - Browse repository at this point
Copy the full SHA 6647715View commit details -
Allow callers to skip fixing a broken reference
Currently, calls to this function can be limited by migration programs by specifying the 9 testnet accounts affected by 10 registers with broken references on testnet. This commit allows callers to implement additional restrictions, so calling FixLoadedBrokenReferences for the affected 9 testnet accounts can be even more limited at the callers discretion. In practice, this change is not expected to produce different migration results because full migration tests before this change correctly fixed the 10 known registers in the 9 testnet accounts. This commit added predicate func(old Value) bool to PersistentSlabStorage.FixLoadedBrokenReferences() to control whether to fix a atree.Value containing broken references. Also modified PersistentSlabStorage.FixLoadedBrokenReferences() to return fixed storage IDs and skipped storage IDs. Both returned values are of type map[StorageID][]StorageID, with key as root slab ID and value as all slab IDs containing broken references connected to the root. Also added more tests and improved existing tests.
Configuration menu - View commit details
-
Copy full SHA for 3efd6be - Browse repository at this point
Copy the full SHA 3efd6beView commit details -
Add PersistentSlabStorage.GetAllChildReferences()
This commit adds GetAllChildReferences() which essentially wraps an existing internal function.
Configuration menu - View commit details
-
Copy full SHA for b362f82 - Browse repository at this point
Copy the full SHA b362f82View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8febf26 - Browse repository at this point
Copy the full SHA 8febf26View commit details -
Merge pull request #392 from onflow/fxamacker/export-getAllChildRefer…
…ences-for-atree-inlining Add PersistentSlabStorage.GetAllChildReferences() for atree inlining
Configuration menu - View commit details
-
Copy full SHA for 300e7e8 - Browse repository at this point
Copy the full SHA 300e7e8View commit details -
Merge pull request #388 from onflow/fxamacker/add-fix-broken-referenc…
…e-function-for-atree-inlining Add feature to enable atree inlining migration to fix references to non-existent registers
Configuration menu - View commit details
-
Copy full SHA for e11f55f - Browse repository at this point
Copy the full SHA e11f55fView commit details
Commits on Apr 26, 2024
-
Fix GetAllChildReferences used by migration filter
Migration programs in onflow/flow-go added a flag to filter old unreferenced slabs and onflow/atree added some functions to support that. However, some of the old unreferenced slabs are not filtered during migration. This commit fixes the migration filter by handling nested storage ID inside element such as Cadence SomeValue.
Configuration menu - View commit details
-
Copy full SHA for a6b615b - Browse repository at this point
Copy the full SHA a6b615bView commit details
Commits on Apr 29, 2024
-
Merge pull request #396 from onflow/fxamacker/fix-get-child-reference…
…s-to-handle-storage-id-in-element Fix migration filter for old unreferenced slabs (atree inlining feature branch)
Configuration menu - View commit details
-
Copy full SHA for e4400b2 - Browse repository at this point
Copy the full SHA e4400b2View commit details
Commits on May 9, 2024
-
Add NonderterministicFastCommit
NonderterministicFastCommit commits changes in nondeterministic order. It can be used by migration program when ordering isn't required. │ before.txt │ after.txt │ │ sec/op │ sec/op vs base │ StorageFastCommit/10-12 89.72µ ± 4% 57.50µ ± 3% -35.92% (p=0.000 n=10) StorageFastCommit/100-12 118.9µ ± 1% 116.0µ ± 4% ~ (p=0.436 n=10) StorageFastCommit/1000-12 4.086m ± 5% 2.397m ± 25% -41.35% (p=0.000 n=10) StorageFastCommit/10000-12 12.629m ± 4% 9.857m ± 3% -21.95% (p=0.000 n=10) StorageFastCommit/100000-12 102.73m ± 0% 72.26m ± 1% -29.66% (p=0.000 n=10) StorageFastCommit/1000000-12 1.544 ± 2% 1.141 ± 2% -26.09% (p=0.000 n=10) geomean 6.661m 4.848m -27.21% │ before.txt │ after.txt │ │ B/op │ B/op vs base │ StorageFastCommit/10-12 28.92Ki ± 0% 28.05Ki ± 0% -3.00% (p=0.000 n=10) StorageFastCommit/100-12 286.4Ki ± 0% 278.6Ki ± 0% -2.71% (p=0.000 n=10) StorageFastCommit/1000-12 3.009Mi ± 0% 2.901Mi ± 0% -3.58% (p=0.000 n=10) StorageFastCommit/10000-12 28.65Mi ± 0% 27.79Mi ± 0% -2.98% (p=0.000 n=10) StorageFastCommit/100000-12 278.8Mi ± 0% 271.1Mi ± 0% -2.75% (p=0.000 n=10) StorageFastCommit/1000000-12 2.923Gi ± 0% 2.821Gi ± 0% -3.49% (p=0.000 n=10) geomean 9.101Mi 8.820Mi -3.09% │ before.txt │ after.txt │ │ allocs/op │ allocs/op vs base │ StorageFastCommit/10-12 219.0 ± 0% 205.0 ± 0% -6.39% (p=0.000 n=10) StorageFastCommit/100-12 1.980k ± 0% 1.875k ± 0% -5.30% (p=0.000 n=10) StorageFastCommit/1000-12 19.23k ± 0% 18.23k ± 0% -5.22% (p=0.000 n=10) StorageFastCommit/10000-12 191.1k ± 0% 181.1k ± 0% -5.24% (p=0.000 n=10) StorageFastCommit/100000-12 1.918M ± 0% 1.816M ± 0% -5.30% (p=0.000 n=10) StorageFastCommit/1000000-12 19.15M ± 0% 18.15M ± 0% -5.22% (p=0.000 n=10) geomean 62.31k 58.91k -5.45%
Configuration menu - View commit details
-
Copy full SHA for 7162eab - Browse repository at this point
Copy the full SHA 7162eabView commit details -
Configuration menu - View commit details
-
Copy full SHA for e739c6e - Browse repository at this point
Copy the full SHA e739c6eView commit details -
Add BatchPreload to decode slabs in parallel
The intended use for BatchPreload is to speedup migrations. BatchPreload decodes slabs in parallel and stores decoded slabs in cache for later retrieval. This is useful for migration program when most or all slabs are expected to be migrated. │ before.txt │ after.txt │ │ sec/op │ sec/op vs base │ StorageRetrieve/10-12 36.23µ ± 3% 35.33µ ± 4% ~ (p=0.075 n=10) StorageRetrieve/100-12 469.6µ ± 8% 124.3µ ± 0% -73.52% (p=0.000 n=10) StorageRetrieve/1000-12 6.678m ± 7% 2.303m ± 20% -65.51% (p=0.000 n=10) StorageRetrieve/10000-12 29.81m ± 2% 12.26m ± 5% -58.86% (p=0.000 n=10) StorageRetrieve/100000-12 303.33m ± 1% 88.40m ± 1% -70.86% (p=0.000 n=10) StorageRetrieve/1000000-12 3.442 ± 1% 1.137 ± 3% -66.96% (p=0.000 n=10) geomean 12.34m 4.816m -60.98% │ before.txt │ after.txt │ │ B/op │ B/op vs base │ StorageRetrieve/10-12 21.59Ki ± 0% 21.59Ki ± 0% ~ (p=1.000 n=10) StorageRetrieve/100-12 219.8Ki ± 0% 224.7Ki ± 0% +2.24% (p=0.000 n=10) StorageRetrieve/1000-12 2.266Mi ± 0% 2.272Mi ± 0% +0.27% (p=0.000 n=10) StorageRetrieve/10000-12 21.94Mi ± 0% 22.14Mi ± 0% +0.91% (p=0.000 n=10) StorageRetrieve/100000-12 215.3Mi ± 0% 218.5Mi ± 0% +1.50% (p=0.000 n=10) StorageRetrieve/1000000-12 2.211Gi ± 0% 2.212Gi ± 0% +0.05% (p=0.000 n=10) geomean 6.919Mi 6.976Mi +0.82% │ before.txt │ after.txt │ │ allocs/op │ allocs/op vs base │ StorageRetrieve/10-12 76.00 ± 0% 76.00 ± 0% ~ (p=1.000 n=10) ¹ StorageRetrieve/100-12 745.0 ± 0% 759.0 ± 0% +1.88% (p=0.000 n=10) StorageRetrieve/1000-12 7.161k ± 0% 7.153k ± 0% -0.11% (p=0.000 n=10) StorageRetrieve/10000-12 70.77k ± 0% 70.58k ± 0% -0.27% (p=0.000 n=10) StorageRetrieve/100000-12 711.9k ± 0% 709.7k ± 0% -0.31% (p=0.000 n=10) StorageRetrieve/1000000-12 7.115M ± 0% 7.077M ± 0% -0.54% (p=0.000 n=10) geomean 22.93k 22.95k +0.11%
Configuration menu - View commit details
-
Copy full SHA for a459d96 - Browse repository at this point
Copy the full SHA a459d96View commit details
Commits on May 13, 2024
-
Refactor to iterate deltas once in NonderterministicFastCommit
This change reduces number of lines in the function but is not expected to yield significant speed improvements.
Configuration menu - View commit details
-
Copy full SHA for a2a4f5c - Browse repository at this point
Copy the full SHA a2a4f5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for aa1c121 - Browse repository at this point
Copy the full SHA aa1c121View commit details -
Configuration menu - View commit details
-
Copy full SHA for e83159f - Browse repository at this point
Copy the full SHA e83159fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5808810 - Browse repository at this point
Copy the full SHA 5808810View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa2ee90 - Browse repository at this point
Copy the full SHA aa2ee90View commit details
Commits on May 14, 2024
-
Revert "Bump golangci-lint from 1.52.2 to 1.53.3"
This reverts commit e83159f.
Configuration menu - View commit details
-
Copy full SHA for 81b6dcd - Browse repository at this point
Copy the full SHA 81b6dcdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 88fa22f - Browse repository at this point
Copy the full SHA 88fa22fView commit details -
Merge pull request #403 from onflow/fxamacker/add-nondeterministic-fa…
…st-commit Add NonderterministicFastCommit to speed up migrations when ordering isn't required
Configuration menu - View commit details
-
Copy full SHA for 12929f5 - Browse repository at this point
Copy the full SHA 12929f5View commit details -
Merge pull request #404 from onflow/fxamacker/add-batch-preload
Add BatchPreload to decode slabs in parallel and cache
Configuration menu - View commit details
-
Copy full SHA for 73e00ec - Browse repository at this point
Copy the full SHA 73e00ecView commit details
Commits on May 21, 2024
-
Check mutation of elements from readonly map iterator
This commit returns ReadOnlyIteratorElementMutationError when elements of readonly map iterator are mutated. Also, a callback can be provided by the caller to log or debug such mutations with more context. As always, mutation of elements from readonly iterators are not guaranteed to persist. Instead of relying on other projects not to mutate readonly elements, this commit returns ReadOnlyIteratorElementMutationError when elements from readonly iterators are mutated. This commit also adds readonly iterator functions that receive mutation callbacks. Callbacks are useful for logging, etc. with more context when mutation occurs. Mutation handling is the same with or without callbacks. If needed, other projects using atree can choose to panic in the callback when mutation is detected. If elements from readonly iterators are mutated: - those changes are not guaranteed to persist. - mutation functions of child containers return ReadOnlyIteratorElementMutationError. - ReadOnlyMapIteratorMutationCallback are called if provided
Configuration menu - View commit details
-
Copy full SHA for 0d63aaf - Browse repository at this point
Copy the full SHA 0d63aafView commit details -
Check mutation of elements from readonly array iterator
This commit returns ReadOnlyIteratorElementMutationError when elements of readonly array iterator are mutated. Also, a callback can be provided by the caller to log or debug such mutations with more context. As always, mutation of elements from readonly iterators are not guaranteed to persist. Instead of relying on other projects not to mutate readonly elements, this commit returns ReadOnlyIteratorElementMutationError when elements from readonly iterators are mutated. This commit also adds readonly iterator functions that receive mutation callbacks. Callbacks are useful for logging, etc. with more context when mutation occurs. Mutation handling is the same with or without callbacks. If needed, other projects using atree can choose to panic in the callback when mutation is detected. If elements from readonly iterators are mutated: - those changes are not guaranteed to persist. - mutation functions of child containers return ReadOnlyIteratorElementMutationError. - ReadOnlyMapIteratorMutationCallback are called if provided
Configuration menu - View commit details
-
Copy full SHA for 019775e - Browse repository at this point
Copy the full SHA 019775eView commit details -
Merge pull request #410 from onflow/fxamacker/add-mutation-callback-t…
…o-readonly-map-iterator Check mutation of elements from readonly map iterator
Configuration menu - View commit details
-
Copy full SHA for bbd27a3 - Browse repository at this point
Copy the full SHA bbd27a3View commit details -
Merge pull request #411 from onflow/fxamacker/add-mutation-callback-t…
…o-readonly-array-iterator Check mutation of elements from readonly array iterator
Configuration menu - View commit details
-
Copy full SHA for 688791c - Browse repository at this point
Copy the full SHA 688791cView commit details
Commits on May 24, 2024
-
Update comment for NondeterministicFastCommit
Make it clearer that encoded slabs are still deterministic, so array and map iterations will remain deterministic. Only the sequence of changed slabs getting committed is nondeterministic. This is useful for migration programs that don't require commit sequence of slabs to be deterministic while still preserving deterministic encoding of slabs (e.g. iteration of arrays and maps remain deterministic).
Configuration menu - View commit details
-
Copy full SHA for 393e179 - Browse repository at this point
Copy the full SHA 393e179View commit details -
Merge pull request #412 from onflow/fxamacker/update-comment-for-nond…
…eterministicfastcommit Update comment for NondeterministicFastCommit
Configuration menu - View commit details
-
Copy full SHA for b79c29e - Browse repository at this point
Copy the full SHA b79c29eView commit details
Commits on Jun 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7bcf32f - Browse repository at this point
Copy the full SHA 7bcf32fView commit details
Commits on Jun 13, 2024
-
Merge pull request #415 from onflow/fxamacker/update-copyright
Update copyright notice to Flow Foundation
Configuration menu - View commit details
-
Copy full SHA for 0db5873 - Browse repository at this point
Copy the full SHA 0db5873View commit details
Commits on Jul 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 691b753 - Browse repository at this point
Copy the full SHA 691b753View commit details -
Merge pull request #428 from onflow/fxamacker/update-array-map-inlining
Update feature/array-map-inlining (atree inlining feature branch)
Configuration menu - View commit details
-
Copy full SHA for caf04d2 - Browse repository at this point
Copy the full SHA caf04d2View commit details