Skip to content

Commit 899e22f

Browse files
committed
Merge remote-tracking branch 'origin/master' into peter/improve-lint
2 parents b0eff0e + 7158034 commit 899e22f

File tree

1,386 files changed

+49843
-23748
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,386 files changed

+49843
-23748
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Do not copy the user's project git directory into the container
2+
# it's not needed to build the project, and causes issues when working within git worktrees
3+
.git/
4+
15
integration/localnet/bootstrap/
26
integration/localnet/profiler/
37
integration/localnet/data/

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- master
2020

2121
env:
22-
GO_VERSION: "1.23"
22+
GO_VERSION: "1.25"
2323

2424
concurrency:
2525
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
@@ -239,7 +239,7 @@ jobs:
239239
timeout-minutes: 1
240240
continue-on-error: true
241241
with:
242-
file: ./coverage.txt
242+
files: ./coverage.txt
243243
flags: unittests
244244
name: codecov-umbrella
245245
token: ${{ secrets.CODECOV_TOKEN }}
@@ -285,7 +285,7 @@ jobs:
285285
timeout-minutes: 1
286286
continue-on-error: true
287287
with:
288-
file: ./coverage.txt
288+
files: ./coverage.txt
289289
flags: unittests
290290
name: codecov-umbrella
291291
token: ${{ secrets.CODECOV_TOKEN }}
@@ -389,7 +389,7 @@ jobs:
389389
timeout-minutes: 1
390390
continue-on-error: true
391391
with:
392-
file: ./coverage.txt
392+
files: ./coverage.txt
393393
flags: unittests
394394
name: codecov-umbrella
395395
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/flaky-test-monitor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
contents: read
1414

1515
env:
16-
GO_VERSION: "1.23"
16+
GO_VERSION: "1.25"
1717
BIGQUERY_DATASET: dev_src_flow_test_metrics
1818
BIGQUERY_TABLE: skipped_tests
1919
BIGQUERY_TABLE2: test_results

.github/workflows/image_builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
type: string
1717

1818
env:
19-
GO_VERSION: "1.23"
19+
GO_VERSION: "1.25"
2020
PRIVATE_REGISTRY_HOST: us-central1-docker.pkg.dev
2121

2222
jobs:

.github/workflows/stale.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ jobs:
77
stale:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/stale@v9
10+
- uses: actions/stale@v10
1111
with:
1212
days-before-issue-stale: 90
1313
days-before-issue-close: 7
1414
exempt-issue-labels: 'Preserve,Idea'
15+
exempt-pr-labels: 'Preserve'
1516
stale-issue-label: 'Stale'
1617
stale-issue-message: >
1718
This issue has been automatically marked as stale because it has not had

.github/workflows/tools.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
type: boolean
1515

1616
env:
17-
GO_VERSION: "1.23"
17+
GO_VERSION: "1.25"
1818

1919
jobs:
2020
build-publish:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/cmd/consensus/consensus
44
/cmd/execution/execution
55
/cmd/verification/verification
6-
/cmd/testclient/testclient
76
/cmd/util/util
87
/cmd/bootstrap/bootstrap
98

