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 branch #5102

Merged
merged 2,800 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
2800 commits
Select commit Hold shift + click to select a range
cb368bc
Merge pull request #5061 from onflow/janez/add-evm-tx-to-bench
janezpodhostnik Nov 29, 2023
f4d0f87
Merge pull request #5077 from onflow/petera/fix-emulator-depenedencies
peterargue Nov 29, 2023
c26077a
Merge pull request #4891 from onflow/khalil/6662-peer-id-specific-decay
kc1116 Nov 29, 2023
24a310e
Merge branch 'master' into guitarheroua/4850-cache-tx-result-err-msg
Guitarheroua Nov 29, 2023
3f1e6aa
[CI] Add timeout to setup go step
peterargue Nov 29, 2023
54cff65
Merge branch 'master' into petera/add-timeout-ci-gosetup
peterargue Nov 29, 2023
e003a3f
Apply suggestions from code review
Guitarheroua Nov 29, 2023
614cca5
Fixed review remarks
Guitarheroua Nov 29, 2023
5946313
Merge branch 'master' into guitarheroua/4850-cache-tx-result-err-msg
Guitarheroua Nov 29, 2023
af4eeb6
Merge branch 'master' into petera/upgrade-ci-go-setup
peterargue Nov 29, 2023
dc8b796
Apply suggestions from code review
Guitarheroua Nov 29, 2023
9577079
Merge pull request #5067 from onflow/amlandeep/refactor-state-sync-re…
koko1123 Nov 29, 2023
9c35852
Fixed remarks
Guitarheroua Nov 29, 2023
b93c392
Merge branch 'master' into guitarheroua/4850-cache-tx-result-err-msg
Guitarheroua Nov 30, 2023
2ac9068
Fixed unit tests
Guitarheroua Nov 30, 2023
5c42ae2
create cadence event from evm
Nov 30, 2023
4299859
use emit event
Nov 30, 2023
06acd81
remove emit raw event as it's no longer needed
Nov 30, 2023
883774f
remove unneeded encode
Nov 30, 2023
bbfbee2
remove not needed todo
Nov 30, 2023
a9ba8fc
Merge branch 'master' into janez/setup-evm-account-on-bootstrap
janezpodhostnik Nov 30, 2023
d955686
camel case names
Nov 30, 2023
b967cf3
add comment
Nov 30, 2023
53bee6a
Merge branch 'master' into janez/unify-core-contracts
janezpodhostnik Nov 30, 2023
3c01c7f
merge fix
janezpodhostnik Nov 30, 2023
02c769b
update emulator
janezpodhostnik Nov 30, 2023
9a42f57
downgrade crypto
janezpodhostnik Nov 30, 2023
6d43827
lint
janezpodhostnik Nov 30, 2023
046ad52
emulator upgrade
janezpodhostnik Nov 30, 2023
1998504
Fixed tx error cache for observer node.
Guitarheroua Nov 30, 2023
56cda1a
Update cadence to v0.42.6
SupunS Nov 30, 2023
2490167
update mocks
Nov 30, 2023
b6f20ab
draft fixed the test
yhassanzadeh13 Dec 1, 2023
44924c0
revises loggers in registry
yhassanzadeh13 Dec 1, 2023
350340b
adds startup logs for distributor
yhassanzadeh13 Dec 1, 2023
a911c56
revises logger in distributor
yhassanzadeh13 Dec 1, 2023
7e5c413
Merge pull request #5095 from onflow/yahya/6915-fixing-FixingTestGoss…
janezpodhostnik Dec 1, 2023
db6f379
change event mock test
Dec 1, 2023
a8c0048
change test cadence events
Dec 1, 2023
10b6f0a
reorg
Dec 1, 2023
707fb10
remove flow event test
Dec 1, 2023
cb66e88
fix test for logs
Dec 1, 2023
be4587b
update comment
Dec 1, 2023
5b77b72
Merge branch 'master' into janez/unify-core-contracts
janezpodhostnik Dec 1, 2023
22fd731
fix test events encoding
Dec 1, 2023
3eb8afa
add todo
Dec 1, 2023
9fdb59b
add register store to execution state
zhangchiqing Nov 22, 2023
5d0fa43
add flag
zhangchiqing Nov 23, 2023
030783b
remove HasState method from execution state
zhangchiqing Nov 23, 2023
24766ed
update mock
zhangchiqing Nov 23, 2023
041dba9
add comment
zhangchiqing Nov 23, 2023
01b14a2
fix lint
zhangchiqing Nov 23, 2023
357f0bb
update hasState
zhangchiqing Nov 23, 2023
abae453
update TODO
zhangchiqing Nov 23, 2023
6b6ca20
update lint
zhangchiqing Nov 23, 2023
9d21001
Apply suggestions from code review
zhangchiqing Nov 29, 2023
6a4354e
Update cmd/execution_builder.go
zhangchiqing Nov 30, 2023
9cffc29
fix lint
zhangchiqing Nov 30, 2023
c0205ee
use panic instead of nil pointer
zhangchiqing Nov 30, 2023
e6627e7
add contract balance
Dec 1, 2023
bcb30ac
add balance to address
Dec 1, 2023
1de70a8
add balance function and definitions
Dec 1, 2023
c739bcb
use ufix value directly
Dec 1, 2023
9611186
add test for balance
Dec 1, 2023
239dad3
add access modifier
Dec 1, 2023
3fd8019
remove unused
Dec 1, 2023
2e2db9c
Merge branch 'gregor/evm/cadence-event' into gregor/evm/account-get-b…
Dec 1, 2023
11dbb8e
Merge branch 'master' into janez/setup-evm-account-on-bootstrap
janezpodhostnik Dec 1, 2023
7a75b6d
Merge branch 'master' into gregor/evm/account-get-balance
Dec 1, 2023
41acbfa
Merge remote-tracking branch 'origin/janez/unify-core-contracts' into…
Dec 1, 2023
93daaf4
resolve merge
Dec 1, 2023
eb53d80
Mark test as flaky
janezpodhostnik Dec 1, 2023
4b169e2
Merge pull request #5033 from onflow/janez/unify-core-contracts
janezpodhostnik Dec 1, 2023
ba534d9
Merge pull request #5054 from onflow/leo/storehouse-execution-state-3
zhangchiqing Dec 1, 2023
4ade2b1
remove replace statement and update crypto version
Dec 1, 2023
5e8f771
cache last finalized height in finalized reader
zhangchiqing Nov 24, 2023
e0c1fa7
add comments
zhangchiqing Dec 1, 2023
4a09107
Merge branch 'master' into janez/setup-evm-account-on-bootstrap
janezpodhostnik Dec 1, 2023
4e77142
fix lint
janezpodhostnik Dec 1, 2023
ef427da
Merge branch 'master' into feature/stable-cadence-3
turbolent Dec 1, 2023
ad764fa
skip flaky tests
zhangchiqing Dec 1, 2023
87380a4
Merge pull request #5056 from onflow/leo/storehouse-finalized-reader-…
zhangchiqing Dec 2, 2023
631a724
Removed unnecessary changes in tests
Guitarheroua Dec 4, 2023
a1d568e
Merge branch 'master' into guitarheroua/4850-cache-tx-result-err-msg
Guitarheroua Dec 4, 2023
f6b2370
Merge pull request #5090 from onflow/gregor/evm/cadence-event
sideninja Dec 4, 2023
edcf7ee
Merge branch 'master' into gregor/evm/benchmark-state
sideninja Dec 4, 2023
999c677
return balance type
Dec 4, 2023
02299b6
add comment
Dec 4, 2023
c47cd13
tidy
Dec 4, 2023
bf4b74b
Merge branch 'master' into gregor/evm/account-get-balance
Dec 4, 2023
836557c
Merged
AndriiDiachuk Dec 4, 2023
0e0ef3b
Merge branch 'AndriiDiachuk/4869-get-protocol-snapshot-from-any-block…
AndriiDiachuk Dec 4, 2023
20d26ce
fix test to check balance type
Dec 4, 2023
0c0a54d
Merge pull request #5066 from Guitarheroua/guitarheroua/4850-cache-tx…
durkmurder Dec 4, 2023
c9a30d3
enable storehouse
zhangchiqing Dec 4, 2023
7331f0f
add test case
zhangchiqing Dec 4, 2023
4bfc168
fix finalized reader
zhangchiqing Dec 4, 2023
9e0560f
fix storehouse
zhangchiqing Dec 5, 2023
961a2e2
update test case
zhangchiqing Dec 5, 2023
6e5d624
refactor NewStorageSnapshot mock
zhangchiqing Dec 5, 2023
9c7f9d0
Merge pull request #5107 from onflow/leo/fix-storage-snapshot
zhangchiqing Dec 5, 2023
f713b2e
Merge branch 'master' into feature/blst-based-crypto
tarakby Dec 5, 2023
769ad67
slow down block production in bft tests
Dec 5, 2023
f7dac6c
slow down block rate in SN test
Dec 5, 2023
e3e29f0
fix SN integration test bug
Dec 5, 2023
bea7bf6
Merge pull request #5111 from onflow/tarak/blst-fix-integration-test
tarakby Dec 6, 2023
598d998
removes t.parallel
yhassanzadeh13 Dec 6, 2023
9dffe11
Merge pull request #4358 from onflow/feature/blst-based-crypto
tarakby Dec 6, 2023
94bee3c
go tidy
Dec 6, 2023
dd977b4
merge master
Dec 6, 2023
81e249a
Apply suggestions from code review
AndriiDiachuk Dec 6, 2023
397543a
Resolved suggestions
AndriiDiachuk Dec 6, 2023
6cbb9d7
Merge pull request #5100 from onflow/tarak/update-crypto-version
tarakby Dec 6, 2023
4a4a706
Merge branch 'master' into yahya/6915-fixing-flakey-integration-test-…
yhassanzadeh13 Dec 6, 2023
3e3d2ed
increases inspector shutdown timeout
yhassanzadeh13 Dec 7, 2023
db3a542
Merge pull request #5112 from onflow/yahya/6915-fixing-flakey-integra…
yhassanzadeh13 Dec 7, 2023
872e2d0
fix get highest
zhangchiqing Dec 5, 2023
0dca9c1
add tests
zhangchiqing Dec 5, 2023
456c131
Merge pull request #5109 from onflow/leo/fix-get-highest
zhangchiqing Dec 7, 2023
77996da
Added more test cases for snapshot by block id
AndriiDiachuk Dec 7, 2023
28246ab
deprecate flow-go/crypto module
Dec 7, 2023
331c845
describe deprecation in readme and delete files
Dec 7, 2023
1f1842c
add empty file and mod tidy
Dec 7, 2023
6a22c15
remove crypto-related testing from CI
Dec 7, 2023
4e22c3d
remove mock generation of public key
Dec 8, 2023
7f13305
add clarification about the crypto Go flag
Dec 8, 2023
c33ed73
Added other err cases for snapshot by block id method
AndriiDiachuk Dec 8, 2023
43c1981
Merge branch 'master' of https://github.com/AndriiDiachuk/flow-go int…
AndriiDiachuk Dec 8, 2023
4ad6516
Linted
AndriiDiachuk Dec 8, 2023
d36df28
Change progress log
janezpodhostnik Dec 8, 2023
92118a6
Migrate payloads by reference
janezpodhostnik Dec 8, 2023
5a44352
fix imports
Dec 11, 2023
19c682f
Merge remote-tracking branch 'origin/gregor/evm/benchmark-state' into…
Dec 11, 2023
e94e415
fix imports
Dec 11, 2023
4472290
fix variable dec
Dec 11, 2023
fef6b06
Merge pull request #5032 from onflow/gregor/evm/benchmark-state
sideninja Dec 11, 2023
6d1fc80
Merge branch 'master' into gregor/evm/account-get-balance
sideninja Dec 11, 2023
3fe1b30
Merge branch 'master' into petera/upgrade-ci-go-setup
peterargue Dec 11, 2023
cbd05e1
Merge branch 'master' into petera/add-timeout-ci-gosetup
peterargue Dec 11, 2023
074d623
Merge branch 'master' into gregor/evm/account-get-balance
Dec 11, 2023
c26a38e
Change signature and add tests
janezpodhostnik Dec 11, 2023
9034a71
add execution state storehouse tests
zhangchiqing Nov 30, 2023
482ebd2
simplify tests
zhangchiqing Nov 30, 2023
cf84604
small refactor
zhangchiqing Nov 30, 2023
08d8a5d
fix lint
zhangchiqing Dec 1, 2023
3a1232e
update MockFinalizedReader
zhangchiqing Dec 1, 2023
ef12afd
Merge branch 'feature/stable-cadence' into bastian/update-stable-cade…
turbolent Dec 11, 2023
fdf95dd
revert TODO
turbolent Dec 11, 2023
9e72b94
adjust to 1.0 API
turbolent Dec 11, 2023
31551f9
add missing import
turbolent Dec 11, 2023
c146429
update to latest Cadence version
turbolent Dec 11, 2023
a9433a8
adjust uses of updated dependencies
turbolent Dec 11, 2023
d2612f9
Apply suggestions from code review
peterargue Dec 11, 2023
cf4eb04
Merge pull request #4482 from onflow/petera/upgrade-ci-go-setup
peterargue Dec 11, 2023
6a6cd7c
Merge pull request #5086 from onflow/leo/storehouse-execution-state-4
zhangchiqing Dec 11, 2023
c9b87ba
Update engine/access/rpc/backend/backend_network.go
peterargue Dec 11, 2023
4530da7
Merge branch 'master' into petera/add-timeout-ci-gosetup
peterargue Dec 11, 2023
aaa8e4e
Merge pull request #4957 from AndriiDiachuk/AndriiDiachuk/4869-get-pr…
peterargue Dec 11, 2023
aa11b8d
Merge branch 'master' into petera/add-timeout-ci-gosetup
peterargue Dec 11, 2023
fd45000
Merge branch 'master' of https://github.com/onflow/flow-go into supun…
SupunS Dec 11, 2023
3c24a2d
add pruned height tests
zhangchiqing Dec 9, 2023
76ffa80
optimize in memory store
zhangchiqing Dec 9, 2023
3f18e8b
Merge pull request #5093 from onflow/supun/cadence-v0.42.6
SupunS Dec 11, 2023
3048504
Merge pull request #5125 from onflow/leo/in-memory-store-pruned-height
zhangchiqing Dec 11, 2023
a8b45d6
Merge pull request #5098 from onflow/gregor/evm/account-get-balance
sideninja Dec 11, 2023
016684e
enable storehouse
zhangchiqing Dec 7, 2023
9c89deb
update log
zhangchiqing Dec 8, 2023
b29edec
log trie info
zhangchiqing Dec 8, 2023
8caf816
log trie root hash
zhangchiqing Dec 8, 2023
704c13c
update checkpoint log
zhangchiqing Dec 8, 2023
6b090ae
enable storehouse
zhangchiqing Dec 8, 2023
d5314f4
log copy checkpoint
zhangchiqing Dec 8, 2023
e6515a7
update default trie path
zhangchiqing Dec 8, 2023
a76dec6
update flag
zhangchiqing Dec 8, 2023
3ddac51
disable storehouse by default
zhangchiqing Dec 9, 2023
9165976
revert in memory store changes
zhangchiqing Dec 9, 2023
cebe195
imporove logging for provider engine
zhangchiqing Dec 11, 2023
701f10f
Apply suggestions from code review
zhangchiqing Dec 11, 2023
6314335
Apply suggestions from code review
zhangchiqing Dec 11, 2023
2cca3b3
revert in memory register store changes
zhangchiqing Dec 11, 2023
028d543
fix lint
zhangchiqing Dec 11, 2023
139994f
Merge pull request #5119 from onflow/tarak/deprecate-flow-go-crypto
tarakby Dec 11, 2023
1aba082
Merge pull request #5124 from onflow/leo/storehouse-improve-logging
zhangchiqing Dec 11, 2023
fde3ab2
increase timeout
peterargue Dec 12, 2023
2088ac5
Merge pull request #5123 from onflow/janez/migrate-payload-by-reference
janezpodhostnik Dec 12, 2023
ae39f7f
Merge pull request #5082 from onflow/petera/add-timeout-ci-gosetup
peterargue Dec 12, 2023
e8af65c
update core-contracts dependencies
joshuahannan Dec 12, 2023
e81b586
Merge pull request #5135 from onflow/josh/contracts-version-update
turbolent Dec 12, 2023
1c40a8a
update to latest Cadence version
turbolent Dec 12, 2023
769957d
pub -> access(all)
turbolent Dec 12, 2023
6e61200
AuthAccount -> &Account
turbolent Dec 12, 2023
6a0dba1
update tests to new Account type API
turbolent Dec 12, 2023
fb4bca0
fix EVM tests
turbolent Dec 12, 2023
cc94099
Merge branch 'master' into bastian/update-stable-cadence-3
turbolent Dec 12, 2023
c562043
update cadence API usage
turbolent Dec 12, 2023
5d954ed
adjust use of ForEachField
turbolent Dec 12, 2023
b2a405c
lint
turbolent Dec 12, 2023
a47391d
fix crypto version
turbolent Dec 12, 2023
6084fd4
try to fix dependencies
turbolent Dec 12, 2023
58d4d07
adjust state commitments
turbolent Dec 12, 2023
ed228b3
adjust storage API usage
turbolent Dec 12, 2023
ad18482
Add EVM methods for encodeABI & decodeABI
m-Peter Dec 3, 2023
32982e3
Add support for ABI encoding/decoding EVM-compatible addresses
m-Peter Dec 4, 2023
058aca3
Add support for ABI encoding/decoding arrays with UInt64
m-Peter Dec 4, 2023
fb73b48
Use Iterate instead of for-loop for traversing interpreter.ArrayValau…
m-Peter Dec 5, 2023
6b48dc3
Add a constant for the name of EVMAddress.bytes field
m-Peter Dec 5, 2023
fdaba1e
Add type assertion for array values
m-Peter Dec 5, 2023
81b488d
Refactor type inference for EVM.decodeABI function
m-Peter Dec 5, 2023
4c8918a
Add support for ABI encoding/decoding all uint/int numeric types
m-Peter Dec 5, 2023
b247d56
Fix decoding of EVM.EVMAddress types and tackle some review comments
m-Peter Dec 6, 2023
f8df966
Add a helper function for creating new geth argument types
m-Peter Dec 6, 2023
0ee8ed4
Rework decodeABI function and fix TypeID checking for EVM.EVMAddress …
m-Peter Dec 7, 2023
5814807
Add support for arrays of leaf types in EVM.decodeABI
m-Peter Dec 7, 2023
230cb0c
Add support for arrays of leaf types in EVM.encodeABI
m-Peter Dec 7, 2023
552a843
Remove hard-coded TypeID for EVM.EVMAddress in EVM.encodeABI function
m-Peter Dec 7, 2023
0329e3a
Add round-trip tests for ABI encoding/decoding
m-Peter Dec 7, 2023
41951b4
Properly pass the EVM AddressLocation to the ABI encode/decode functions
m-Peter Dec 8, 2023
c02ae41
Add helper function for generating the TypeID for EVM.EVMAddress struct
m-Peter Dec 8, 2023
5458c2d
Improve error handling and introduce user errors
m-Peter Dec 8, 2023
8e77658
Add tests for possible errors in EVM.encodeABI & EVM.decodeABI
m-Peter Dec 11, 2023
dbe6ed5
Remove skipped test cases about the value of encoded data
m-Peter Dec 11, 2023
8e088e7
improve ABI encoding and decoding
turbolent Dec 12, 2023
0fd7908
test nested array encoding and decoding
turbolent Dec 12, 2023
7f4adf9
Remove unused unknownABITypeError type
m-Peter Dec 12, 2023
a435faa
Support EVM.EVMAddress leaf type in arrays
m-Peter Dec 12, 2023
359e272
Fix bug when ABI encoding/decoding constant-size Cadence arrays and a…
m-Peter Dec 12, 2023
cb152a0
Merge pull request #5122 from onflow/janez/progress-log-change
janezpodhostnik Dec 13, 2023
0cce03f
Merge branch 'master' into janez/setup-evm-account-on-bootstrap
janezpodhostnik Dec 13, 2023
c3585e6
Merge branch 'master' into abi-encoding-decoding
franklywatson Dec 13, 2023
2c5c8e7
[CI] Cleanup integration make targets
peterargue Dec 13, 2023
5b16ed6
Report computation for EVM.encodeABI & EVM.decodeABI methods
m-Peter Dec 13, 2023
00b49e3
Merge pull request #5070 from onflow/janez/setup-evm-account-on-boots…
janezpodhostnik Dec 13, 2023
ba6f0ff
Merge pull request #5024 from m-Peter/abi-encoding-decoding
franklywatson Dec 13, 2023
88e8600
Merge pull request #5141 from onflow/petera/cleanup-integration-make-…
peterargue Dec 13, 2023
8399b2a
update dependencies
turbolent Dec 13, 2023
97450a9
remove resource destructors
turbolent Dec 13, 2023
d0e9674
update NFT contract
turbolent Dec 13, 2023
6659fee
update to updated Emulator
turbolent Dec 13, 2023
f045e79
adjust state commitments
turbolent Dec 13, 2023
5bd7ca2
fix tests
turbolent Dec 13, 2023
5a8eb43
replace use of removed unsafeRandom function with new revertibleRando…
turbolent Dec 13, 2023
1c1e287
fix random generation
turbolent Dec 14, 2023
816c5cd
fix tests
turbolent Dec 14, 2023
a9b7453
use the same types
turbolent Dec 14, 2023
163208a
Merge branch 'master' into bastian/update-stable-cadence-3
turbolent Dec 14, 2023
79e1b5a
fix merge
turbolent Dec 14, 2023
2fd33eb
fix expected CID, given updated code
turbolent Dec 14, 2023
af0013e
replace AuthAccount uses with Account type reference
turbolent Dec 14, 2023
f4e0a06
update account storage setup transaction to Cadence 1.0
turbolent Dec 14, 2023
05e6d08
fix Cadence DSL, UpdateAccountCode might deploy a contract
turbolent Dec 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 8 additions & 5 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,15 @@ jobs:

