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

Merge master into v1.0 atree register inlining feature branch #3229

Conversation

turbolent
Copy link
Member

Description

Conflict resolution:
commit 03e9e10da0c6ce4e114f89f086823ee60406f475
Merge: d258aa622 50d446334
Author: Bastian Müller <bastian@turbolent.com>
Date:   Mon Apr 8 15:25:51 2024 -0700

    Merge branch 'master' into bastian/update-atree-register-inlining-v1.0

diff --git a/migrations/legacy_intersection_type.go b/migrations/legacy_intersection_type.go
index 4a9fcc96d..f89e5075f 100644
--- a/migrations/legacy_intersection_type.go
+++ b/migrations/legacy_intersection_type.go
@@ -33,39 +33,6 @@ type LegacyIntersectionType struct {
 
 var _ interpreter.StaticType = &LegacyIntersectionType{}
 
-func (t *LegacyIntersectionType) Equal(other interpreter.StaticType) bool {
-	var otherTypes []*interpreter.InterfaceStaticType
-
-	switch other := other.(type) {
-
-	case *LegacyIntersectionType:
-		otherTypes = other.Types
-
-	case *interpreter.IntersectionStaticType:
-		otherTypes = other.Types
-
-	default:
-		return false
-	}
-
-	if len(t.Types) != len(otherTypes) {
-		return false
-	}
-
-outer:
-	for _, typ := range t.Types {
-		for _, otherType := range otherTypes {
-			if typ.Equal(otherType) {
-				continue outer
-			}
-		}
-
-		return false
-	}
-
-	return true
-}
-
 func (t *LegacyIntersectionType) ID() common.TypeID {
 	interfaceTypeIDs := make([]string, 0, len(t.Types))
 	for _, interfaceType := range t.Types {
diff --git a/migrations/legacy_primitivestatic_type.go b/migrations/legacy_primitivestatic_type.go
index 173fbb455..5cd62a674 100644
--- a/migrations/legacy_primitivestatic_type.go
+++ b/migrations/legacy_primitivestatic_type.go
@@ -32,20 +32,6 @@ type LegacyPrimitiveStaticType struct {
 
 var _ interpreter.StaticType = LegacyPrimitiveStaticType{}
 
-func (t LegacyPrimitiveStaticType) Equal(other interpreter.StaticType) bool {
-	switch other := other.(type) {
-
-	case LegacyPrimitiveStaticType:
-		return t == other
-
-	case interpreter.PrimitiveStaticType:
-		return t.PrimitiveStaticType == other
-
-	default:
-		return false
-	}
-}
-
 func (t LegacyPrimitiveStaticType) ID() common.TypeID {
 	primitiveStaticType := t.PrimitiveStaticType
 
diff --git a/migrations/legacy_reference_type.go b/migrations/legacy_reference_type.go
index d73a147df..7d873a4db 100644
--- a/migrations/legacy_reference_type.go
+++ b/migrations/legacy_reference_type.go
@@ -34,26 +34,6 @@ type LegacyReferenceType struct {
 
 var _ interpreter.StaticType = &LegacyReferenceType{}
 
-// Equal() compares both value and type of t and other.
-// LegacyReferenceType.Equal() is needed because Equal() in general
-// compares values and their types.  Embedded ReferenceStaticType.Equal()
-// returns false when other is *LegacyReferenceType type.
-func (t *LegacyReferenceType) Equal(other interpreter.StaticType) bool {
-	switch other := other.(type) {
-
-	case *LegacyReferenceType:
-		return t.Authorization.Equal(other.Authorization) &&
-			t.ReferencedType.Equal(other.ReferencedType)
-
-	case *interpreter.ReferenceStaticType:
-		return t.Authorization.Equal(other.Authorization) &&
-			t.ReferencedType.Equal(other.ReferencedType)
-
-	default:
-		return false
-	}
-}
-
 func (t *LegacyReferenceType) ID() common.TypeID {
 	if !t.HasLegacyIsAuthorized {
 		// Encode as a regular reference type
diff --git a/migrations/statictypes/account_type_migration_test.go b/migrations/statictypes/account_type_migration_test.go
remerge CONFLICT (content): Merge conflict in migrations/statictypes/account_type_migration_test.go
index 30d53c092..78aa468ec 100644
--- a/migrations/statictypes/account_type_migration_test.go
+++ b/migrations/statictypes/account_type_migration_test.go
@@ -1227,209 +1227,6 @@ func TestAccountTypeRehash(t *testing.T) {
 				return interpreter.NewUnmeteredStringValue(s)
 			}
 
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
-		storage, inter := newStorageAndInterpreter(t)
-
-		dictionaryStaticType := interpreter.NewDictionaryStaticType(
-			nil,
-			interpreter.PrimitiveStaticTypeMetaType,
-			interpreter.PrimitiveStaticTypeString,
-		)
-		dictValue := interpreter.NewDictionaryValue(inter, locationRange, dictionaryStaticType)
-
-		accountTypes := []interpreter.PrimitiveStaticType{
-			interpreter.PrimitiveStaticTypePublicAccount,                  //nolint:staticcheck
-			interpreter.PrimitiveStaticTypeAuthAccount,                    //nolint:staticcheck
-			interpreter.PrimitiveStaticTypeAuthAccountCapabilities,        //nolint:staticcheck
-			interpreter.PrimitiveStaticTypePublicAccountCapabilities,      //nolint:staticcheck
-			interpreter.PrimitiveStaticTypeAuthAccountAccountCapabilities, //nolint:staticcheck
-			interpreter.PrimitiveStaticTypeAuthAccountStorageCapabilities, //nolint:staticcheck
-			interpreter.PrimitiveStaticTypeAuthAccountContracts,           //nolint:staticcheck
-			interpreter.PrimitiveStaticTypePublicAccountContracts,         //nolint:staticcheck
-			interpreter.PrimitiveStaticTypeAuthAccountKeys,                //nolint:staticcheck
-			interpreter.PrimitiveStaticTypePublicAccountKeys,              //nolint:staticcheck
-			interpreter.PrimitiveStaticTypeAuthAccountInbox,               //nolint:staticcheck
-			interpreter.PrimitiveStaticTypeAccountKey,                     //nolint:staticcheck
-		}
-
-		for _, typ := range accountTypes {
-			typeValue := interpreter.NewUnmeteredTypeValue(
-				migrations.LegacyPrimitiveStaticType{
-					PrimitiveStaticType: typ,
-				},
-			)
-			dictValue.Insert(
-				inter,
-				locationRange,
-				typeValue,
-				newStringValue(typ.String()),
-			)
-		}
-
-		storageMap := storage.GetStorageMap(
-			testAddress,
-			common.PathDomainStorage.Identifier(),
-			true,
-		)
-
-		storageMap.SetValue(inter,
-			storageMapKey,
-			dictValue.Transfer(
-				inter,
-				locationRange,
-				atree.Address(testAddress),
-				false,
-				nil,
-				nil,
-				true, // dictValue is standalone
-			),
-		)
-
-		err := storage.Commit(inter, false)
-		require.NoError(t, err)
-	})
-
-	t.Run("migrate", func(t *testing.T) {
-
-		storage, inter := newStorageAndInterpreter(t)
-
-		migration := migrations.NewStorageMigration(inter, storage)
-
-		reporter := newTestReporter()
-
-		migration.MigrateAccount(
-			testAddress,
-			migration.NewValueMigrationsPathMigrator(
-				reporter,
-				NewStaticTypeMigration(),
-			),
-		)
-
-		err := migration.Commit()
-		require.NoError(t, err)
-
-		// Assert
-
-		require.Empty(t, reporter.errors)
-
-		err = storage.CheckHealth()
-		require.NoError(t, err)
-
-		require.Equal(t,
-			map[struct {
-				interpreter.StorageKey
-				interpreter.StorageMapKey
-			}]struct{}{
-				{
-					StorageKey: interpreter.StorageKey{
-						Address: testAddress,
-						Key:     common.PathDomainStorage.Identifier(),
-					},
-					StorageMapKey: storageMapKey,
-				}: {},
-			},
-			reporter.migrated,
-		)
-	})
-
-	t.Run("load", func(t *testing.T) {
-
-		storage, inter := newStorageAndInterpreter(t)
-
-		storageMap := storage.GetStorageMap(testAddress, common.PathDomainStorage.Identifier(), false)
-		storedValue := storageMap.ReadValue(inter, storageMapKey)
-
-		require.IsType(t, &interpreter.DictionaryValue{}, storedValue)
-
-		dictValue := storedValue.(*interpreter.DictionaryValue)
-
-		var existingKeys []interpreter.Value
-		dictValue.Iterate(
-			inter,
-			interpreter.EmptyLocationRange,
-			func(key, value interpreter.Value) (resume bool) {
-				existingKeys = append(existingKeys, key)
-				// continue iteration
-				return true
-			},
-		)
-
-		for _, key := range existingKeys {
-			actual := dictValue.Remove(
-				inter,
-				interpreter.EmptyLocationRange,
-				key,
-			)
-
-			assert.NotNil(t, actual)
-
-			staticType := key.(interpreter.TypeValue).Type
-
-			var possibleExpectedValues []interpreter.Value
-			var str string
-
-			switch {
-			case staticType.Equal(unauthorizedAccountReferenceType):
-				str = "PublicAccount"
-			case staticType.Equal(authAccountReferenceType):
-				str = "AuthAccount"
-			case staticType.Equal(interpreter.PrimitiveStaticTypeAccount_Capabilities):
-				// For both `AuthAccount.Capabilities` and `PublicAccount.Capabilities`,
-				// the migrated key is the same (`Account_Capabilities`).
-				// So the value at the key could be any of the two original values,
-				// depending on the order of migration.
-				possibleExpectedValues = []interpreter.Value{
-					interpreter.NewUnmeteredSomeValueNonCopying(
-						interpreter.NewUnmeteredStringValue("AuthAccountCapabilities"),
-					),
-					interpreter.NewUnmeteredSomeValueNonCopying(
-						interpreter.NewUnmeteredStringValue("PublicAccountCapabilities"),
-					),
-				}
-			case staticType.Equal(interpreter.PrimitiveStaticTypeAccount_AccountCapabilities):
-				str = "AuthAccountAccountCapabilities"
-			case staticType.Equal(interpreter.PrimitiveStaticTypeAccount_StorageCapabilities):
-				str = "AuthAccountStorageCapabilities"
-			case staticType.Equal(interpreter.PrimitiveStaticTypeAccount_Contracts):
-				// For both `AuthAccount.Contracts` and `PublicAccount.Contracts`,
-				// the migrated key is the same (Account_Contracts).
-				// So the value at the key could be any of the two original values,
-				// depending on the order of migration.
-				possibleExpectedValues = []interpreter.Value{
-					interpreter.NewUnmeteredSomeValueNonCopying(
-						interpreter.NewUnmeteredStringValue("AuthAccountContracts"),
-					),
-					interpreter.NewUnmeteredSomeValueNonCopying(
-						interpreter.NewUnmeteredStringValue("PublicAccountContracts"),
-					),
-				}
-			case staticType.Equal(interpreter.PrimitiveStaticTypeAccount_Keys):
-				// For both `AuthAccount.Keys` and `PublicAccount.Keys`,
-				// the migrated key is the same (Account_Keys).
-				// So the value at the key could be any of the two original values,
-				// depending on the order of migration.
-				possibleExpectedValues = []interpreter.Value{
-					interpreter.NewUnmeteredSomeValueNonCopying(
-						interpreter.NewUnmeteredStringValue("AuthAccountKeys"),
-					),
-					interpreter.NewUnmeteredSomeValueNonCopying(
-						interpreter.NewUnmeteredStringValue("PublicAccountKeys"),
-					),
-				}
-			case staticType.Equal(interpreter.PrimitiveStaticTypeAccount_Inbox):
-				str = "AuthAccountInbox"
-			case staticType.Equal(interpreter.AccountKeyStaticType):
-				str = "AccountKey"
-			default:
-				require.Fail(t, fmt.Sprintf("Unexpected type `%s` in dictionary key", staticType.ID()))
-			}
-
-			if possibleExpectedValues != nil {
-				assert.Contains(t, possibleExpectedValues, actual)
-			} else {
-				expected := interpreter.NewUnmeteredSomeValueNonCopying(
-					interpreter.NewUnmeteredStringValue(str),
-=======
 			newStorageAndInterpreter := func(t *testing.T) (*runtime.Storage, *interpreter.Interpreter) {
 				storage := runtime.NewStorage(ledger, nil)
 				inter, err := interpreter.NewInterpreter(
@@ -1441,7 +1238,6 @@ func TestAccountTypeRehash(t *testing.T) {
 						AtreeValueValidationEnabled:   false,
 						AtreeStorageValidationEnabled: true,
 					},
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 				)
 				require.NoError(t, err)
 
@@ -1489,6 +1285,7 @@ func TestAccountTypeRehash(t *testing.T) {
 						false,
 						nil,
 						nil,
+						true, // dictValue is standalone
 					),
 				)
 
@@ -1553,11 +1350,15 @@ func TestAccountTypeRehash(t *testing.T) {
 				dictValue := storedValue.(*interpreter.DictionaryValue)
 
 				var existingKeys []interpreter.Value
-				dictValue.Iterate(inter, func(key, value interpreter.Value) (resume bool) {
+				dictValue.Iterate(
+					inter,
+					interpreter.EmptyLocationRange,
+					func(key, value interpreter.Value) (resume bool) {
 						existingKeys = append(existingKeys, key)
 						// continue iteration
 						return true
-				}, interpreter.EmptyLocationRange)
+					},
+				)
 
 				require.Len(t, existingKeys, 1)
 
diff --git a/runtime/convertValues.go b/runtime/convertValues.go
remerge CONFLICT (content): Merge conflict in runtime/convertValues.go
index 1f54f91be..1b68f2ce7 100644
--- a/runtime/convertValues.go
+++ b/runtime/convertValues.go
@@ -595,14 +595,9 @@ func exportDictionaryValue(
 						},
 					)
 
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
 					return true
 				},
 			)
-=======
-				return true
-			}, locationRange)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 
 			if err != nil {
 				return nil, err
diff --git a/runtime/interpreter/interpreter.go b/runtime/interpreter/interpreter.go
remerge CONFLICT (content): Merge conflict in runtime/interpreter/interpreter.go
index 45ba97cec..7886bcb4e 100644
--- a/runtime/interpreter/interpreter.go
+++ b/runtime/interpreter/interpreter.go
@@ -5244,7 +5244,6 @@ func (interpreter *Interpreter) invalidateReferencedResources(
 
 	switch value := value.(type) {
 	case *CompositeValue:
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
 		value.ForEachLoadedField(
 			interpreter,
 			func(_ string, fieldValue Value) (resume bool) {
@@ -5252,12 +5251,14 @@ func (interpreter *Interpreter) invalidateReferencedResources(
 				// continue iteration
 				return true
 			},
+			locationRange,
 		)
 		valueID = value.ValueID()
 
 	case *DictionaryValue:
 		value.IterateLoaded(
 			interpreter,
+			locationRange,
 			func(_, value Value) (resume bool) {
 				interpreter.invalidateReferencedResources(value, locationRange)
 				return true
@@ -5265,20 +5266,6 @@ func (interpreter *Interpreter) invalidateReferencedResources(
 		)
 		valueID = value.ValueID()
 
-=======
-		value.ForEachLoadedField(interpreter, func(_ string, fieldValue Value) (resume bool) {
-			interpreter.invalidateReferencedResources(fieldValue, locationRange)
-			// continue iteration
-			return true
-		}, locationRange)
-		storageID = value.StorageID()
-	case *DictionaryValue:
-		value.IterateLoaded(interpreter, func(_, value Value) (resume bool) {
-			interpreter.invalidateReferencedResources(value, locationRange)
-			return true
-		}, locationRange)
-		storageID = value.StorageID()
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 	case *ArrayValue:
 		value.IterateLoaded(
 			interpreter,
@@ -5532,19 +5519,14 @@ func (interpreter *Interpreter) validateMutation(valueID atree.ValueID, location
 	})
 }
 
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
 func (interpreter *Interpreter) withMutationPrevention(valueID atree.ValueID, f func()) {
-	oldIteration, present := interpreter.SharedState.containerValueIteration[valueID]
-	interpreter.SharedState.containerValueIteration[valueID] = struct{}{}
-=======
-func (interpreter *Interpreter) withMutationPrevention(storageID atree.StorageID, f func()) {
 	if interpreter == nil {
 		f()
 		return
 	}
-	oldIteration, present := interpreter.SharedState.containerValueIteration[storageID]
-	interpreter.SharedState.containerValueIteration[storageID] = struct{}{}
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
+
+	oldIteration, present := interpreter.SharedState.containerValueIteration[valueID]
+	interpreter.SharedState.containerValueIteration[valueID] = struct{}{}
 
 	f()
 
diff --git a/runtime/interpreter/value.go b/runtime/interpreter/value.go
remerge CONFLICT (content): Merge conflict in runtime/interpreter/value.go
index f89928605..361986fb5 100644
--- a/runtime/interpreter/value.go
+++ b/runtime/interpreter/value.go
@@ -2236,14 +2236,9 @@ func (v *ArrayValue) Set(interpreter *Interpreter, locationRange LocationRange,
 	interpreter.maybeValidateAtreeStorage()
 
 	existingValue := StoredValue(interpreter, existingStorable, interpreter.Storage())
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
-
+	interpreter.checkResourceLoss(existingValue, locationRange)
 	existingValue.DeepRemove(interpreter, true) // existingValue is standalone because it was overwritten in parent container.
 
-=======
-	interpreter.checkResourceLoss(existingValue, locationRange)
-	existingValue.DeepRemove(interpreter)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 	interpreter.RemoveReferencedSlab(existingStorable)
 }
 
@@ -2268,15 +2263,6 @@ func (v *ArrayValue) MeteredString(interpreter *Interpreter, seenReferences Seen
 
 	i := 0
 
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
-	_ = v.array.IterateReadOnly(func(element atree.Value) (resume bool, err error) {
-		// ok to not meter anything created as part of this iteration, since we will discard the result
-		// upon creating the string
-		values[i] = MustConvertUnmeteredStoredValue(element).MeteredString(memoryGauge, seenReferences)
-		i++
-		return true, nil
-	})
-=======
 	v.Iterate(
 		interpreter,
 		func(value Value) (resume bool) {
@@ -2289,7 +2275,6 @@ func (v *ArrayValue) MeteredString(interpreter *Interpreter, seenReferences Seen
 		false,
 		locationRange,
 	)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 
 	return format.Array(values)
 }
@@ -17424,13 +17409,9 @@ func (v *CompositeValue) SetMemberWithoutTransfer(
 	if existingStorable != nil {
 		existingValue := StoredValue(interpreter, existingStorable, config.Storage)
 
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
-		existingValue.DeepRemove(interpreter, true) // existingValue is standalone because it was overwritten in parent container.
-=======
 		interpreter.checkResourceLoss(existingValue, locationRange)
 
-		existingValue.DeepRemove(interpreter)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
+		existingValue.DeepRemove(interpreter, true) // existingValue is standalone because it was overwritten in parent container.
 
 		interpreter.RemoveReferencedSlab(existingStorable)
 		return true
@@ -17486,15 +17467,6 @@ func (v *CompositeValue) MeteredString(interpreter *Interpreter, seenReferences
 	strLen := emptyCompositeStringLen
 
 	var fields []CompositeField
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
-	_ = v.dictionary.IterateReadOnly(func(key atree.Value, value atree.Value) (resume bool, err error) {
-		field := NewCompositeField(
-			memoryGauge,
-			string(key.(StringAtreeValue)),
-			MustConvertStoredValue(memoryGauge, value),
-		)
-=======
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 
 	v.ForEachField(
 		interpreter,
@@ -18207,7 +18179,6 @@ func (v *CompositeValue) ForEachField(
 	f func(fieldName string, fieldValue Value) (resume bool),
 	locationRange LocationRange,
 ) {
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
 	iterate := func(fn atree.MapEntryIterationFunc) error {
 		return v.dictionary.Iterate(
 			StringAtreeValueComparator,
@@ -18215,10 +18186,12 @@ func (v *CompositeValue) ForEachField(
 			fn,
 		)
 	}
-	v.forEachField(gauge, iterate, f)
-=======
-	v.forEachField(interpreter, v.dictionary.Iterate, f, locationRange)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
+	v.forEachField(
+		interpreter,
+		iterate,
+		f,
+		locationRange,
+	)
 }
 
 // ForEachLoadedField iterates over all LOADED field-name field-value pairs of the composite value.
@@ -18228,11 +18201,12 @@ func (v *CompositeValue) ForEachLoadedField(
 	f func(fieldName string, fieldValue Value) (resume bool),
 	locationRange LocationRange,
 ) {
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
-	v.forEachField(gauge, v.dictionary.IterateReadOnlyLoadedValues, f)
-=======
-	v.forEachField(interpreter, v.dictionary.IterateLoadedValues, f, locationRange)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
+	v.forEachField(
+		interpreter,
+		v.dictionary.IterateReadOnlyLoadedValues,
+		f,
+		locationRange,
+	)
 }
 
 func (v *CompositeValue) forEachField(
@@ -18299,12 +18273,8 @@ func (v *CompositeValue) RemoveField(
 
 	// Value
 	existingValue := StoredValue(interpreter, existingValueStorable, interpreter.Storage())
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
-	existingValue.DeepRemove(interpreter, true) // existingValue is standalone because it was removed from parent container.
-=======
 	interpreter.checkResourceLoss(existingValue, locationRange)
-	existingValue.DeepRemove(interpreter)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
+	existingValue.DeepRemove(interpreter, true) // existingValue is standalone because it was removed from parent container.
 	interpreter.RemoveReferencedSlab(existingValueStorable)
 }
 
@@ -18959,7 +18929,6 @@ func (v *DictionaryValue) iterateKeys(
 	interpreter.withMutationPrevention(v.ValueID(), iterate)
 }
 
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
 func (v *DictionaryValue) IterateReadOnly(
 	interpreter *Interpreter,
 	locationRange LocationRange,
@@ -18970,7 +18939,7 @@ func (v *DictionaryValue) IterateReadOnly(
 			fn,
 		)
 	}
-	v.iterate(interpreter, iterate, f)
+	v.iterate(interpreter, iterate, f, locationRange)
 }
 
 func (v *DictionaryValue) Iterate(
@@ -18987,26 +18956,20 @@ func (v *DictionaryValue) Iterate(
 			fn,
 		)
 	}
-	v.iterate(interpreter, iterate, f)
+	v.iterate(interpreter, iterate, f, locationRange)
 }
 
 func (v *DictionaryValue) IterateLoaded(
 	interpreter *Interpreter,
+	locationRange LocationRange,
 	f func(key, value Value) (resume bool),
 ) {
 	v.iterate(
 		interpreter,
 		v.dictionary.IterateReadOnlyLoadedValues,
 		f,
+		locationRange,
 	)
-=======
-func (v *DictionaryValue) Iterate(interpreter *Interpreter, f func(key, value Value) (resume bool), locationRange LocationRange) {
-	v.iterate(interpreter, v.dictionary.Iterate, f, locationRange)
-}
-
-func (v *DictionaryValue) IterateLoaded(interpreter *Interpreter, f func(key, value Value) (resume bool), locationRange LocationRange) {
-	v.iterate(interpreter, v.dictionary.IterateLoadedValues, f, locationRange)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 }
 
 func (v *DictionaryValue) iterate(
@@ -19019,8 +18982,6 @@ func (v *DictionaryValue) iterate(
 		err := atreeIterate(func(key, value atree.Value) (resume bool, err error) {
 			// atree.OrderedMap iteration provides low-level atree.Value,
 			// convert to high-level interpreter.Value
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
-=======
 
 			keyValue := MustConvertStoredValue(interpreter, key)
 			valueValue := MustConvertStoredValue(interpreter, value)
@@ -19028,7 +18989,6 @@ func (v *DictionaryValue) iterate(
 			interpreter.checkInvalidatedResourceOrResourceReference(keyValue, locationRange)
 			interpreter.checkInvalidatedResourceOrResourceReference(valueValue, locationRange)
 
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 			resume = f(
 				keyValue,
 				valueValue,
@@ -19088,7 +19048,6 @@ func (v *DictionaryValue) Iterator() DictionaryKeyIterator {
 }
 
 func (v *DictionaryValue) Walk(interpreter *Interpreter, walkChild func(Value), locationRange LocationRange) {
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
 	v.Iterate(
 		interpreter,
 		locationRange,
@@ -19098,13 +19057,6 @@ func (v *DictionaryValue) Walk(interpreter *Interpreter, walkChild func(Value),
 			return true
 		},
 	)
-=======
-	v.Iterate(interpreter, func(key, value Value) (resume bool) {
-		walkChild(key)
-		walkChild(value)
-		return true
-	}, locationRange)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 }
 
 func (v *DictionaryValue) StaticType(_ *Interpreter) StaticType {
@@ -19124,16 +19076,10 @@ func (v *DictionaryValue) IsImportable(inter *Interpreter, locationRange Locatio
 				return false
 			}
 
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
 			// continue iteration
 			return true
 		},
 	)
-=======
-		// continue iteration
-		return true
-	}, locationRange)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 
 	return importable
 }
@@ -19185,14 +19131,9 @@ func (v *DictionaryValue) Destroy(interpreter *Interpreter, locationRange Locati
 					maybeDestroy(interpreter, locationRange, key)
 					maybeDestroy(interpreter, locationRange, value)
 
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
 					return true
 				},
 			)
-=======
-				return true
-			}, locationRange)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 		},
 	)
 
@@ -19349,15 +19290,10 @@ func (v *DictionaryValue) MeteredString(interpreter *Interpreter, seenReferences
 	}, v.Count())
 
 	index := 0
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
-	_ = v.dictionary.IterateReadOnly(func(key, value atree.Value) (resume bool, err error) {
-		// atree.OrderedMap iteration provides low-level atree.Value,
-		// convert to high-level interpreter.Value
-=======
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 
 	v.Iterate(
 		interpreter,
+		locationRange,
 		func(key, value Value) (resume bool) {
 			// atree.OrderedMap iteration provides low-level atree.Value,
 			// convert to high-level interpreter.Value
@@ -19372,7 +19308,6 @@ func (v *DictionaryValue) MeteredString(interpreter *Interpreter, seenReferences
 			index++
 			return true
 		},
-		locationRange,
 	)
 
 	// len = len(open-brace) + len(close-brace) + (n times colon+space) + ((n-1) times comma+space)
diff --git a/runtime/tests/interpreter/values_test.go b/runtime/tests/interpreter/values_test.go
remerge CONFLICT (content): Merge conflict in runtime/tests/interpreter/values_test.go
index 8ec9db522..90254906a 100644
--- a/runtime/tests/interpreter/values_test.go
+++ b/runtime/tests/interpreter/values_test.go
@@ -138,16 +138,10 @@ func TestInterpretRandomMapOperations(t *testing.T) {
 				orgValue, ok := entries.get(inter, key)
 				require.True(t, ok, "cannot find key: %v", key)
 
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
 				utils.AssertValuesEqual(t, inter, orgValue, value)
 				return true
 			},
 		)
-=======
-			utils.AssertValuesEqual(t, inter, orgValue, value)
-			return true
-		}, interpreter.EmptyLocationRange)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 	})
 
 	t.Run("deep copy", func(t *testing.T) {
diff --git a/runtime/tests/utils/utils.go b/runtime/tests/utils/utils.go
remerge CONFLICT (content): Merge conflict in runtime/tests/utils/utils.go
index 56775f86a..2b8c43fea 100644
--- a/runtime/tests/utils/utils.go
+++ b/runtime/tests/utils/utils.go
@@ -247,14 +247,9 @@ func DictionaryKeyValues(inter *interpreter.Interpreter, dict *interpreter.Dicti
 			result[i*2+1] = value
 			i++
 
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
 			return true
 		},
 	)
-=======
-		return true
-	}, interpreter.EmptyLocationRange)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 	return result
 }
 
@@ -301,25 +296,8 @@ func DictionaryEntries[K, V any](
 				Value: value,
 			}
 			return iterStatus
-<<<<<<< d258aa622 (Merge pull request #3179 from onflow/supun/atree-inlining-merge-master)
 		},
 	)
-=======
-		}
-
-		value, ok := fromVal(rawValue)
-		if !ok {
-			iterStatus = false
-			return iterStatus
-		}
-
-		res[idx] = DictionaryEntry[K, V]{
-			Key:   key,
-			Value: value,
-		}
-		return iterStatus
-	}, interpreter.EmptyLocationRange)
->>>>>>> 50d446334 (Merge pull request #3224 from onflow/bastian/composite-value-remove-field-check-resource-loss)
 
 	return res, iterStatus
 }
diff --git a/tools/storage-explorer/go.mod b/tools/storage-explorer/go.mod
index 774def2f6..3de28388a 100644
--- a/tools/storage-explorer/go.mod
+++ b/tools/storage-explorer/go.mod
@@ -4,7 +4,7 @@ go 1.20
 
 require (
 	github.com/gorilla/mux v1.8.1
-	github.com/onflow/atree v0.6.1-0.20240308163425-dc825c20b1a2
+	github.com/onflow/atree v0.6.1-0.20240314011440-92714cac03fb
 	github.com/onflow/cadence v1.0.0-M8
 	github.com/onflow/flow-go v0.34.0-crescendo-preview.5.0.20240229164931-a67398875618
 	github.com/rs/zerolog v1.32.0
diff --git a/tools/storage-explorer/go.sum b/tools/storage-explorer/go.sum
index 70e47d586..b6b2aeb6a 100644
--- a/tools/storage-explorer/go.sum
+++ b/tools/storage-explorer/go.sum
@@ -1772,8 +1772,8 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn
 github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
 github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
 github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM=
-github.com/onflow/atree v0.6.1-0.20240308163425-dc825c20b1a2 h1:jJLDswfAVB0bHCu1y1FPdKukPcTNmN+jYEX9S9phbv0=
-github.com/onflow/atree v0.6.1-0.20240308163425-dc825c20b1a2/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM=
+github.com/onflow/atree v0.6.1-0.20240314011440-92714cac03fb h1:9w+8wseSv7TZ9ikGfKSZ6yJifgYLhm717Zo0SVKpGEQ=
+github.com/onflow/atree v0.6.1-0.20240314011440-92714cac03fb/go.mod h1:7YNAyCd5JENq+NzH+fR1ABUZVzbSq9dkt0+5fZH3L2A=
 github.com/onflow/crypto v0.25.0 h1:BeWbLsh3ZD13Ej+Uky6kg1PL1ZIVBDVX+2MVBNwqddg=
 github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI=
 github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.2-0.20240227190927-0e6ce7e3222b h1:oXHQft30sElpK7G3xWB5tEizI2G+S4p64iVh0LtX4E0=

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

dsainati1 and others added 18 commits April 3, 2024 15:08
Resource Reference Invalidation Improvements
remove ability to dereference arrays or dicts of structs
…te field

the function is currently only used in tests, but might be used in the future
Copy link

github-actions bot commented Apr 8, 2024

Cadence Benchstat comparison

This branch with compared with the base branch onflow:feature/atree-register-inlining-v1.0 commit d258aa6
The command for i in {1..N}; do go test ./... -run=XXX -bench=. -benchmem -shuffle=on; done was used.
Bench tests were run a total of 7 times on each branch.

Collapsed results for better readability

old.txtnew.txt
time/opdelta
DecodeBatchEventsCCF-4138ms ± 0%127ms ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsJSON-4385ms ± 0%406ms ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.FeesDeducted-42.85µs ± 0%2.80µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.TokensWithdrawn-42.11µs ± 0%2.12µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-42.80µs ± 0%2.79µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-43.10µs ± 0%3.15µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.NewWeeklyPayout-42.14µs ± 0%2.25µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.RewardsPaid-42.50µs ± 0%2.51µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensDeposited-42.58µs ± 0%2.55µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensDeposited_with_nil_receiver-42.48µs ± 0%2.51µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensMinted-42.12µs ± 0%2.12µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensWithdrawn-42.61µs ± 0%2.58µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowFees.FeesDeducted-49.58µs ± 0%9.39µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowFees.TokensWithdrawn-45.55µs ± 0%5.47µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-48.62µs ± 0%8.49µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-411.8µs ± 0%11.7µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.NewWeeklyPayout-45.67µs ± 0%5.60µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.RewardsPaid-47.27µs ± 0%7.22µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensDeposited-47.62µs ± 0%7.61µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensDeposited_with_nil_receiver-46.94µs ± 0%6.85µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensMinted-45.61µs ± 0%5.53µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensWithdrawn-47.64µs ± 0%7.52µs ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsCCF-486.9ms ± 0%292.4ms ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsJSON-4106ms ± 0%105ms ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.FeesDeducted-41.96µs ± 0%1.97µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.TokensWithdrawn-41.52µs ± 0%1.55µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-41.88µs ± 0%1.89µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-42.21µs ± 0%2.22µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.NewWeeklyPayout-41.57µs ± 0%1.57µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.RewardsPaid-41.71µs ± 0%1.72µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensDeposited-41.76µs ± 0%1.76µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensDeposited_with_nil_receiver-41.72µs ± 0%1.73µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensMinted-41.51µs ± 0%1.54µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensWithdrawn-41.78µs ± 0%1.77µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowFees.FeesDeducted-42.54µs ± 0%2.48µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowFees.TokensWithdrawn-41.43µs ± 0%1.39µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-42.22µs ± 0%2.21µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-43.16µs ± 0%3.14µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.NewWeeklyPayout-41.46µs ± 0%1.44µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.RewardsPaid-41.87µs ± 0%1.87µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensDeposited-42.17µs ± 0%2.15µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensDeposited_with_nil_receiver-41.70µs ± 0%1.70µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensMinted-41.43µs ± 0%1.43µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensWithdrawn-42.14µs ± 0%2.12µs ± 0%~(p=1.000 n=1+1)
ExportType/composite_type-4282ns ± 0%286ns ± 0%~(p=1.000 n=1+1)
ExportType/simple_type-471.1ns ± 0%76.7ns ± 0%~(p=1.000 n=1+1)
InterpretRecursionFib-42.21ms ± 0%2.22ms ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_interpreter-4910ns ± 0%918ns ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_sub-interpreter-4455ns ± 0%458ns ± 0%~(p=1.000 n=1+1)
ParseArray-45.94ms ± 1%5.91ms ± 0%~(p=1.000 n=2+2)
ParseDeploy/byte_array-48.95ms ± 1%9.01ms ± 1%~(p=0.667 n=2+2)
ParseDeploy/decode_hex-41.00ms ± 0%1.00ms ± 0%~(p=0.667 n=2+2)
ParseFungibleToken/With_memory_metering-4149µs ± 2%150µs ± 6%~(p=1.000 n=2+2)
ParseFungibleToken/Without_memory_metering-4123µs ± 3%115µs ± 3%~(p=0.333 n=2+2)
ParseInfix-45.27µs ± 1%5.24µs ± 0%~(p=0.667 n=2+2)
QualifiedIdentifierCreation/One_level-42.17ns ± 0%2.17ns ± 0%~(p=1.000 n=1+1)
QualifiedIdentifierCreation/Three_levels-484.3ns ± 0%84.1ns ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-43.66µs ± 0%3.65µs ± 0%~(p=1.000 n=1+1)
SuperTypeInference/arrays-4236ns ± 0%237ns ± 0%~(p=1.000 n=1+1)
SuperTypeInference/composites-497.5ns ± 0%101.0ns ± 0%~(p=1.000 n=1+1)
SuperTypeInference/integers-4318ns ± 0%316ns ± 0%~(p=1.000 n=1+1)
ValueIsSubtypeOfSemaType-480.7ns ± 0%76.4ns ± 0%~(p=1.000 n=1+1)
 
alloc/opdelta
DecodeBatchEventsCCF-466.5MB ± 0%66.5MB ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsJSON-4244MB ± 0%244MB ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.FeesDeducted-41.40kB ± 0%1.40kB ± 0%~(all equal)
DecodeCCF/FlowFees.TokensWithdrawn-41.21kB ± 0%1.21kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-41.48kB ± 0%1.48kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-41.49kB ± 0%1.49kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.NewWeeklyPayout-41.26kB ± 0%1.26kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.RewardsPaid-41.38kB ± 0%1.38kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited-41.32kB ± 0%1.32kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited_with_nil_receiver-41.30kB ± 0%1.30kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensMinted-41.21kB ± 0%1.21kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensWithdrawn-41.33kB ± 0%1.33kB ± 0%~(all equal)
DecodeJSON/FlowFees.FeesDeducted-46.00kB ± 0%6.00kB ± 0%~(all equal)
DecodeJSON/FlowFees.TokensWithdrawn-43.60kB ± 0%3.60kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-45.43kB ± 0%5.43kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-47.35kB ± 0%7.35kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.NewWeeklyPayout-43.64kB ± 0%3.64kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.RewardsPaid-44.54kB ± 0%4.54kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited-44.88kB ± 0%4.88kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited_with_nil_receiver-44.46kB ± 0%4.46kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensMinted-43.60kB ± 0%3.60kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensWithdrawn-44.88kB ± 0%4.88kB ± 0%~(all equal)
EncodeBatchEventsCCF-462.4MB ± 0%62.4MB ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsJSON-439.1MB ± 0%39.1MB ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.FeesDeducted-41.22kB ± 0%1.22kB ± 0%~(all equal)
EncodeCCF/FlowFees.TokensWithdrawn-41.17kB ± 0%1.17kB ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-41.44kB ± 0%1.44kB ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-41.41kB ± 0%1.41kB ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.NewWeeklyPayout-41.34kB ± 0%1.34kB ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.RewardsPaid-41.42kB ± 0%1.42kB ± 0%~(all equal)
EncodeCCF/FlowToken.TokensDeposited-41.22kB ± 0%1.22kB ± 0%~(all equal)
EncodeCCF/FlowToken.TokensDeposited_with_nil_receiver-41.20kB ± 0%1.20kB ± 0%~(all equal)
EncodeCCF/FlowToken.TokensMinted-41.17kB ± 0%1.17kB ± 0%~(all equal)
EncodeCCF/FlowToken.TokensWithdrawn-41.22kB ± 0%1.22kB ± 0%~(all equal)
EncodeJSON/FlowFees.FeesDeducted-4864B ± 0%864B ± 0%~(all equal)
EncodeJSON/FlowFees.TokensWithdrawn-4504B ± 0%504B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-4888B ± 0%888B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-41.08kB ± 0%1.08kB ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.NewWeeklyPayout-4552B ± 0%552B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.RewardsPaid-4752B ± 0%752B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited-4776B ± 0%776B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited_with_nil_receiver-4640B ± 0%640B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensMinted-4512B ± 0%512B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensWithdrawn-4768B ± 0%768B ± 0%~(all equal)
ExportType/composite_type-4120B ± 0%120B ± 0%~(all equal)
ExportType/simple_type-40.00B 0.00B ~(all equal)
InterpretRecursionFib-41.00MB ± 0%1.00MB ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_interpreter-4944B ± 0%944B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-4200B ± 0%200B ± 0%~(all equal)
ParseArray-42.65MB ± 0%2.65MB ± 0%~(p=0.333 n=2+2)
ParseDeploy/byte_array-44.15MB ± 2%4.23MB ± 0%~(p=0.333 n=2+2)
ParseDeploy/decode_hex-4214kB ± 0%214kB ± 0%~(p=0.333 n=2+2)
ParseFungibleToken/With_memory_metering-429.6kB ± 0%29.6kB ± 0%~(p=1.000 n=2+2)
ParseFungibleToken/Without_memory_metering-429.6kB ± 0%29.6kB ± 0%~(p=0.667 n=2+2)
ParseInfix-41.92kB ± 0%1.92kB ± 0%~(p=0.667 n=2+2)
QualifiedIdentifierCreation/One_level-40.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-464.0B ± 0%64.0B ± 0%~(all equal)
RuntimeScriptNoop-43.21kB ± 0%3.21kB ± 0%~(all equal)
SuperTypeInference/arrays-496.0B ± 0%96.0B ± 0%~(all equal)
SuperTypeInference/composites-40.00B 0.00B ~(all equal)
SuperTypeInference/integers-40.00B 0.00B ~(all equal)
ValueIsSubtypeOfSemaType-448.0B ± 0%48.0B ± 0%~(all equal)
 
allocs/opdelta
DecodeBatchEventsCCF-41.48M ± 0%1.48M ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsJSON-44.70M ± 0%4.70M ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.FeesDeducted-430.0 ± 0%30.0 ± 0%~(all equal)
DecodeCCF/FlowFees.TokensWithdrawn-426.0 ± 0%26.0 ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-430.0 ± 0%30.0 ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-432.0 ± 0%32.0 ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.NewWeeklyPayout-426.0 ± 0%26.0 ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.RewardsPaid-429.0 ± 0%29.0 ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited-431.0 ± 0%31.0 ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited_with_nil_receiver-429.0 ± 0%29.0 ± 0%~(all equal)
DecodeCCF/FlowToken.TokensMinted-426.0 ± 0%26.0 ± 0%~(all equal)
DecodeCCF/FlowToken.TokensWithdrawn-431.0 ± 0%31.0 ± 0%~(all equal)
DecodeJSON/FlowFees.FeesDeducted-4126 ± 0%126 ± 0%~(all equal)
DecodeJSON/FlowFees.TokensWithdrawn-471.0 ± 0%71.0 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-4102 ± 0%102 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-4159 ± 0%159 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.NewWeeklyPayout-470.0 ± 0%70.0 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.RewardsPaid-487.0 ± 0%87.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited-495.0 ± 0%95.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited_with_nil_receiver-486.0 ± 0%86.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensMinted-471.0 ± 0%71.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensWithdrawn-495.0 ± 0%95.0 ± 0%~(all equal)
EncodeBatchEventsCCF-4950k ± 0%950k ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsJSON-4853k ± 0%853k ± 0%~(all equal)
EncodeCCF/FlowFees.FeesDeducted-419.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowFees.TokensWithdrawn-419.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-419.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-419.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.NewWeeklyPayout-419.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.RewardsPaid-419.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensDeposited-420.0 ± 0%20.0 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensDeposited_with_nil_receiver-420.0 ± 0%20.0 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensMinted-419.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensWithdrawn-420.0 ± 0%20.0 ± 0%~(all equal)
EncodeJSON/FlowFees.FeesDeducted-419.0 ± 0%19.0 ± 0%~(all equal)
EncodeJSON/FlowFees.TokensWithdrawn-412.0 ± 0%12.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-416.0 ± 0%16.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-425.0 ± 0%25.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.NewWeeklyPayout-412.0 ± 0%12.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.RewardsPaid-415.0 ± 0%15.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited-419.0 ± 0%19.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited_with_nil_receiver-414.0 ± 0%14.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensMinted-413.0 ± 0%13.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensWithdrawn-418.0 ± 0%18.0 ± 0%~(all equal)
ExportType/composite_type-43.00 ± 0%3.00 ± 0%~(all equal)
ExportType/simple_type-40.00 0.00 ~(all equal)
InterpretRecursionFib-418.9k ± 0%18.9k ± 0%~(all equal)
NewInterpreter/new_interpreter-415.0 ± 0%15.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-44.00 ± 0%4.00 ± 0%~(all equal)
ParseArray-459.6k ± 0%59.6k ± 0%~(p=0.333 n=2+2)
ParseDeploy/byte_array-489.4k ± 0%89.4k ± 0%~(p=0.333 n=2+2)
ParseDeploy/decode_hex-463.0 ± 0%63.0 ± 0%~(all equal)
ParseFungibleToken/With_memory_metering-4773 ± 1%773 ± 1%~(p=1.000 n=2+2)
ParseFungibleToken/Without_memory_metering-4773 ± 1%773 ± 1%~(p=1.000 n=2+2)
ParseInfix-448.0 ± 0%48.0 ± 0%~(all equal)
QualifiedIdentifierCreation/One_level-40.00 0.00 ~(all equal)
QualifiedIdentifierCreation/Three_levels-42.00 ± 0%2.00 ± 0%~(all equal)
RuntimeScriptNoop-451.0 ± 0%51.0 ± 0%~(all equal)
SuperTypeInference/arrays-43.00 ± 0%3.00 ± 0%~(all equal)
SuperTypeInference/composites-40.00 0.00 ~(all equal)
SuperTypeInference/integers-40.00 0.00 ~(all equal)
ValueIsSubtypeOfSemaType-41.00 ± 0%1.00 ± 0%~(all equal)
 

@turbolent turbolent merged commit 43ad9af into feature/atree-register-inlining-v1.0 Apr 9, 2024
7 of 9 checks passed
@turbolent turbolent deleted the bastian/update-atree-register-inlining-v1.0 branch April 9, 2024 17:44
@SupunS SupunS added the Chore label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants