Skip to content

Commit

Permalink
Add unimplemented ChainReader() method to MedianProvider (#379)
Browse files Browse the repository at this point in the history
* Add unimplemented ChainReader() method to MedianProvider

* Update ops/go.mod to fix errors in "make build-go"

* integration-tests/common/common.go: remove P2P.V1 section from config

---------

Co-authored-by: cfal <[email protected]>
  • Loading branch information
reductionista and cfal authored Dec 6, 2023
1 parent ad1115e commit 516a805
Show file tree
Hide file tree
Showing 10 changed files with 318 additions and 731 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
rust 1.67.1
nodejs 18.6.0
yarn 1.22.19
golang 1.21.3
golang 1.21.4
python 3.9.13

# Tools
Expand Down
19 changes: 11 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ require (
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.17.0
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/chainlink-common v0.1.7-0.20231117021201-6814387d8d3e
github.com/smartcontractkit/chainlink-common v0.1.7-0.20231205033838-dfac15e672d4
github.com/smartcontractkit/libocr v0.0.0-20230925165524-ffa38fe11ef8
github.com/stretchr/testify v1.8.4
github.com/tidwall/gjson v1.16.0
go.uber.org/multierr v1.11.0
go.uber.org/ratelimit v0.2.0
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.13.0
golang.org/x/crypto v0.14.0
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1
google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753
google.golang.org/grpc v1.58.3
Expand Down Expand Up @@ -53,7 +53,7 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cometbft/cometbft-db v0.7.0 // indirect
github.com/confio/ics23/go v0.9.0 // indirect
github.com/confluentinc/confluent-kafka-go v1.9.2 // indirect
github.com/confluentinc/confluent-kafka-go/v2 v2.3.0 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect
github.com/cosmos/gogoproto v1.4.10 // indirect
Expand All @@ -74,7 +74,9 @@ require (
github.com/ethereum/go-ethereum v1.12.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fxamacker/cbor/v2 v2.5.0 // indirect
github.com/getsentry/sentry-go v0.19.0 // indirect
github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
Expand All @@ -87,7 +89,7 @@ require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 // indirect
Expand Down Expand Up @@ -134,7 +136,7 @@ require (
github.com/prometheus/procfs v0.11.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/riferrei/srclient v0.5.4 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.1.1 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.2.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/spf13/afero v1.9.3 // indirect
Expand All @@ -153,6 +155,7 @@ require (
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
github.com/zondax/hid v0.9.1 // indirect
github.com/zondax/ledger-go v0.14.1 // indirect
Expand All @@ -165,10 +168,10 @@ require (
go.opentelemetry.io/otel/sdk v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.12.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect
Expand Down
136 changes: 58 additions & 78 deletions go.sum

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions integration-tests/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ TendermintURL = '%s'
Enabled = true
[P2P]
[P2P.V1]
Enabled = false
[P2P.V2]
Enabled = true
DeltaDial = '5s'
Expand Down
178 changes: 62 additions & 116 deletions integration-tests/go.mod

Large diffs are not rendered by default.

687 changes: 167 additions & 520 deletions integration-tests/go.sum

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions ops/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,9 @@ replace (
github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.22.1

github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

// K8s imports are weird
k8s.io/api => k8s.io/api v0.25.11
k8s.io/client-go => k8s.io/client-go v0.25.11
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d
)
12 changes: 6 additions & 6 deletions ops/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -455,22 +455,22 @@ gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY=
gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.27.3 h1:yR6oQXXnUEBWEWcvPWS0jQL575KoAboQPfJAuKNrw5Y=
k8s.io/api v0.27.3/go.mod h1:C4BNvZnQOF7JA/0Xed2S+aUyJSfTGkGFxLXz9MnpIpg=
k8s.io/api v0.25.11 h1:4mjYDfE3yp22jrytjH0knwgzjXKkxHX4D01ZCAazvZM=
k8s.io/api v0.25.11/go.mod h1:bK4UvD4bthtutNlvensrfBX21PRQ/vs2cIYggHkOOAo=
k8s.io/apiextensions-apiserver v0.25.3 h1:bfI4KS31w2f9WM1KLGwnwuVlW3RSRPuIsfNF/3HzR0k=
k8s.io/apiextensions-apiserver v0.25.3/go.mod h1:ZJqwpCkxIx9itilmZek7JgfUAM0dnTsA48I4krPqRmo=
k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM=
k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E=
k8s.io/cli-runtime v0.25.11 h1:GE2yNZm1tN+MJtw1SGMOLesLF7Kp7NVAVqRSTbXfu4o=
k8s.io/cli-runtime v0.25.11/go.mod h1:r/nEINuHVEpgGhcd2WamU7hD1t/lMnSz8XM44Autltc=
k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8=
k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48=
k8s.io/client-go v0.25.11 h1:DJQ141UsbNRI6wYSlcYLP5J5BW5Wq7Bgm42Ztq2SW70=
k8s.io/client-go v0.25.11/go.mod h1:41Xs7p1SfhoReUnmjjYCfCNWFiq4xSkexwJfbxF2F7A=
k8s.io/component-base v0.26.2 h1:IfWgCGUDzrD6wLLgXEstJKYZKAFS2kO+rBRi0p3LqcI=
k8s.io/component-base v0.26.2/go.mod h1:DxbuIe9M3IZPRxPIzhch2m1eT7uFrSBJUBuVCQEBivs=
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 h1:OmK1d0WrkD3IPfkskvroRykOulHVHf0s0ZIFRjyt+UI=
k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515/go.mod h1:kzo02I3kQ4BTtEfVLaPbjvCkX97YqGve33wzlb3fofQ=
k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d h1:VcFq5n7wCJB2FQMCIHfC+f+jNcGgNMar1uKd6rVlifU=
k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY=
k8s.io/kubectl v0.25.11 h1:6bsft5Gan6BCvQ7cJbDRFjTm4Zfq8GuUYpsWAdVngYE=
k8s.io/kubectl v0.25.11/go.mod h1:8mIfgkFgT+yJ8/TlmPW1qoRh46H2si9q5nW8id7i9iM=
k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc=
Expand Down
4 changes: 4 additions & 0 deletions pkg/cosmos/adapters/cosmwasm/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,7 @@ func (p *medianProvider) MedianContract() median.MedianContract {
func (p *medianProvider) OnchainConfigCodec() median.OnchainConfigCodec {
return median.StandardOnchainConfigCodec{}
}

func (p *medianProvider) ChainReader() relaytypes.ChainReader {
return nil
}
4 changes: 4 additions & 0 deletions pkg/cosmos/adapters/injective/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,7 @@ func (p *medianProvider) MedianContract() median.MedianContract {
func (p *medianProvider) OnchainConfigCodec() median.OnchainConfigCodec {
return median.StandardOnchainConfigCodec{}
}

func (p *medianProvider) ChainReader() relaytypes.ChainReader {
return nil
}

0 comments on commit 516a805

Please sign in to comment.