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 to Stable Cadence feature branch #2593

Merged
merged 175 commits into from
Jun 22, 2023

Conversation

turbolent
Copy link
Member

@turbolent turbolent commented Jun 21, 2023

Description

Additional adjustments (only tests) in d0bffa8 and dda2353

Conflict resolution 1:
git log -1 -p -w --remerge-diff fadb1f6
commit fadb1f6ed22b2eb82a2e1f46f2395ae7ba93c417
Merge: a0862a6b5 1311ef1ed
Author: Bastian Müller <bastian@axiomzen.co>
Date:   Wed Jun 21 12:26:03 2023 -0700

    Merge branch 'master' into bastian/sync-stable-cadence-2

diff --git a/encoding/json/decode.go b/encoding/json/decode.go
remerge CONFLICT (content): Merge conflict in encoding/json/decode.go
index e8f0ca008..ab3c2ee07 100644
--- a/encoding/json/decode.go
+++ b/encoding/json/decode.go
@@ -135,11 +135,8 @@ const (
 	typeParametersKey = "typeParameters"
 	returnKey         = "return"
 	typeBoundKey      = "typeBound"
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
 	purityKey         = "purity"
-=======
 	functionTypeKey   = "functionType"
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
 )
 
 func (d *Decoder) decodeJSON(v any) cadence.Value {
@@ -980,7 +977,6 @@ func (d *Decoder) decodeFieldType(valueJSON any, results typeDecodingResults) ca
 	)
 }
 
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
 func (d *Decoder) decodePurity(purity any) cadence.FunctionPurity {
 	functionPurity := toString(purity)
 	if functionPurity == "view" {
@@ -990,14 +986,10 @@ func (d *Decoder) decodePurity(purity any) cadence.FunctionPurity {
 }
 
 func (d *Decoder) decodeFunctionType(typeParametersValue, parametersValue, returnValue any, purity any, results typeDecodingResults) cadence.Type {
-	typeParameters := d.decodeTypeParameters(toSlice(typeParametersValue), results)
-=======
-func (d *Decoder) decodeFunctionType(typeParametersValue, parametersValue, returnValue any, results typeDecodingResults) cadence.Type {
 	var typeParameters []cadence.TypeParameter
 	if typeParametersValue != nil {
 		typeParameters = d.decodeTypeParameters(toSlice(typeParametersValue), results)
 	}
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
 	parameters := d.decodeParameters(toSlice(parametersValue), results)
 	returnType := d.decodeType(returnValue, results)
 	functionPurity := d.decodePurity(purity)
diff --git a/encoding/json/encoding_test.go b/encoding/json/encoding_test.go
remerge CONFLICT (content): Merge conflict in encoding/json/encoding_test.go
index e6ce72286..da5b0b304 100644
--- a/encoding/json/encoding_test.go
+++ b/encoding/json/encoding_test.go
@@ -2462,11 +2462,8 @@ func TestEncodeType(t *testing.T) {
                 "value": {
                   "staticType": {
                     "kind": "Function",
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
 					"purity": "",
-=======
                     "typeID": "(<T>(String):Int)",
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
                     "return": {
                       "kind": "Int"
                     },
@@ -2495,7 +2492,6 @@ func TestEncodeType(t *testing.T) {
 
 	})
 
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
 	t.Run("with view static function", func(t *testing.T) {
 
 		testEncodeAndDecode(
@@ -2521,7 +2517,10 @@ func TestEncodeType(t *testing.T) {
 					]}
 				}
 			}`,
-=======
+		)
+
+	})
+
 	t.Run("with static function, without type parameters (decode only)", func(t *testing.T) {
 
 		testDecode(
@@ -2558,12 +2557,9 @@ func TestEncodeType(t *testing.T) {
 					ReturnType: cadence.IntType{},
 				},
 			},
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
 		)
-
 	})
 
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
 	t.Run("with implicit purity", func(t *testing.T) {
 
 		encodedValue := `{"type":"Type","value":{"staticType":
@@ -2592,8 +2588,6 @@ func TestEncodeType(t *testing.T) {
 		require.Equal(t, value, decodedValue)
 	})
 
-=======
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
 	t.Run("with static Capability<Int>", func(t *testing.T) {
 
 		testEncodeAndDecode(
diff --git a/runtime/account_test.go b/runtime/account_test.go
remerge CONFLICT (content): Merge conflict in runtime/account_test.go
index 638af2871..5fd6db73a 100644
--- a/runtime/account_test.go
+++ b/runtime/account_test.go
@@ -39,134 +39,6 @@ import (
 	. "github.com/onflow/cadence/runtime/tests/utils"
 )
 
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
-=======
-func TestRuntimeTransaction_AddPublicKey(t *testing.T) {
-
-	t.Parallel()
-
-	rt := newTestInterpreterRuntime()
-
-	keyA := cadence.NewArray([]cadence.Value{
-		cadence.NewUInt8(1),
-		cadence.NewUInt8(2),
-		cadence.NewUInt8(3),
-	})
-
-	keyB := cadence.NewArray([]cadence.Value{
-		cadence.NewUInt8(4),
-		cadence.NewUInt8(5),
-		cadence.NewUInt8(6),
-	})
-
-	keys := cadence.NewArray([]cadence.Value{
-		keyA,
-		keyB,
-	})
-
-	var tests = []struct {
-		name     string
-		code     string
-		args     []cadence.Value
-		expected [][]byte
-		keyCount int
-	}{
-		{
-			name: "Single key",
-			code: `
-              transaction(keyA: [UInt8]) {
-                prepare(signer: AuthAccount) {
-                  let acct = AuthAccount(payer: signer)
-                  acct.addPublicKey(keyA)
-                }
-              }
-            `,
-			keyCount: 1,
-			args:     []cadence.Value{keyA},
-			expected: [][]byte{{1, 2, 3}},
-		},
-		{
-			name: "Multiple keys",
-			code: `
-              transaction(keys: [[UInt8]]) {
-                prepare(signer: AuthAccount) {
-                  let acct = AuthAccount(payer: signer)
-                  for key in keys {
-                    acct.addPublicKey(key)
-                  }
-                }
-              }
-            `,
-			keyCount: 2,
-			args:     []cadence.Value{keys},
-			expected: [][]byte{{1, 2, 3}, {4, 5, 6}},
-		},
-	}
-
-	nextTransactionLocation := newTransactionLocationGenerator()
-
-	for _, tt := range tests {
-
-		var events []cadence.Event
-		var keys [][]byte
-
-		runtimeInterface := &testRuntimeInterface{
-			storage: newTestLedger(nil, nil),
-			getSigningAccounts: func() ([]Address, error) {
-				return []Address{{42}}, nil
-			},
-			createAccount: func(payer Address) (address Address, err error) {
-				return Address{42}, nil
-			},
-			addEncodedAccountKey: func(address Address, publicKey []byte) error {
-				keys = append(keys, publicKey)
-				return nil
-			},
-			emitEvent: func(event cadence.Event) error {
-				events = append(events, event)
-				return nil
-			},
-			decodeArgument: func(b []byte, t cadence.Type) (value cadence.Value, err error) {
-				return json.Decode(nil, b)
-			},
-		}
-
-		t.Run(tt.name, func(t *testing.T) {
-
-			args := make([][]byte, len(tt.args))
-			for i, arg := range tt.args {
-				var err error
-				args[i], err = json.Encode(arg)
-				if err != nil {
-					panic(fmt.Errorf("broken test: invalid argument: %w", err))
-				}
-			}
-
-			err := rt.ExecuteTransaction(
-				Script{
-					Source:    []byte(tt.code),
-					Arguments: args,
-				},
-				Context{
-					Interface: runtimeInterface,
-					Location:  nextTransactionLocation(),
-				},
-			)
-			require.NoError(t, err)
-			assert.Len(t, events, tt.keyCount+1)
-			assert.Len(t, keys, tt.keyCount)
-			assert.Equal(t, tt.expected, keys)
-
-			assert.EqualValues(t, stdlib.AccountCreatedEventType.ID(), events[0].Type().ID())
-
-			for _, event := range events[1:] {
-				assert.EqualValues(t, stdlib.AccountKeyAddedFromByteArrayEventType.ID(), event.Type().ID())
-			}
-		})
-	}
-}
-
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
 func TestRuntimeAccountKeyConstructor(t *testing.T) {
 
 	t.Parallel()
diff --git a/runtime/runtime_test.go b/runtime/runtime_test.go
remerge CONFLICT (content): Merge conflict in runtime/runtime_test.go
index c068f2fa5..b06d8bb6a 100644
--- a/runtime/runtime_test.go
+++ b/runtime/runtime_test.go
@@ -2788,24 +2788,15 @@ func TestRuntimeScriptReturnSpecial(t *testing.T) {
                   }
                 `,
 				expected: cadence.Function{
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
-					FunctionType: &cadence.FunctionType{
-						Purity: sema.FunctionPurityView,
-						Parameters: []cadence.Parameter{
-							{
-								Label:      sema.ArgumentLabelNotRequired,
-								Identifier: "message",
-								Type:       cadence.StringType{},
-=======
 					FunctionType: cadence.TypeWithCachedTypeID(
 						&cadence.FunctionType{
+							Purity: sema.FunctionPurityView,
 							Parameters: []cadence.Parameter{
 								{
 									Label:      sema.ArgumentLabelNotRequired,
 									Identifier: "message",
 									Type:       cadence.StringType{},
 								},
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
 							},
 							ReturnType: cadence.NeverType{},
 						},
diff --git a/runtime/sema/type.go b/runtime/sema/type.go
remerge CONFLICT (content): Merge conflict in runtime/sema/type.go
index 796890f48..e3b08a0a7 100644
--- a/runtime/sema/type.go
+++ b/runtime/sema/type.go
@@ -1578,15 +1578,15 @@ var (
 			WithTag(Word128TypeTag).
 			WithIntRange(Word128TypeMinIntBig, Word128TypeMaxIntBig)
 
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
 	Word128TypeAnnotation = NewTypeAnnotation(Word128Type)
-=======
+
 	// Word256Type represents the 256-bit unsigned integer type `Word256`
 	// which does NOT check for overflow and underflow
 	Word256Type = NewNumericType(Word256TypeName).
 			WithTag(Word256TypeTag).
 			WithIntRange(Word256TypeMinIntBig, Word256TypeMaxIntBig)
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
+
+	Word256TypeAnnotation = NewTypeAnnotation(Word256Type)
 
 	// FixedPointType represents the super-type of all fixed-point types
 	FixedPointType = NewNumericType(FixedPointTypeName).
diff --git a/runtime/stdlib/account.go b/runtime/stdlib/account.go
remerge CONFLICT (content): Merge conflict in runtime/stdlib/account.go
index 1393a5148..c1dfce2c0 100644
--- a/runtime/stdlib/account.go
+++ b/runtime/stdlib/account.go
@@ -457,120 +457,6 @@ func newStorageCapacityGetFunction(
 	}
 }
 
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
-=======
-type AccountEncodedKeyAdditionHandler interface {
-	EventEmitter
-	// AddEncodedAccountKey appends an encoded key to an account.
-	AddEncodedAccountKey(address common.Address, key []byte) error
-}
-
-func newAddPublicKeyFunction(
-	gauge common.MemoryGauge,
-	handler AccountEncodedKeyAdditionHandler,
-	addressValue interpreter.AddressValue,
-) *interpreter.HostFunctionValue {
-
-	// Converted addresses can be cached and don't have to be recomputed on each function invocation
-	address := addressValue.ToAddress()
-
-	return interpreter.NewHostFunctionValue(
-		gauge,
-		sema.AuthAccountTypeAddPublicKeyFunctionType,
-		func(invocation interpreter.Invocation) interpreter.Value {
-			publicKeyValue, ok := invocation.Arguments[0].(*interpreter.ArrayValue)
-			if !ok {
-				panic(errors.NewUnreachableError())
-			}
-
-			locationRange := invocation.LocationRange
-
-			inter := invocation.Interpreter
-
-			publicKey, err := interpreter.ByteArrayValueToByteSlice(inter, publicKeyValue, locationRange)
-			if err != nil {
-				panic("addPublicKey requires the first argument to be a byte array")
-			}
-
-			errors.WrapPanic(func() {
-				err = handler.AddEncodedAccountKey(address, publicKey)
-			})
-			if err != nil {
-				panic(err)
-			}
-
-			handler.EmitEvent(
-				inter,
-				AccountKeyAddedFromByteArrayEventType,
-				[]interpreter.Value{
-					addressValue,
-					publicKeyValue,
-				},
-				locationRange,
-			)
-
-			return interpreter.Void
-		},
-	)
-}
-
-type AccountEncodedKeyRevocationHandler interface {
-	EventEmitter
-	// RevokeEncodedAccountKey removes a key from an account by index, add returns the encoded key.
-	RevokeEncodedAccountKey(address common.Address, index int) ([]byte, error)
-}
-
-func newRemovePublicKeyFunction(
-	gauge common.MemoryGauge,
-	handler AccountEncodedKeyRevocationHandler,
-	addressValue interpreter.AddressValue,
-) *interpreter.HostFunctionValue {
-
-	// Converted addresses can be cached and don't have to be recomputed on each function invocation
-	address := addressValue.ToAddress()
-
-	return interpreter.NewHostFunctionValue(
-		gauge,
-		sema.AuthAccountTypeRemovePublicKeyFunctionType,
-		func(invocation interpreter.Invocation) interpreter.Value {
-			index, ok := invocation.Arguments[0].(interpreter.IntValue)
-			if !ok {
-				panic(errors.NewUnreachableError())
-			}
-
-			var publicKey []byte
-			var err error
-			errors.WrapPanic(func() {
-				publicKey, err = handler.RevokeEncodedAccountKey(address, index.ToInt(invocation.LocationRange))
-			})
-			if err != nil {
-				panic(err)
-			}
-
-			inter := invocation.Interpreter
-			locationRange := invocation.LocationRange
-
-			publicKeyValue := interpreter.ByteSliceToByteArrayValue(
-				inter,
-				publicKey,
-			)
-
-			handler.EmitEvent(
-				inter,
-				AccountKeyRemovedFromByteArrayEventType,
-				[]interpreter.Value{
-					addressValue,
-					publicKeyValue,
-				},
-				locationRange,
-			)
-
-			return interpreter.Void
-		},
-	)
-}
-
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
 type AccountKeyAdditionHandler interface {
 	EventEmitter
 	PublicKeyValidator
diff --git a/runtime/stdlib/flow.go b/runtime/stdlib/flow.go
remerge CONFLICT (content): Merge conflict in runtime/stdlib/flow.go
index 1a7330c12..d4d5b9ede 100644
--- a/runtime/stdlib/flow.go
+++ b/runtime/stdlib/flow.go
@@ -190,19 +190,6 @@ var AccountEventCodeHashParameter = sema.Parameter{
 	TypeAnnotation: HashTypeAnnotation,
 }
 
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
-var AccountEventPublicKeyParameter = sema.Parameter{
-	Identifier:     "publicKey",
-	TypeAnnotation: sema.ByteArrayTypeAnnotation,
-=======
-var AccountEventPublicKeyParameterAsByteArrayType = sema.Parameter{
-	Identifier: "publicKey",
-	TypeAnnotation: sema.NewTypeAnnotation(
-		sema.ByteArrayType,
-	),
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
-}
-
 var AccountEventPublicKeyParameterAsCompositeType = sema.Parameter{
 	Identifier: "publicKey",
 	TypeAnnotation: sema.NewTypeAnnotation(
@@ -227,24 +214,12 @@ var AccountCreatedEventType = newFlowEventType(
 	AccountEventAddressParameter,
 )
 
-var AccountKeyAddedFromByteArrayEventType = newFlowEventType(
-	"AccountKeyAdded",
-	AccountEventAddressParameter,
-	AccountEventPublicKeyParameterAsByteArrayType,
-)
-
 var AccountKeyAddedFromPublicKeyEventType = newFlowEventType(
 	"AccountKeyAdded",
 	AccountEventAddressParameter,
 	AccountEventPublicKeyParameterAsCompositeType,
 )
 
-var AccountKeyRemovedFromByteArrayEventType = newFlowEventType(
-	"AccountKeyRemoved",
-	AccountEventAddressParameter,
-	AccountEventPublicKeyParameterAsByteArrayType,
-)
-
 var AccountKeyRemovedFromPublicKeyIndexEventType = newFlowEventType(
 	"AccountKeyRemoved",
 	AccountEventAddressParameter,
diff --git a/runtime/stdlib/flow_test.go b/runtime/stdlib/flow_test.go
index bbc6ea26f..e57c8737d 100644
--- a/runtime/stdlib/flow_test.go
+++ b/runtime/stdlib/flow_test.go
@@ -37,9 +37,7 @@ func TestFlowEventTypeIDs(t *testing.T) {
 
 	for _, ty := range []sema.Type{
 		AccountCreatedEventType,
-		AccountKeyAddedFromByteArrayEventType,
 		AccountKeyAddedFromPublicKeyEventType,
-		AccountKeyRemovedFromByteArrayEventType,
 		AccountKeyRemovedFromPublicKeyIndexEventType,
 		AccountContractAddedEventType,
 		AccountContractUpdatedEventType,
diff --git a/runtime/tests/interpreter/reference_test.go b/runtime/tests/interpreter/reference_test.go
remerge CONFLICT (content): Merge conflict in runtime/tests/interpreter/reference_test.go
index b4c8abbe7..94664f970 100644
--- a/runtime/tests/interpreter/reference_test.go
+++ b/runtime/tests/interpreter/reference_test.go
@@ -540,7 +540,6 @@ func TestInterpretReferenceExpressionOfOptional(t *testing.T) {
 	})
 }
 
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
 func TestInterpretResourceReferenceInvalidationOnMove(t *testing.T) {
 
 	t.Parallel()
@@ -630,18 +629,10 @@ func TestInterpretResourceReferenceInvalidationOnMove(t *testing.T) {
 	})
 
 	t.Run("account to stack", func(t *testing.T) {
-=======
-func TestInterpretReferenceTrackingOnInvocation(t *testing.T) {
-
-	t.Parallel()
-
-	t.Run("simple resource", func(t *testing.T) {
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
 
 		t.Parallel()
 
 		inter := parseCheckAndInterpret(t, `
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
             resource R {
                 pub(set) var id: Int
 
@@ -1244,7 +1235,20 @@ func TestInterpretResourceReferenceInvalidationOnDestroy(t *testing.T) {
 		_, err := inter.Invoke("test")
 		RequireError(t, err)
 		require.ErrorAs(t, err, &interpreter.DestroyedResourceError{})
-=======
+
+	})
+}
+
+func TestInterpretReferenceTrackingOnInvocation(t *testing.T) {
+
+	t.Parallel()
+
+	t.Run("simple resource", func(t *testing.T) {
+
+		t.Parallel()
+
+		inter := parseCheckAndInterpret(t,
+			`
             pub resource Foo {
 
                 pub let id: UInt8
@@ -1274,6 +1278,5 @@ func TestInterpretResourceReferenceInvalidationOnDestroy(t *testing.T) {
 
 		_, err := inter.Invoke("main")
 		require.NoError(t, err)
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
 	})
 }
diff --git a/values_test.go b/values_test.go
remerge CONFLICT (content): Merge conflict in values_test.go
index 31d24528a..d8a218222 100644
--- a/values_test.go
+++ b/values_test.go
@@ -601,22 +601,13 @@ func TestNumberValue_ToBigEndianBytes(t *testing.T) {
 			uint128MaxValue:           {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255},
 		},
 		"UInt256": {
-<<<<<<< a0862a6b5 (Merge pull request #2513 from onflow/bastian/sync-stable-cadence)
 			NewUInt256(0):             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 			NewUInt256(42):            {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42},
 			NewUInt256(127):           {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127},
 			NewUInt256(128):           {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128},
 			NewUInt256(200):           {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200},
-			UInt256{sema.UInt256TypeMaxIntBig}: {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255},
-=======
-			NewUInt256(0):             {0},
-			NewUInt256(42):            {42},
-			NewUInt256(127):           {127},
-			NewUInt256(128):           {128},
-			NewUInt256(200):           {200},
 			uint256LargeValueTestCase: {127, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255},
 			uint256MaxValue:           {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255},
->>>>>>> 1311ef1ed (Merge pull request #2591 from onflow/release/v0.39.12)
 		},
 		// Word*
 		"Word8": {
Conflict resolution 2:
git log -1 -p -w --remerge-diff 96ebaf5dd3de2b8e9549473ec88e16dc0f9ba102
commit 96ebaf5dd3de2b8e9549473ec88e16dc0f9ba102
Merge: e17ca20d1 115c6c411
Author: Bastian Müller <bastian@axiomzen.co>
Date:   Wed Jun 21 17:13:13 2023 -0700

    Merge branch 'feature/stable-cadence' into bastian/sync-stable-cadence-2

diff --git a/runtime/interpreter/sharedstate.go b/runtime/interpreter/sharedstate.go
remerge CONFLICT (content): Merge conflict in runtime/interpreter/sharedstate.go
index 5db4ce05a..c7529d615 100644
--- a/runtime/interpreter/sharedstate.go
+++ b/runtime/interpreter/sharedstate.go
@@ -43,12 +43,9 @@ type SharedState struct {
 	storageMutatedDuringIteration               bool
 	CapabilityControllerIterations              map[AddressPath]int
 	MutationDuringCapabilityControllerIteration bool
-<<<<<<< e17ca20d1 (bring back test)
 	containerValueIteration                     map[atree.StorageID]struct{}
 	destroyedResources                          map[atree.StorageID]struct{}
-=======
 	currentEntitlementMappedValue               Authorization
->>>>>>> 115c6c411 (Merge pull request #2594 from onflow/sainati/merge-entitlements)
 }
 
 func NewSharedState(config *Config) *SharedState {
diff --git a/runtime/interpreter/value.go b/runtime/interpreter/value.go
remerge CONFLICT (content): Merge conflict in runtime/interpreter/value.go
index 4d3f93832..340d5f9eb 100644
--- a/runtime/interpreter/value.go
+++ b/runtime/interpreter/value.go
@@ -15356,21 +15356,7 @@ func (v *CompositeValue) Destroy(interpreter *Interpreter, locationRange Locatio
 		}()
 	}
 
-<<<<<<< e17ca20d1 (bring back test)
 	storageID := v.StorageID()
-=======
-	// if this type has attachments, destroy all of them before invoking the destructor
-	v.forEachAttachment(interpreter, locationRange, func(attachment *CompositeValue) {
-		// an attachment's destructor may make reference to `base`, so we must set the base value
-		// for the attachment before invoking its destructor. For other functions, this happens
-		// automatically when the attachment is accessed with the access expression `v[A]`, which
-		// is a necessary pre-requisite for calling any members of the attachment. However, in
-		// the case of a destructor, this is called implicitly, and thus must have its `base`
-		// set manually
-		attachment.setBaseValue(interpreter, v, attachmentBaseAuthorization(interpreter, attachment))
-		attachment.Destroy(interpreter, locationRange)
-	})
->>>>>>> 115c6c411 (Merge pull request #2594 from onflow/sainati/merge-entitlements)
 
 	interpreter.withResourceDestruction(
 		storageID,
@@ -15384,7 +15370,7 @@ func (v *CompositeValue) Destroy(interpreter *Interpreter, locationRange Locatio
 				// is a necessary pre-requisite for calling any members of the attachment. However, in
 				// the case of a destructor, this is called implicitly, and thus must have its `base`
 				// set manually
-				attachment.setBaseValue(interpreter, v)
+				attachment.setBaseValue(interpreter, v, attachmentBaseAuthorization(interpreter, attachment))
 				attachment.Destroy(interpreter, locationRange)
 			})
 
@@ -15395,26 +15381,7 @@ func (v *CompositeValue) Destroy(interpreter *Interpreter, locationRange Locatio
 				v.Destructor = interpreter.SharedState.typeCodes.CompositeCodes[v.TypeID()].DestructorFunction
 			}
 
-<<<<<<< e17ca20d1 (bring back test)
 			destructor := v.Destructor
-=======
-	if destructor != nil {
-		var base *EphemeralReferenceValue
-		var self MemberAccessibleValue = v
-		if v.Kind == common.CompositeKindAttachment {
-			base, self = attachmentBaseAndSelfValues(interpreter, locationRange, v)
-		}
-		invocation := NewInvocation(
-			interpreter,
-			&self,
-			base,
-			nil,
-			nil,
-			nil,
-			nil,
-			locationRange,
-		)
->>>>>>> 115c6c411 (Merge pull request #2594 from onflow/sainati/merge-entitlements)
 
 			if destructor != nil {
 				var base *EphemeralReferenceValue
@@ -15429,6 +15396,7 @@ func (v *CompositeValue) Destroy(interpreter *Interpreter, locationRange Locatio
 					nil,
 					nil,
 					nil,
+					nil,
 					locationRange,
 				)
 
diff --git a/types.go b/types.go
remerge CONFLICT (content): Merge conflict in types.go
index b022e67a6..6fb0e1a74 100644
--- a/types.go
+++ b/types.go
@@ -20,11 +20,8 @@ package cadence
 
 import (
 	"fmt"
-<<<<<<< e17ca20d1 (bring back test)
 	"reflect"
-=======
 	"strings"
->>>>>>> 115c6c411 (Merge pull request #2594 from onflow/sainati/merge-entitlements)
 	"sync"
 
 	"github.com/onflow/cadence/runtime/common"
Conflict resolution 3:
git log -1 -p -w --remerge-diff 5bded4bad2e408a5bcc9bd156c698aa60babb954
commit 5bded4bad2e408a5bcc9bd156c698aa60babb954
Merge: 96ebaf5dd 6fd0e0153
Author: Bastian Müller <bastian@axiomzen.co>
Date:   Thu Jun 22 09:47:50 2023 -0700

    Merge branch 'feature/stable-cadence' into bastian/sync-stable-cadence-2

diff --git a/runtime/sema/authaccount.cdc b/runtime/sema/authaccount.cdc
index 9bfbadfbb..e987a4094 100644
--- a/runtime/sema/authaccount.cdc
+++ b/runtime/sema/authaccount.cdc
@@ -103,7 +103,7 @@ access(all) struct AuthAccount {
     /// The given type must not necessarily be exactly the same as the type of the borrowed object.
     ///
     /// The path must be a storage path, i.e., only the domain `storage` is allowed.
-    pub fun check<T: Any>(from: StoragePath): Bool
+    access(all) fun check<T: Any>(from: StoragePath): Bool
 
     /// **DEPRECATED**: Instead, use `capabilities.storage.issue`, and `capabilities.publish` if the path is public.
     ///
diff --git a/runtime/sema/authaccount.gen.go b/runtime/sema/authaccount.gen.go
remerge CONFLICT (content): Merge conflict in runtime/sema/authaccount.gen.go
index 22b9c60a1..2106e5b45 100644
--- a/runtime/sema/authaccount.gen.go
+++ b/runtime/sema/authaccount.gen.go
@@ -1951,18 +1951,14 @@ func init() {
 		),
 		NewUnmeteredFunctionMember(
 			AuthAccountType,
-<<<<<<< 96ebaf5dd (Merge branch 'feature/stable-cadence' into bastian/sync-stable-cadence-2)
-			ast.AccessPublic,
+			ast.AccessAll,
 			AuthAccountTypeCheckFunctionName,
 			AuthAccountTypeCheckFunctionType,
 			AuthAccountTypeCheckFunctionDocString,
 		),
 		NewUnmeteredFunctionMember(
 			AuthAccountType,
-			ast.AccessPublic,
-=======
 			ast.AccessAll,
->>>>>>> 6fd0e0153 (Merge pull request #2540 from onflow/sainati/remove-pub-priv)
 			AuthAccountTypeLinkFunctionName,
 			AuthAccountTypeLinkFunctionType,
 			AuthAccountTypeLinkFunctionDocString,
diff --git a/runtime/stdlib/contracts/test.cdc b/runtime/stdlib/contracts/test.cdc
remerge CONFLICT (content): Merge conflict in runtime/stdlib/contracts/test.cdc
index 3390aa682..25392726b 100644
--- a/runtime/stdlib/contracts/test.cdc
+++ b/runtime/stdlib/contracts/test.cdc
@@ -98,33 +98,33 @@ access(all) contract Test {
 
         /// Returns all the logs from the blockchain, up to the calling point.
         ///
-        pub fun logs(): [String] {
+        access(all) fun logs(): [String] {
             return self.backend.logs()
         }
 
         /// Returns the service account of the blockchain. Can be used to sign
         /// transactions with this account.
         ///
-        pub fun serviceAccount(): Account {
+        access(all) fun serviceAccount(): Account {
             return self.backend.serviceAccount()
         }
 
         /// Returns all events emitted from the blockchain.
         ///
-        pub fun events(): [AnyStruct] {
+        access(all) fun events(): [AnyStruct] {
             return self.backend.events(nil)
         }
 
         /// Returns all events emitted from the blockchain,
         /// filtered by type.
         ///
-        pub fun eventsOfType(_ type: Type): [AnyStruct] {
+        access(all) fun eventsOfType(_ type: Type): [AnyStruct] {
             return self.backend.events(type)
         }
 
         /// Resets the state of the blockchain.
         ///
-        pub fun reset() {
+        access(all) fun reset() {
             self.backend.reset()
         }
     }
@@ -289,29 +289,25 @@ access(all) contract Test {
         /// Set the configuration to be used by the blockchain.
         /// Overrides any existing configuration.
         ///
-<<<<<<< 96ebaf5dd (Merge branch 'feature/stable-cadence' into bastian/sync-stable-cadence-2)
-        pub fun useConfiguration(_ configuration: Configuration)
+        access(all) fun useConfiguration(_ configuration: Configuration)
 
         /// Returns all the logs from the blockchain, up to the calling point.
         ///
-        pub fun logs(): [String]
+        access(all) fun logs(): [String]
 
         /// Returns the service account of the blockchain. Can be used to sign
         /// transactions with this account.
         ///
-        pub fun serviceAccount(): Account
+        access(all) fun serviceAccount(): Account
 
         /// Returns all events emitted from the blockchain, optionally filtered
         /// by type.
         ///
-        pub fun events(_ type: Type?): [AnyStruct]
+        access(all) fun events(_ type: Type?): [AnyStruct]
 
         /// Resets the state of the blockchain.
         ///
-        pub fun reset()
-=======
-        access(all) fun useConfiguration(_ configuration: Configuration)
->>>>>>> 6fd0e0153 (Merge pull request #2540 from onflow/sainati/remove-pub-priv)
+        access(all) fun reset()
     }
 
     /// Returns a new matcher that negates the test of the given matcher.

  • Targeted PR against master feature/stable-cadence 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

darkdrag00nv2 and others added 30 commits May 27, 2023 00:27
This function will call the emulator's Blockchain.ReloadBlockchain method,
under the hood.
Add tests for test framework blockchain
- AnyStructAttachmentType
- AnyResourceAttachmentType
…hmentType-and-AnyResourceAttachmentType-in-CCF

Support 2 new attachment types in CCF codec
@github-actions
Copy link

github-actions bot commented Jun 21, 2023

Cadence Benchstat comparison

This branch with compared with the base branch onflow:feature/stable-cadence commit 6fd0e01
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
CheckContractInterfaceFungibleTokenConformance-2125µs ± 0%132µs ± 0%~(p=1.000 n=1+1)
ContractInterfaceFungibleToken-242.1µs ± 0%42.5µs ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsCCF-2155ms ± 0%156ms ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsJSON-2529ms ± 0%514ms ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.FeesDeducted-24.67µs ± 0%4.69µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.TokensWithdrawn-22.90µs ± 0%3.41µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-23.37µs ± 0%4.97µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-23.62µs ± 0%4.67µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.NewWeeklyPayout-22.89µs ± 0%3.63µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.RewardsPaid-23.06µs ± 0%3.10µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensDeposited-23.11µs ± 0%3.07µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensDeposited_with_nil_receiver-23.09µs ± 0%3.03µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensMinted-22.55µs ± 0%2.50µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensWithdrawn-23.19µs ± 0%3.10µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowFees.FeesDeducted-213.1µs ± 0%12.9µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowFees.TokensWithdrawn-27.44µs ± 0%7.27µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-211.8µs ± 0%11.3µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-216.3µs ± 0%16.4µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.NewWeeklyPayout-27.56µs ± 0%7.49µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.RewardsPaid-29.64µs ± 0%9.66µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensDeposited-210.2µs ± 0%10.2µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensDeposited_with_nil_receiver-29.26µs ± 0%9.39µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensMinted-27.48µs ± 0%7.42µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensWithdrawn-210.4µs ± 0%10.2µs ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsCCF-2116ms ± 0%69ms ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsJSON-2186ms ± 0%136ms ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.FeesDeducted-21.67µs ± 0%1.43µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.TokensWithdrawn-21.17µs ± 0%1.18µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-21.67µs ± 0%1.46µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-21.84µs ± 0%1.56µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.NewWeeklyPayout-21.20µs ± 0%1.19µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.RewardsPaid-21.57µs ± 0%1.34µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensDeposited-21.63µs ± 0%1.46µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensDeposited_with_nil_receiver-21.60µs ± 0%1.42µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensMinted-21.20µs ± 0%1.21µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensWithdrawn-21.63µs ± 0%1.44µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowFees.FeesDeducted-23.28µs ± 0%3.27µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowFees.TokensWithdrawn-21.80µs ± 0%1.81µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-22.94µs ± 0%2.91µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-24.11µs ± 0%4.08µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.NewWeeklyPayout-21.84µs ± 0%1.83µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.RewardsPaid-22.44µs ± 0%2.42µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensDeposited-22.78µs ± 0%2.82µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensDeposited_with_nil_receiver-22.21µs ± 0%2.21µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensMinted-21.84µs ± 0%1.84µs ± 0%~(all equal)
EncodeJSON/FlowToken.TokensWithdrawn-22.77µs ± 0%2.75µs ± 0%~(p=1.000 n=1+1)
ExportType/composite_type-2363ns ± 0%352ns ± 0%~(p=1.000 n=1+1)
ExportType/simple_type-254.6ns ± 0%55.5ns ± 0%~(p=1.000 n=1+1)
InterpretRecursionFib-22.56ms ± 0%2.53ms ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_interpreter-21.21µs ± 0%1.31µs ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_sub-interpreter-2621ns ± 0%616ns ± 0%~(p=1.000 n=1+1)
ParseArray-28.18ms ± 0%8.32ms ± 0%~(p=1.000 n=1+1)
ParseDeploy/byte_array-212.5ms ± 0%12.7ms ± 0%~(p=1.000 n=1+1)
ParseDeploy/decode_hex-21.23ms ± 0%1.25ms ± 0%~(p=1.000 n=1+1)
ParseFungibleToken/With_memory_metering-2205µs ± 0%206µs ± 0%~(p=1.000 n=1+1)
ParseFungibleToken/Without_memory_metering-2163µs ± 0%161µs ± 0%~(p=1.000 n=1+1)
ParseInfix-27.12µs ± 0%7.90µs ± 0%~(p=1.000 n=1+1)
QualifiedIdentifierCreation/One_level-22.36ns ± 0%2.35ns ± 0%~(p=1.000 n=1+1)
QualifiedIdentifierCreation/Three_levels-2139ns ± 0%140ns ± 0%~(p=1.000 n=1+1)
RuntimeResourceDictionaryValues-25.46ms ± 0%5.66ms ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-24.30µs ± 0%5.73µs ± 0%~(p=1.000 n=1+1)
SuperTypeInference/arrays-2340ns ± 0%340ns ± 0%~(p=1.000 n=1+1)
SuperTypeInference/composites-2145ns ± 0%146ns ± 0%~(p=1.000 n=1+1)
SuperTypeInference/integers-297.4ns ± 0%90.5ns ± 0%~(p=1.000 n=1+1)
ValueIsSubtypeOfSemaType-292.1ns ± 0%93.8ns ± 0%~(p=1.000 n=1+1)
 
alloc/opdelta
CheckContractInterfaceFungibleTokenConformance-253.5kB ± 0%53.5kB ± 0%~(p=1.000 n=1+1)
ContractInterfaceFungibleToken-225.9kB ± 0%25.9kB ± 0%~(all equal)
DecodeBatchEventsCCF-267.3MB ± 0%67.3MB ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsJSON-2246MB ± 0%246MB ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.FeesDeducted-21.41kB ± 0%1.41kB ± 0%~(all equal)
DecodeCCF/FlowFees.TokensWithdrawn-21.22kB ± 0%1.22kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-21.49kB ± 0%1.49kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-21.50kB ± 0%1.50kB ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.NewWeeklyPayout-21.26kB ± 0%1.26kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.RewardsPaid-21.38kB ± 0%1.38kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited-21.34kB ± 0%1.34kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited_with_nil_receiver-21.33kB ± 0%1.33kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensMinted-21.22kB ± 0%1.22kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensWithdrawn-21.35kB ± 0%1.35kB ± 0%~(all equal)
DecodeJSON/FlowFees.FeesDeducted-26.03kB ± 0%6.03kB ± 0%~(all equal)
DecodeJSON/FlowFees.TokensWithdrawn-23.62kB ± 0%3.62kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-25.46kB ± 0%5.46kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-27.40kB ± 0%7.40kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.NewWeeklyPayout-23.67kB ± 0%3.67kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.RewardsPaid-24.57kB ± 0%4.57kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited-24.93kB ± 0%4.93kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited_with_nil_receiver-24.50kB ± 0%4.50kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensMinted-23.63kB ± 0%3.63kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensWithdrawn-24.91kB ± 0%4.91kB ± 0%~(all equal)
EncodeBatchEventsCCF-240.3MB ± 0%37.1MB ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsJSON-234.0MB ± 0%34.0MB ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.FeesDeducted-2808B ± 0%736B ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.TokensWithdrawn-2688B ± 0%688B ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-2872B ± 0%800B ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-2848B ± 0%768B ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.NewWeeklyPayout-2704B ± 0%704B ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.RewardsPaid-2848B ± 0%784B ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensDeposited-2816B ± 0%752B ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensDeposited_with_nil_receiver-2800B ± 0%736B ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensMinted-2688B ± 0%688B ± 0%~(all equal)
EncodeCCF/FlowToken.TokensWithdrawn-2816B ± 0%752B ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowFees.FeesDeducted-2768B ± 0%768B ± 0%~(all equal)
EncodeJSON/FlowFees.TokensWithdrawn-2408B ± 0%408B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-2760B ± 0%760B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-2952B ± 0%952B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.NewWeeklyPayout-2424B ± 0%424B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.RewardsPaid-2624B ± 0%624B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited-2680B ± 0%680B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited_with_nil_receiver-2544B ± 0%544B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensMinted-2416B ± 0%416B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensWithdrawn-2672B ± 0%672B ± 0%~(all equal)
ExportType/composite_type-2136B ± 0%136B ± 0%~(all equal)
ExportType/simple_type-20.00B 0.00B ~(all equal)
InterpretRecursionFib-21.00MB ± 0%1.00MB ± 0%~(all equal)
NewInterpreter/new_interpreter-2864B ± 0%992B ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_sub-interpreter-2200B ± 0%200B ± 0%~(all equal)
ParseArray-22.65MB ± 0%2.73MB ± 0%~(p=1.000 n=1+1)
ParseDeploy/byte_array-24.28MB ± 0%4.28MB ± 0%~(p=1.000 n=1+1)
ParseDeploy/decode_hex-2214kB ± 0%214kB ± 0%~(p=1.000 n=1+1)
ParseFungibleToken/With_memory_metering-229.7kB ± 0%29.8kB ± 0%~(p=1.000 n=1+1)
ParseFungibleToken/Without_memory_metering-229.8kB ± 0%29.8kB ± 0%~(p=1.000 n=1+1)
ParseInfix-21.91kB ± 0%1.91kB ± 0%~(p=1.000 n=1+1)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
RuntimeResourceDictionaryValues-22.29MB ± 0%2.29MB ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-22.95kB ± 0%3.21kB ± 0%~(p=1.000 n=1+1)
SuperTypeInference/arrays-296.0B ± 0%96.0B ± 0%~(all equal)
SuperTypeInference/composites-20.00B 0.00B ~(all equal)
SuperTypeInference/integers-20.00B 0.00B ~(all equal)
ValueIsSubtypeOfSemaType-248.0B ± 0%48.0B ± 0%~(all equal)
 
allocs/opdelta
CheckContractInterfaceFungibleTokenConformance-2853 ± 0%853 ± 0%~(all equal)
ContractInterfaceFungibleToken-2392 ± 0%392 ± 0%~(all equal)
DecodeBatchEventsCCF-21.48M ± 0%1.48M ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsJSON-24.75M ± 0%4.75M ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.FeesDeducted-230.0 ± 0%30.0 ± 0%~(all equal)
DecodeCCF/FlowFees.TokensWithdrawn-226.0 ± 0%26.0 ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-230.0 ± 0%30.0 ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-232.0 ± 0%32.0 ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.NewWeeklyPayout-226.0 ± 0%26.0 ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.RewardsPaid-229.0 ± 0%29.0 ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited-231.0 ± 0%31.0 ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited_with_nil_receiver-229.0 ± 0%29.0 ± 0%~(all equal)
DecodeCCF/FlowToken.TokensMinted-226.0 ± 0%26.0 ± 0%~(all equal)
DecodeCCF/FlowToken.TokensWithdrawn-231.0 ± 0%31.0 ± 0%~(all equal)
DecodeJSON/FlowFees.FeesDeducted-2129 ± 0%129 ± 0%~(all equal)
DecodeJSON/FlowFees.TokensWithdrawn-272.0 ± 0%72.0 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-2103 ± 0%103 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-2163 ± 0%163 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.NewWeeklyPayout-271.0 ± 0%71.0 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.RewardsPaid-288.0 ± 0%88.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited-296.0 ± 0%96.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited_with_nil_receiver-287.0 ± 0%87.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensMinted-272.0 ± 0%72.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensWithdrawn-296.0 ± 0%96.0 ± 0%~(all equal)
EncodeBatchEventsCCF-2564k ± 0%467k ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsJSON-2757k ± 0%757k ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.FeesDeducted-211.0 ± 0%9.0 ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.TokensWithdrawn-29.00 ± 0%9.00 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-211.0 ± 0%9.0 ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-211.0 ± 0%9.0 ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.NewWeeklyPayout-29.00 ± 0%9.00 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.RewardsPaid-211.0 ± 0%9.0 ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensDeposited-212.0 ± 0%10.0 ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensDeposited_with_nil_receiver-212.0 ± 0%10.0 ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensMinted-29.00 ± 0%9.00 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensWithdrawn-212.0 ± 0%10.0 ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowFees.FeesDeducted-217.0 ± 0%17.0 ± 0%~(all equal)
EncodeJSON/FlowFees.TokensWithdrawn-210.0 ± 0%10.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-214.0 ± 0%14.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-223.0 ± 0%23.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.NewWeeklyPayout-210.0 ± 0%10.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.RewardsPaid-213.0 ± 0%13.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited-217.0 ± 0%17.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited_with_nil_receiver-212.0 ± 0%12.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensMinted-211.0 ± 0%11.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensWithdrawn-216.0 ± 0%16.0 ± 0%~(all equal)
ExportType/composite_type-23.00 ± 0%3.00 ± 0%~(all equal)
ExportType/simple_type-20.00 0.00 ~(all equal)
InterpretRecursionFib-218.9k ± 0%18.9k ± 0%~(all equal)
NewInterpreter/new_interpreter-214.0 ± 0%16.0 ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_sub-interpreter-24.00 ± 0%4.00 ± 0%~(all equal)
ParseArray-259.6k ± 0%59.6k ± 0%~(all equal)
ParseDeploy/byte_array-289.4k ± 0%89.4k ± 0%~(all equal)
ParseDeploy/decode_hex-263.0 ± 0%63.0 ± 0%~(all equal)
ParseFungibleToken/With_memory_metering-2778 ± 0%778 ± 0%~(all equal)
ParseFungibleToken/Without_memory_metering-2778 ± 0%778 ± 0%~(all equal)
ParseInfix-248.0 ± 0%48.0 ± 0%~(all equal)
QualifiedIdentifierCreation/One_level-20.00 0.00 ~(all equal)
QualifiedIdentifierCreation/Three_levels-22.00 ± 0%2.00 ± 0%~(all equal)
RuntimeResourceDictionaryValues-236.9k ± 0%36.9k ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-245.0 ± 0%51.0 ± 0%~(p=1.000 n=1+1)
SuperTypeInference/arrays-23.00 ± 0%3.00 ± 0%~(all equal)
SuperTypeInference/composites-20.00 0.00 ~(all equal)
SuperTypeInference/integers-20.00 0.00 ~(all equal)
ValueIsSubtypeOfSemaType-21.00 ± 0%1.00 ± 0%~(all equal)
 

@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Merging #2593 (e17ca20) into feature/stable-cadence (6fd0e01) will decrease coverage by 0.03%.
The diff coverage is 79.01%.

❗ Current head e17ca20 differs from pull request most recent head dda2353. Consider uploading reports for the commit dda2353 to get more accurate results

@@                    Coverage Diff                     @@
##           feature/stable-cadence    #2593      +/-   ##
==========================================================
- Coverage                   78.84%   78.81%   -0.03%     
==========================================================
  Files                         340      337       -3     
  Lines                       80309    78668    -1641     
==========================================================
- Hits                        63321    62004    -1317     
+ Misses                      14689    14377     -312     
+ Partials                     2299     2287      -12     
Flag Coverage Δ
unittests 78.81% <79.01%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
runtime/interpreter/errors.go 55.98% <0.00%> (-0.40%) ⬇️
runtime/interpreter/hashablevalue.go 100.00% <ø> (ø)
runtime/interpreter/primitivestatictype_string.go 100.00% <ø> (ø)
runtime/interpreter/visitor.go 8.33% <0.00%> (-0.18%) ⬇️
runtime/stdlib/test.go 29.59% <0.00%> (ø)
runtime/stdlib/test_emulatorbackend.go 52.40% <61.42%> (+22.71%) ⬆️
runtime/interpreter/encode.go 67.26% <66.66%> (+0.24%) ⬆️
runtime/interpreter/value.go 68.58% <68.03%> (-0.27%) ⬇️
runtime/interpreter/decode.go 46.88% <70.58%> (+0.86%) ⬆️
runtime/coverage.go 93.81% <75.51%> (-3.72%) ⬇️
... and 31 more

... and 62 files with indirect coverage changes

@turbolent turbolent requested a review from SupunS June 21, 2023 21:22
@turbolent
Copy link
Member Author

turbolent commented Jun 22, 2023

Merged and resolved conflicts, but for some reason the commit is not showing up 🤔

96ebaf5 is there now, looks like GitHub was having issues again

@turbolent
Copy link
Member Author

Updated the PR description with diffs of all three conflict resolutions as well as the two additional commits to adjust tests

@turbolent turbolent requested review from dsainati1 and SupunS June 22, 2023 17:05
@turbolent turbolent merged commit 0e3b9d3 into feature/stable-cadence Jun 22, 2023
@turbolent turbolent deleted the bastian/sync-stable-cadence-2 branch June 22, 2023 17:28
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.

8 participants