diff --git a/go.mod b/go.mod index 11d881390..e2cc9eb79 100644 --- a/go.mod +++ b/go.mod @@ -78,6 +78,8 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) +replace github.com/smartcontractkit/libocr => github.com/augustbleeds/libocr v0.0.0-20240222154448-6050883e1800 + replace ( // until merged upstream: https://github.com/hashicorp/go-plugin/pull/257 github.com/hashicorp/go-plugin => github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 diff --git a/go.sum b/go.sum index b2516b246..cfd73c757 100644 --- a/go.sum +++ b/go.sum @@ -44,6 +44,8 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.9.4 h1:mnUj0ivWy6UzbB1uLFqKR6F+ZyiDc7j4iGgHTpO+5+I= github.com/Microsoft/hcsshim v0.9.4/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= +github.com/augustbleeds/libocr v0.0.0-20240222154448-6050883e1800 h1:eXMkGNE9kfAYyAEBlzjL53ax4klanSS+v4zOhNfuE2M= +github.com/augustbleeds/libocr v0.0.0-20240222154448-6050883e1800/go.mod h1:kC0qmVPUaVkFqGiZMNhmRmjdphuUmeyLEdlWFOQzFWI= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= @@ -272,8 +274,6 @@ github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+ github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= -github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1 h1:3y9WsXkZ5lxFrmfH7DQHs/q308lylKId5l/3VC0QAdM= -github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1/go.mod h1:kC0qmVPUaVkFqGiZMNhmRmjdphuUmeyLEdlWFOQzFWI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= diff --git a/pkg/loop/internal/median.go b/pkg/loop/internal/median.go index 3f306ddf7..66aca763b 100644 --- a/pkg/loop/internal/median.go +++ b/pkg/loop/internal/median.go @@ -38,7 +38,7 @@ func NewPluginMedianClient(broker Broker, brokerCfg BrokerConfig, conn *grpc.Cli return &PluginMedianClient{PluginClient: pc, median: pb.NewPluginMedianClient(pc), ServiceClient: NewServiceClient(pc.BrokerExt, pc)} } -func (m *PluginMedianClient) NewMedianFactory(ctx context.Context, provider types.MedianProvider, dataSource, juelsPerFeeCoin median.DataSource, errorLog types.ErrorLog) (types.ReportingPluginFactory, error) { +func (m *PluginMedianClient) NewMedianFactory(ctx context.Context, provider types.MedianProvider, dataSource, juelsPerFeeCoin, gasPrice median.DataSource, errorLog types.ErrorLog) (types.ReportingPluginFactory, error) { cc := m.NewClientConn("MedianPluginFactory", func(ctx context.Context) (id uint32, deps Resources, err error) { dataSourceID, dsRes, err := m.ServeNew("DataSource", func(s *grpc.Server) { pb.RegisterDataSourceServer(s, median_internal.NewDataSourceServer(dataSource)) @@ -56,6 +56,14 @@ func (m *PluginMedianClient) NewMedianFactory(ctx context.Context, provider type } deps.Add(juelsPerFeeCoinDataSourceRes) + gasPriceDataSourceID, gasPriceDataSourceRes, err := m.ServeNew("GasPriceDataSource", func(s *grpc.Server) { + pb.RegisterDataSourceServer(s, median_internal.NewDataSourceServer(gasPrice)) + }) + if err != nil { + return 0, nil, err + } + deps.Add(gasPriceDataSourceRes) + var ( providerID uint32 providerRes Resource @@ -98,6 +106,7 @@ func (m *PluginMedianClient) NewMedianFactory(ctx context.Context, provider type MedianProviderID: providerID, DataSourceID: dataSourceID, JuelsPerFeeCoinDataSourceID: juelsPerFeeCoinDataSourceID, + GasPriceDataSourceID: gasPriceDataSourceID, ErrorLogID: errorLogID, }) if err != nil { @@ -142,9 +151,17 @@ func (m *pluginMedianServer) NewMedianFactory(ctx context.Context, request *pb.N juelsRes := Resource{juelsConn, "JuelsPerFeeCoinDataSource"} juelsPerFeeCoin := median_internal.NewDataSourceClient(juelsConn) - providerConn, err := m.Dial(request.MedianProviderID) + gasPriceConn, err := m.Dial(request.GasPriceDataSourceID) if err != nil { m.CloseAll(dsRes, juelsRes) + return nil, ErrConnDial{Name: "GasPriceDataSource", ID: request.GasPriceDataSourceID, Err: err} + } + gasPriceRes := Resource{gasPriceConn, "GasPriceDataSource"} + gasPrice := median_internal.NewDataSourceClient(gasPriceConn) + + providerConn, err := m.Dial(request.MedianProviderID) + if err != nil { + m.CloseAll(dsRes, juelsRes, gasPriceRes) return nil, ErrConnDial{Name: "MedianProvider", ID: request.MedianProviderID, Err: err} } providerRes := Resource{providerConn, "MedianProvider"} @@ -152,15 +169,15 @@ func (m *pluginMedianServer) NewMedianFactory(ctx context.Context, request *pb.N errorLogConn, err := m.Dial(request.ErrorLogID) if err != nil { - m.CloseAll(dsRes, juelsRes, providerRes) + m.CloseAll(dsRes, juelsRes, gasPriceRes, providerRes) return nil, ErrConnDial{Name: "ErrorLog", ID: request.ErrorLogID, Err: err} } errorLogRes := Resource{errorLogConn, "ErrorLog"} errorLog := NewErrorLogClient(errorLogConn) - factory, err := m.impl.NewMedianFactory(ctx, provider, dataSource, juelsPerFeeCoin, errorLog) + factory, err := m.impl.NewMedianFactory(ctx, provider, dataSource, juelsPerFeeCoin, gasPrice, errorLog) if err != nil { - m.CloseAll(dsRes, juelsRes, providerRes, errorLogRes) + m.CloseAll(dsRes, juelsRes, gasPriceRes, providerRes, errorLogRes) return nil, err } @@ -251,6 +268,7 @@ func (r *reportCodecClient) BuildReport(observations []median.ParsedAttributedOb Value: pb.NewBigIntFromInt(o.Value), JulesPerFeeCoin: pb.NewBigIntFromInt(o.JuelsPerFeeCoin), Observer: uint32(o.Observer), + GasPrice: pb.NewBigIntFromInt(o.GasPrice), }) } var reply *pb.BuildReportReply diff --git a/pkg/loop/internal/median/datasource.go b/pkg/loop/internal/median/datasource.go index 4ba6fa16e..c21db607f 100644 --- a/pkg/loop/internal/median/datasource.go +++ b/pkg/loop/internal/median/datasource.go @@ -26,9 +26,11 @@ func (d *DataSourceClient) Observe(ctx context.Context, timestamp types.ReportTi reply, err := d.grpc.Observe(ctx, &pb.ObserveRequest{ ReportTimestamp: pb.ReportTimestampToPb(timestamp), }) + if err != nil { return nil, err } + return reply.Value.Int(), nil } @@ -50,6 +52,7 @@ func (d *DataSourceServer) Observe(ctx context.Context, request *pb.ObserveReque return nil, err } val, err := d.impl.Observe(ctx, timestamp) + if err != nil { return nil, err } diff --git a/pkg/loop/internal/pb/median.pb.go b/pkg/loop/internal/pb/median.pb.go index d90a86a54..105a078ea 100644 --- a/pkg/loop/internal/pb/median.pb.go +++ b/pkg/loop/internal/pb/median.pb.go @@ -32,6 +32,7 @@ type NewMedianFactoryRequest struct { DataSourceID uint32 `protobuf:"varint,2,opt,name=dataSourceID,proto3" json:"dataSourceID,omitempty"` JuelsPerFeeCoinDataSourceID uint32 `protobuf:"varint,3,opt,name=juelsPerFeeCoinDataSourceID,proto3" json:"juelsPerFeeCoinDataSourceID,omitempty"` ErrorLogID uint32 `protobuf:"varint,4,opt,name=errorLogID,proto3" json:"errorLogID,omitempty"` + GasPriceDataSourceID uint32 `protobuf:"varint,5,opt,name=gasPriceDataSourceID,proto3" json:"gasPriceDataSourceID,omitempty"` } func (x *NewMedianFactoryRequest) Reset() { @@ -94,7 +95,14 @@ func (x *NewMedianFactoryRequest) GetErrorLogID() uint32 { return 0 } -// NewMedianFactoryRequest has return arguments for [github.com/smartcontractkit/chainlink-common/pkg/loop.Relayer.NewMedianFactory]. +func (x *NewMedianFactoryRequest) GetGasPriceDataSourceID() uint32 { + if x != nil { + return x.GasPriceDataSourceID + } + return 0 +} + +// NewMedianFactoryRequest has return arguments for [github.com/smartcontractkit/chainlink-relay/pkg/loop.Relayer.NewMedianFactory]. type NewMedianFactoryReply struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -200,6 +208,7 @@ type ParsedAttributedObservation struct { Value *BigInt `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` JulesPerFeeCoin *BigInt `protobuf:"bytes,3,opt,name=julesPerFeeCoin,proto3" json:"julesPerFeeCoin,omitempty"` Observer uint32 `protobuf:"varint,4,opt,name=observer,proto3" json:"observer,omitempty"` // uint8 + GasPrice *BigInt `protobuf:"bytes,5,opt,name=gasPrice,proto3" json:"gasPrice,omitempty"` } func (x *ParsedAttributedObservation) Reset() { @@ -262,6 +271,13 @@ func (x *ParsedAttributedObservation) GetObserver() uint32 { return 0 } +func (x *ParsedAttributedObservation) GetGasPrice() *BigInt { + if x != nil { + return x.GasPrice + } + return nil +} + // BuildReportRequest has arguments for [github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median.ReportCodec.BuildReport]. type BuildReportRequest struct { state protoimpl.MessageState @@ -1037,7 +1053,7 @@ var file_median_proto_rawDesc = []byte{ 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xcb, 0x01, 0x0a, 0x17, 0x4e, 0x65, 0x77, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, + 0x6f, 0x22, 0xff, 0x01, 0x0a, 0x17, 0x4e, 0x65, 0x77, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x50, @@ -1049,148 +1065,153 @@ var file_median_proto_rawDesc = []byte{ 0x28, 0x0d, 0x52, 0x1b, 0x6a, 0x75, 0x65, 0x6c, 0x73, 0x50, 0x65, 0x72, 0x46, 0x65, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x49, 0x44, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x49, 0x44, 0x22, - 0x53, 0x0a, 0x15, 0x4e, 0x65, 0x77, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3a, 0x0a, 0x18, 0x72, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x79, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x72, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x79, 0x49, 0x44, 0x22, 0x2c, 0x0a, 0x10, 0x53, 0x61, 0x76, 0x65, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x22, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x0f, 0x6a, 0x75, 0x6c, 0x65, 0x73, 0x50, 0x65, 0x72, - 0x46, 0x65, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x0f, 0x6a, 0x75, 0x6c, - 0x65, 0x73, 0x50, 0x65, 0x72, 0x46, 0x65, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, - 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, - 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x5b, 0x0a, 0x12, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, - 0x0a, 0x0c, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x50, 0x61, 0x72, 0x73, - 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x4f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2a, 0x0a, 0x10, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x22, 0x31, 0x0a, 0x17, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x22, 0x3d, 0x0a, 0x15, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x72, - 0x6f, 0x6d, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, - 0x06, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x6e, 0x22, 0x26, 0x0a, 0x16, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0c, 0x0a, - 0x01, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x6e, 0x22, 0x28, 0x0a, 0x14, 0x4d, - 0x61, 0x78, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x03, 0x6d, 0x61, 0x78, 0x22, 0x22, 0x0a, 0x20, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xe8, 0x01, 0x0a, 0x1e, 0x4c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x22, 0x0a, 0x0c, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x30, 0x0a, 0x0c, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, - 0x52, 0x0c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x44, - 0x0a, 0x0f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0x39, 0x0a, 0x1b, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x6f, - 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x22, - 0x6b, 0x0a, 0x19, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x22, 0x0a, 0x0c, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x4f, 0x0a, 0x0d, - 0x4f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x0a, - 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, 0x1e, 0x0a, - 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x22, 0x4a, 0x0a, - 0x0d, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, - 0x0a, 0x0d, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4f, 0x6e, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x6f, 0x6e, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x27, 0x0a, 0x0b, 0x45, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, - 0x64, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, - 0x65, 0x64, 0x22, 0x29, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x22, 0x48, 0x0a, - 0x0b, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x39, 0x0a, 0x0d, + 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x49, 0x44, 0x12, + 0x32, 0x0a, 0x14, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x67, + 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x49, 0x44, 0x22, 0x53, 0x0a, 0x15, 0x4e, 0x65, 0x77, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, + 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3a, 0x0a, 0x18, + 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, + 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x46, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x44, 0x22, 0x2c, 0x0a, 0x10, 0x53, 0x61, 0x76, 0x65, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xdd, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x72, 0x73, 0x65, + 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x22, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, + 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x0f, 0x6a, 0x75, 0x6c, 0x65, + 0x73, 0x50, 0x65, 0x72, 0x46, 0x65, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, + 0x0f, 0x6a, 0x75, 0x6c, 0x65, 0x73, 0x50, 0x65, 0x72, 0x46, 0x65, 0x65, 0x43, 0x6f, 0x69, 0x6e, + 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x08, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x08, + 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x08, 0x67, 0x61, + 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x5b, 0x0a, 0x12, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x0c, + 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x2a, 0x0a, 0x10, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, + 0x31, 0x0a, 0x17, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x22, 0x3d, 0x0a, 0x15, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x72, 0x6f, 0x6d, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x06, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x6e, 0x22, 0x26, 0x0a, 0x16, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x6e, 0x22, 0x28, 0x0a, 0x14, 0x4d, 0x61, 0x78, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, + 0x6d, 0x61, 0x78, 0x22, 0x22, 0x0a, 0x20, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xe8, 0x01, 0x0a, 0x1e, 0x4c, 0x61, 0x74, 0x65, + 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x30, 0x0a, 0x0c, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x0c, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0f, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x22, 0x39, 0x0a, 0x1b, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x22, 0x6b, 0x0a, + 0x19, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x4f, 0x0a, 0x0d, 0x4f, 0x6e, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x0a, 0x03, 0x6d, + 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x03, 0x6d, + 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x22, 0x4a, 0x0a, 0x0d, 0x45, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0d, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0x60, 0x0a, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x50, 0x0a, 0x10, 0x4e, 0x65, 0x77, 0x4d, 0x65, - 0x64, 0x69, 0x61, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x49, 0x0a, 0x08, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x12, 0x3d, 0x0a, 0x09, 0x53, 0x61, 0x76, 0x65, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x00, 0x32, 0xf1, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, - 0x6f, 0x64, 0x65, 0x63, 0x12, 0x41, 0x0a, 0x0b, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x10, 0x4d, 0x65, 0x64, 0x69, 0x61, - 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0f, 0x4d, 0x61, 0x78, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1c, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x2e, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x27, 0x0a, 0x0b, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, + 0x22, 0x29, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x22, 0x48, 0x0a, 0x0b, 0x44, + 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x39, 0x0a, 0x0d, 0x6f, 0x6e, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0x60, 0x0a, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4d, + 0x65, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x50, 0x0a, 0x10, 0x4e, 0x65, 0x77, 0x4d, 0x65, 0x64, 0x69, + 0x61, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x4e, 0x65, 0x77, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x4e, 0x65, 0x77, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x49, 0x0a, 0x08, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x4c, 0x6f, 0x67, 0x12, 0x3d, 0x0a, 0x09, 0x53, 0x61, 0x76, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x00, 0x32, 0xf1, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x64, + 0x65, 0x63, 0x12, 0x41, 0x0a, 0x0b, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x10, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, + 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0f, 0x4d, 0x61, 0x78, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xdb, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x64, - 0x69, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x6b, 0x0a, 0x19, 0x4c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, - 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x14, 0x4c, 0x61, 0x74, 0x65, - 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, - 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x6f, - 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, - 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x7c, 0x0a, 0x12, 0x4f, 0x6e, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x32, 0x0a, 0x06, - 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x45, 0x6e, - 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, - 0x12, 0x32, 0x0a, 0x06, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x6b, 0x69, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x2d, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xdb, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x64, 0x69, 0x61, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x6b, 0x0a, 0x19, 0x4c, 0x61, 0x74, + 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x14, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, + 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x21, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, + 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x00, 0x32, 0x7c, 0x0a, 0x12, 0x4f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x32, 0x0a, 0x06, 0x45, 0x6e, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x45, 0x6e, 0x63, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x32, + 0x0a, 0x06, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x00, 0x42, 0x42, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6b, 0x69, + 0x74, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x2d, 0x72, 0x65, 0x6c, 0x61, + 0x79, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1233,37 +1254,38 @@ var file_median_proto_goTypes = []interface{}{ var file_median_proto_depIdxs = []int32{ 19, // 0: loop.ParsedAttributedObservation.value:type_name -> loop.BigInt 19, // 1: loop.ParsedAttributedObservation.julesPerFeeCoin:type_name -> loop.BigInt - 3, // 2: loop.BuildReportRequest.observations:type_name -> loop.ParsedAttributedObservation - 19, // 3: loop.MedianFromReportReply.median:type_name -> loop.BigInt - 19, // 4: loop.LatestTransmissionDetailsReply.latestAnswer:type_name -> loop.BigInt - 20, // 5: loop.LatestTransmissionDetailsReply.latestTimestamp:type_name -> google.protobuf.Timestamp - 19, // 6: loop.OnchainConfig.min:type_name -> loop.BigInt - 19, // 7: loop.OnchainConfig.max:type_name -> loop.BigInt - 14, // 8: loop.EncodeRequest.onchainConfig:type_name -> loop.OnchainConfig - 14, // 9: loop.DecodeReply.onchainConfig:type_name -> loop.OnchainConfig - 0, // 10: loop.PluginMedian.NewMedianFactory:input_type -> loop.NewMedianFactoryRequest - 2, // 11: loop.ErrorLog.SaveError:input_type -> loop.SaveErrorRequest - 4, // 12: loop.ReportCodec.BuildReport:input_type -> loop.BuildReportRequest - 6, // 13: loop.ReportCodec.MedianFromReport:input_type -> loop.MedianFromReportRequest - 8, // 14: loop.ReportCodec.MaxReportLength:input_type -> loop.MaxReportLengthRequest - 10, // 15: loop.MedianContract.LatestTransmissionDetails:input_type -> loop.LatestTransmissionDetailsRequest - 12, // 16: loop.MedianContract.LatestRoundRequested:input_type -> loop.LatestRoundRequestedRequest - 15, // 17: loop.OnchainConfigCodec.Encode:input_type -> loop.EncodeRequest - 17, // 18: loop.OnchainConfigCodec.Decode:input_type -> loop.DecodeRequest - 1, // 19: loop.PluginMedian.NewMedianFactory:output_type -> loop.NewMedianFactoryReply - 21, // 20: loop.ErrorLog.SaveError:output_type -> google.protobuf.Empty - 5, // 21: loop.ReportCodec.BuildReport:output_type -> loop.BuildReportReply - 7, // 22: loop.ReportCodec.MedianFromReport:output_type -> loop.MedianFromReportReply - 9, // 23: loop.ReportCodec.MaxReportLength:output_type -> loop.MaxReportLengthReply - 11, // 24: loop.MedianContract.LatestTransmissionDetails:output_type -> loop.LatestTransmissionDetailsReply - 13, // 25: loop.MedianContract.LatestRoundRequested:output_type -> loop.LatestRoundRequestedReply - 16, // 26: loop.OnchainConfigCodec.Encode:output_type -> loop.EncodeReply - 18, // 27: loop.OnchainConfigCodec.Decode:output_type -> loop.DecodeReply - 19, // [19:28] is the sub-list for method output_type - 10, // [10:19] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 19, // 2: loop.ParsedAttributedObservation.gasPrice:type_name -> loop.BigInt + 3, // 3: loop.BuildReportRequest.observations:type_name -> loop.ParsedAttributedObservation + 19, // 4: loop.MedianFromReportReply.median:type_name -> loop.BigInt + 19, // 5: loop.LatestTransmissionDetailsReply.latestAnswer:type_name -> loop.BigInt + 20, // 6: loop.LatestTransmissionDetailsReply.latestTimestamp:type_name -> google.protobuf.Timestamp + 19, // 7: loop.OnchainConfig.min:type_name -> loop.BigInt + 19, // 8: loop.OnchainConfig.max:type_name -> loop.BigInt + 14, // 9: loop.EncodeRequest.onchainConfig:type_name -> loop.OnchainConfig + 14, // 10: loop.DecodeReply.onchainConfig:type_name -> loop.OnchainConfig + 0, // 11: loop.PluginMedian.NewMedianFactory:input_type -> loop.NewMedianFactoryRequest + 2, // 12: loop.ErrorLog.SaveError:input_type -> loop.SaveErrorRequest + 4, // 13: loop.ReportCodec.BuildReport:input_type -> loop.BuildReportRequest + 6, // 14: loop.ReportCodec.MedianFromReport:input_type -> loop.MedianFromReportRequest + 8, // 15: loop.ReportCodec.MaxReportLength:input_type -> loop.MaxReportLengthRequest + 10, // 16: loop.MedianContract.LatestTransmissionDetails:input_type -> loop.LatestTransmissionDetailsRequest + 12, // 17: loop.MedianContract.LatestRoundRequested:input_type -> loop.LatestRoundRequestedRequest + 15, // 18: loop.OnchainConfigCodec.Encode:input_type -> loop.EncodeRequest + 17, // 19: loop.OnchainConfigCodec.Decode:input_type -> loop.DecodeRequest + 1, // 20: loop.PluginMedian.NewMedianFactory:output_type -> loop.NewMedianFactoryReply + 21, // 21: loop.ErrorLog.SaveError:output_type -> google.protobuf.Empty + 5, // 22: loop.ReportCodec.BuildReport:output_type -> loop.BuildReportReply + 7, // 23: loop.ReportCodec.MedianFromReport:output_type -> loop.MedianFromReportReply + 9, // 24: loop.ReportCodec.MaxReportLength:output_type -> loop.MaxReportLengthReply + 11, // 25: loop.MedianContract.LatestTransmissionDetails:output_type -> loop.LatestTransmissionDetailsReply + 13, // 26: loop.MedianContract.LatestRoundRequested:output_type -> loop.LatestRoundRequestedReply + 16, // 27: loop.OnchainConfigCodec.Encode:output_type -> loop.EncodeReply + 18, // 28: loop.OnchainConfigCodec.Decode:output_type -> loop.DecodeReply + 20, // [20:29] is the sub-list for method output_type + 11, // [11:20] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_median_proto_init() } diff --git a/pkg/loop/internal/pb/median.proto b/pkg/loop/internal/pb/median.proto index 3ddda6c70..5028e00a2 100644 --- a/pkg/loop/internal/pb/median.proto +++ b/pkg/loop/internal/pb/median.proto @@ -18,6 +18,7 @@ message NewMedianFactoryRequest { uint32 dataSourceID = 2; uint32 juelsPerFeeCoinDataSourceID = 3; uint32 errorLogID = 4; + uint32 gasPriceDataSourceID = 5; } // NewMedianFactoryRequest has return arguments for [github.com/smartcontractkit/chainlink-common/pkg/loop.Relayer.NewMedianFactory]. @@ -47,6 +48,7 @@ message ParsedAttributedObservation { BigInt value = 2; BigInt julesPerFeeCoin = 3; uint32 observer = 4; // uint8 + BigInt gasPrice = 5; } // BuildReportRequest has arguments for [github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median.ReportCodec.BuildReport]. diff --git a/pkg/loop/internal/test/datasource.go b/pkg/loop/internal/test/datasource.go index e62a989be..a108e1128 100644 --- a/pkg/loop/internal/test/datasource.go +++ b/pkg/loop/internal/test/datasource.go @@ -19,9 +19,18 @@ func StaticDataSource() median.DataSource { return &staticDataSource{value} } func StaticJuelsPerFeeCoinDataSource() median.DataSource { return &staticDataSource{juelsPerFeeCoin} } +func StaticGasPriceDataSource() median.DataSource { return &staticDataSource{gasPrice} } + func (s *staticDataSource) Observe(ctx context.Context, timestamp types.ReportTimestamp) (*big.Int, error) { if timestamp != reportContext.ReportTimestamp { return nil, fmt.Errorf("expected %v but got %v", reportContext.ReportTimestamp, timestamp) } return s.value, nil } + +type NOOPDataSource struct { +} + +func (s *NOOPDataSource) Observe(ctx context.Context, _ types.ReportTimestamp) (*big.Int, error) { + return big.NewInt(0), nil +} diff --git a/pkg/loop/internal/test/median.go b/pkg/loop/internal/test/median.go index 3e14d213e..8688997f6 100644 --- a/pkg/loop/internal/test/median.go +++ b/pkg/loop/internal/test/median.go @@ -29,9 +29,17 @@ type PluginMedianTest struct { } func (m PluginMedianTest) TestPluginMedian(t *testing.T, p types.PluginMedian) { + t.Run("PluginMedian No-op GasPriceDataSource", func(t *testing.T) { + ctx := tests.Context(t) + factory, err := p.NewMedianFactory(ctx, m.MedianProvider, &staticDataSource{value}, &staticDataSource{juelsPerFeeCoin}, &NOOPDataSource{}, &StaticErrorLog{}) + require.NoError(t, err) + + ReportingPluginFactory(t, factory) + }) + t.Run("PluginMedian", func(t *testing.T) { ctx := tests.Context(t) - factory, err := p.NewMedianFactory(ctx, m.MedianProvider, &staticDataSource{value}, &staticDataSource{juelsPerFeeCoin}, &StaticErrorLog{}) + factory, err := p.NewMedianFactory(ctx, m.MedianProvider, &staticDataSource{value}, &staticDataSource{juelsPerFeeCoin}, &staticDataSource{gasPrice}, &StaticErrorLog{}) require.NoError(t, err) ReportingPluginFactory(t, factory) @@ -111,7 +119,7 @@ func OCR3ReportingPluginFactory(t *testing.T, factory types.OCR3ReportingPluginF type StaticPluginMedian struct{} -func (s StaticPluginMedian) NewMedianFactory(ctx context.Context, provider types.MedianProvider, dataSource, juelsPerFeeCoinDataSource median.DataSource, errorLog types.ErrorLog) (types.ReportingPluginFactory, error) { +func (s StaticPluginMedian) NewMedianFactory(ctx context.Context, provider types.MedianProvider, dataSource, juelsPerFeeCoinDataSource, gasPriceDataSource median.DataSource, errorLog types.ErrorLog) (types.ReportingPluginFactory, error) { cr := provider.ChainReader() var gotLatestValue map[string]int @@ -270,6 +278,13 @@ func (s StaticPluginMedian) NewMedianFactory(ctx context.Context, provider types if !assert.ObjectsAreEqual(juelsPerFeeCoin, gotJuels) { return nil, fmt.Errorf("expected JuelsPerFeeCoin %s but got %s", juelsPerFeeCoin, gotJuels) } + gotGas, err := gasPriceDataSource.Observe(ctx, reportContext.ReportTimestamp) + if err != nil { + return nil, fmt.Errorf("failed to observe GasPriceSubUnitDataSource: %w", err) + } + if !assert.ObjectsAreEqual(gasPrice, gotGas) { + return nil, fmt.Errorf("expected GasPriceSubUnitDataSource %s but got %s", gasPrice, gotGas) + } if err := errorLog.SaveError(ctx, errMsg); err != nil { return nil, fmt.Errorf("failed to save error: %w", err) } diff --git a/pkg/loop/internal/test/test.go b/pkg/loop/internal/test/test.go index 359204a87..a8f131d0a 100644 --- a/pkg/loop/internal/test/test.go +++ b/pkg/loop/internal/test/test.go @@ -66,6 +66,7 @@ var ( } encoded = []byte{5: 11} juelsPerFeeCoin = big.NewInt(1234) + gasPrice = big.NewInt(777) onchainConfig = median.OnchainConfig{Min: big.NewInt(-12), Max: big.NewInt(1234567890987654321)} latestAnswer = big.NewInt(-66) latestTimestamp = time.Unix(1234567890, 987654321).UTC() diff --git a/pkg/loop/median_service.go b/pkg/loop/median_service.go index bdeecb936..3e1f97b4d 100644 --- a/pkg/loop/median_service.go +++ b/pkg/loop/median_service.go @@ -22,13 +22,13 @@ type MedianService struct { // NewMedianService returns a new [*MedianService]. // cmd must return a new exec.Cmd each time it is called. -func NewMedianService(lggr logger.Logger, grpcOpts GRPCOpts, cmd func() *exec.Cmd, provider types.MedianProvider, dataSource, juelsPerFeeCoin median.DataSource, errorLog types.ErrorLog) *MedianService { +func NewMedianService(lggr logger.Logger, grpcOpts GRPCOpts, cmd func() *exec.Cmd, provider types.MedianProvider, dataSource, juelsPerFeeCoin, gasPrice median.DataSource, errorLog types.ErrorLog) *MedianService { newService := func(ctx context.Context, instance any) (types.ReportingPluginFactory, error) { plug, ok := instance.(types.PluginMedian) if !ok { return nil, fmt.Errorf("expected PluginMedian but got %T", instance) } - return plug.NewMedianFactory(ctx, provider, dataSource, juelsPerFeeCoin, errorLog) + return plug.NewMedianFactory(ctx, provider, dataSource, juelsPerFeeCoin, gasPrice, errorLog) } stopCh := make(chan struct{}) lggr = logger.Named(lggr, "MedianService") diff --git a/pkg/loop/median_service_test.go b/pkg/loop/median_service_test.go index 9819eace7..e115e2f36 100644 --- a/pkg/loop/median_service_test.go +++ b/pkg/loop/median_service_test.go @@ -15,10 +15,9 @@ import ( func TestMedianService(t *testing.T) { t.Parallel() - median := loop.NewMedianService(logger.Test(t), loop.GRPCOpts{}, func() *exec.Cmd { return NewHelperProcessCommand(loop.PluginMedianName, false) - }, test.StaticMedianProvider{}, test.StaticDataSource(), test.StaticJuelsPerFeeCoinDataSource(), &test.StaticErrorLog{}) + }, test.StaticMedianProvider{}, test.StaticDataSource(), test.StaticJuelsPerFeeCoinDataSource(), test.StaticGasPriceDataSource(), &test.StaticErrorLog{}) hook := median.PluginService.XXXTestHook() servicetest.Run(t, median) @@ -54,7 +53,7 @@ func TestMedianService_recovery(t *testing.T) { Limit: int(limit.Add(1)), } return h.New() - }, test.StaticMedianProvider{}, test.StaticDataSource(), test.StaticJuelsPerFeeCoinDataSource(), &test.StaticErrorLog{}) + }, test.StaticMedianProvider{}, test.StaticDataSource(), test.StaticJuelsPerFeeCoinDataSource(), test.StaticGasPriceDataSource(), &test.StaticErrorLog{}) servicetest.Run(t, median) test.ReportingPluginFactory(t, median) diff --git a/pkg/types/provider_median.go b/pkg/types/provider_median.go index 0da99592b..09eefcd00 100644 --- a/pkg/types/provider_median.go +++ b/pkg/types/provider_median.go @@ -16,5 +16,5 @@ type MedianProvider interface { type PluginMedian interface { // NewMedianFactory returns a new ReportingPluginFactory. If provider implements GRPCClientConn, it can be forwarded efficiently via proxy. - NewMedianFactory(ctx context.Context, provider MedianProvider, dataSource, juelsPerFeeCoin median.DataSource, errorLog ErrorLog) (ReportingPluginFactory, error) + NewMedianFactory(ctx context.Context, provider MedianProvider, dataSource, juelsPerFeeCoin, gasPrice median.DataSource, errorLog ErrorLog) (ReportingPluginFactory, error) }