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

Sync Stable Cadence #2796

Merged
merged 23 commits into from
Sep 19, 2023
Merged

Conversation

turbolent
Copy link
Member

Description

Resolving conflicts mainly involved:

  • Adjusting TestRuntimeInvalidWrappedPrivateCapability to Cap Cons
  • Adjusting field iteration of composite values

Also, added the view modifier to the new String.join function. (re: #2466)

Conflict resolution
commit 8859243f1a8646ed0415a69569331e19e6f8f6ca
Merge: 238db584c 833562efb
Author: Bastian Müller <bastian@turbolent.com>
Date:   Tue Sep 19 13:15:38 2023 -0700

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

diff --git a/runtime/ast/expression_test.go b/runtime/ast/expression_test.go
index c490586b3..0d4263e0d 100644
--- a/runtime/ast/expression_test.go
+++ b/runtime/ast/expression_test.go
@@ -4763,6 +4763,7 @@ func TestFunctionExpression_Doc(t *testing.T) {
 					prettier.Text("()"),
 				},
 			},
+			prettier.Text(" "),
 			prettier.Text("{}"),
 		}
 
diff --git a/runtime/interpreter/interpreter.go b/runtime/interpreter/interpreter.go
index 55be367a3..e297a8d80 100644
--- a/runtime/interpreter/interpreter.go
+++ b/runtime/interpreter/interpreter.go
@@ -5074,8 +5074,10 @@ func (interpreter *Interpreter) invalidateReferencedResources(value Value, destr
 
 	switch value := value.(type) {
 	case *CompositeValue:
-		value.ForEachLoadedField(interpreter, func(_ string, fieldValue Value) {
+		value.ForEachLoadedField(interpreter, func(_ string, fieldValue Value) (resume bool) {
 			interpreter.invalidateReferencedResources(fieldValue, destroyed)
+			// continue iteration
+			return true
 		})
 		storageID = value.StorageID()
 	case *DictionaryValue:
diff --git a/runtime/interpreter/value.go b/runtime/interpreter/value.go
remerge CONFLICT (content): Merge conflict in runtime/interpreter/value.go
index b8b3df93e..b80d96da8 100644
--- a/runtime/interpreter/value.go
+++ b/runtime/interpreter/value.go
@@ -17438,31 +17438,29 @@ func (v *CompositeValue) GetOwner() common.Address {
 
 // ForEachField iterates over all field-name field-value pairs of the composite value.
 // It does NOT iterate over computed fields and functions!
-<<<<<<< 238db584c (Merge pull request #2778 from onflow/bastian/capability-exists)
-func (v *CompositeValue) ForEachField(gauge common.MemoryGauge, f func(fieldName string, fieldValue Value)) {
+func (v *CompositeValue) ForEachField(
+	gauge common.MemoryGauge,
+	f func(fieldName string, fieldValue Value) (resume bool),
+) {
 	v.forEachField(gauge, v.dictionary.Iterate, f)
 }
 
-func (v *CompositeValue) ForEachLoadedField(gauge common.MemoryGauge, f func(fieldName string, fieldValue Value)) {
+// ForEachLoadedField iterates over all LOADED field-name field-value pairs of the composite value.
+// It does NOT iterate over computed fields and functions!
+func (v *CompositeValue) ForEachLoadedField(
+	gauge common.MemoryGauge,
+	f func(fieldName string, fieldValue Value) (resume bool),
+) {
 	v.forEachField(gauge, v.dictionary.IterateLoadedValues, f)
 }
 
 func (v *CompositeValue) forEachField(
 	gauge common.MemoryGauge,
 	atreeIterate func(fn atree.MapEntryIterationFunc) error,
-	f func(fieldName string, fieldValue Value),
-) {
-	err := atreeIterate(func(key atree.Value, value atree.Value) (resume bool, err error) {
-		f(
-=======
-func (v *CompositeValue) ForEachField(
-	gauge common.MemoryGauge,
 	f func(fieldName string, fieldValue Value) (resume bool),
 ) {
-
-	err := v.dictionary.Iterate(func(key atree.Value, value atree.Value) (resume bool, err error) {
+	err := atreeIterate(func(key atree.Value, value atree.Value) (resume bool, err error) {
 		resume = f(
->>>>>>> 833562efb (Merge pull request #2795 from onflow/release/v0.41.1)
 			string(key.(StringAtreeValue)),
 			MustConvertStoredValue(gauge, value),
 		)
diff --git a/runtime/program_params_validation_test.go b/runtime/program_params_validation_test.go
index 49fd41b0f..988b2a210 100644
--- a/runtime/program_params_validation_test.go
+++ b/runtime/program_params_validation_test.go
@@ -1143,9 +1143,14 @@ func TestRuntimeTransactionParameterTypeValidation(t *testing.T) {
 				Address: common.MustBytesToAddress([]byte{0x1}),
 				Name:    "C",
 			}: []byte(`
-               pub contract C {
-                    pub struct S {
-                        pub let cap: Capability
+               access(all)
+               contract C {
+
+                    access(all)
+                    struct S {
+
+                        access(all)
+                        let cap: Capability
 
                         init(cap: Capability) {
                             self.cap = cap
@@ -1163,13 +1168,10 @@ func TestRuntimeTransactionParameterTypeValidation(t *testing.T) {
 
 		address := common.MustBytesToAddress([]byte{0x1})
 
-		path, err := cadence.NewPath(common.PathDomainPrivate, "foo")
-		require.NoError(t, err)
-
-		capability := cadence.NewPathCapability(
+		capability := cadence.NewCapability(
+			1,
 			cadence.Address(address),
-			path,
-			cadence.NewReferenceType(false, cadence.AuthAccountType{}),
+			cadence.NewReferenceType(cadence.UnauthorizedAccess, cadence.AccountType),
 		)
 
 		arg := cadence.Struct{
@@ -1191,7 +1193,7 @@ func TestRuntimeTransactionParameterTypeValidation(t *testing.T) {
 			},
 		}
 
-		err = executeTransaction(t, script, contracts, arg)
+		err := executeTransaction(t, script, contracts, arg)
 		expectRuntimeError(t, err, &ArgumentNotImportableError{})
 	})
 
@@ -1204,23 +1206,20 @@ func TestRuntimeTransactionParameterTypeValidation(t *testing.T) {
 
 		address := common.MustBytesToAddress([]byte{0x1})
 
-		path, err := cadence.NewPath(common.PathDomainPrivate, "foo")
-		require.NoError(t, err)
-
-		capability := cadence.NewPathCapability(
+		capability := cadence.NewCapability(
+			1,
 			cadence.Address(address),
-			path,
-			cadence.NewReferenceType(false, cadence.AuthAccountType{}),
+			cadence.NewReferenceType(cadence.UnauthorizedAccess, cadence.AccountType),
 		)
 
 		arg := cadence.Array{
-			ArrayType: cadence.NewVariableSizedArrayType(cadence.AnyStructType{}),
+			ArrayType: cadence.NewVariableSizedArrayType(cadence.AnyStructType),
 			Values: []cadence.Value{
 				capability,
 			},
 		}
 
-		err = executeTransaction(t, script, nil, arg)
+		err := executeTransaction(t, script, nil, arg)
 		expectRuntimeError(t, err, &ArgumentNotImportableError{})
 	})
 
@@ -1233,18 +1232,15 @@ func TestRuntimeTransactionParameterTypeValidation(t *testing.T) {
 
 		address := common.MustBytesToAddress([]byte{0x1})
 
-		path, err := cadence.NewPath(common.PathDomainPrivate, "foo")
-		require.NoError(t, err)
-
-		capability := cadence.NewPathCapability(
+		capability := cadence.NewCapability(
+			1,
 			cadence.Address(address),
-			path,
-			cadence.NewReferenceType(false, cadence.AuthAccountType{}),
+			cadence.NewReferenceType(cadence.UnauthorizedAccess, cadence.AccountType),
 		)
 
 		arg := cadence.NewOptional(capability)
 
-		err = executeTransaction(t, script, nil, arg)
+		err := executeTransaction(t, script, nil, arg)
 		expectRuntimeError(t, err, &ArgumentNotImportableError{})
 	})
 
@@ -1257,13 +1253,10 @@ func TestRuntimeTransactionParameterTypeValidation(t *testing.T) {
 
 		address := common.MustBytesToAddress([]byte{0x1})
 
-		path, err := cadence.NewPath(common.PathDomainPrivate, "foo")
-		require.NoError(t, err)
-
-		capability := cadence.NewPathCapability(
+		capability := cadence.NewCapability(
+			1,
 			cadence.Address(address),
-			path,
-			cadence.NewReferenceType(false, cadence.AuthAccountType{}),
+			cadence.NewReferenceType(cadence.UnauthorizedAccess, cadence.AccountType),
 		)
 
 		arg := cadence.NewDictionary([]cadence.KeyValuePair{
@@ -1273,7 +1266,7 @@ func TestRuntimeTransactionParameterTypeValidation(t *testing.T) {
 			},
 		})
 
-		err = executeTransaction(t, script, nil, arg)
+		err := executeTransaction(t, script, nil, arg)
 		expectRuntimeError(t, err, &ArgumentNotImportableError{})
 	})
 
diff --git a/runtime/runtime_test.go b/runtime/runtime_test.go
remerge CONFLICT (content): Merge conflict in runtime/runtime_test.go
index ee56f61e6..766add29b 100644
--- a/runtime/runtime_test.go
+++ b/runtime/runtime_test.go
@@ -9316,7 +9316,6 @@ func TestRuntimeWrappedErrorHandling(t *testing.T) {
 	assertRuntimeErrorIsUserError(t, err)
 }
 
-<<<<<<< 238db584c (Merge pull request #2778 from onflow/bastian/capability-exists)
 func BenchmarkRuntimeResourceTracking(b *testing.B) {
 
 	runtime := newTestInterpreterRuntime()
@@ -9614,31 +9613,26 @@ func TestRuntimeEventEmission(t *testing.T) {
 		)
 
 	})
-=======
+}
+
 func TestRuntimeInvalidWrappedPrivateCapability(t *testing.T) {
 
 	t.Parallel()
 
 	runtime := newTestInterpreterRuntime()
 	runtime.defaultConfig.AtreeValidationEnabled = false
-	runtime.defaultConfig.AccountLinkingEnabled = true
 
 	address := common.MustBytesToAddress([]byte{0x1})
 
-	linkTx := []byte(`
-      #allowAccountLinking
+	helperContract := []byte(`
+      access(all)
+      contract Foo {
 
-      transaction {
-          prepare(acct: AuthAccount) {
-              acct.linkAccount(/private/foo)
-          }
-      }
-    `)
+          access(all)
+          struct Thing {
 
-	helperContract := []byte(`
-      pub contract Foo {
-          pub struct Thing {
-              pub let cap: Capability
+              access(all)
+              let cap: Capability
 
               init(cap: Capability) {
                   self.cap = cap
@@ -9650,10 +9644,11 @@ func TestRuntimeInvalidWrappedPrivateCapability(t *testing.T) {
 	getCapScript := []byte(`
       import Foo from 0x1
 
-      pub fun main(addr: Address): AnyStruct {
-          let acct = getAuthAccount(addr)
-          let authCap = acct.getCapability<&AuthAccount>(/private/foo)
-          return Foo.Thing(cap: authCap)
+      access(all)
+      fun main(addr: Address): AnyStruct {
+          let acct = getAuthAccount<auth(Capabilities) &Account>(addr)
+          let cap = acct.capabilities.account.issue<auth(Storage) &Account>()
+          return Foo.Thing(cap: cap)
       }
 	`)
 
@@ -9661,8 +9656,9 @@ func TestRuntimeInvalidWrappedPrivateCapability(t *testing.T) {
       import Foo from 0x1
 
       transaction(thing: Foo.Thing) {
-          prepare(_: AuthAccount) {
-		      thing.cap.borrow<&AuthAccount>()!.save("Hello, World", to: /storage/attack)
+          prepare(_: &Account) {
+ 		      thing.cap.borrow<auth(Storage) &Account>()!
+                  .storage.save("Hello, World", to: /storage/attack)
           }
       }
     `)
@@ -9700,22 +9696,9 @@ func TestRuntimeInvalidWrappedPrivateCapability(t *testing.T) {
 	nextTransactionLocation := newTransactionLocationGenerator()
 	nextScriptLocation := newScriptLocationGenerator()
 
-	// Deploy
-
-	err := runtime.ExecuteTransaction(
-		Script{
-			Source: linkTx,
-		},
-		Context{
-			Interface: runtimeInterface,
-			Location:  nextTransactionLocation(),
-		},
-	)
-	require.NoError(t, err)
-
 	// Deploy helper contract
 
-	err = runtime.ExecuteTransaction(
+	err := runtime.ExecuteTransaction(
 		Script{
 			Source: deploy,
 		},
@@ -9760,5 +9743,4 @@ func TestRuntimeInvalidWrappedPrivateCapability(t *testing.T) {
 
 	var argumentNotImportableErr *ArgumentNotImportableError
 	require.ErrorAs(t, err, &argumentNotImportableErr)
->>>>>>> 833562efb (Merge pull request #2795 from onflow/release/v0.41.1)
 }
diff --git a/runtime/sema/string_type.go b/runtime/sema/string_type.go
remerge CONFLICT (content): Merge conflict in runtime/sema/string_type.go
index 37cb87b25..b4fa76259 100644
--- a/runtime/sema/string_type.go
+++ b/runtime/sema/string_type.go
@@ -315,20 +315,15 @@ var StringTypeFromCharactersFunctionType = NewSimpleFunctionType(
 			}),
 		},
 	},
-<<<<<<< 238db584c (Merge pull request #2778 from onflow/bastian/capability-exists)
 	StringTypeAnnotation,
 )
-=======
-	ReturnTypeAnnotation: NewTypeAnnotation(
-		StringType,
-	),
-}
 
-var StringTypeJoinFunctionType = &FunctionType{
-	Parameters: []Parameter{
+var StringTypeJoinFunctionType = NewSimpleFunctionType(
+	FunctionPurityView,
+	[]Parameter{
 		{
 			Label:      ArgumentLabelNotRequired,
-			Identifier: "strs",
+			Identifier: "strings",
 			TypeAnnotation: NewTypeAnnotation(&VariableSizedType{
 				Type: StringType,
 			}),
@@ -338,6 +333,5 @@ var StringTypeJoinFunctionType = &FunctionType{
 			TypeAnnotation: NewTypeAnnotation(StringType),
 		},
 	},
-	ReturnTypeAnnotation: NewTypeAnnotation(StringType),
-}
->>>>>>> 833562efb (Merge pull request #2795 from onflow/release/v0.41.1)
+	StringTypeAnnotation,
+)

  • 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

darkdrag00nv2 and others added 23 commits September 3, 2023 15:19
Merge `release/v0.41.0` to `master`
Co-authored-by: Bastian Müller <bastian@turbolent.com>
Introduce `String.join` function
@turbolent turbolent requested a review from SupunS as a code owner September 19, 2023 20:19
@turbolent turbolent self-assigned this Sep 19, 2023
@github-actions
Copy link

Cadence Benchstat comparison

This branch with compared with the base branch onflow:feature/stable-cadence commit 238db58
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-2167ms ± 0%171ms ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsJSON-2512ms ± 0%521ms ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.FeesDeducted-25.33µs ± 0%3.90µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.TokensWithdrawn-24.13µs ± 0%2.88µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-25.14µs ± 0%3.71µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-26.70µs ± 0%4.35µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.NewWeeklyPayout-23.02µs ± 0%2.84µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.RewardsPaid-23.28µs ± 0%3.38µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensDeposited-23.32µs ± 0%3.39µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensDeposited_with_nil_receiver-23.24µs ± 0%3.26µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensMinted-22.77µs ± 0%2.84µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensWithdrawn-23.50µs ± 0%3.50µs ± 0%~(all equal)
DecodeJSON/FlowFees.FeesDeducted-213.2µs ± 0%13.2µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowFees.TokensWithdrawn-27.72µs ± 0%7.29µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-211.3µs ± 0%11.2µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-216.2µs ± 0%15.8µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.NewWeeklyPayout-27.50µs ± 0%7.47µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.RewardsPaid-29.73µs ± 0%9.52µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensDeposited-210.3µs ± 0%10.8µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensDeposited_with_nil_receiver-29.16µs ± 0%9.28µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensMinted-27.40µs ± 0%7.43µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensWithdrawn-210.4µs ± 0%10.4µs ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsCCF-2124ms ± 0%118ms ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsJSON-2145ms ± 0%151ms ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.FeesDeducted-22.83µs ± 0%4.09µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.TokensWithdrawn-22.10µs ± 0%3.48µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-22.64µs ± 0%4.25µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-23.07µs ± 0%4.73µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.NewWeeklyPayout-22.15µs ± 0%3.51µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.RewardsPaid-22.33µs ± 0%2.41µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensDeposited-22.49µs ± 0%2.35µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensDeposited_with_nil_receiver-22.52µs ± 0%2.31µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensMinted-22.18µs ± 0%2.03µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensWithdrawn-22.42µs ± 0%2.37µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowFees.FeesDeducted-23.47µs ± 0%3.56µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowFees.TokensWithdrawn-22.00µs ± 0%1.93µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-23.31µs ± 0%3.13µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-24.33µs ± 0%4.43µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.NewWeeklyPayout-21.97µs ± 0%2.02µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.RewardsPaid-22.54µs ± 0%2.69µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensDeposited-23.00µs ± 0%2.97µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensDeposited_with_nil_receiver-22.34µs ± 0%2.51µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensMinted-22.03µs ± 0%2.04µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensWithdrawn-22.88µs ± 0%2.90µs ± 0%~(p=1.000 n=1+1)
ExportType/composite_type-2448ns ± 0%456ns ± 0%~(p=1.000 n=1+1)
ExportType/simple_type-2105ns ± 0%97ns ± 0%~(p=1.000 n=1+1)
InterpretRecursionFib-22.66ms ± 0%2.64ms ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_interpreter-21.31µs ± 0%1.31µs ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_sub-interpreter-2689ns ± 0%670ns ± 0%~(p=1.000 n=1+1)
ParseArray-29.06ms ± 0%8.44ms ± 0%~(p=1.000 n=1+1)
ParseDeploy/byte_array-212.5ms ± 0%13.2ms ± 0%~(p=1.000 n=1+1)
ParseDeploy/decode_hex-21.36ms ± 0%1.35ms ± 0%~(p=1.000 n=1+1)
ParseFungibleToken/With_memory_metering-2215µs ± 0%222µs ± 0%~(p=1.000 n=1+1)
ParseFungibleToken/Without_memory_metering-2163µs ± 0%168µs ± 0%~(p=1.000 n=1+1)
ParseInfix-27.06µs ± 0%7.31µs ± 0%~(p=1.000 n=1+1)
QualifiedIdentifierCreation/One_level-22.78ns ± 0%2.62ns ± 0%~(p=1.000 n=1+1)
QualifiedIdentifierCreation/Three_levels-2131ns ± 0%129ns ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-26.15µs ± 0%6.00µs ± 0%~(p=1.000 n=1+1)
SuperTypeInference/arrays-2362ns ± 0%364ns ± 0%~(p=1.000 n=1+1)
SuperTypeInference/composites-2150ns ± 0%152ns ± 0%~(p=1.000 n=1+1)
SuperTypeInference/integers-2171ns ± 0%172ns ± 0%~(p=1.000 n=1+1)
ValueIsSubtypeOfSemaType-2102ns ± 0%104ns ± 0%~(p=1.000 n=1+1)
 
alloc/opdelta
DecodeBatchEventsCCF-266.1MB ± 0%66.1MB ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsJSON-2244MB ± 0%244MB ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.FeesDeducted-21.39kB ± 0%1.39kB ± 0%~(all equal)
DecodeCCF/FlowFees.TokensWithdrawn-21.20kB ± 0%1.20kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-21.47kB ± 0%1.47kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-21.48kB ± 0%1.48kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.NewWeeklyPayout-21.25kB ± 0%1.25kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.RewardsPaid-21.37kB ± 0%1.37kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited-21.31kB ± 0%1.31kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited_with_nil_receiver-21.30kB ± 0%1.30kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensMinted-21.20kB ± 0%1.20kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensWithdrawn-21.32kB ± 0%1.32kB ± 0%~(all equal)
DecodeJSON/FlowFees.FeesDeducted-26.00kB ± 0%6.00kB ± 0%~(all equal)
DecodeJSON/FlowFees.TokensWithdrawn-23.60kB ± 0%3.60kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-25.43kB ± 0%5.43kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-27.35kB ± 0%7.35kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.NewWeeklyPayout-23.64kB ± 0%3.64kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.RewardsPaid-24.54kB ± 0%4.54kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited-24.88kB ± 0%4.88kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited_with_nil_receiver-24.46kB ± 0%4.46kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensMinted-23.60kB ± 0%3.60kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensWithdrawn-24.88kB ± 0%4.88kB ± 0%~(all equal)
EncodeBatchEventsCCF-262.4MB ± 0%62.4MB ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsJSON-239.1MB ± 0%39.1MB ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.FeesDeducted-21.22kB ± 0%1.22kB ± 0%~(all equal)
EncodeCCF/FlowFees.TokensWithdrawn-21.17kB ± 0%1.17kB ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-21.44kB ± 0%1.44kB ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-21.41kB ± 0%1.41kB ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.NewWeeklyPayout-21.34kB ± 0%1.34kB ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.RewardsPaid-21.42kB ± 0%1.42kB ± 0%~(all equal)
EncodeCCF/FlowToken.TokensDeposited-21.22kB ± 0%1.22kB ± 0%~(all equal)
EncodeCCF/FlowToken.TokensDeposited_with_nil_receiver-21.20kB ± 0%1.20kB ± 0%~(all equal)
EncodeCCF/FlowToken.TokensMinted-21.17kB ± 0%1.17kB ± 0%~(all equal)
EncodeCCF/FlowToken.TokensWithdrawn-21.22kB ± 0%1.22kB ± 0%~(all equal)
EncodeJSON/FlowFees.FeesDeducted-2864B ± 0%864B ± 0%~(all equal)
EncodeJSON/FlowFees.TokensWithdrawn-2504B ± 0%504B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-2888B ± 0%888B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-21.08kB ± 0%1.08kB ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.NewWeeklyPayout-2552B ± 0%552B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.RewardsPaid-2752B ± 0%752B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited-2776B ± 0%776B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited_with_nil_receiver-2640B ± 0%640B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensMinted-2512B ± 0%512B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensWithdrawn-2768B ± 0%768B ± 0%~(all equal)
ExportType/composite_type-2120B ± 0%120B ± 0%~(all equal)
ExportType/simple_type-20.00B 0.00B ~(all equal)
InterpretRecursionFib-21.00MB ± 0%1.00MB ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_interpreter-2928B ± 0%928B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-2200B ± 0%200B ± 0%~(all equal)
ParseArray-22.80MB ± 0%2.73MB ± 0%~(p=1.000 n=1+1)
ParseDeploy/byte_array-24.29MB ± 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.7kB ± 0%~(p=1.000 n=1+1)
ParseFungibleToken/Without_memory_metering-229.7kB ± 0%29.7kB ± 0%~(p=1.000 n=1+1)
ParseInfix-21.92kB ± 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)
RuntimeScriptNoop-23.21kB ± 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
DecodeBatchEventsCCF-21.48M ± 0%1.48M ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsJSON-24.70M ± 0%4.70M ± 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-2126 ± 0%126 ± 0%~(all equal)
DecodeJSON/FlowFees.TokensWithdrawn-271.0 ± 0%71.0 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-2102 ± 0%102 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-2159 ± 0%159 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.NewWeeklyPayout-270.0 ± 0%70.0 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.RewardsPaid-287.0 ± 0%87.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited-295.0 ± 0%95.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited_with_nil_receiver-286.0 ± 0%86.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensMinted-271.0 ± 0%71.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensWithdrawn-295.0 ± 0%95.0 ± 0%~(all equal)
EncodeBatchEventsCCF-2950k ± 0%950k ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsJSON-2853k ± 0%853k ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.FeesDeducted-219.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowFees.TokensWithdrawn-219.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-219.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-219.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.NewWeeklyPayout-219.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.RewardsPaid-219.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensDeposited-220.0 ± 0%20.0 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensDeposited_with_nil_receiver-220.0 ± 0%20.0 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensMinted-219.0 ± 0%19.0 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensWithdrawn-220.0 ± 0%20.0 ± 0%~(all equal)
EncodeJSON/FlowFees.FeesDeducted-219.0 ± 0%19.0 ± 0%~(all equal)
EncodeJSON/FlowFees.TokensWithdrawn-212.0 ± 0%12.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-216.0 ± 0%16.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-225.0 ± 0%25.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.NewWeeklyPayout-212.0 ± 0%12.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.RewardsPaid-215.0 ± 0%15.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited-219.0 ± 0%19.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited_with_nil_receiver-214.0 ± 0%14.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensMinted-213.0 ± 0%13.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensWithdrawn-218.0 ± 0%18.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-215.0 ± 0%15.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-24.00 ± 0%4.00 ± 0%~(all equal)
ParseArray-259.6k ± 0%59.6k ± 0%~(p=1.000 n=1+1)
ParseDeploy/byte_array-289.4k ± 0%89.4k ± 0%~(p=1.000 n=1+1)
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)
RuntimeScriptNoop-251.0 ± 0%51.0 ± 0%~(all equal)
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 Sep 19, 2023

Codecov Report

Patch coverage: 86.44% and project coverage change: +0.05% 🎉

Comparison is base (238db58) 79.67% compared to head (8859243) 79.73%.

Additional details and impacted files
@@                    Coverage Diff                     @@
##           feature/stable-cadence    #2796      +/-   ##
==========================================================
+ Coverage                   79.67%   79.73%   +0.05%     
==========================================================
  Files                         342      342              
  Lines                       80688    80778      +90     
==========================================================
+ Hits                        64288    64407     +119     
+ Misses                      14095    14063      -32     
- Partials                     2305     2308       +3     
Flag Coverage Δ
unittests 79.73% <86.44%> (+0.05%) ⬆️

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

Files Changed Coverage Δ
runtime/interpreter/simplecompositevalue.go 72.95% <52.38%> (-4.13%) ⬇️
runtime/interpreter/value_string.go 90.66% <89.65%> (-1.18%) ⬇️
runtime/ast/expression.go 92.48% <100.00%> (-0.01%) ⬇️
runtime/interpreter/interpreter.go 88.27% <100.00%> (+<0.01%) ⬆️
runtime/interpreter/value.go 67.09% <100.00%> (+0.10%) ⬆️
runtime/sema/string_type.go 96.22% <100.00%> (+0.26%) ⬆️

... and 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@turbolent turbolent merged commit a88e5eb into feature/stable-cadence Sep 19, 2023
8 of 11 checks passed
@turbolent turbolent deleted the bastian/sync-stable-cadence-7 branch September 19, 2023 21:06
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.

4 participants