Skip to content

Commit 62ba95a

Browse files
Merge branch 'main' into sui-analyzer
2 parents 881485d + 93e6795 commit 62ba95a

Some content is hidden

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

51 files changed

+2178
-645
lines changed

.github/workflows/pull-request-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: smartcontractkit/.github/actions/ci-lint-go@ci-lint-go/v2 # [email protected]
2020
with:
2121
only-new-issues: "false"
22-
golangci-lint-version: v2.1.6
22+
golangci-lint-version: v2.5.0
2323

2424
ci-lint-misc:
2525
name: Lint GH Actions and scripts

.github/workflows/schedule-main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: schedule-main
33
on:
44
schedule:
55
# Runs once a day at 1:00 UTC on main branch to collect statistics
6-
- cron: '0 1 * * *'
6+
- cron: "0 1 * * *"
77
workflow_dispatch:
88

99
jobs:
@@ -19,7 +19,7 @@ jobs:
1919
uses: smartcontractkit/.github/actions/ci-lint-go@ci-lint-go/v2 # [email protected]
2020
with:
2121
only-new-issues: "false"
22-
golangci-lint-version: v2.1.6
22+
golangci-lint-version: v2.5.0
2323

2424
ci-lint-misc:
2525
name: Lint GH Actions and scripts
@@ -52,7 +52,7 @@ jobs:
5252
sonarqube:
5353
name: Sonar Scan
5454
runs-on: ubuntu-24.04
55-
needs: [ ci-test, ci-lint-misc, ci-lint ]
55+
needs: [ci-test, ci-lint-misc, ci-lint]
5656
permissions:
5757
contents: read
5858
actions: read

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ linters:
7373
desc: Use github.com/smartcontractkit/chainlink-common/pkg/logger instead
7474
- pkg: github.com/pkg/errors
7575
desc: Use the standard library instead, for example https://pkg.go.dev/fmt#Errorf
76+
- pkg: github.com/smartcontractkit/chainlink/v2
77+
desc: You must not import this package. There is no alternative.
78+
- pkg: github.com/smartcontractkit/chainlink/deployment
79+
desc: You must not import this package. There is no alternative.
7680
goconst:
7781
min-len: 5
7882
govet:

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
golang 1.24.4
2-
golangci-lint 2.1.6
2+
golangci-lint 2.5.0
33
mockery 3.3.4
44
nodejs 20.16.0
55
pnpm 10.6.5
66
task 3.41.0
7-
postgres 15.1
7+
postgres 15.1

CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
# chainlink-deployments-framework
22

