Skip to content

Merge v1.10#4513

Merged
turbolent merged 202 commits into
masterfrom
bastian/merge-v1.10
Jul 8, 2026
Merged

Merge v1.10#4513
turbolent merged 202 commits into
masterfrom
bastian/merge-v1.10

Conversation

@turbolent

@turbolent turbolent commented Jul 2, 2026

Copy link
Copy Markdown
Member

  • 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

SupunS and others added 30 commits May 13, 2026 13:59
… into supun/fix-capability-entitlement-stripping
…stripping

Do not strip entitlements when capabilities are assigned to `AnyStruct`
… into bastian/forbid-mapping-access-non-fields
… into bastian/forbid-mapping-access-non-fields
…-fields

Forbid mapping access modifier on non-field members
Implicitly unbox values in switch-statement similar to == operator
…eachable-statement

Add defensive panic after statements ending control flow
turbolent added 20 commits June 11, 2026 21:12
Canonicalize Cadence wrappers for atree containers (Array/Dictionary/Composite)
…e invoked from there against the same storage
…16.1-rc.2

Update to internal atree v0.16.1-rc.2
…ation-context

Pass the invocation context to CreateAccount to allow re-entrant contract function calls
Recursively canonicalize SomeValue inner values when a stored container element is converted through MustConvertStoredContainerElement.

This closes the gap where an optional-wrapped array, dictionary, or composite could produce distinct Cadence wrappers even though direct container reads were canonicalized.

Add a Cadence-level regression that compares references taken through an optional container element, plus focused Go-level cache tests for single and nested SomeValue wrappers.

Update transfer tests to pass the interpreter context into ArrayValue.Get instead of nil, so canonicalizing reads always have a container cache.
…er-elements

Canonicalize optional container elements
…16.1-rc.3

Update to internal atree v0.16.1-rc.3
@turbolent turbolent self-assigned this Jul 2, 2026
@turbolent turbolent requested a review from SupunS as a code owner July 2, 2026 16:04
@turbolent turbolent added the Chore label Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
gomod/github.com/onflow/atree 0.16.1 🟢 8.7
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1030 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Security-Policy🟢 10security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Pinned-Dependencies🟢 10all dependencies are pinned
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST🟢 8SAST tool detected but not run on all commits
gomod/github.com/onflow/atree 0.16.1 🟢 8.7
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1030 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Security-Policy🟢 10security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Pinned-Dependencies🟢 10all dependencies are pinned
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST🟢 8SAST tool detected but not run on all commits

Scanned Files

  • go.mod
  • tools/compatibility-check/go.mod

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Benchstat comparison

  • Base branch: onflow:master
  • Base commit: 3fa2a11
Results

old.txtnew.txt
time/opdelta
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ByteArrayTransfer-41.21µs ± 0%1.43µs ± 0%~(p=1.000 n=1+1)
ByteArrayValueToByteSlice-481.0ns ± 0%80.4ns ± 0%~(p=1.000 n=1+1)
ByteSliceToByteArrayValue-4881ns ± 0%1321ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/bbq/compiler goos:linux goarch:amd64
CompileFungibleTokenTransferTransaction-4118µs ± 0%125µs ± 0%~(p=1.000 n=1+1)
CompileTime-429.0µs ± 0%30.3µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-4333µs ± 0%348µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
ContractImport-4210µs ± 0%212µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EMVAddressTransfer-43.37µs ± 0%3.99µs ± 0%~(p=1.000 n=1+1)
Emit-44.45ms ± 0%4.94ms ± 0%~(p=1.000 n=1+1)
EnumTransfer-41.25µs ± 0%1.60µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-4253ns ± 0%217ns ± 0%~(p=1.000 n=1+1)
ExportType/simple_type-442.2ns ± 0%43.3ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
FTTransfer-4135µs ± 0%139µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/sema goos:linux goarch:amd64
FlowTokenContract-4590µs ± 0%616µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-420.4µs ± 0%21.7µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
ImperativeFib-425.8µs ± 0%26.3µs ± 0%~(p=1.000 n=1+1)
ImperativeFibNewCompilerNewVM-451.4µs ± 0%53.5µs ± 0%~(p=1.000 n=1+1)
ImperativeFibNewVM-429.0µs ± 0%29.6µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
InterpretRecursionFib-42.15ms ± 0%2.21ms ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
InterpreterFTTransfer-4119µs ± 0%120µs ± 0%~(p=1.000 n=1+1)
InterpreterImperativeFib-421.1µs ± 0%23.0µs ± 0%~(p=1.000 n=1+1)
InterpreterNewStruct-464.5µs ± 0%71.1µs ± 0%~(p=1.000 n=1+1)
MethodCall/concrete_type_method_call-443.7µs ± 0%45.7µs ± 0%~(p=1.000 n=1+1)
MethodCall/interface_method_call-460.5µs ± 0%61.5µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
NewInterpreter/new_interpreter-4860ns ± 0%941ns ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_sub-interpreter-4318ns ± 0%312ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
NewStruct-442.3µs ± 0%48.9µs ± 0%~(p=1.000 n=1+1)
NewStructRaw-42.89µs ± 0%3.63µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/sema goos:linux goarch:amd64
QualifiedIdentifierCreation/One_level-42.11ns ± 0%2.11ns ± 0%~(p=1.000 n=1+1)
QualifiedIdentifierCreation/Three_levels-481.3ns ± 0%81.5ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
RecursionFib-41.58ms ± 0%1.62ms ± 0%~(p=1.000 n=1+1)
RuntimeFungibleTokenTransfer-4767µs ± 0%758µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-4617µs ± 0%625µs ± 0%~(p=1.000 n=1+1)
RuntimeResourceDictionaryValues-42.63ms ± 0%2.69ms ± 0%~(p=1.000 n=1+1)
RuntimeResourceTracking-49.63ms ± 0%10.55ms ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-414.1µs ± 0%14.3µs ± 0%~(p=1.000 n=1+1)
RuntimeVMInvokeContractImperativeFib-441.4µs ± 0%42.2µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/sema goos:linux goarch:amd64
SuperTypeInference/arrays-4115ns ± 0%115ns ± 0%~(p=1.000 n=1+1)
SuperTypeInference/composites-473.1ns ± 0%72.7ns ± 0%~(p=1.000 n=1+1)
SuperTypeInference/integers-4143ns ± 0%142ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-457.2ns ± 0%56.9ns ± 0%~(p=1.000 n=1+1)
 