.mockery.yaml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
dir: "{{.InterfaceDir}}/mock"
2+
outpkg: "mock"
3+
filename: "{{.InterfaceName | snakecase}}.go"
4+
mockname: "{{.InterfaceName}}"
5+
6+
all: True
7+
with-expecter: False
8+
include-auto-generated: False
9+
disable-func-mocks: True
10+
fail-on-missing: True
11+
12+
# Suppress warnings
13+
issue-845-fix: True
14+
disable-version-string: True
15+
resolve-type-alias: False
16+
17+
packages:
18+
github.com/onflow/flow-go/access:
19+
github.com/onflow/flow-go/access/validator:
20+
github.com/onflow/flow-go/cmd/util/ledger/reporters:
21+
github.com/onflow/flow-go/consensus/hotstuff:
22+
config:
23+
dir: "consensus/hotstuff/mocks"
24+
outpkg: "mocks"
25+
github.com/onflow/flow-go/engine/access/ingestion/tx_error_messages:
26+
github.com/onflow/flow-go/engine/access/rest/common/models:
27+
github.com/onflow/flow-go/engine/access/rest/websockets:
28+
github.com/onflow/flow-go/engine/access/rest/websockets/data_providers:
29+
github.com/onflow/flow-go/engine/access/rpc/backend/accounts/provider:
30+
github.com/onflow/flow-go/engine/access/rpc/backend/events/provider:
31+
github.com/onflow/flow-go/engine/access/rpc/backend/node_communicator:
32+
github.com/onflow/flow-go/engine/access/rpc/backend/transactions/error_messages:
33+
github.com/onflow/flow-go/engine/access/rpc/backend/transactions/provider:
34+
github.com/onflow/flow-go/engine/access/rpc/backend/transactions/retrier:
35+
github.com/onflow/flow-go/engine/access/rpc/connection:
36+
github.com/onflow/flow-go/engine/access/state_stream:
37+
github.com/onflow/flow-go/engine/access/subscription:
38+
github.com/onflow/flow-go/engine/access/subscription/tracker:
39+
github.com/onflow/flow-go/engine/access/wrapper:
40+
config:
41+
dir: "engine/access/mock"
42+
github.com/onflow/flow-go/engine/collection:
43+
github.com/onflow/flow-go/engine/collection/epochmgr:
44+
github.com/onflow/flow-go/engine/collection/rpc:
45+
github.com/onflow/flow-go/engine/common/follower:
46+
interfaces:
47+
complianceCore:
48+
config:
49+
exported: true
50+
mockname: "{{.InterfaceName | firstUpper}}"
51+
github.com/onflow/flow-go/engine/common/follower/cache:
52+
github.com/onflow/flow-go/engine/consensus:
53+
github.com/onflow/flow-go/engine/consensus/approvals:
54+
github.com/onflow/flow-go/engine/execution:
55+
github.com/onflow/flow-go/engine/execution/computation:
56+
github.com/onflow/flow-go/engine/execution/computation/computer:
57+
github.com/onflow/flow-go/engine/execution/computation/query:
58+
github.com/onflow/flow-go/engine/execution/ingestion/uploader:
59+
github.com/onflow/flow-go/engine/execution/provider:
60+
github.com/onflow/flow-go/engine/execution/state:
61+
github.com/onflow/flow-go/engine/protocol:
62+
github.com/onflow/flow-go/engine/verification/fetcher:
63+
github.com/onflow/flow-go/fvm:
64+
github.com/onflow/flow-go/fvm/environment:
65+
github.com/onflow/flow-go/fvm/storage/snapshot:
66+
github.com/onflow/flow-go/insecure:
67+
github.com/onflow/flow-go/ledger:
68+
github.com/onflow/flow-go/model/fingerprint:
69+
github.com/onflow/flow-go/module:
70+
github.com/onflow/flow-go/module/component:
71+
github.com/onflow/flow-go/module/execution:
72+
github.com/onflow/flow-go/module/executiondatasync/execution_data:
73+
github.com/onflow/flow-go/module/executiondatasync/optimistic_sync:
74+
config:
75+
all: False
76+
interfaces:
77+
Core:
78+
github.com/onflow/flow-go/module/executiondatasync/tracker:
79+
github.com/onflow/flow-go/module/forest:
80+
github.com/onflow/flow-go/module/mempool:
81+
github.com/onflow/flow-go/module/mempool/consensus/mock_interfaces:
82+
config:
83+
dir: "module/mempool/consensus/mock"
84+
github.com/onflow/flow-go/module/state_synchronization:
85+
github.com/onflow/flow-go/module/state_synchronization/requester:
86+
github.com/onflow/flow-go/network:
87+
github.com/onflow/flow-go/network/alsp:
88+
github.com/onflow/flow-go/network/p2p:
89+
github.com/onflow/flow-go/state/cluster:
90+
github.com/onflow/flow-go/state/protocol:
91+
github.com/onflow/flow-go/state/protocol/events:
92+
github.com/onflow/flow-go/state/protocol/protocol_state:
93+
github.com/onflow/flow-go/state/protocol/protocol_state/mock_interfaces:
94+
config:
95+
dir: "state/protocol/protocol_state/mock"
96+
github.com/onflow/flow-go/state/protocol/protocol_state/epochs:
97+
github.com/onflow/flow-go/state/protocol/protocol_state/epochs/mock_interfaces:
98+
config:
99+
dir: "state/protocol/protocol_state/epochs/mock"
100+
github.com/onflow/flow-go/storage:
101+
102+
# external libraries
103+
github.com/onflow/flow-go-sdk/access:
104+
config:
105+
dir: "integration/benchmark/mock"
106+
interfaces:
107+
Client:
108+
109+
github.com/onflow/crypto:
110+
config:
111+
dir: "module/mock"
112+
interfaces:
113+
PublicKey:
File renamed without changes.

