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 nix deps #1098

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ linters:
- unused
# extra
- exhaustive
- exportloopref
- revive
- goimports
- gosec
Expand All @@ -27,6 +26,9 @@ linters-settings:
local-prefixes: github.com/smartcontractkit/chainlink-testing-framework
gosec:
exclude-generated: true
excludes:
# Potential integer overflow when converting between integer types, a lot of false positives
- G115
govet:
# report about shadowed variables
check-shadowing: false
Expand Down
3 changes: 0 additions & 3 deletions blockchain/ethereum.go
Original file line number Diff line number Diff line change
Expand Up @@ -1058,8 +1058,6 @@ func (e *EthereumClient) WaitForEvents() error {
g := errgroup.Group{}

for subName, sub := range queuedEvents {
subName := subName
sub := sub
g.Go(func() error {
defer func() {
// if the subscription is complete, delete it from the queue
Expand Down Expand Up @@ -1729,7 +1727,6 @@ func (e *EthereumMultinodeClient) DeleteHeaderEventSubscription(key string) {
func (e *EthereumMultinodeClient) WaitForEvents() error {
g := errgroup.Group{}
for _, c := range e.Clients {
c := c
g.Go(func() error {
return c.WaitForEvents()
})
Expand Down
1 change: 0 additions & 1 deletion blockchain/transaction_confirmers.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ func (e *EthereumClient) receiveHeader(header *SafeEVMHeader) error {

g := errgroup.Group{}
for _, sub := range subs {
sub := sub
g.Go(func() error {
return sub.ReceiveHeader(safeHeader)
})
Expand Down
16 changes: 8 additions & 8 deletions config/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,21 @@ func (n *NetworkConfig) OverrideURLsAndKeysFromEVMNetwork() {
return
}
for name, evmNetwork := range n.EVMNetworks {
if evmNetwork.URLs != nil && len(evmNetwork.URLs) > 0 {
if len(evmNetwork.URLs) > 0 {
logging.L.Warn().Str("network", name).Msg("found URLs in EVMNetwork. overriding RPC URLs in RpcWsUrls with EVMNetwork URLs")
if n.RpcWsUrls == nil {
n.RpcWsUrls = make(map[string][]string)
}
n.RpcWsUrls[name] = evmNetwork.URLs
}
if evmNetwork.HTTPURLs != nil && len(evmNetwork.HTTPURLs) > 0 {
if len(evmNetwork.HTTPURLs) > 0 {
logging.L.Warn().Str("network", name).Msg("found HTTPURLs in EVMNetwork. overriding RPC URLs in RpcHttpUrls with EVMNetwork HTTP URLs")
if n.RpcHttpUrls == nil {
n.RpcHttpUrls = make(map[string][]string)
}
n.RpcHttpUrls[name] = evmNetwork.HTTPURLs
}
if evmNetwork.PrivateKeys != nil && len(evmNetwork.PrivateKeys) > 0 {
if len(evmNetwork.PrivateKeys) > 0 {
logging.L.Warn().Str("network", name).Msg("found PrivateKeys in EVMNetwork. overriding wallet keys in WalletKeys with EVMNetwork private keys")
if n.WalletKeys == nil {
n.WalletKeys = make(map[string][]string)
Expand Down Expand Up @@ -261,7 +261,7 @@ func (n *NetworkConfig) applyDefaults(defaults *NetworkConfig) error {
n.SelectedNetworks = defaults.SelectedNetworks
}
if defaults.EVMNetworks != nil {
if n.EVMNetworks == nil || len(n.EVMNetworks) == 0 {
if len(n.EVMNetworks) == 0 {
n.EVMNetworks = defaults.EVMNetworks
} else {
for network, cfg := range defaults.EVMNetworks {
Expand All @@ -272,7 +272,7 @@ func (n *NetworkConfig) applyDefaults(defaults *NetworkConfig) error {
}
}
if defaults.AnvilConfigs != nil {
if n.AnvilConfigs == nil || len(n.AnvilConfigs) == 0 {
if len(n.AnvilConfigs) == 0 {
n.AnvilConfigs = defaults.AnvilConfigs
} else {
for network, cfg := range defaults.AnvilConfigs {
Expand All @@ -283,7 +283,7 @@ func (n *NetworkConfig) applyDefaults(defaults *NetworkConfig) error {
}
}
if defaults.RpcHttpUrls != nil {
if n.RpcHttpUrls == nil || len(n.RpcHttpUrls) == 0 {
if len(n.RpcHttpUrls) == 0 {
n.RpcHttpUrls = defaults.RpcHttpUrls
} else {
for network, urls := range defaults.RpcHttpUrls {
Expand All @@ -294,7 +294,7 @@ func (n *NetworkConfig) applyDefaults(defaults *NetworkConfig) error {
}
}
if defaults.RpcWsUrls != nil {
if n.RpcWsUrls == nil || len(n.RpcWsUrls) == 0 {
if len(n.RpcWsUrls) == 0 {
n.RpcWsUrls = defaults.RpcWsUrls
} else {
for network, urls := range defaults.RpcWsUrls {
Expand All @@ -305,7 +305,7 @@ func (n *NetworkConfig) applyDefaults(defaults *NetworkConfig) error {
}
}
if defaults.WalletKeys != nil {
if n.WalletKeys == nil || len(n.WalletKeys) == 0 {
if len(n.WalletKeys) == 0 {
n.WalletKeys = defaults.WalletKeys
} else {

Expand Down
2 changes: 0 additions & 2 deletions docker/test_env/killgrave_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ func runTestWithExpectations(t *testing.T, k *Killgrave, expectations []kgTest)
var err error
// Check the different kinds of responses
for _, test := range expectations {
test := test

t.Run(test.Name, func(t *testing.T) {
t.Parallel()
m := []string{http.MethodGet}
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

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

1 change: 0 additions & 1 deletion logstream/logstream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func TestLogStreamDocker(t *testing.T) {
}

for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
ctx := testcontext.Get(t)
Expand Down
1 change: 0 additions & 1 deletion networks/known_networks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ new_network = ["ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
},
}
for _, tc := range testcases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
encoded := base64.StdEncoding.EncodeToString([]byte(tc.networkConfigTOML))
err := os.Setenv("BASE64_NETWORK_CONFIG", encoded)
Expand Down
1 change: 0 additions & 1 deletion seth/block_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func (cs *BlockStats) Stats(startBlock *big.Int, endBlock *big.Int) error {
blockMu := &sync.Mutex{}
eg := &errgroup.Group{}
for bn := startBlock.Int64(); bn < endBlock.Int64(); bn++ {
bn := bn
eg.Go(func() error {
cs.Limiter.Take()
block, err := cs.Client.Client.BlockByNumber(context.Background(), big.NewInt(bn))
Expand Down
1 change: 0 additions & 1 deletion seth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ func NewClientRaw(
eg, egCtx := errgroup.WithContext(ctx)
// root key is element 0 in ephemeral
for _, addr := range c.Addresses[1:] {
addr := addr
eg.Go(func() error {
return c.TransferETHFromKey(egCtx, 0, addr.Hex(), bd.AddrFunding, gasPrice)
})
Expand Down
1 change: 0 additions & 1 deletion seth/client_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ func TestAPIKeys(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
wg := &sync.WaitGroup{}
for i := 1; i < 61; i++ {
i := i
wg.Add(1)
go func() {
defer wg.Done()
Expand Down
18 changes: 9 additions & 9 deletions seth/flake.lock

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

1 change: 0 additions & 1 deletion seth/test_utils/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func NewClientWithAddresses(t *testing.T, addressCount int, funding *big.Int) *s
eg, egCtx := errgroup.WithContext(ctx)
// root key is element 0 in ephemeral
for _, addr := range addresses {
addr := addr
eg.Go(func() error {
return c.TransferETHFromKey(egCtx, 0, addr, funding, gasPrice)
})
Expand Down
4 changes: 2 additions & 2 deletions utils/seth/seth.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ func ValidateSethNetworkConfig(cfg *pkg_seth.Network) error {
if cfg == nil {
return errors.New("network cannot be nil")
}
if cfg.URLs == nil || len(cfg.URLs) == 0 {
if len(cfg.URLs) == 0 {
return errors.New("URLs are required")
}
if cfg.PrivateKeys == nil || len(cfg.PrivateKeys) == 0 {
if len(cfg.PrivateKeys) == 0 {
return errors.New("PrivateKeys are required")
}
if cfg.TransferGasFee == 0 {
Expand Down
12 changes: 6 additions & 6 deletions wasp/flake.lock

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

7 changes: 4 additions & 3 deletions wasp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ require (
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
github.com/pkg/errors v0.9.1
github.com/prometheus/common v0.45.0
github.com/pyroscope-io/client v0.7.1
github.com/rs/zerolog v1.30.0
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449
github.com/stretchr/testify v1.8.4
Expand Down Expand Up @@ -96,7 +95,7 @@ require (
github.com/jpillora/backoff v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/klauspost/compress v1.17.1 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand All @@ -121,7 +120,6 @@ require (
github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/prometheus v0.47.2-0.20231010075449-4b9c19fe5510 // indirect
github.com/pyroscope-io/godeltaprof v0.1.2 // indirect
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/spf13/pflag v1.0.5 // indirect
Expand Down Expand Up @@ -168,6 +166,8 @@ require (
sigs.k8s.io/yaml v1.3.0 // indirect
)

require github.com/grafana/pyroscope-go v1.1.2

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect
Expand All @@ -188,6 +188,7 @@ require (
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 // indirect
github.com/grafana/pyroscope-go/godeltaprof v0.1.8 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions wasp/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ github.com/grafana/loki v1.6.2-0.20231215164305-b51b7d7b5503 h1:gdrsYbmk8822v6qv
github.com/grafana/loki v1.6.2-0.20231215164305-b51b7d7b5503/go.mod h1:d8seWXCEXkL42mhuIJYcGi6DxfehzoIpLrMQWJojvOo=
github.com/grafana/loki/pkg/push v0.0.0-20231124142027-e52380921608 h1:ZYk42718kSXOiIKdjZKljWLgBpzL5z1yutKABksQCMg=
github.com/grafana/loki/pkg/push v0.0.0-20231124142027-e52380921608/go.mod h1:f3JSoxBTPXX5ec4FxxeC19nTBSxoTz+cBgS3cYLMcr0=
github.com/grafana/pyroscope-go v1.1.2 h1:7vCfdORYQMCxIzI3NlYAs3FcBP760+gWuYWOyiVyYx8=
github.com/grafana/pyroscope-go v1.1.2/go.mod h1:HSSmHo2KRn6FasBA4vK7BMiQqyQq8KSuBKvrhkXxYPU=
github.com/grafana/pyroscope-go/godeltaprof v0.1.8 h1:iwOtYXeeVSAeYefJNaxDytgjKtUuKQbJqgAIjlnicKg=
github.com/grafana/pyroscope-go/godeltaprof v0.1.8/go.mod h1:2+l7K7twW49Ct4wFluZD3tZ6e0SjanjcUUBPVD/UuGU=
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww=
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A=
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw=
Expand Down Expand Up @@ -503,8 +507,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/klauspost/compress v1.17.1 h1:NE3C767s2ak2bweCZo3+rdP4U/HoyVXLv/X9f2gPS5g=
github.com/klauspost/compress v1.17.1/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
Expand Down Expand Up @@ -666,10 +670,6 @@ github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/prometheus/prometheus v0.47.2-0.20231010075449-4b9c19fe5510 h1:6ksZ7t1hNOzGPPs8DK7SvXQf6UfWzi+W5Z7PCBl8gx4=
github.com/prometheus/prometheus v0.47.2-0.20231010075449-4b9c19fe5510/go.mod h1:UC0TwJiF90m2T3iYPQBKnGu8gv3s55dF/EgpTq8gyvo=
github.com/pyroscope-io/client v0.7.1 h1:yFRhj3vbgjBxehvxQmedmUWJQ4CAfCHhn+itPsuWsHw=
github.com/pyroscope-io/client v0.7.1/go.mod h1:4h21iOU4pUOq0prKyDlvYRL+SCKsBc5wKiEtV+rJGqU=
github.com/pyroscope-io/godeltaprof v0.1.2 h1:MdlEmYELd5w+lvIzmZvXGNMVzW2Qc9jDMuJaPOR75g4=
github.com/pyroscope-io/godeltaprof v0.1.2/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE=
github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4=
github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI=
github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
Expand Down
3 changes: 1 addition & 2 deletions wasp/perf_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package wasp

import (
"github.com/grafana/pyroscope-go"
"testing"
"time"

Expand All @@ -13,8 +14,6 @@ import (

"fmt"
"net/http/httptest"

"github.com/pyroscope-io/client/pyroscope"
)

/* This tests can also be used as a performance validation of a tool itself or as a dashboard data filler */
Expand Down
2 changes: 1 addition & 1 deletion wasp/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (m *Profile) printDashboardLink() {
if err != nil {
log.Warn().Msgf("could not get dashboard link: %s", err)
} else {
log.Info().Msgf("Dashboard URL: " + url)
log.Info().Msgf("Dashboard URL: %s", url)
}
}

Expand Down
Loading