3+
## 0.55.0
4+
5+
### Minor Changes
6+
7+
- [#492](https://github.com/smartcontractkit/chainlink-deployments-framework/pull/492) [`7243af8`](https://github.com/smartcontractkit/chainlink-deployments-framework/commit/7243af8be1d93101d0655c3424d60f6dcdcd883e) Thanks [@jkongie](https://github.com/jkongie)! - update aptos dep to v1.9.1
8+
9+
- [#474](https://github.com/smartcontractkit/chainlink-deployments-framework/pull/474) [`fdcf28d`](https://github.com/smartcontractkit/chainlink-deployments-framework/commit/fdcf28d6dfaa06c3bdfd92acae2c5e414479c4af) Thanks [@ecPablo](https://github.com/ecPablo)! - add predecessors and opcount calculation logic to proposalutils package.
10+
11+
### Patch Changes
12+
13+
- [#496](https://github.com/smartcontractkit/chainlink-deployments-framework/pull/496) [`fea372c`](https://github.com/smartcontractkit/chainlink-deployments-framework/commit/fea372c81f6cd0a49c1793cd3f87686842669a1d) Thanks [@graham-chainlink](https://github.com/graham-chainlink)! - fix: update db controller to accept context
14+
15+
- [#498](https://github.com/smartcontractkit/chainlink-deployments-framework/pull/498) [`ce51cbe`](https://github.com/smartcontractkit/chainlink-deployments-framework/commit/ce51cbefa3d92af9fa91bb5a6dcb531d69b76f54) Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - fix: anvil env should check for addresses from DataStore as well
16+
17+
- [#495](https://github.com/smartcontractkit/chainlink-deployments-framework/pull/495) [`126609e`](https://github.com/smartcontractkit/chainlink-deployments-framework/commit/126609e1400ac56142d751291ec9cab83d716216) Thanks [@ecPablo](https://github.com/ecPablo)! - get delay for advancing time from the proposal instead of constant value
18+
19+
- [#497](https://github.com/smartcontractkit/chainlink-deployments-framework/pull/497) [`976d232`](https://github.com/smartcontractkit/chainlink-deployments-framework/commit/976d232b8ea5263f743f2885d50cbd18a5712b48) Thanks [@graham-chainlink](https://github.com/graham-chainlink)! - fix(catalog/memory): remove dependency on testing.T
20+
21+
## 0.54.1
22+
23+
### Patch Changes
24+
25+
- [#489](https://github.com/smartcontractkit/chainlink-deployments-framework/pull/489) [`63fda69`](https://github.com/smartcontractkit/chainlink-deployments-framework/commit/63fda69d0c909cbb4cc6104a68cb03a92f4b12be) Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - feat(mcms): query Timelock contract for CallProxy address
26+
27+
- [#478](https://github.com/smartcontractkit/chainlink-deployments-framework/pull/478) [`f318c97`](https://github.com/smartcontractkit/chainlink-deployments-framework/commit/f318c973efa79278e12d2fa3c1b4eb52daa178bf) Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - fix: restore owner after mcm.SetConfig() in fork tests with --test-signer
28+
29+
## 0.54.0
30+
31+
### Minor Changes
32+
33+
- [#481](https://github.com/smartcontractkit/chainlink-deployments-framework/pull/481) [`1f7f6bc`](https://github.com/smartcontractkit/chainlink-deployments-framework/commit/1f7f6bc9be80a9522680022868448847b62ba20a) Thanks [@graham-chainlink](https://github.com/graham-chainlink)! - feat(operations): introduce AsUntypedRelaxed
34+
35+
### Patch Changes
36+
37+
- [#484](https://github.com/smartcontractkit/chainlink-deployments-framework/pull/484) [`fb9d9bf`](https://github.com/smartcontractkit/chainlink-deployments-framework/commit/fb9d9bfef7456052e4c07fc4bba3c9b16e5b4bd5) Thanks [@jkongie](https://github.com/jkongie)! - Fixes test engine MCMS execution when multiple proposals have the same `validUntil` timestamp.
38+
39+
A salt override is added to each timelock proposal persisted to the state to ensure unique operation
40+
IDs in test environments where multiple proposals may have identical timestamps. This salt is used
41+
in the hashing algorithm to determine the root of the merkle tree.
42+
43+
- [#479](https://github.com/smartcontractkit/chainlink-deployments-framework/pull/479) [`930e469`](https://github.com/smartcontractkit/chainlink-deployments-framework/commit/930e469560608b9ec32a398393862b9fbc4d663a) Thanks [@jkongie](https://github.com/jkongie)! - Fixes MCMS Execution failing to Set Root in the test engine
44+
45+
- [#475](https://github.com/smartcontractkit/chainlink-deployments-framework/pull/475) [`8d9ded3`](https://github.com/smartcontractkit/chainlink-deployments-framework/commit/8d9ded34541c2f47211832cfbbb7906b40c5746f) Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - fix(mcms): check for PostOpCountReached errors in Solana as well
46+
347
## 0.53.0
448

549
### Minor Changes

chain/internal/common/chain_metadata.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package common
1+
package common //nolint:revive // var-naming: This is an internal package for common code that is shared between chains.
22

33
import (
44
"fmt"

chain/solana/solana_chain.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (c Chain) CloseBuffers(logger logger.Logger, buffer string) error {
6464
"--bypass-warning",
6565
}
6666

67-
cmd := exec.Command("solana", baseArgs...) // #nosec G204
67+
cmd := exec.CommandContext(context.TODO(), "solana", baseArgs...) // #nosec G204
6868
logger.Infof("Closing buffers with command: %s", cmd.String())
6969

7070
// Capture the command output
@@ -133,12 +133,12 @@ func (c Chain) DeployProgram(logger logger.Logger, programInfo ProgramInfo, isUp
133133
if overallocate && programBytes > 0 {
134134
baseArgs = append(baseArgs, "--max-len", strconv.Itoa(programBytes))
135135
}
136-
cmd = exec.Command("solana", baseArgs...) // #nosec G204
136+
cmd = exec.CommandContext(context.TODO(), "solana", baseArgs...) // #nosec G204
137137
} else {
138138
// Keypairs wont be created for devenvs
139139
logger.Infow("Deploying new program",
140140
"programFile", programFile)
141-
cmd = exec.Command("solana", baseArgs...) // #nosec G204
141+
cmd = exec.CommandContext(context.TODO(), "solana", baseArgs...) // #nosec G204
142142
}
143143

144144
// Capture the command output

chain/utils/chain_info.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package utils
1+
package utils //nolint:revive // var-naming: We need to keep this name for now for backwards compatibility.
22

33
import chainsel "github.com/smartcontractkit/chain-selectors"
44

datastore/catalog/memory/address_ref_store.go

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"database/sql"
66
"errors"
77
"fmt"
8-
"testing"
98

109
"github.com/lib/pq"
1110

@@ -39,25 +38,21 @@ const (
3938
)
4039

4140
type memoryAddressRefStore struct {
42-
t *testing.T
4341
config MemoryDataStoreConfig
4442
db *dbController
4543
}
4644

4745
// Ensure memoryAddressRefStore implements the V2 interface
4846
var _ datastore.MutableRefStoreV2[datastore.AddressRefKey, datastore.AddressRef] = &memoryAddressRefStore{}
4947

50-
func newCatalogAddressRefStore(t *testing.T, config MemoryDataStoreConfig, db *dbController) *memoryAddressRefStore {
51-
t.Helper()
52-
48+
func newCatalogAddressRefStore(config MemoryDataStoreConfig, db *dbController) *memoryAddressRefStore {
5349
return &memoryAddressRefStore{
54-
t: t,
5550
config: config,
5651
db: db,
5752
}
5853
}
5954

60-
func (s *memoryAddressRefStore) Get(_ context.Context, key datastore.AddressRefKey, options ...datastore.GetOption) (datastore.AddressRef, error) {
55+
func (s *memoryAddressRefStore) Get(ctx context.Context, key datastore.AddressRefKey, options ...datastore.GetOption) (datastore.AddressRef, error) {
6156
ignoreTransactions := false
6257
for _, option := range options {
6358
switch option {
@@ -71,7 +66,7 @@ func (s *memoryAddressRefStore) Get(_ context.Context, key datastore.AddressRefK
7166
} else {
7267
db = s.db
7368
}
74-
rows, err := db.Query(query_ADDRESS_REFERENCE_BY_ID, key.ChainSelector(), key.Type().String(), key.Version().String(), key.Qualifier())
69+
rows, err := db.QueryContext(ctx, query_ADDRESS_REFERENCE_BY_ID, key.ChainSelector(), key.Type().String(), key.Version().String(), key.Qualifier())
7570
defer func(rows *sql.Rows) {
7671
if rows != nil {
7772
_ = rows.Close()
@@ -107,8 +102,8 @@ func (s *memoryAddressRefStore) Get(_ context.Context, key datastore.AddressRefK
107102
}
108103

109104
// Fetch returns a copy of all AddressRefs in the catalog.
110-
func (s *memoryAddressRefStore) Fetch(_ context.Context) ([]datastore.AddressRef, error) {
111-
rows, err := s.db.Query(query_ALL_ADDRESS_REFERENCES)
105+
func (s *memoryAddressRefStore) Fetch(ctx context.Context) ([]datastore.AddressRef, error) {
106+
rows, err := s.db.QueryContext(ctx, query_ALL_ADDRESS_REFERENCES)
112107
defer func(rows *sql.Rows) {
113108
if rows != nil {
114109
_ = rows.Close()
@@ -171,8 +166,9 @@ func (s *memoryAddressRefStore) Update(ctx context.Context, r datastore.AddressR
171166
return s.edit(ctx, query_UPDATE_ADDRESS_REFERENCE, r)
172167
}
173168

174-
func (s *memoryAddressRefStore) edit(_ context.Context, qry string, r datastore.AddressRef) error {
175-
result, err := s.db.Exec(
169+
func (s *memoryAddressRefStore) edit(ctx context.Context, qry string, r datastore.AddressRef) error {
170+
result, err := s.db.ExecContext(
171+
ctx,
176172
qry,
177173
r.ChainSelector,
178174
r.Type.String(),

datastore/catalog/memory/address_ref_store_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,11 @@ func setupTestStore(t *testing.T) (*memoryAddressRefStore, func()) {
450450
Domain: "test_domain",
451451
Environment: "catalog_testing",
452452
}
453-
store := NewMemoryDataStore(t, config)
453+
store, err := NewMemoryDataStore(config)
454+
require.NoError(t, err)
454455

455456
return store.Addresses().(*memoryAddressRefStore), func() {
456-
store.Close()
457+
require.NoError(t, store.Close())
457458
}
458459
}
459460

0 commit comments

Comments
 (0)