Makefile

Lines changed: 3 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ unittest-main:
7777
.PHONY: install-mock-generators
7878
install-mock-generators:
7979
cd ${GOPATH}; \
80-
go install github.com/vektra/mockery/[email protected]; \
81-
go install github.com/golang/mock/[email protected];
80+
go install github.com/vektra/mockery/[email protected];
8281

8382
.PHONY: install-tools
8483
install-tools: check-go-version install-mock-generators
@@ -154,92 +153,15 @@ generate-fvm-env-wrappers:
154153

155154
.PHONY: generate-mocks
156155
generate-mocks: install-mock-generators
157-
mockery --name '(Connector|PingInfoProvider)' --dir=network/p2p --case=underscore --output="./network/mocknetwork" --outpkg="mocknetwork"
158-
CGO_CFLAGS=$(CRYPTO_FLAG) mockgen -destination=network/mocknetwork/mock_network.go -package=mocknetwork github.com/onflow/flow-go/network EngineRegistry
159-
mockery --name=ExecutionDataStore --dir=module/executiondatasync/execution_data --case=underscore --output="./module/executiondatasync/execution_data/mock" --outpkg="mock"
160-
mockery --name=Downloader --dir=module/executiondatasync/execution_data --case=underscore --output="./module/executiondatasync/execution_data/mock" --outpkg="mock"
161-
mockery --name='.*' --dir=integration/benchmark/mocksiface --case=underscore --output="integration/benchmark/mock" --outpkg="mock"
162-
mockery --name '(ExecutionDataRequester|IndexReporter)' --dir=module/state_synchronization --case=underscore --output="./module/state_synchronization/mock" --outpkg="state_synchronization"
163-
mockery --name 'ExecutionState' --dir=engine/execution/state --case=underscore --output="engine/execution/state/mock" --outpkg="mock"
164-
mockery --name 'BlockComputer' --dir=engine/execution/computation/computer --case=underscore --output="engine/execution/computation/computer/mock" --outpkg="mock"
165-
mockery --name 'ComputationManager' --dir=engine/execution/computation --case=underscore --output="engine/execution/computation/mock" --outpkg="mock"
166-
mockery --name '.*' --dir=engine/execution/computation/query --case=underscore --output="engine/execution/computation/query/mock" --outpkg="mock"
167-
mockery --name 'EpochComponentsFactory' --dir=engine/collection/epochmgr --case=underscore --output="engine/collection/epochmgr/mock" --outpkg="mock"
168-
mockery --name '.*' --dir=engine/execution/ --case=underscore --output="engine/execution/mock" --outpkg="mock"
169-
mockery --name 'Backend' --dir=engine/collection/rpc --case=underscore --output="engine/collection/rpc/mock" --outpkg="mock"
170-
mockery --name 'ProviderEngine' --dir=engine/execution/provider --case=underscore --output="engine/execution/provider/mock" --outpkg="mock"
171-
mockery --name '.*' --dir=state/cluster --case=underscore --output="state/cluster/mock" --outpkg="mock"
172-
mockery --name '.*' --dir=module --case=underscore --output="./module/mock" --outpkg="mock"
173-
mockery --name '.*' --dir=module/mempool --case=underscore --output="./module/mempool/mock" --outpkg="mempool"
174-
mockery --name '.*' --dir=module/component --case=underscore --output="./module/component/mock" --outpkg="component"
175-
mockery --name '.*' --dir=network --case=underscore --output="./network/mocknetwork" --outpkg="mocknetwork"
176-
mockery --name '.*' --dir=storage --case=underscore --output="./storage/mock" --outpkg="mock"
177-
mockery --name 'DeferredDBUpdate' --dir=storage/badger/transaction --case=underscore --output="storage/mock" --outpkg="mock"
178-
mockery --name '.*' --dir="state/protocol" --case=underscore --output="state/protocol/mock" --outpkg="mock"
179-
mockery --name '.*' --dir="state/protocol/events" --case=underscore --output="./state/protocol/events/mock" --outpkg="mock"
180-
mockery --name '.*' --dir="state/protocol/protocol_state" --case=underscore --output="state/protocol/protocol_state/mock" --outpkg="mock"
181-
mockery --name '.*' --dir="state/protocol/protocol_state/epochs" --case=underscore --output="state/protocol/protocol_state/epochs/mock" --outpkg="mock"
182-
mockery --name '.*' --dir=engine/execution/computation/computer --case=underscore --output="./engine/execution/computation/computer/mock" --outpkg="mock"
183-
mockery --name '.*' --dir=engine/execution/state --case=underscore --output="./engine/execution/state/mock" --outpkg="mock"
184-
mockery --name '.*' --dir=engine/collection --case=underscore --output="./engine/collection/mock" --outpkg="mock"
185-
mockery --name 'complianceCore' --dir=engine/common/follower --exported --case=underscore --output="./engine/common/follower/mock" --outpkg="mock"
186-
mockery --name '.*' --dir=engine/common/follower/cache --case=underscore --output="./engine/common/follower/cache/mock" --outpkg="mock"
187-
mockery --name '.*' --dir=engine/consensus --case=underscore --output="./engine/consensus/mock" --outpkg="mock"
188-
mockery --name '.*' --dir=engine/consensus/approvals --case=underscore --output="./engine/consensus/approvals/mock" --outpkg="mock"
189-
rm -rf ./fvm/mock
190-
mockery --name '.*' --dir=fvm --case=underscore --output="./fvm/mock" --outpkg="mock"
191-
rm -rf ./fvm/environment/mock
192-
mockery --name '.*' --dir=fvm/environment --case=underscore --output="./fvm/environment/mock" --outpkg="mock"
193-
mockery --name '.*' --dir=ledger --case=underscore --output="./ledger/mock" --outpkg="mock"
194-
mockery --name 'ViolationsConsumer' --dir=network --case=underscore --output="./network/mocknetwork" --outpkg="mocknetwork"
195-
mockery --name '.*' --dir=network/p2p/ --case=underscore --output="./network/p2p/mock" --outpkg="mockp2p"
196-
mockery --name '.*' --dir=network/alsp --case=underscore --output="./network/alsp/mock" --outpkg="mockalsp"
197-
mockery --name 'Vertex' --dir="./module/forest" --case=underscore --output="./module/forest/mock" --outpkg="mock"
198-
mockery --name '.*' --dir="./consensus/hotstuff" --case=underscore --output="./consensus/hotstuff/mocks" --outpkg="mocks"
199-
mockery --name '.*' --dir="./engine/access/wrapper" --case=underscore --output="./engine/access/mock" --outpkg="mock"
200-
mockery --name 'API' --dir="./access" --case=underscore --output="./access/mock" --outpkg="mock"
201-
mockery --name 'Blocks' --dir="./access/validator" --case=underscore --output="./access/validator/mock" --outpkg="mock"
202-
mockery --name 'API' --dir="./engine/protocol" --case=underscore --output="./engine/protocol/mock" --outpkg="mock"
203-
mockery --name '.*' --dir="./engine/access/state_stream" --case=underscore --output="./engine/access/state_stream/mock" --outpkg="mock"
204-
mockery --name 'BlockTracker' --dir="./engine/access/subscription/tracker" --case=underscore --output="./engine/access/subscription/tracker/mock" --outpkg="mock"
205-
mockery --name 'ExecutionDataTracker' --dir="./engine/access/subscription/tracker" --case=underscore --output="./engine/access/subscription/tracker/mock" --outpkg="mock"
206-
mockery --name 'DataProvider' --dir="./engine/access/rest/websockets/data_providers" --case=underscore --output="./engine/access/rest/websockets/data_providers/mock" --outpkg="mock"
207-
mockery --name 'DataProviderFactory' --dir="./engine/access/rest/websockets/data_providers" --case=underscore --output="./engine/access/rest/websockets/data_providers/mock" --outpkg="mock"
208-
mockery --name 'LinkGenerator' --dir="./engine/access/rest/common/models" --case=underscore --output="./engine/access/rest/common/models/mock" --outpkg="mock"
209-
mockery --name 'WebsocketConnection' --dir="./engine/access/rest/websockets" --case=underscore --output="./engine/access/rest/websockets/mock" --outpkg="mock"
210-
mockery --name 'ConnectionFactory' --dir="./engine/access/rpc/connection" --case=underscore --output="./engine/access/rpc/connection/mock" --outpkg="mock"
211-
mockery --name 'Communicator' --dir="./engine/access/rpc/backend/node_communicator" --case=underscore --output="./engine/access/rpc/backend/node_communicator/mock" --outpkg="mock"
212-
mockery --name 'AccountProvider' --dir="./engine/access/rpc/backend/accounts/provider" --case=underscore --output="./engine/access/rpc/backend/accounts/provider/mock" --outpkg="mock"
213-
mockery --name 'EventProvider' --dir="./engine/access/rpc/backend/events/provider" --case=underscore --output="./engine/access/rpc/backend/events/provider/mock" --outpkg="mock"
214-
mockery --name 'TransactionProvider' --dir="./engine/access/rpc/backend/transactions/provider" --case=underscore --output="./engine/access/rpc/backend/transactions/provider/mock" --outpkg="mock"
215-
mockery --name 'Provider' --dir="./engine/access/rpc/backend/transactions/error_messages" --case=underscore --output="./engine/access/rpc/backend/transactions/error_messages/mock" --outpkg="mock"
216-
mockery --name 'TransactionSender' --dir="./engine/access/rpc/backend/transactions/retrier" --case=underscore --output="./engine/access/rpc/backend/transactions/retrier/mock" --outpkg="mock"
217-
mockery --name 'Retrier' --dir="./engine/access/rpc/backend/transactions/retrier" --case=underscore --output="./engine/access/rpc/backend/transactions/retrier/mock" --outpkg="mock"
218-
mockery --name '.*' --dir=model/fingerprint --case=underscore --output="./model/fingerprint/mock" --outpkg="mock"
219-
mockery --name 'ExecForkActor' --structname 'ExecForkActorMock' --dir=module/mempool/consensus/mock/ --case=underscore --output="./module/mempool/consensus/mock/" --outpkg="mock"
220-
mockery --name '.*' --dir=engine/verification/fetcher/ --case=underscore --output="./engine/verification/fetcher/mock" --outpkg="mockfetcher"
221-
mockery --name '.*' --dir=./cmd/util/ledger/reporters --case=underscore --output="./cmd/util/ledger/reporters/mock" --outpkg="mock"
222-
mockery --name 'Storage' --dir=module/executiondatasync/tracker --case=underscore --output="module/executiondatasync/tracker/mock" --outpkg="mocktracker"
223-
mockery --name 'ScriptExecutor' --dir=module/execution --case=underscore --output="module/execution/mock" --outpkg="mock"
224-
mockery --name 'StorageSnapshot' --dir=fvm/storage/snapshot --case=underscore --output="fvm/storage/snapshot/mock" --outpkg="mock"
225-
mockery --name 'Core' --dir=module/executiondatasync/optimistic_sync --case=underscore --output="module/executiondatasync/optimistic_sync/mock" --outpkg="mock"
226-
mockery --name 'Requester' --dir=engine/access/ingestion/tx_error_messages --case=underscore --output="engine/access/ingestion/tx_error_messages/mock" --outpkg="mock"
227-
mockery --name 'ExecutionDataRequester' --dir=module/state_synchronization/requester --case=underscore --output="module/state_synchronization/requester/mock" --outpkg="mock"
228-
229-
#temporarily make insecure/ a non-module to allow mockery to create mocks
230-
mv insecure/go.mod insecure/go2.mod
231-
if [ -f go.work ]; then mv go.work go2.work; fi
232-
mockery --name '.*' --dir=insecure/ --case=underscore --output="./insecure/mock" --outpkg="mockinsecure"
233-
mv insecure/go2.mod insecure/go.mod
234-
if [ -f go2.work ]; then mv go2.work go.work; fi
156+
mockery --config .mockery.yaml
157+
cd insecure; mockery --config .mockery.yaml
235158

236159
# this ensures there is no unused dependency being added by accident
237160
.PHONY: tidy
238161
tidy:
239162
go mod tidy -v
240163
cd integration; go mod tidy -v
241164
cd crypto; go mod tidy -v
242-
cd cmd/testclient; go mod tidy -v
243165
cd insecure; go mod tidy -v
244166
git diff --exit-code
245167

0 commit comments

Comments
 (0)