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

Update Cadence 1.0 feature branch #5171

Merged
merged 188 commits into from
Dec 20, 2023
Merged

Conversation

turbolent
Copy link
Member

Work done by @sideninja

Conflict resolution
commit 313b21fd511be47a131af0d40d47715a4faae411
Merge: 4c4527a42f 3d8d907db2
Author: Gregor Gololicic <gregor.gololicic@dapperlabs.com>
Date:   Wed Dec 20 14:14:43 2023 +0100

    Merge branch 'master' into feature/stable-cadence
    
    # Conflicts:
    #       fvm/environment/meter.go
    #       fvm/evm/stdlib/contract.go
    #       go.sum
    #       insecure/go.mod
    #       insecure/go.sum
    #       integration/go.sum

diff --git a/fvm/environment/meter.go b/fvm/environment/meter.go
remerge CONFLICT (content): Merge conflict in fvm/environment/meter.go
index ac754fe636..1541ef6974 100644
--- a/fvm/environment/meter.go
+++ b/fvm/environment/meter.go
@@ -12,51 +12,6 @@ import (
 
 const (
 	// [2_000, 3_000) reserved for the FVM
-<<<<<<< 4c4527a42f (Merge pull request #5102 from onflow/bastian/update-stable-cadence-3)
-	ComputationKindHash                       = 2001
-	ComputationKindVerifySignature            = 2002
-	ComputationKindAddAccountKey              = 2003
-	ComputationKindAddEncodedAccountKey       = 2004
-	ComputationKindAllocateStorageIndex       = 2005
-	ComputationKindCreateAccount              = 2006
-	ComputationKindEmitEvent                  = 2007
-	ComputationKindGenerateUUID               = 2008
-	ComputationKindGetAccountAvailableBalance = 2009
-	ComputationKindGetAccountBalance          = 2010
-	ComputationKindGetAccountContractCode     = 2011
-	ComputationKindGetAccountContractNames    = 2012
-	ComputationKindGetAccountKey              = 2013
-	ComputationKindGetBlockAtHeight           = 2014
-	ComputationKindGetCode                    = 2015
-	ComputationKindGetCurrentBlockHeight      = 2016
-	_                                         = 2017
-	ComputationKindGetStorageCapacity         = 2018
-	ComputationKindGetStorageUsed             = 2019
-	ComputationKindGetValue                   = 2020
-	ComputationKindRemoveAccountContractCode  = 2021
-	ComputationKindResolveLocation            = 2022
-	ComputationKindRevokeAccountKey           = 2023
-	_                                         = 2024 // removed, DO NOT REUSE
-	_                                         = 2025 // removed, DO NOT REUSE
-	ComputationKindSetValue                   = 2026
-	ComputationKindUpdateAccountContractCode  = 2027
-	ComputationKindValidatePublicKey          = 2028
-	ComputationKindValueExists                = 2029
-	ComputationKindAccountKeysCount           = 2030
-	ComputationKindBLSVerifyPOP               = 2031
-	ComputationKindBLSAggregateSignatures     = 2032
-	ComputationKindBLSAggregatePublicKeys     = 2033
-	ComputationKindGetOrLoadProgram           = 2034
-	ComputationKindGenerateAccountLocalID     = 2035
-	ComputationKindGetRandomSourceHistory     = 2036
-	ComputationKindEVMGasUsage                = 2037
-	ComputationKindRLPEncoding                = 2038
-	ComputationKindRLPDecoding                = 2039
-	ComputationKindEncodeEvent                = 2040
-	_                                         = 2041
-	ComputationKindEVMEncodeABI               = 2042
-	ComputationKindEVMDecodeABI               = 2042
-=======
 	ComputationKindHash = 2001 + iota
 	ComputationKindVerifySignature
 	ComputationKindAddAccountKey
@@ -100,7 +55,6 @@ const (
 	_
 	ComputationKindEVMEncodeABI
 	ComputationKindEVMDecodeABI
->>>>>>> 3d8d907db2 (Merge pull request #5154 from onflow/yahya/fixes-p2p-package-names)
 )
 
 type Meter interface {
diff --git a/fvm/evm/stdlib/contract.go b/fvm/evm/stdlib/contract.go
remerge CONFLICT (content): Merge conflict in fvm/evm/stdlib/contract.go
index 1e7de5f517..112c773650 100644
--- a/fvm/evm/stdlib/contract.go
+++ b/fvm/evm/stdlib/contract.go
@@ -40,13 +40,9 @@ const ContractName = "EVM"
 const evmAddressTypeBytesFieldName = "bytes"
 const evmAddressTypeQualifiedIdentifier = "EVM.EVMAddress"
 
-<<<<<<< 4c4527a42f (Merge pull request #5102 from onflow/bastian/update-stable-cadence-3)
-var EVMTransactionBytesCadenceType = cadence.NewVariableSizedArrayType(cadence.UInt8Type)
-=======
 const abiEncodingByteSize = 32
 
-var EVMTransactionBytesCadenceType = cadence.NewVariableSizedArrayType(cadence.TheUInt8Type)
->>>>>>> 3d8d907db2 (Merge pull request #5154 from onflow/yahya/fixes-p2p-package-names)
+var EVMTransactionBytesCadenceType = cadence.NewVariableSizedArrayType(cadence.UInt8Type)
 var evmTransactionBytesType = sema.NewVariableSizedType(nil, sema.UInt8Type)
 
 var evmAddressBytesType = sema.NewConstantSizedType(nil, sema.UInt8Type, types.AddressLength)
diff --git a/go.sum b/go.sum
remerge CONFLICT (content): Merge conflict in go.sum
index a09eec2124..65a6c9f3bc 100644
--- a/go.sum
+++ b/go.sum
@@ -1885,19 +1885,11 @@ github.com/onflow/flow-go-sdk v0.44.0-stable-cadence.2/go.mod h1:mbLrR3MkYbi9LH3
 github.com/onflow/flow-go/crypto v0.24.7/go.mod h1:fqCzkIBBMRRkciVrvW21rECKq1oD7Q6u+bCI78lfNX0=
 github.com/onflow/flow-go/crypto v0.25.0 h1:6lmoiAQ3APCF+nV7f4f2AXL3PuDKqQiWqRJXmjrMEq4=
 github.com/onflow/flow-go/crypto v0.25.0/go.mod h1:OOb2vYcS8AOCajBClhHTJ0NKftFl1RQgTQ0+Vh4nbqk=
-<<<<<<< 4c4527a42f (Merge pull request #5102 from onflow/bastian/update-stable-cadence-3)
 github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20231213195450-0b951b342b14 h1:pHblchb5rKrpt1xmeKnMNq3utzBi2bvepHu7z1ZPWjw=
 github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20231213195450-0b951b342b14/go.mod h1:OKA2xWNugqqbaFSmxdb1VWixtuqSdz/VK1MlbdcIUxw=
 github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20221202093946-932d1c70e288/go.mod h1:gQxYqCfkI8lpnKsmIjwtN2mV/N2PIwc1I+RUK4HPIc8=
-github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231124194313-106cc495def6 h1:KMN+OEVaw7KAgxL3p8ux7CMuyTvacAlYTbasOqowh4M=
-github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231124194313-106cc495def6/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
-=======
-github.com/onflow/flow-nft/lib/go/contracts v1.1.0 h1:rhUDeD27jhLwOqQKI/23008CYfnqXErrJvc4EFRP2a0=
-github.com/onflow/flow-nft/lib/go/contracts v1.1.0/go.mod h1:YsvzYng4htDgRB9sa9jxdwoTuuhjK8WYWXTyLkIigZY=
-github.com/onflow/flow/protobuf/go/flow v0.2.2/go.mod h1:gQxYqCfkI8lpnKsmIjwtN2mV/N2PIwc1I+RUK4HPIc8=
 github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 h1:+rT+UsfTR39JZO8ht2+4fkaWfHw74SCj1fyz1lWuX8A=
 github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
->>>>>>> 3d8d907db2 (Merge pull request #5154 from onflow/yahya/fixes-p2p-package-names)
 github.com/onflow/go-bitswap v0.0.0-20230703214630-6d3db958c73d h1:QcOAeEyF3iAUHv21LQ12sdcsr0yFrJGoGLyCAzYYtvI=
 github.com/onflow/go-bitswap v0.0.0-20230703214630-6d3db958c73d/go.mod h1:GCPpiyRoHncdqPj++zPr9ZOYBX4hpJ0pYZRYqSE8VKk=
 github.com/onflow/sdks v0.5.0/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU=
diff --git a/insecure/go.mod b/insecure/go.mod
remerge CONFLICT (content): Merge conflict in insecure/go.mod
index eb1ab129df..d1d1ec668a 100644
--- a/insecure/go.mod
+++ b/insecure/go.mod
@@ -198,7 +198,6 @@ require (
 	github.com/multiformats/go-varint v0.0.7 // indirect
 	github.com/nxadm/tail v1.4.8 // indirect
 	github.com/olekukonko/tablewriter v0.0.5 // indirect
-<<<<<<< 4c4527a42f (Merge pull request #5102 from onflow/bastian/update-stable-cadence-3)
 	github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f // indirect
 	github.com/onflow/cadence v1.0.0-preview.1.0.20231213191345-0ff20e15e7e1 // indirect
 	github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20231212203043-37cbe453d425 // indirect
@@ -206,17 +205,7 @@ require (
 	github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20231212194336-a2802ba36596 // indirect
 	github.com/onflow/flow-go-sdk v0.44.0-stable-cadence.2 // indirect
 	github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20231213195450-0b951b342b14 // indirect
-	github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231124194313-106cc495def6 // indirect
-=======
-	github.com/onflow/atree v0.6.0 // indirect
-	github.com/onflow/cadence v0.42.6 // indirect
-	github.com/onflow/flow-core-contracts/lib/go/contracts v1.2.4-0.20231016154253-a00dbf7c061f // indirect
-	github.com/onflow/flow-core-contracts/lib/go/templates v1.2.4-0.20231016154253-a00dbf7c061f // indirect
-	github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20230711213910-baad011d2b13 // indirect
-	github.com/onflow/flow-go-sdk v0.41.17 // indirect
-	github.com/onflow/flow-nft/lib/go/contracts v1.1.0 // indirect
 	github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 // indirect
->>>>>>> 3d8d907db2 (Merge pull request #5154 from onflow/yahya/fixes-p2p-package-names)
 	github.com/onflow/go-bitswap v0.0.0-20230703214630-6d3db958c73d // indirect
 	github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba // indirect
 	github.com/onflow/wal v0.0.0-20230529184820-bc9f8244608d // indirect
diff --git a/insecure/go.sum b/insecure/go.sum
remerge CONFLICT (content): Merge conflict in insecure/go.sum
index 900dc9d09d..78ba1ac99e 100644
--- a/insecure/go.sum
+++ b/insecure/go.sum
@@ -1877,19 +1877,11 @@ github.com/onflow/flow-go-sdk v0.44.0-stable-cadence.2/go.mod h1:mbLrR3MkYbi9LH3
 github.com/onflow/flow-go/crypto v0.24.7/go.mod h1:fqCzkIBBMRRkciVrvW21rECKq1oD7Q6u+bCI78lfNX0=
 github.com/onflow/flow-go/crypto v0.25.0 h1:6lmoiAQ3APCF+nV7f4f2AXL3PuDKqQiWqRJXmjrMEq4=
 github.com/onflow/flow-go/crypto v0.25.0/go.mod h1:OOb2vYcS8AOCajBClhHTJ0NKftFl1RQgTQ0+Vh4nbqk=
-<<<<<<< 4c4527a42f (Merge pull request #5102 from onflow/bastian/update-stable-cadence-3)
 github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20231213195450-0b951b342b14 h1:pHblchb5rKrpt1xmeKnMNq3utzBi2bvepHu7z1ZPWjw=
 github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20231213195450-0b951b342b14/go.mod h1:OKA2xWNugqqbaFSmxdb1VWixtuqSdz/VK1MlbdcIUxw=
 github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20221202093946-932d1c70e288/go.mod h1:gQxYqCfkI8lpnKsmIjwtN2mV/N2PIwc1I+RUK4HPIc8=
-github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231124194313-106cc495def6 h1:KMN+OEVaw7KAgxL3p8ux7CMuyTvacAlYTbasOqowh4M=
-github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231124194313-106cc495def6/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
-=======
-github.com/onflow/flow-nft/lib/go/contracts v1.1.0 h1:rhUDeD27jhLwOqQKI/23008CYfnqXErrJvc4EFRP2a0=
-github.com/onflow/flow-nft/lib/go/contracts v1.1.0/go.mod h1:YsvzYng4htDgRB9sa9jxdwoTuuhjK8WYWXTyLkIigZY=
-github.com/onflow/flow/protobuf/go/flow v0.2.2/go.mod h1:gQxYqCfkI8lpnKsmIjwtN2mV/N2PIwc1I+RUK4HPIc8=
 github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 h1:+rT+UsfTR39JZO8ht2+4fkaWfHw74SCj1fyz1lWuX8A=
 github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
->>>>>>> 3d8d907db2 (Merge pull request #5154 from onflow/yahya/fixes-p2p-package-names)
 github.com/onflow/go-bitswap v0.0.0-20230703214630-6d3db958c73d h1:QcOAeEyF3iAUHv21LQ12sdcsr0yFrJGoGLyCAzYYtvI=
 github.com/onflow/go-bitswap v0.0.0-20230703214630-6d3db958c73d/go.mod h1:GCPpiyRoHncdqPj++zPr9ZOYBX4hpJ0pYZRYqSE8VKk=
 github.com/onflow/sdks v0.5.0/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU=
diff --git a/integration/go.sum b/integration/go.sum
remerge CONFLICT (content): Merge conflict in integration/go.sum
index 5d6a3edbf4..bd52e410e4 100644
--- a/integration/go.sum
+++ b/integration/go.sum
@@ -1963,19 +1963,11 @@ github.com/onflow/flow-go-sdk v0.44.0-stable-cadence.2/go.mod h1:mbLrR3MkYbi9LH3
 github.com/onflow/flow-go/crypto v0.24.7/go.mod h1:fqCzkIBBMRRkciVrvW21rECKq1oD7Q6u+bCI78lfNX0=
 github.com/onflow/flow-go/crypto v0.25.0 h1:6lmoiAQ3APCF+nV7f4f2AXL3PuDKqQiWqRJXmjrMEq4=
 github.com/onflow/flow-go/crypto v0.25.0/go.mod h1:OOb2vYcS8AOCajBClhHTJ0NKftFl1RQgTQ0+Vh4nbqk=
-<<<<<<< 4c4527a42f (Merge pull request #5102 from onflow/bastian/update-stable-cadence-3)
 github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20231213195450-0b951b342b14 h1:pHblchb5rKrpt1xmeKnMNq3utzBi2bvepHu7z1ZPWjw=
 github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20231213195450-0b951b342b14/go.mod h1:OKA2xWNugqqbaFSmxdb1VWixtuqSdz/VK1MlbdcIUxw=
 github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20221202093946-932d1c70e288/go.mod h1:gQxYqCfkI8lpnKsmIjwtN2mV/N2PIwc1I+RUK4HPIc8=
-github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231124194313-106cc495def6 h1:KMN+OEVaw7KAgxL3p8ux7CMuyTvacAlYTbasOqowh4M=
-github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231124194313-106cc495def6/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
-=======
-github.com/onflow/flow-nft/lib/go/contracts v1.1.0 h1:rhUDeD27jhLwOqQKI/23008CYfnqXErrJvc4EFRP2a0=
-github.com/onflow/flow-nft/lib/go/contracts v1.1.0/go.mod h1:YsvzYng4htDgRB9sa9jxdwoTuuhjK8WYWXTyLkIigZY=
-github.com/onflow/flow/protobuf/go/flow v0.2.2/go.mod h1:gQxYqCfkI8lpnKsmIjwtN2mV/N2PIwc1I+RUK4HPIc8=
 github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 h1:+rT+UsfTR39JZO8ht2+4fkaWfHw74SCj1fyz1lWuX8A=
 github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
->>>>>>> 3d8d907db2 (Merge pull request #5154 from onflow/yahya/fixes-p2p-package-names)
 github.com/onflow/go-bitswap v0.0.0-20230703214630-6d3db958c73d h1:QcOAeEyF3iAUHv21LQ12sdcsr0yFrJGoGLyCAzYYtvI=
 github.com/onflow/go-bitswap v0.0.0-20230703214630-6d3db958c73d/go.mod h1:GCPpiyRoHncdqPj++zPr9ZOYBX4hpJ0pYZRYqSE8VKk=
 github.com/onflow/sdks v0.5.0/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU=

fvm/environment/meter.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2023

Codecov Report

Attention: 753 lines in your changes are missing coverage. Please review.

Comparison is base (4c4527a) 79.71% compared to head (8c5c1da) 56.52%.

Files Patch % Lines
module/metrics/gossipsub.go 0.00% 190 Missing ⚠️
network/p2p/tracer/gossipSubMeshTracer.go 16.93% 152 Missing and 5 partials ⚠️
network/netconf/flags.go 36.60% 97 Missing ⚠️
module/metrics/gossipsub_rpc_inspector.go 0.00% 92 Missing ⚠️
network/p2p/builder/libp2pNodeBuilder.go 0.00% 60 Missing ⚠️
cmd/scaffold.go 0.00% 26 Missing ⚠️
module/metrics/noop.go 0.00% 25 Missing ⚠️
module/metrics/herocache.go 0.00% 24 Missing ⚠️
network/p2p/test/fixtures.go 40.00% 15 Missing ⚠️
network/p2p/scoring/registry.go 87.75% 9 Missing and 3 partials ⚠️
... and 16 more
Additional details and impacted files
@@                     Coverage Diff                     @@
##           feature/stable-cadence    #5171       +/-   ##
===========================================================
- Coverage                   79.71%   56.52%   -23.19%     
===========================================================
  Files                           1      981      +980     
  Lines                          69    93007    +92938     
===========================================================
+ Hits                           55    52576    +52521     
- Misses                         13    36544    +36531     
- Partials                        1     3887     +3886     
Flag Coverage Δ
unittests 56.52% <36.02%> (-23.19%) ⬇️

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

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

@turbolent turbolent closed this Dec 20, 2023
@turbolent turbolent reopened this Dec 20, 2023
@sideninja sideninja self-requested a review December 20, 2023 21:45
@turbolent turbolent merged commit 5d681fd into feature/stable-cadence Dec 20, 2023
102 checks passed
@turbolent turbolent deleted the gregor/evm/cadence-1 branch December 20, 2023 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants