Skip to content

Commit

Permalink
Implements interface changes to support block ranges WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzaldysanchez authored and samsondav committed Apr 25, 2023
1 parent 6cb4dc7 commit 297d0d6
Show file tree
Hide file tree
Showing 32 changed files with 426 additions and 582 deletions.
33 changes: 19 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,24 @@ go 1.20

require (
github.com/confluentinc/confluent-kafka-go v1.9.2
github.com/golang/protobuf v1.5.2
github.com/ethereum/go-ethereum v1.11.5
github.com/golang/protobuf v1.5.3
github.com/hashicorp/go-plugin v1.4.8
github.com/jpillora/backoff v1.0.0
github.com/linkedin/goavro/v2 v2.12.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.12.0
github.com/prometheus/client_golang v1.15.0
github.com/riferrei/srclient v0.5.4
github.com/satori/go.uuid v1.2.0
github.com/smartcontractkit/libocr v0.0.0-20230413082317-9561d14087cc
github.com/stretchr/testify v1.7.5
// WARNING: Experimental version of libocr - do not merge until this is officially released!
github.com/smartcontractkit/libocr v0.0.0-20230419212942-1c3f88528944
github.com/stretchr/testify v1.8.0
go.uber.org/atomic v1.7.0
go.uber.org/goleak v1.1.12
go.uber.org/multierr v1.6.0
go.uber.org/zap v1.16.0
google.golang.org/grpc v1.53.0
google.golang.org/protobuf v1.28.1
google.golang.org/protobuf v1.30.0
)

require (
Expand All @@ -30,25 +32,28 @@ require (
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/go-hclog v0.14.1 // indirect
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.1.1 // indirect
github.com/stretchr/objx v0.4.0 // indirect
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20230223222841-637eb2293923 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/tools v0.1.3 // indirect
)

// Fix go mod tidy issue for ambiguous imports from go-ethereum
// See https://github.com/ugorji/go/issues/279
replace github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.22.1
373 changes: 34 additions & 339 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/loop/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"google.golang.org/grpc"

libocr "github.com/smartcontractkit/libocr/offchainreporting2/types"
libocr "github.com/smartcontractkit/libocr/offchainreporting2plus/types"

pb "github.com/smartcontractkit/chainlink-relay/pkg/loop/internal/pb"
"github.com/smartcontractkit/chainlink-relay/pkg/types"
Expand Down
2 changes: 1 addition & 1 deletion pkg/loop/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"context"
"fmt"

libocr "github.com/smartcontractkit/libocr/offchainreporting2/types"
libocr "github.com/smartcontractkit/libocr/offchainreporting2plus/types"
"github.com/stretchr/testify/assert"
)

Expand Down
11 changes: 8 additions & 3 deletions pkg/loop/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"google.golang.org/grpc"

"github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median"
"github.com/smartcontractkit/libocr/offchainreporting2/types"
"github.com/smartcontractkit/libocr/offchainreporting2plus/reportingplugin/median"
"github.com/smartcontractkit/libocr/offchainreporting2plus/types"

pb "github.com/smartcontractkit/chainlink-relay/pkg/loop/internal/pb"
)
Expand All @@ -23,7 +23,12 @@ func newDataSourceClient(cc *grpc.ClientConn) *dataSourceClient {
}

func (d *dataSourceClient) Observe(ctx context.Context, timestamp types.ReportTimestamp) (*big.Int, error) {
reply, err := d.grpc.Observe(ctx, &pb.ObserveRequest{ReportTimestamp: pbReportTimestamp(timestamp)})
reply, err := d.grpc.Observe(ctx, &pb.ObserveRequest{
ReportTimestamp: pbReportTimestamp(timestamp),
ConfigDigest: repts.ConfigDigest[:],
Epoch: repts.Epoch,
Round: uint32(repts.Round),
})
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/loop/datasource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"math/big"

"github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median"
"github.com/smartcontractkit/libocr/offchainreporting2/types"
"github.com/smartcontractkit/libocr/offchainreporting2plus/reportingplugin/median"
"github.com/smartcontractkit/libocr/offchainreporting2plus/types"
)

var _ median.DataSource = (*staticDataSource)(nil)
Expand Down
22 changes: 11 additions & 11 deletions pkg/loop/internal/pb/median.pb.go

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

Loading

0 comments on commit 297d0d6

Please sign in to comment.