diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 92da5a94e84..cad6b7ad3c6 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -82,6 +82,7 @@ jobs: docker-push: name: ${{ matrix.role }} images runs-on: ubuntu-latest + environment: Production Docker Registry needs: matrix_builder # setup jobs for each role diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b708d0b973c..3b5620f43c2 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,10 +1,18 @@ name: CD on: - push: - tags: - - '*' - - "!daily-*" +# Workflow dispatch for now, while we're testing environments + # push: + # tags: + # - '*' + # - "!daily-*" + workflow_dispatch: + inputs: + tag: + description: 'Tag/commit' + required: true + type: string + env: GO_VERSION: "1.22" @@ -13,6 +21,7 @@ jobs: docker-push: name: Push to container registry runs-on: ubuntu-latest + environment: Production Docker Registry steps: - name: Setup Go uses: actions/setup-go@v4 @@ -21,6 +30,8 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: Checkout repo uses: actions/checkout@v2 + with: + ref: ${{ inputs.tag }} # Provide Google Service Account credentials to Github Action, allowing interaction with the Google Container Registry # Logging in as github-actions@dl-flow.iam.gserviceaccount.com - id: auth diff --git a/engine/common/requester/engine.go b/engine/common/requester/engine.go index b1e35bcb642..3a9031e3b5a 100644 --- a/engine/common/requester/engine.go +++ b/engine/common/requester/engine.go @@ -421,15 +421,6 @@ func (e *Engine) dispatchRequest() (bool, error) { } e.requests[req.Nonce] = req - if e.log.Debug().Enabled() { - e.log.Debug(). - Hex("provider", logging.ID(providerID)). - Uint64("nonce", req.Nonce). - Strs("entities", logging.IDs(entityIDs)). - TimeDiff("duration", time.Now(), requestStart). - Msg("entity request sent") - } - // NOTE: we forget about requests after the expiry of the shortest retry time // from the entities in the list; this means that we purge requests aggressively. // However, most requests should be responded to on the first attempt and clearing @@ -443,11 +434,15 @@ func (e *Engine) dispatchRequest() (bool, error) { delete(e.requests, req.Nonce) }() + if e.log.Debug().Enabled() { + e.log.Debug(). + Hex("provider", logging.ID(providerID)). + Uint64("nonce", req.Nonce). + Strs("entities", logging.IDs(entityIDs)). + TimeDiff("duration", time.Now(), requestStart). + Msg("entity request sent") + } e.metrics.MessageSent(e.channel.String(), metrics.MessageEntityRequest) - e.log.Debug(). - Uint64("nonce", req.Nonce). - Strs("entity_ids", flow.IdentifierList(req.EntityIDs).Strings()). - Msg("entity request sent") return true, nil } diff --git a/fvm/evm/types/result.go b/fvm/evm/types/result.go index d33fa883a21..2ad16a0b5df 100644 --- a/fvm/evm/types/result.go +++ b/fvm/evm/types/result.go @@ -151,7 +151,7 @@ func (res *Result) RLPEncodedLogs() ([]byte, error) { if len(res.Logs) > 0 { encodedLogs, err = rlp.EncodeToBytes(res.Logs) if err != nil { - return nil, err + return encodedLogs, err } } return encodedLogs, nil @@ -170,11 +170,11 @@ func (res *Result) DeployedContractAddressString() string { // StateChangeChecksum constructs a checksum // based on the state change commitment on the result func (res *Result) StateChangeChecksum() [ChecksumLength]byte { - return BytesToChecksum(res.StateChangeCommitment) + return SliceToChecksumLength(res.StateChangeCommitment) } -// BytesToChecksum cuts the first 4 bytes of the input and convert it into checksum -func BytesToChecksum(input []byte) [ChecksumLength]byte { +// SliceToChecksumLength cuts the first 4 bytes of the input and convert it into checksum +func SliceToChecksumLength(input []byte) [ChecksumLength]byte { // the first 4 bytes of StateChangeCommitment is used as checksum var checksum [ChecksumLength]byte if len(input) >= ChecksumLength { diff --git a/go.mod b/go.mod index ce21004255f..dbed42d9182 100644 --- a/go.mod +++ b/go.mod @@ -48,7 +48,7 @@ require ( github.com/multiformats/go-multiaddr-dns v0.3.1 github.com/multiformats/go-multihash v0.2.3 github.com/onflow/atree v0.8.0-rc.6 - github.com/onflow/cadence v1.0.0 + github.com/onflow/cadence v1.0.1 github.com/onflow/crypto v0.25.2 github.com/onflow/flow v0.3.4 github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 diff --git a/go.sum b/go.sum index 2f51ed1016e..8f4f3a4f317 100644 --- a/go.sum +++ b/go.sum @@ -2171,8 +2171,8 @@ github.com/onflow/atree v0.8.0-rc.6/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/ github.com/onflow/boxo v0.0.0-20240201202436-f2477b92f483 h1:LpiQhTAfM9CAmNVEs0n//cBBgCg+vJSiIxTHYUklZ84= github.com/onflow/boxo v0.0.0-20240201202436-f2477b92f483/go.mod h1:pIZgTWdm3k3pLF9Uq6MB8JEcW07UDwNJjlXW1HELW80= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0 h1:bvT75F2LZJvDCBmmajAv7QLISK6Qp30FAKcSwqNNH+o= -github.com/onflow/cadence v1.0.0/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= +github.com/onflow/cadence v1.0.1 h1:Vv/txHQsaT5BzS14SrsMRQgj164JdNVKafekXrZ5Fx4= +github.com/onflow/cadence v1.0.1/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.2 h1:GjHunqVt+vPcdqhxxhAXiMIF3YiLX7gTuTR5O+VG2ns= github.com/onflow/crypto v0.25.2/go.mod h1:fY7eLqUdMKV8EGOw301unP8h7PvLVy8/6gVR++/g0BY= diff --git a/insecure/go.mod b/insecure/go.mod index 060fa230a0f..5eedd7c0c17 100644 --- a/insecure/go.mod +++ b/insecure/go.mod @@ -203,7 +203,7 @@ require ( github.com/nxadm/tail v1.4.8 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onflow/atree v0.8.0-rc.6 // indirect - github.com/onflow/cadence v1.0.0 // indirect + github.com/onflow/cadence v1.0.1 // indirect github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 // indirect github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 // indirect github.com/onflow/flow-ft/lib/go/contracts v1.0.0 // indirect diff --git a/insecure/go.sum b/insecure/go.sum index 8b88066e0ed..7910b609280 100644 --- a/insecure/go.sum +++ b/insecure/go.sum @@ -2159,8 +2159,8 @@ github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs github.com/onflow/atree v0.8.0-rc.6 h1:GWgaylK24b5ta2Hq+TvyOF7X5tZLiLzMMn7lEt59fsA= github.com/onflow/atree v0.8.0-rc.6/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0 h1:bvT75F2LZJvDCBmmajAv7QLISK6Qp30FAKcSwqNNH+o= -github.com/onflow/cadence v1.0.0/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= +github.com/onflow/cadence v1.0.1 h1:Vv/txHQsaT5BzS14SrsMRQgj164JdNVKafekXrZ5Fx4= +github.com/onflow/cadence v1.0.1/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.2 h1:GjHunqVt+vPcdqhxxhAXiMIF3YiLX7gTuTR5O+VG2ns= github.com/onflow/crypto v0.25.2/go.mod h1:fY7eLqUdMKV8EGOw301unP8h7PvLVy8/6gVR++/g0BY= diff --git a/integration/go.mod b/integration/go.mod index 9bae86babca..2dcdefd2aee 100644 --- a/integration/go.mod +++ b/integration/go.mod @@ -20,7 +20,7 @@ require ( github.com/ipfs/go-ds-badger2 v0.1.3 github.com/ipfs/go-ds-pebble v0.3.1-0.20240828032824-d745b9d3200b github.com/libp2p/go-libp2p v0.32.2 - github.com/onflow/cadence v1.0.0 + github.com/onflow/cadence v1.0.1 github.com/onflow/crypto v0.25.2 github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 diff --git a/integration/go.sum b/integration/go.sum index 4128721ef99..68675018855 100644 --- a/integration/go.sum +++ b/integration/go.sum @@ -2144,8 +2144,8 @@ github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs github.com/onflow/atree v0.8.0-rc.6 h1:GWgaylK24b5ta2Hq+TvyOF7X5tZLiLzMMn7lEt59fsA= github.com/onflow/atree v0.8.0-rc.6/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0 h1:bvT75F2LZJvDCBmmajAv7QLISK6Qp30FAKcSwqNNH+o= -github.com/onflow/cadence v1.0.0/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= +github.com/onflow/cadence v1.0.1 h1:Vv/txHQsaT5BzS14SrsMRQgj164JdNVKafekXrZ5Fx4= +github.com/onflow/cadence v1.0.1/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.2 h1:GjHunqVt+vPcdqhxxhAXiMIF3YiLX7gTuTR5O+VG2ns= github.com/onflow/crypto v0.25.2/go.mod h1:fY7eLqUdMKV8EGOw301unP8h7PvLVy8/6gVR++/g0BY=