Skip to content

Commit

Permalink
Merge branch 'develop' into augustus.mcms
Browse files Browse the repository at this point in the history
  • Loading branch information
augustbleeds authored Sep 4, 2024
2 parents a9eb982 + 70e50c6 commit 114306e
Show file tree
Hide file tree
Showing 23 changed files with 666 additions and 228 deletions.
3 changes: 1 addition & 2 deletions .github/actions/install-starknet-foundry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A composite action that installs the snforge and sncast binaries
inputs:
starknet_foundry_version:
description: Starknet Foundry release version
default: "0.21.0"
default: "0.27.0"
required: false

runs:
Expand All @@ -16,4 +16,3 @@ runs:
run: |
curl -L https://raw.githubusercontent.com/foundry-rs/starknet-foundry/master/scripts/install.sh | sh
snfoundryup -v ${{ inputs.starknet_foundry_version }}
3 changes: 3 additions & 0 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,8 @@ jobs:
- name: Install Cairo
uses: ./.github/actions/install-cairo

- name: Install Starknet Foundry
uses: ./.github/actions/install-starknet-foundry

- name: Test
run: nix develop -c make test-cairo-contracts
9 changes: 9 additions & 0 deletions .github/workflows/integration-tests-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ jobs:
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
- name: Notify Slack
# Only run this notification for merge to develop failures
if: failure() && github.event_name != 'workflow_dispatch'
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
env:
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}
with:
channel-id: "#team-test-tooling-internal"
slack-message: ":x: :mild-panic-intensifies: Publish Integration Test Image failed: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}\nRepository: Starknet\n${{ format('Notifying <!subteam^{0}|{0}>', secrets.GUARDIAN_SLACK_NOTIFICATION_HANDLE)}}"
18 changes: 18 additions & 0 deletions .github/workflows/relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,21 @@ jobs:
./relayer/coverage.txt
./relayer/race_coverage.txt
check-tidy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: "relayer/go.mod"
- name: Ensure "make gomodtidy" has been run
run: |
make gomodtidy
git diff --exit-code
- name: Ensure "make generate" has been run
run: |
make rm-mocked
make generate
git diff --stat --exit-code
35 changes: 33 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ linters:
- whitespace
- depguard
- containedctx
- fatcontext
- mirror
- loggercheck
linters-settings:
exhaustive:
default-signifies-exhaustive: true
Expand All @@ -31,8 +34,21 @@ linters-settings:
# - G304
# - G404
govet:
# report about shadowed variables
check-shadowing: true
enable:
- shadow
settings:
printf:
# Additionally check custom logger
funcs:
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Debugf
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Infof
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Warnf
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Errorf
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Panicf
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Fatalf
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).AssumptionViolationf
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Tracef
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Criticalf
errorlint:
# Allow formatting of errors without %w
errorf: false
Expand Down Expand Up @@ -111,6 +127,21 @@ linters-settings:
desc: Use gopkg.in/guregu/null.v4 instead
- pkg: "gopkg.in/guregu/null.v3"
desc: Use gopkg.in/guregu/null.v4 instead
- pkg: github.com/go-gorm/gorm
desc: Use github.com/jmoiron/sqlx directly instead
loggercheck:
# Check that *w logging functions have even number of args (i.e., well formed key-value pairs).
rules:
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Debugw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Infow
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Warnw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Errorw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Panicw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Fatalw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).AssumptionViolationw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Tracew
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Criticalw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).With
issues:
exclude-rules:
- path: test
Expand Down
23 changes: 18 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,25 @@ format-go-fmt:
cd ./ops && go fmt ./...
cd ./integration-tests && go fmt ./...

.PHONY: gomods
gomods: ## Install gomods
go install github.com/jmank88/[email protected]

.PHONY: gomodtidy
gomodtidy:
cd ./relayer && go mod tidy
cd ./monitoring && go mod tidy
cd ./ops && go mod tidy
cd ./integration-tests && go mod tidy
gomodtidy: gomods
gomods tidy

.PHONY: mockery
mockery: $(mockery) ## Install mockery.
go install github.com/vektra/mockery/[email protected]