alloc/opdelta
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ByteArrayTransfer-41.07kB ± 0%1.14kB ± 0%~(p=1.000 n=1+1)
ByteArrayValueToByteSlice-432.0B ± 0%32.0B ± 0%~(all equal)
ByteSliceToByteArrayValue-4837B ± 0%1028B ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/bbq/compiler goos:linux goarch:amd64
CompileFungibleTokenTransferTransaction-483.3kB ± 0%83.5kB ± 0%~(p=1.000 n=1+1)
CompileTime-417.2kB ± 0%17.2kB ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-4145kB ± 0%149kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
ContractImport-477.8kB ± 0%80.3kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EMVAddressTransfer-42.46kB ± 0%2.76kB ± 0%~(p=1.000 n=1+1)
Emit-41.51MB ± 0%1.69MB ± 0%~(p=1.000 n=1+1)
EnumTransfer-4889B ± 0%962B ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-4112B ± 0%112B ± 0%~(all equal)
ExportType/simple_type-40.00B 0.00B ~(all equal)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
FTTransfer-446.8kB ± 0%46.8kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/sema goos:linux goarch:amd64
FlowTokenContract-4242kB ± 0%246kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-48.30kB ± 0%8.30kB ± 0%~(all equal)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
ImperativeFib-46.30kB ± 0%6.30kB ± 0%~(all equal)
ImperativeFibNewCompilerNewVM-426.9kB ± 0%27.0kB ± 0%~(p=1.000 n=1+1)
ImperativeFibNewVM-49.00kB ± 0%9.03kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
InterpretRecursionFib-41.17MB ± 0%1.17MB ± 0%~(all equal)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
InterpreterFTTransfer-447.1kB ± 0%46.2kB ± 0%~(p=1.000 n=1+1)
InterpreterImperativeFib-48.29kB ± 0%8.29kB ± 0%~(all equal)
InterpreterNewStruct-424.5kB ± 0%26.0kB ± 0%~(p=1.000 n=1+1)
MethodCall/concrete_type_method_call-411.1kB ± 0%11.4kB ± 0%~(p=1.000 n=1+1)
MethodCall/interface_method_call-418.0kB ± 0%18.3kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
NewInterpreter/new_interpreter-4976B ± 0%1024B ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_sub-interpreter-4232B ± 0%232B ± 0%~(all equal)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
NewStruct-413.9kB ± 0%15.7kB ± 0%~(p=1.000 n=1+1)
NewStructRaw-41.83kB ± 0%1.97kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/sema goos:linux goarch:amd64
QualifiedIdentifierCreation/One_level-40.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-464.0B ± 0%64.0B ± 0%~(all equal)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
RecursionFib-4342kB ± 0%342kB ± 0%~(all equal)
RuntimeFungibleTokenTransfer-4251kB ± 0%252kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-4173kB ± 0%175kB ± 0%~(p=1.000 n=1+1)
RuntimeResourceDictionaryValues-41.78MB ± 0%1.82MB ± 0%~(p=1.000 n=1+1)
RuntimeResourceTracking-46.98MB ± 0%7.49MB ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-48.06kB ± 0%8.17kB ± 0%~(p=1.000 n=1+1)
RuntimeVMInvokeContractImperativeFib-414.3kB ± 0%15.0kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/sema goos:linux goarch:amd64
SuperTypeInference/arrays-424.0B ± 0%24.0B ± 0%~(all equal)
SuperTypeInference/composites-40.00B 0.00B ~(all equal)
SuperTypeInference/integers-40.00B 0.00B ~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-432.0B ± 0%32.0B ± 0%~(all equal)
 
