Skip to content

Commit

Permalink
rm plugins/cmd/chainlink-solana (#10973)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 authored Oct 23, 2023
1 parent ae8ec42 commit ff84f9f
Show file tree
Hide file tree
Showing 38 changed files with 134 additions and 1,190 deletions.
6 changes: 1 addition & 5 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,12 @@ chainlink-test: operator-ui ## Build a test build of chainlink binary.
chainlink-local-start:
./chainlink -c /etc/node-secrets-volume/default.toml -c /etc/node-secrets-volume/overrides.toml -secrets /etc/node-secrets-volume/secrets.toml node start -d -p /etc/node-secrets-volume/node-password -a /etc/node-secrets-volume/apicredentials --vrfpassword=/etc/node-secrets-volume/apicredentials

.PHONY: install-solana
install-solana: ## Build & install the chainlink-solana binary.
go install $(GOFLAGS) ./plugins/cmd/chainlink-solana

.PHONY: install-median
install-median: ## Build & install the chainlink-median binary.
go install $(GOFLAGS) ./plugins/cmd/chainlink-median

.PHONY: install-starknet
install-starknet: ## Build & install the chainlink-solana binary.
install-starknet: ## Build & install the chainlink-starknet binary.
go install $(GOFLAGS) ./plugins/cmd/chainlink-starknet

.PHONY: docker ## Build the chainlink docker image
Expand Down
2 changes: 1 addition & 1 deletion core/chains/cosmos/relayer_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type LoopRelayerChain struct {
}

func NewLoopRelayerChain(r *pkgcosmos.Relayer, s adapters.Chain) *LoopRelayerChain {
ra := relay.NewRelayerServerAdapter(r, s)
ra := relay.NewServerAdapter(r, s)
return &LoopRelayerChain{
Relayer: ra,
chain: s,
Expand Down
6 changes: 3 additions & 3 deletions core/cmd/shell_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr"
evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype"
"github.com/smartcontractkit/chainlink/v2/core/services/pg"
"github.com/smartcontractkit/chainlink/v2/core/sessions"
Expand All @@ -46,6 +45,7 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/store/dialects"
"github.com/smartcontractkit/chainlink/v2/core/store/migrate"
"github.com/smartcontractkit/chainlink/v2/core/utils"
"github.com/smartcontractkit/chainlink/v2/core/web"
webPresenters "github.com/smartcontractkit/chainlink/v2/core/web/presenters"
)

Expand Down Expand Up @@ -656,9 +656,9 @@ func (p *HealthCheckPresenter) ToRow() []string {
var status string

switch p.Status {
case services.StatusFailing:
case web.HealthStatusFailing:
status = red(p.Status)
case services.StatusPassing:
case web.HealthStatusPassing:
status = green(p.Status)
}

Expand Down
4 changes: 2 additions & 2 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 // indirect
github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231019215252-bcced69e26a6 // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231016152201-a10a460e67d8 // indirect
github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231020230319-2ede955d1dc9 // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231023133638-72f4e799ab05 // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 // indirect
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect
Expand Down
8 changes: 4 additions & 4 deletions core/scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1458,10 +1458,10 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 h1:vdieOW3CZGdD2R5zvCSMS+0vksyExPN3/Fa1uVfld/A=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47/go.mod h1:xMwqRdj5vqYhCJXgKVqvyAwdcqM6ZAEhnwEQ4Khsop8=
github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231019215252-bcced69e26a6 h1:nLIqyl3GAOaa2WKqLItQ+dpLEp1XRPZyzADLSMXNWgE=
github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231019215252-bcced69e26a6/go.mod h1:M9U1JV7IQi8Sfj4JR1qSi1tIh6omgW78W/8SHN/8BUQ=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231016152201-a10a460e67d8 h1:EYo1yJAwBt2RcK45vaExh5cnEJ3nk2RwF0tdNjMoWNI=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231016152201-a10a460e67d8/go.mod h1:S17dRqwSFSrMdueQ3clPI6XWZWKJjTvqTZVd0F05Ugc=
github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231020230319-2ede955d1dc9 h1:fFD5SgSJtnXvkGLK3CExNKpUIz4sGrNNkKv3Ljw63Hk=
github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231020230319-2ede955d1dc9/go.mod h1:M9U1JV7IQi8Sfj4JR1qSi1tIh6omgW78W/8SHN/8BUQ=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231023133638-72f4e799ab05 h1:DaPSVnxe7oz1QJ+AVIhQWs1W3ubQvwvGo9NbHpMs1OQ=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231023133638-72f4e799ab05/go.mod h1:o0Pn1pbaUluboaK6/yhf8xf7TiFCkyFl6WUOdwqamuU=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918/go.mod h1:/yp/sqD8Iz5GU5fcercjrw0ivJF7HDcupYg+Gjr7EPg=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss=
Expand Down
3 changes: 2 additions & 1 deletion core/services/chainlink/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/smartcontractkit/sqlx"

"github.com/smartcontractkit/chainlink-relay/pkg/loop"
relayservices "github.com/smartcontractkit/chainlink-relay/pkg/services"

"github.com/smartcontractkit/chainlink/v2/core/bridges"
"github.com/smartcontractkit/chainlink/v2/core/build"
Expand Down Expand Up @@ -386,7 +387,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) {
globalLogger.Debug("Off-chain reporting v2 disabled")
}

healthChecker := services.NewChecker()
healthChecker := relayservices.NewChecker()

var lbs []utils.DependentAwaiter
for _, c := range legacyEVMChains.Slice() {
Expand Down
4 changes: 2 additions & 2 deletions core/services/chainlink/relayer_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solana.TOMLConf
if err != nil {
return nil, err
}
solanaRelayers[relayID] = relay.NewRelayerServerAdapter(pkgsolana.NewRelayer(lggr, chain), chain)
solanaRelayers[relayID] = relay.NewServerAdapter(pkgsolana.NewRelayer(lggr, chain), chain)
}
}
return solanaRelayers, nil
Expand Down Expand Up @@ -214,7 +214,7 @@ func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs starknet.St
return nil, err
}