.PHONY: rm-mocked
rm-mocked:
grep -rl "^// Code generated by mockery" | grep .go$ | xargs -r rm

.PHONY: generate
generate: mockery gomods
gomods -w go generate -x ./...

.PHONY: format-cairo
format-cairo:
Expand Down
58 changes: 12 additions & 46 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ require (
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-msgpack v0.5.5 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-plugin v1.6.2-0.20240829161738-06afb6d7ae99 // indirect
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
Expand Down Expand Up @@ -474,9 +474,6 @@ require (
replace (
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

// until merged upstream: https://github.com/hashicorp/go-plugin/pull/257
github.com/hashicorp/go-plugin => github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306

// until merged upstream: https://github.com/mwitkow/grpc-proxy/pull/69
github.com/mwitkow/grpc-proxy => github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f

Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,8 @@ github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHh
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/hashicorp/go-plugin v1.6.2-0.20240829161738-06afb6d7ae99 h1:OSQYEsRT3tRttZkk6zyC3aAaliwd7Loi/KgXgXxGtwA=
github.com/hashicorp/go-plugin v1.6.2-0.20240829161738-06afb6d7ae99/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q=
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M=
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
Expand Down Expand Up @@ -1412,8 +1414,6 @@ github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240708135824-bf
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240708135824-bf9122a8cee6/go.mod h1:+lAHs46edxC7o1bURJBQ81rR/ej6PYCGU8l8dOgNRnM=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240708135824-bf9122a8cee6 h1:MHk1MDz1J0EzCH27UG9E+fT2tjddMSaoAXWxiOB2aBg=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240708135824-bf9122a8cee6/go.mod h1:UJKJcHY0iLvmZyUU2tyPVqUmfzmgSVDVtgjwCX8cE5M=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0=
github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e h1:9ypZ/8aW8Vm497i1gXHcT96oNLiu88jbg9QdX+IUE3E=
Expand Down
6 changes: 1 addition & 5 deletions monitoring/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-plugin v1.6.2-0.20240829161738-06afb6d7ae99 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/invopop/jsonschema v0.12.0 // indirect
Expand All @@ -72,7 +72,6 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
Expand Down Expand Up @@ -126,9 +125,6 @@ require (
replace (
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

// until merged upstream: https://github.com/hashicorp/go-plugin/pull/257
github.com/hashicorp/go-plugin => github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306

// until merged upstream: https://github.com/mwitkow/grpc-proxy/pull/69
github.com/mwitkow/grpc-proxy => github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f

Expand Down
6 changes: 2 additions & 4 deletions monitoring/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ github.com/hashicorp/consul/sdk v0.16.0 h1:SE9m0W6DEfgIVCJX7xU+iv/hUl4m/nxqMTnCd
github.com/hashicorp/consul/sdk v0.16.0/go.mod h1:7pxqqhqoaPqnBnzXD1StKed62LqJeClzVsUEy85Zr0A=
github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=
github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-plugin v1.6.2-0.20240829161738-06afb6d7ae99 h1:OSQYEsRT3tRttZkk6zyC3aAaliwd7Loi/KgXgXxGtwA=
github.com/hashicorp/go-plugin v1.6.2-0.20240829161738-06afb6d7ae99/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q=
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
Expand Down Expand Up @@ -385,8 +387,6 @@ github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQth
github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8=
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
Expand Down Expand Up @@ -476,8 +476,6 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf h1:d9AS/K8RSVG64USb20N/U7RaPOsYPcmuLGJq7iE+caM=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625074419-c278d083facf/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0=
github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI=
Expand Down
11 changes: 5 additions & 6 deletions monitoring/pkg/monitoring/mocks/Metrics.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions ops/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,6 @@ require (
replace (
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

// until merged upstream: https://github.com/hashicorp/go-plugin/pull/257
github.com/hashicorp/go-plugin => github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306

// until merged upstream: https://github.com/mwitkow/grpc-proxy/pull/69
github.com/mwitkow/grpc-proxy => github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f

Expand Down
Loading

0 comments on commit 114306e

Please sign in to comment.