allocs/opdelta
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ByteArrayTransfer-47.00 ± 0%8.00 ± 0%~(p=1.000 n=1+1)
ByteArrayValueToByteSlice-41.00 ± 0%1.00 ± 0%~(all equal)
ByteSliceToByteArrayValue-45.00 ± 0%6.00 ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/bbq/compiler goos:linux goarch:amd64
CompileFungibleTokenTransferTransaction-4577 ± 0%581 ± 0%~(p=1.000 n=1+1)
CompileTime-4212 ± 0%212 ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-42.23k ± 0%2.27k ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
ContractImport-41.37k ± 0%1.39k ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EMVAddressTransfer-429.0 ± 0%31.0 ± 0%~(p=1.000 n=1+1)
Emit-441.0k ± 0%42.0k ± 0%~(p=1.000 n=1+1)
EnumTransfer-413.0 ± 0%14.0 ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-42.00 ± 0%2.00 ± 0%~(all equal)
ExportType/simple_type-40.00 0.00 ~(all equal)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
FTTransfer-41.50k ± 0%1.49k ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/sema goos:linux goarch:amd64
FlowTokenContract-43.60k ± 0%3.71k ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-4176 ± 0%176 ± 0%~(all equal)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
ImperativeFib-4322 ± 0%322 ± 0%~(all equal)
ImperativeFibNewCompilerNewVM-4533 ± 0%534 ± 0%~(p=1.000 n=1+1)
ImperativeFibNewVM-4364 ± 0%365 ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
InterpretRecursionFib-416.5k ± 0%16.5k ± 0%~(all equal)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
InterpreterFTTransfer-41.04k ± 0%1.01k ± 0%~(p=1.000 n=1+1)
InterpreterImperativeFib-4175 ± 0%175 ± 0%~(all equal)
InterpreterNewStruct-4408 ± 0%418 ± 0%~(p=1.000 n=1+1)
MethodCall/concrete_type_method_call-4402 ± 0%404 ± 0%~(p=1.000 n=1+1)
MethodCall/interface_method_call-4512 ± 0%514 ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
NewInterpreter/new_interpreter-415.0 ± 0%16.0 ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_sub-interpreter-44.00 ± 0%4.00 ± 0%~(all equal)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
NewStruct-4422 ± 0%432 ± 0%~(p=1.000 n=1+1)
NewStructRaw-430.0 ± 0%32.0 ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/sema goos:linux goarch:amd64
QualifiedIdentifierCreation/One_level-40.00 0.00 ~(all equal)
QualifiedIdentifierCreation/Three_levels-42.00 ± 0%2.00 ± 0%~(all equal)
pkg:github.com/onflow/cadence/bbq/vm/test goos:linux goarch:amd64
RecursionFib-419.5k ± 0%19.5k ± 0%~(all equal)
RuntimeFungibleTokenTransfer-44.21k ± 0%4.22k ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-43.21k ± 0%3.22k ± 0%~(p=1.000 n=1+1)
RuntimeResourceDictionaryValues-436.7k ± 0%36.7k ± 0%~(p=1.000 n=1+1)
RuntimeResourceTracking-4128k ± 0%131k ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-4113 ± 0%117 ± 0%~(p=1.000 n=1+1)
RuntimeVMInvokeContractImperativeFib-4481 ± 0%489 ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/sema goos:linux goarch:amd64
SuperTypeInference/arrays-41.00 ± 0%1.00 ± 0%~(all equal)
SuperTypeInference/composites-40.00 0.00 ~(all equal)
SuperTypeInference/integers-40.00 0.00 ~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-41.00 ± 0%1.00 ± 0%~(all equal)
 

@turbolent

Copy link
Copy Markdown
Member Author

There was only one small conflict, both sides adding tests at the end of a file, which could be trivially resolved:

diff --git a/interpreter/switch_test.go b/interpreter/switch_test.go
remerge CONFLICT (content): Merge conflict in interpreter/switch_test.go
index ca731b8e6..7c4a36fc2 100644
--- a/interpreter/switch_test.go
+++ b/interpreter/switch_test.go
@@ -235,7 +235,6 @@ func TestInterpretSwitchStatement(t *testing.T) {
        })
 }

-<<<<<<< 3fa2a11ef (Merge pull request #4510 from onflow/bastian/feature-inventory)
 func TestInterpretSwitchStatementControlFlowInLoop(t *testing.T) {

        t.Parallel()
@@ -388,7 +387,10 @@ func TestInterpretSwitchStatementControlFlowInLoop(t *testing.T) {
             }
         `,
                        6,
-=======
+               )
+       })
+}
+
 func TestInterpretSwitchStatementOptionalUnboxing(t *testing.T) {

        t.Parallel()
@@ -532,7 +534,6 @@ func TestInterpretSwitchStatementOptionalUnboxing(t *testing.T) {
                        invokable,
                        interpreter.NewUnmeteredStringValue("nil"),
                        result,
->>>>>>> d01300fc3 (Merge pull request #4512 from onflow/bastian/update-atree-v0.16.1)
                )
        })
 }

@SupunS SupunS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👏 👏

@turbolent turbolent merged commit a941ba1 into master Jul 8, 2026
14 of 17 checks passed
@turbolent turbolent deleted the bastian/merge-v1.10 branch July 8, 2026 18:27
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.

2 participants