starknetRelayers[relayID] = relay.NewRelayerServerAdapter(pkgstarknet.NewRelayer(lggr, chain), chain)
starknetRelayers[relayID] = relay.NewServerAdapter(pkgstarknet.NewRelayer(lggr, chain), chain)
}
}
return starknetRelayers, nil
Expand Down
38 changes: 5 additions & 33 deletions core/services/checkable.go
Original file line number Diff line number Diff line change
@@ -1,39 +1,11 @@
package services

import (
"errors"
"testing"
"github.com/smartcontractkit/chainlink-relay/pkg/services"
)

// Checkable should be implemented by any type requiring health checks.
// From the k8s docs:
// > ready means it’s initialized and healthy means that it can accept traffic in kubernetes
// See: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
type Checkable interface {
// Ready should return nil if ready, or an error message otherwise.
Ready() error
// HealthReport returns a full health report of the callee including it's dependencies.
// key is the dep name, value is nil if healthy, or error message otherwise.
// See CopyHealth.
HealthReport() map[string]error
// Name returns the fully qualified name of the component. Usually the logger name.
Name() string
}
// Deprecated: use services.HealthReporter
type Checkable = services.HealthReporter

// CopyHealth copies health statuses from src to dest.
// If duplicate names are encountered, the errors are joined, unless testing in which case a panic is thrown.
func CopyHealth(dest, src map[string]error) {
for name, err := range src {
errOrig, ok := dest[name]
if ok {
if testing.Testing() {
panic("service names must be unique: duplicate name: " + name)
}
if errOrig != nil {
dest[name] = errors.Join(errOrig, err)
continue
}
}
dest[name] = err
}
}
// Deprecated: use services.CopyHealth
func CopyHealth(dest, src map[string]error) { services.CopyHealth(dest, src) }
Loading

0 comments on commit ff84f9f

Please sign in to comment.