# 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
- name: Docker login
uses: docker/login-action@v1
- id: auth
uses: google-github-actions/auth@v1
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_SERVICE_KEY }}
credentials_json: ${{ secrets.GCR_SERVICE_KEY_SECRET }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: Authenticate docker with gcloud
run: |
gcloud auth configure-docker

- name: Build/Push ${{ matrix.role }} images
env:
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ jobs:
run: make crypto_setup_gopath
# 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
- name: Docker login
uses: docker/login-action@v1
- id: auth
uses: google-github-actions/auth@v1
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_SERVICE_KEY }}
credentials_json: ${{ secrets.GCR_SERVICE_KEY_SECRET }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: Authenticate docker with gcloud
run: |
gcloud auth configure-docker
- name: Docker build
run: |
make docker-build-flow
Expand Down
182 changes: 114 additions & 68 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.51
version: v1.54
args: -v --build-tags relic
working-directory: ${{ matrix.dir }}
# https://github.com/golangci/golangci-lint-action/issues/244
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
cache: true
- name: Set Test Matrix
id: set-test-matrix
run: go run utils/test_matrix/test_matrix.go admin cmd consensus engine fvm ledger module network/test network/p2p utils
run: go run utils/test_matrix/test_matrix.go admin cmd consensus engine/access engine/collection engine/common engine/consensus engine/execution/ingestion:buildjet-8vcpu-ubuntu-2204 engine/execution/computation engine/execution engine/verification engine:buildjet-4vcpu-ubuntu-2204 fvm ledger module/dkg module:buildjet-4vcpu-ubuntu-2204 network/alsp network/test/cohort1:buildjet-16vcpu-ubuntu-2204 network/test/cohort2:buildjet-4vcpu-ubuntu-2204 network/p2p/connection network/p2p/p2pnode:buildjet-4vcpu-ubuntu-2204 network/p2p/scoring network/p2p network state storage utils

unit-test:
name: Unit Tests (${{ matrix.targets.name }})
Expand All @@ -108,8 +108,8 @@ jobs:
fail-fast: false
matrix:
targets: ${{ fromJSON(needs.create-dynamic-test-matrix.outputs.dynamic-matrix)}}
# need to set image explicitly due to GitHub logging issue as described in https://github.com/onflow/flow-go/pull/3087#issuecomment-1234383202
runs-on: ubuntu-20.04
## need to set image explicitly due to GitHub logging issue as described in https://github.com/onflow/flow-go/pull/3087#issuecomment-1234383202
runs-on: ${{ matrix.targets.runner }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand All @@ -123,8 +123,8 @@ jobs:
- name: Run tests (${{ matrix.targets.name }})
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 3
timeout_minutes: 35
max_attempts: 5
command: VERBOSE=1 make -e GO_TEST_PACKAGES="${{ matrix.targets.packages }}" test

# TODO(rbtz): re-enable when we fix exisiting races.
Expand All @@ -148,17 +148,20 @@ jobs:
make2: unittest
retries: 1
race: 1
runner: ubuntu-latest
- name: insecure
make1: install-tools
make2: test
retries: 3
retries: 5
race: 0
runner: buildjet-4vcpu-ubuntu-2204
- name: integration
make1: install-tools
make2: test
retries: 3
retries: 5
race: 0
runs-on: ubuntu-latest
runner: buildjet-4vcpu-ubuntu-2204
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand All @@ -174,7 +177,7 @@ jobs:
RACE_DETECTOR: ${{ matrix.race }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
timeout_minutes: 35
max_attempts: ${{ matrix.retries }}
# run `make2` target inside each module's root
command: VERBOSE=1 make -C ${{ matrix.name }} ${{ matrix.make2 }}
Expand All @@ -185,27 +188,101 @@ jobs:
flags: unittests
name: codecov-umbrella

docker-build:
name: Docker Build
runs-on: buildjet-16vcpu-ubuntu-2204
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
# all tags are needed for integration tests
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Build relic
run: make crypto_setup_gopath
- name: Docker build
run: make docker-build-flow docker-build-flow-corrupt
- name: Save Docker images
run: |
docker save \
gcr.io/flow-container-registry/access:latest \
gcr.io/flow-container-registry/collection:latest \
gcr.io/flow-container-registry/consensus:latest \
gcr.io/flow-container-registry/execution:latest \
gcr.io/flow-container-registry/ghost:latest \
gcr.io/flow-container-registry/observer:latest \
gcr.io/flow-container-registry/verification:latest \
gcr.io/flow-container-registry/access-corrupted:latest \
gcr.io/flow-container-registry/execution-corrupted:latest \
gcr.io/flow-container-registry/verification-corrupted:latest > flow-docker-images.tar
- name: Cache Docker images
uses: actions/cache@v3
with:
path: flow-docker-images.tar
# use the workflow run id as part of the cache key to ensure these docker images will only be used for a single workflow run
key: flow-docker-images-${{ hashFiles('**/Dockerfile') }}-${{ github.run_id }}

integration-test:
name: Integration Tests
needs: docker-build
strategy:
fail-fast: false
matrix:
make:
- make -C integration access-tests
- make -C integration bft-framework-tests
- make -C integration bft-protocol-tests
- make -C integration bft-gossipsub-tests
- make -C integration collection-tests
- make -C integration consensus-tests
- make -C integration epochs-cohort1-tests
- make -C integration epochs-cohort2-tests
- make -C integration execution-tests
- make -C integration ghost-tests
- make -C integration mvp-tests
- make -C integration network-tests
- make -C integration verification-tests
- make -C integration upgrades-tests
runs-on: ubuntu-latest
include:
- name: Access Cohort1 Integration Tests
make: make -C integration access-cohort1-tests
runner: buildjet-4vcpu-ubuntu-2204
- name: Access Cohort2 Integration Tests
make: make -C integration access-cohort2-tests
runner: ubuntu-latest
- name: Access Cohort3 Integration Tests
make: make -C integration access-cohort3-tests
runner: ubuntu-latest
# test suite has single test which is flaky and needs to be fixed - reminder here to put it back when it's fixed
# - name: BFT (Framework) Integration Tests
# make: make -C integration bft-framework-tests
# runner: ubuntu-latest
- name: BFT (Protocol) Integration Tests
make: make -C integration bft-protocol-tests
runner: buildjet-8vcpu-ubuntu-2204
- name: BFT (Gossipsub) Integration Tests
make: make -C integration bft-gossipsub-tests
runner: ubuntu-latest
- name: Collection Integration Tests
make: make -C integration collection-tests
runner: ubuntu-latest
- name: Consensus Integration Tests
make: make -C integration consensus-tests
runner: ubuntu-latest
- name: Epoch Cohort1 Integration Tests
make: make -C integration epochs-cohort1-tests
runner: buildjet-8vcpu-ubuntu-2204
- name: Epoch Cohort2 Integration Tests
make: make -C integration epochs-cohort2-tests
runner: buildjet-4vcpu-ubuntu-2204
- name: Execution Integration Tests
make: make -C integration execution-tests
runner: ubuntu-latest
- name: Ghost Integration Tests
make: make -C integration ghost-tests
runner: ubuntu-latest
- name: MVP Integration Tests
make: make -C integration mvp-tests
runner: ubuntu-latest
- name: Network Integration Tests
make: make -C integration network-tests
runner: ubuntu-latest
- name: Verification Integration Tests
make: make -C integration verification-tests
runner: ubuntu-latest
- name: Upgrade Integration Tests
make: make -C integration upgrades-tests
runner: ubuntu-latest
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand All @@ -219,51 +296,20 @@ jobs:
cache: true
- name: Build relic
run: make crypto_setup_gopath
- name: Docker build
run: make docker-build-flow docker-build-flow-corrupt
- name: Run tests
- name: Load cached Docker images
uses: actions/cache@v3
with:
path: flow-docker-images.tar
# use the same cache key as the docker-build job
key: flow-docker-images-${{ hashFiles('**/Dockerfile') }}-${{ github.run_id }}
- name: Load Docker images
run: docker load -i flow-docker-images.tar
- name: Run tests (${{ matrix.name }})
# TODO(rbtz): re-enable when we fix exisiting races.
#env:
# RACE_DETECTOR: 1
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 3
timeout_minutes: 35
max_attempts: 5
command: VERBOSE=1 ${{ matrix.make }}

localnet-test:
name: Localnet Compatibility Tests With Flow-CLI Client and Observer
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Build relic and other tools
run: make install-tools
- name: Install Flow Client In Docker
# This proved to be more reliable than installing it locally.
run: cd integration/localnet && sh client/client.sh
- name: Set up Localnet
run: bash -c 'cd integration/localnet/ && make -e OBSERVER=2 bootstrap && make start-flow'
- name: Ensure Observer is started
run: docker ps -f name=localnet-observer_1-1 | grep localnet-observer
- name: Get Client Version ensuring the client is provisioned
run: docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n observer version
- name: Wait for a default waiting period until a clean state
# This will not cause flakiness.
# The waiting time is a reasonable time to expect an observer to be responsive
run: sleep 10
- name: Get Status ensuring the access endpoint is online
run: docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n access status
- name: Wait for finalized blocks and check them
run: docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n observer blocks get latest
- name: Wait for finalized blocks and check them with Observer
run: sleep 5 && docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n access blocks get latest && docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n observer blocks get latest
- name: Stop localnet
run: bash -c 'cd integration/localnet/ && make stop'
1 change: 0 additions & 1 deletion .github/workflows/flaky-test-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
push:
paths:
- '.github/workflows/flaky-test-monitor.yml'
- '.github/workflows/ci.yml'

env:
BIGQUERY_DATASET: production_src_flow_test_metrics
Expand Down
File renamed without changes.
14 changes: 8 additions & 6 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,20 @@ jobs:
- id: auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCR_SERVICE_KEY }} # TODO: we need a new key to allow uploads
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
credentials_json: ${{ secrets.GCR_SERVICE_KEY }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: flow
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# to accurately get the version tag
fetch-depth: 0
ref: ${{ inputs.tag }}
- name: Build relic
run: make crypto_setup_gopath
Expand Down
22 changes: 17 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,17 @@ cmd/util/util:

.PHONY: update-core-contracts-version
update-core-contracts-version:
# updates the core-contracts version in all of the go.mod files
# usage example: CC_VERSION=0.16.0 make update-core-contracts-version
./scripts/update-core-contracts.sh $(CC_VERSION)
make tidy

.PHONY: update-cadence-version
update-cadence-version:
# updates the cadence version in all of the go.mod files
# usage example: CC_VERSION=0.16.0 make update-cadence-version
./scripts/update-cadence.sh $(CC_VERSION)
make tidy

############################################################################################
# CAUTION: DO NOT MODIFY THESE TARGETS! DOING SO WILL BREAK THE FLAKY TEST MONITOR
Expand Down Expand Up @@ -156,12 +166,13 @@ generate-mocks: install-mock-generators
mockery --name='.*' --dir=integration/benchmark/mocksiface --case=underscore --output="integration/benchmark/mock" --outpkg="mock"
mockery --name=ExecutionDataStore --dir=module/executiondatasync/execution_data --case=underscore --output="./module/executiondatasync/execution_data/mock" --outpkg="mock"
mockery --name=Downloader --dir=module/executiondatasync/execution_data --case=underscore --output="./module/executiondatasync/execution_data/mock" --outpkg="mock"
mockery --name 'ExecutionDataRequester' --dir=module/state_synchronization --case=underscore --output="./module/state_synchronization/mock" --outpkg="state_synchronization"
mockery --name '(ExecutionDataRequester|IndexReporter)' --dir=module/state_synchronization --case=underscore --output="./module/state_synchronization/mock" --outpkg="state_synchronization"
mockery --name 'ExecutionState' --dir=engine/execution/state --case=underscore --output="engine/execution/state/mock" --outpkg="mock"
mockery --name 'BlockComputer' --dir=engine/execution/computation/computer --case=underscore --output="engine/execution/computation/computer/mock" --outpkg="mock"
mockery --name 'ComputationManager' --dir=engine/execution/computation --case=underscore --output="engine/execution/computation/mock" --outpkg="mock"
mockery --name 'Executor' --dir=engine/execution/computation/query --case=underscore --output="engine/execution/computation/query/mock" --outpkg="mock"
mockery --name '.*' --dir=engine/execution/computation/query --case=underscore --output="engine/execution/computation/query/mock" --outpkg="mock"
mockery --name 'EpochComponentsFactory' --dir=engine/collection/epochmgr --case=underscore --output="engine/collection/epochmgr/mock" --outpkg="mock"
mockery --name '.*' --dir=engine/execution/ --case=underscore --output="engine/execution/mock" --outpkg="mock"
mockery --name 'Backend' --dir=engine/collection/rpc --case=underscore --output="engine/collection/rpc/mock" --outpkg="mock"
mockery --name 'ProviderEngine' --dir=engine/execution/provider --case=underscore --output="engine/execution/provider/mock" --outpkg="mock"
(cd ./crypto && mockery --name 'PublicKey' --case=underscore --output="../module/mock" --outpkg="mock")
Expand Down Expand Up @@ -202,6 +213,7 @@ generate-mocks: install-mock-generators
mockery --name '.*' --dir=engine/verification/fetcher/ --case=underscore --output="./engine/verification/fetcher/mock" --outpkg="mockfetcher"
mockery --name '.*' --dir=./cmd/util/ledger/reporters --case=underscore --output="./cmd/util/ledger/reporters/mock" --outpkg="mock"
mockery --name 'Storage' --dir=module/executiondatasync/tracker --case=underscore --output="module/executiondatasync/tracker/mock" --outpkg="mocktracker"
mockery --name 'ScriptExecutor' --dir=module/execution --case=underscore --output="module/execution/mock" --outpkg="mock"

#temporarily make insecure/ a non-module to allow mockery to create mocks
mv insecure/go.mod insecure/go2.mod
Expand Down Expand Up @@ -420,7 +432,7 @@ docker-build-ghost-debug:

PHONY: docker-build-bootstrap
docker-build-bootstrap:
docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/bootstrap --build-arg GOARCH=$(GOARCH) --target production \
docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/bootstrap --build-arg GOARCH=$(GOARCH) --build-arg VERSION=$(IMAGE_TAG) --target production \
--label "git_commit=${COMMIT}" --label "git_tag=${IMAGE_TAG}" \
-t "$(CONTAINER_REGISTRY)/bootstrap:latest" -t "$(CONTAINER_REGISTRY)/bootstrap:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/bootstrap:$(IMAGE_TAG)" .

Expand Down Expand Up @@ -620,7 +632,7 @@ docker-all-tools: tool-util tool-remove-execution-fork

PHONY: docker-build-util
docker-build-util:
docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/util --build-arg GOARCH=$(GOARCH) --target production \
docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/util --build-arg GOARCH=$(GOARCH) --build-arg VERSION=$(IMAGE_TAG) --target production \
-t "$(CONTAINER_REGISTRY)/util:latest" -t "$(CONTAINER_REGISTRY)/util:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/util:$(IMAGE_TAG)" .

PHONY: tool-util
Expand All @@ -629,7 +641,7 @@ tool-util: docker-build-util

PHONY: docker-build-remove-execution-fork
docker-build-remove-execution-fork:
docker build -f cmd/Dockerfile --ssh default --build-arg TARGET=./cmd/util/cmd/remove-execution-fork --build-arg GOARCH=$(GOARCH) --target production \
docker build -f cmd/Dockerfile --ssh default --build-arg TARGET=./cmd/util/cmd/remove-execution-fork --build-arg GOARCH=$(GOARCH) --build-arg VERSION=$(IMAGE_TAG) --target production \
-t "$(CONTAINER_REGISTRY)/remove-execution-fork:latest" -t "$(CONTAINER_REGISTRY)/remove-execution-fork:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/remove-execution-fork:$(IMAGE_TAG)" .

PHONY: tool-remove-execution-fork
Expand Down
Loading
Loading