From c429772fe86fcb0230590283ae77a218af4f6299 Mon Sep 17 00:00:00 2001 From: Margaret Ma Date: Thu, 6 Jun 2024 18:26:35 -0400 Subject: [PATCH] Add account address pub key to fms chain config for Starknet (#13421) * add account address pub key to fms chain config for starknet * Update core/web/resolver/feeds_manager_chain_config.go Co-authored-by: Chris De Leon <147140544+chris-de-leon-cll@users.noreply.github.com> --------- Co-authored-by: Chris De Leon <147140544+chris-de-leon-cll@users.noreply.github.com> --- .changeset/olive-experts-matter.md | 5 + core/services/feeds/models.go | 30 +- core/services/feeds/models_test.go | 5 + core/services/feeds/orm.go | 22 +- core/services/feeds/orm_test.go | 125 ++++---- core/services/feeds/proto/feeds_manager.pb.go | 274 ++++++++++-------- core/services/feeds/service.go | 10 +- core/services/feeds/service_test.go | 50 ++-- ...account_public_key_to_fms_chain_config.sql | 11 + .../resolver/feeds_manager_chain_config.go | 5 + .../feeds_manager_chain_config_test.go | 68 +++-- core/web/resolver/mutation.go | 10 + core/web/schema/type/feeds_manager.graphql | 3 + 13 files changed, 358 insertions(+), 260 deletions(-) create mode 100644 .changeset/olive-experts-matter.md create mode 100644 core/store/migrate/migrations/0242_add_account_public_key_to_fms_chain_config.sql diff --git a/.changeset/olive-experts-matter.md b/.changeset/olive-experts-matter.md new file mode 100644 index 00000000000..cb212f638f4 --- /dev/null +++ b/.changeset/olive-experts-matter.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#db_update Add account_address_public_key to feeds_manager_chain_configs diff --git a/core/services/feeds/models.go b/core/services/feeds/models.go index ac0568ca131..3fedc98d0f1 100644 --- a/core/services/feeds/models.go +++ b/core/services/feeds/models.go @@ -76,14 +76,17 @@ func (p *Plugins) Scan(value interface{}) error { type ChainType string const ( - ChainTypeUnknown ChainType = "UNKNOWN" - ChainTypeEVM ChainType = "EVM" + ChainTypeUnknown ChainType = "UNKNOWN" + ChainTypeEVM ChainType = "EVM" + ChainTypeStarknet ChainType = "STARKNET" ) func NewChainType(s string) (ChainType, error) { switch s { case "EVM": return ChainTypeEVM, nil + case "STARKNET": + return ChainTypeStarknet, nil default: return ChainTypeUnknown, errors.New("invalid chain type") } @@ -103,17 +106,18 @@ type FeedsManager struct { // ChainConfig defines the chain configuration for a Feeds Manager. type ChainConfig struct { - ID int64 - FeedsManagerID int64 - ChainID string - ChainType ChainType - AccountAddress string - AdminAddress string - FluxMonitorConfig FluxMonitorConfig - OCR1Config OCR1Config - OCR2Config OCR2ConfigModel - CreatedAt time.Time - UpdatedAt time.Time + ID int64 + FeedsManagerID int64 + ChainID string + ChainType ChainType + AccountAddress string + AccountAddressPublicKey null.String + AdminAddress string + FluxMonitorConfig FluxMonitorConfig + OCR1Config OCR1Config + OCR2Config OCR2ConfigModel + CreatedAt time.Time + UpdatedAt time.Time } // FluxMonitorConfig defines configuration for FluxMonitorJobs. diff --git a/core/services/feeds/models_test.go b/core/services/feeds/models_test.go index 9e3bb0f9f1c..13567281735 100644 --- a/core/services/feeds/models_test.go +++ b/core/services/feeds/models_test.go @@ -23,6 +23,11 @@ func Test_NewChainType(t *testing.T) { give: "EVM", want: ChainTypeEVM, }, + { + name: "Starknet Chain Type", + give: "STARKNET", + want: ChainTypeStarknet, + }, { name: "Invalid Chain Type", give: "", diff --git a/core/services/feeds/orm.go b/core/services/feeds/orm.go index bf77051dad7..23d7044879e 100644 --- a/core/services/feeds/orm.go +++ b/core/services/feeds/orm.go @@ -101,8 +101,8 @@ RETURNING id; // CreateChainConfig creates a new chain config. func (o *orm) CreateChainConfig(ctx context.Context, cfg ChainConfig) (id int64, err error) { stmt := ` -INSERT INTO feeds_manager_chain_configs (feeds_manager_id, chain_id, chain_type, account_address, admin_address, flux_monitor_config, ocr1_config, ocr2_config, created_at, updated_at) -VALUES ($1,$2,$3,$4,$5,$6,$7,$8,NOW(),NOW()) +INSERT INTO feeds_manager_chain_configs (feeds_manager_id, chain_id, chain_type, account_address, account_address_public_key, admin_address, flux_monitor_config, ocr1_config, ocr2_config, created_at, updated_at) +VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,NOW(),NOW()) RETURNING id; ` @@ -113,6 +113,7 @@ RETURNING id; cfg.ChainID, cfg.ChainType, cfg.AccountAddress, + cfg.AccountAddressPublicKey, cfg.AdminAddress, cfg.FluxMonitorConfig, cfg.OCR1Config, @@ -129,7 +130,7 @@ func (o *orm) CreateBatchChainConfig(ctx context.Context, cfgs []ChainConfig) (i } stmt := ` -INSERT INTO feeds_manager_chain_configs (feeds_manager_id, chain_id, chain_type, account_address, admin_address, flux_monitor_config, ocr1_config, ocr2_config, created_at, updated_at) +INSERT INTO feeds_manager_chain_configs (feeds_manager_id, chain_id, chain_type, account_address, account_address_public_key, admin_address, flux_monitor_config, ocr1_config, ocr2_config, created_at, updated_at) VALUES %s RETURNING id; ` @@ -141,16 +142,16 @@ RETURNING id; for i, cfg := range cfgs { // Generate the placeholders - pnumidx := i * 8 + pnumidx := i * 9 - lo, hi := pnumidx+1, pnumidx+8 + lo, hi := pnumidx+1, pnumidx+9 pnums := make([]any, hi-lo+1) for i := range pnums { pnums[i] = i + lo } vStrs = append(vStrs, fmt.Sprintf( - "($%d, $%d, $%d, $%d, $%d, $%d, $%d, $%d, NOW(), NOW())", pnums..., + "($%d, $%d, $%d, $%d, $%d, $%d, $%d, $%d, $%d, NOW(), NOW())", pnums..., )) // Append the values @@ -159,6 +160,7 @@ RETURNING id; cfg.ChainID, cfg.ChainType, cfg.AccountAddress, + cfg.AccountAddressPublicKey, cfg.AdminAddress, cfg.FluxMonitorConfig, cfg.OCR1Config, @@ -192,7 +194,7 @@ RETURNING id; // GetChainConfig fetches a chain config. func (o *orm) GetChainConfig(ctx context.Context, id int64) (*ChainConfig, error) { stmt := ` -SELECT id, feeds_manager_id, chain_id, chain_type, account_address, admin_address, flux_monitor_config, ocr1_config, ocr2_config, created_at, updated_at +SELECT id, feeds_manager_id, chain_id, chain_type, account_address, account_address_public_key, admin_address, flux_monitor_config, ocr1_config, ocr2_config, created_at, updated_at FROM feeds_manager_chain_configs WHERE id = $1; ` @@ -207,7 +209,7 @@ WHERE id = $1; // ids. func (o *orm) ListChainConfigsByManagerIDs(ctx context.Context, mgrIDs []int64) ([]ChainConfig, error) { stmt := ` -SELECT id, feeds_manager_id, chain_id, chain_type, account_address, admin_address, flux_monitor_config, ocr1_config, ocr2_config, created_at, updated_at +SELECT id, feeds_manager_id, chain_id, chain_type, account_address, account_address_public_key, admin_address, flux_monitor_config, ocr1_config, ocr2_config, created_at, updated_at FROM feeds_manager_chain_configs WHERE feeds_manager_id = ANY($1) ` @@ -227,8 +229,9 @@ SET account_address = $1, flux_monitor_config = $3, ocr1_config = $4, ocr2_config = $5, + account_address_public_key = $6, updated_at = NOW() -WHERE id = $6 +WHERE id = $7 RETURNING id; ` @@ -239,6 +242,7 @@ RETURNING id; cfg.FluxMonitorConfig, cfg.OCR1Config, cfg.OCR2Config, + cfg.AccountAddressPublicKey, cfg.ID, ) diff --git a/core/services/feeds/orm_test.go b/core/services/feeds/orm_test.go index df2624319f5..c4c9ced2ce3 100644 --- a/core/services/feeds/orm_test.go +++ b/core/services/feeds/orm_test.go @@ -206,11 +206,12 @@ func Test_ORM_CreateChainConfig(t *testing.T) { orm = setupORM(t) fmID = createFeedsManager(t, orm) cfg1 = feeds.ChainConfig{ - FeedsManagerID: fmID, - ChainID: "1", - ChainType: feeds.ChainTypeEVM, - AccountAddress: "0x0001", - AdminAddress: "0x1001", + FeedsManagerID: fmID, + ChainID: "1", + ChainType: feeds.ChainTypeEVM, + AccountAddress: "0x0001", + AdminAddress: "0x1001", + AccountAddressPublicKey: null.StringFrom("0x0002"), FluxMonitorConfig: feeds.FluxMonitorConfig{ Enabled: true, }, @@ -235,14 +236,15 @@ func Test_ORM_CreateChainConfig(t *testing.T) { require.NoError(t, err) assertChainConfigEqual(t, map[string]interface{}{ - "feedsManagerID": cfg1.FeedsManagerID, - "chainID": cfg1.ChainID, - "chainType": cfg1.ChainType, - "accountAddress": cfg1.AccountAddress, - "adminAddress": cfg1.AdminAddress, - "fluxMonitorConfig": cfg1.FluxMonitorConfig, - "ocrConfig": cfg1.OCR1Config, - "ocr2Config": cfg1.OCR2Config, + "feedsManagerID": cfg1.FeedsManagerID, + "chainID": cfg1.ChainID, + "chainType": cfg1.ChainType, + "accountAddress": cfg1.AccountAddress, + "accountAddressPublicKey": cfg1.AccountAddressPublicKey, + "adminAddress": cfg1.AdminAddress, + "fluxMonitorConfig": cfg1.FluxMonitorConfig, + "ocrConfig": cfg1.OCR1Config, + "ocr2Config": cfg1.OCR2Config, }, *actual) } @@ -254,11 +256,12 @@ func Test_ORM_CreateBatchChainConfig(t *testing.T) { orm = setupORM(t) fmID = createFeedsManager(t, orm) cfg1 = feeds.ChainConfig{ - FeedsManagerID: fmID, - ChainID: "1", - ChainType: feeds.ChainTypeEVM, - AccountAddress: "0x0001", - AdminAddress: "0x1001", + FeedsManagerID: fmID, + ChainID: "1", + ChainType: feeds.ChainTypeEVM, + AccountAddress: "0x0001", + AccountAddressPublicKey: null.StringFrom("0x0002"), + AdminAddress: "0x1001", } cfg2 = feeds.ChainConfig{ FeedsManagerID: fmID, @@ -278,14 +281,15 @@ func Test_ORM_CreateBatchChainConfig(t *testing.T) { require.NoError(t, err) assertChainConfigEqual(t, map[string]interface{}{ - "feedsManagerID": cfg1.FeedsManagerID, - "chainID": cfg1.ChainID, - "chainType": cfg1.ChainType, - "accountAddress": cfg1.AccountAddress, - "adminAddress": cfg1.AdminAddress, - "fluxMonitorConfig": cfg1.FluxMonitorConfig, - "ocrConfig": cfg1.OCR1Config, - "ocr2Config": cfg1.OCR2Config, + "feedsManagerID": cfg1.FeedsManagerID, + "chainID": cfg1.ChainID, + "chainType": cfg1.ChainType, + "accountAddress": cfg1.AccountAddress, + "accountAddressPublicKey": cfg1.AccountAddressPublicKey, + "adminAddress": cfg1.AdminAddress, + "fluxMonitorConfig": cfg1.FluxMonitorConfig, + "ocrConfig": cfg1.OCR1Config, + "ocr2Config": cfg1.OCR2Config, }, *actual) actual, err = orm.GetChainConfig(ctx, ids[1]) @@ -346,11 +350,12 @@ func Test_ORM_ListChainConfigsByManagerIDs(t *testing.T) { orm = setupORM(t) fmID = createFeedsManager(t, orm) cfg1 = feeds.ChainConfig{ - FeedsManagerID: fmID, - ChainID: "1", - ChainType: feeds.ChainTypeEVM, - AccountAddress: "0x0001", - AdminAddress: "0x1001", + FeedsManagerID: fmID, + ChainID: "1", + ChainType: feeds.ChainTypeEVM, + AccountAddress: "0x0001", + AccountAddressPublicKey: null.StringFrom("0x0002"), + AdminAddress: "0x1001", FluxMonitorConfig: feeds.FluxMonitorConfig{ Enabled: true, }, @@ -376,14 +381,15 @@ func Test_ORM_ListChainConfigsByManagerIDs(t *testing.T) { require.Len(t, actual, 1) assertChainConfigEqual(t, map[string]interface{}{ - "feedsManagerID": cfg1.FeedsManagerID, - "chainID": cfg1.ChainID, - "chainType": cfg1.ChainType, - "accountAddress": cfg1.AccountAddress, - "adminAddress": cfg1.AdminAddress, - "fluxMonitorConfig": cfg1.FluxMonitorConfig, - "ocrConfig": cfg1.OCR1Config, - "ocr2Config": cfg1.OCR2Config, + "feedsManagerID": cfg1.FeedsManagerID, + "chainID": cfg1.ChainID, + "chainType": cfg1.ChainType, + "accountAddress": cfg1.AccountAddress, + "accountAddressPublicKey": cfg1.AccountAddressPublicKey, + "adminAddress": cfg1.AdminAddress, + "fluxMonitorConfig": cfg1.FluxMonitorConfig, + "ocrConfig": cfg1.OCR1Config, + "ocr2Config": cfg1.OCR2Config, }, actual[0]) } @@ -395,19 +401,21 @@ func Test_ORM_UpdateChainConfig(t *testing.T) { orm = setupORM(t) fmID = createFeedsManager(t, orm) cfg1 = feeds.ChainConfig{ - FeedsManagerID: fmID, - ChainID: "1", - ChainType: feeds.ChainTypeEVM, - AccountAddress: "0x0001", - AdminAddress: "0x1001", - FluxMonitorConfig: feeds.FluxMonitorConfig{Enabled: false}, - OCR1Config: feeds.OCR1Config{Enabled: false}, - OCR2Config: feeds.OCR2ConfigModel{Enabled: false}, + FeedsManagerID: fmID, + ChainID: "1", + ChainType: feeds.ChainTypeEVM, + AccountAddress: "0x0001", + AccountAddressPublicKey: null.NewString("", false), + AdminAddress: "0x1001", + FluxMonitorConfig: feeds.FluxMonitorConfig{Enabled: false}, + OCR1Config: feeds.OCR1Config{Enabled: false}, + OCR2Config: feeds.OCR2ConfigModel{Enabled: false}, } updateCfg = feeds.ChainConfig{ - AccountAddress: "0x0002", - AdminAddress: "0x1002", - FluxMonitorConfig: feeds.FluxMonitorConfig{Enabled: true}, + AccountAddress: "0x0002", + AdminAddress: "0x1002", + AccountAddressPublicKey: null.StringFrom("0x0002"), + FluxMonitorConfig: feeds.FluxMonitorConfig{Enabled: true}, OCR1Config: feeds.OCR1Config{ Enabled: true, IsBootstrap: false, @@ -434,14 +442,15 @@ func Test_ORM_UpdateChainConfig(t *testing.T) { require.NoError(t, err) assertChainConfigEqual(t, map[string]interface{}{ - "feedsManagerID": cfg1.FeedsManagerID, - "chainID": cfg1.ChainID, - "chainType": cfg1.ChainType, - "accountAddress": updateCfg.AccountAddress, - "adminAddress": updateCfg.AdminAddress, - "fluxMonitorConfig": updateCfg.FluxMonitorConfig, - "ocrConfig": updateCfg.OCR1Config, - "ocr2Config": updateCfg.OCR2Config, + "feedsManagerID": cfg1.FeedsManagerID, + "chainID": cfg1.ChainID, + "chainType": cfg1.ChainType, + "accountAddress": updateCfg.AccountAddress, + "accountAddressPublicKey": updateCfg.AccountAddressPublicKey, + "adminAddress": updateCfg.AdminAddress, + "fluxMonitorConfig": updateCfg.FluxMonitorConfig, + "ocrConfig": updateCfg.OCR1Config, + "ocr2Config": updateCfg.OCR2Config, }, *actual) } diff --git a/core/services/feeds/proto/feeds_manager.pb.go b/core/services/feeds/proto/feeds_manager.pb.go index a73b4a0cd29..89f351a4270 100644 --- a/core/services/feeds/proto/feeds_manager.pb.go +++ b/core/services/feeds/proto/feeds_manager.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v3.21.7 +// protoc-gen-go v1.34.1 +// protoc v4.25.3 // source: pkg/noderpc/proto/feeds_manager.proto package proto @@ -79,6 +79,8 @@ const ( ChainType_CHAIN_TYPE_UNSPECIFIED ChainType = 0 ChainType_CHAIN_TYPE_EVM ChainType = 1 ChainType_CHAIN_TYPE_SOLANA ChainType = 2 + ChainType_CHAIN_TYPE_ZKSYNC ChainType = 3 + ChainType_CHAIN_TYPE_STARKNET ChainType = 4 ) // Enum value maps for ChainType. @@ -87,11 +89,15 @@ var ( 0: "CHAIN_TYPE_UNSPECIFIED", 1: "CHAIN_TYPE_EVM", 2: "CHAIN_TYPE_SOLANA", + 3: "CHAIN_TYPE_ZKSYNC", + 4: "CHAIN_TYPE_STARKNET", } ChainType_value = map[string]int32{ "CHAIN_TYPE_UNSPECIFIED": 0, "CHAIN_TYPE_EVM": 1, "CHAIN_TYPE_SOLANA": 2, + "CHAIN_TYPE_ZKSYNC": 3, + "CHAIN_TYPE_STARKNET": 4, } ) @@ -470,12 +476,13 @@ type ChainConfig struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Chain *Chain `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` - AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` - AdminAddress string `protobuf:"bytes,3,opt,name=admin_address,json=adminAddress,proto3" json:"admin_address,omitempty"` - FluxMonitorConfig *FluxMonitorConfig `protobuf:"bytes,4,opt,name=flux_monitor_config,json=fluxMonitorConfig,proto3" json:"flux_monitor_config,omitempty"` - Ocr1Config *OCR1Config `protobuf:"bytes,5,opt,name=ocr1_config,json=ocr1Config,proto3" json:"ocr1_config,omitempty"` - Ocr2Config *OCR2Config `protobuf:"bytes,6,opt,name=ocr2_config,json=ocr2Config,proto3" json:"ocr2_config,omitempty"` + Chain *Chain `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` + AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + AdminAddress string `protobuf:"bytes,3,opt,name=admin_address,json=adminAddress,proto3" json:"admin_address,omitempty"` + FluxMonitorConfig *FluxMonitorConfig `protobuf:"bytes,4,opt,name=flux_monitor_config,json=fluxMonitorConfig,proto3" json:"flux_monitor_config,omitempty"` + Ocr1Config *OCR1Config `protobuf:"bytes,5,opt,name=ocr1_config,json=ocr1Config,proto3" json:"ocr1_config,omitempty"` + Ocr2Config *OCR2Config `protobuf:"bytes,6,opt,name=ocr2_config,json=ocr2Config,proto3" json:"ocr2_config,omitempty"` + AccountAddressPublicKey *string `protobuf:"bytes,7,opt,name=account_address_public_key,json=accountAddressPublicKey,proto3,oneof" json:"account_address_public_key,omitempty"` } func (x *ChainConfig) Reset() { @@ -552,6 +559,13 @@ func (x *ChainConfig) GetOcr2Config() *OCR2Config { return nil } +func (x *ChainConfig) GetAccountAddressPublicKey() string { + if x != nil && x.AccountAddressPublicKey != nil { + return *x.AccountAddressPublicKey + } + return "" +} + type UpdateNodeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1800,7 +1814,7 @@ var file_pkg_noderpc_proto_feeds_manager_proto_rawDesc = []byte{ 0x63, 0x75, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, - 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x0b, 0x43, + 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x8a, 0x03, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x0f, @@ -1819,123 +1833,132 @@ var file_pkg_noderpc_proto_feeds_manager_proto_rawDesc = []byte{ 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x0b, 0x6f, 0x63, 0x72, 0x32, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x4f, 0x43, 0x52, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x6f, 0x63, 0x72, 0x32, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x9f, 0x03, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x09, - 0x6a, 0x6f, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, - 0x0c, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x6a, - 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, - 0x2a, 0x0a, 0x11, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, - 0x70, 0x65, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x42, 0x6f, - 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x65, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x13, 0x62, - 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, - 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, - 0x72, 0x61, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, - 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, - 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x22, 0x0a, - 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x63, 0x66, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x73, 0x12, 0x35, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, - 0x0a, 0x12, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, 0x6f, - 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x15, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x12, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, - 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x43, 0x0a, 0x13, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, - 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x71, - 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, - 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x75, 0x6c, - 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x22, 0x24, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x22, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x22, 0x0a, 0x10, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x40, 0x0a, 0x1a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x17, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0x9f, 0x03, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, + 0x09, 0x6a, 0x6f, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x0c, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, + 0x6a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x73, 0x5f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, + 0x5f, 0x70, 0x65, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x42, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x65, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x13, + 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, + 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x62, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x12, 0x18, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x22, + 0x0a, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x06, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x66, 0x6d, 0x2e, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x42, 0x0a, 0x12, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x15, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x12, 0x52, 0x65, 0x6a, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x52, + 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x43, 0x0a, 0x13, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x71, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, - 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x2a, 0x63, 0x0a, 0x07, 0x4a, 0x6f, 0x62, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, - 0x0a, 0x15, 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x55, 0x58, 0x5f, - 0x4d, 0x4f, 0x4e, 0x49, 0x54, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4a, 0x4f, 0x42, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x43, 0x52, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4a, - 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x43, 0x52, 0x32, 0x10, 0x03, 0x2a, 0x52, - 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x43, - 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x48, 0x41, 0x49, 0x4e, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x4d, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, - 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4f, 0x4c, 0x41, 0x4e, 0x41, - 0x10, 0x02, 0x32, 0xd8, 0x02, 0x0a, 0x0c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x4d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, - 0x6f, 0x62, 0x12, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, - 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, 0x66, - 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x12, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, - 0x63, 0x66, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, - 0x63, 0x66, 0x6d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x6a, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x18, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, - 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc4, 0x01, - 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, - 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x16, 0x2e, 0x63, 0x66, - 0x6d, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x2e, 0x63, 0x66, 0x6d, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, - 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3d, 0x5a, 0x3b, 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, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0x24, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x22, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x22, 0x0a, 0x10, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x2a, 0x63, 0x0a, 0x07, 0x4a, 0x6f, + 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x19, 0x0a, 0x15, 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x55, 0x58, + 0x5f, 0x4d, 0x4f, 0x4e, 0x49, 0x54, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4a, 0x4f, + 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x43, 0x52, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, + 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x43, 0x52, 0x32, 0x10, 0x03, 0x2a, + 0x82, 0x01, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, + 0x16, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x48, 0x41, + 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x56, 0x4d, 0x10, 0x01, 0x12, 0x15, 0x0a, + 0x11, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4f, 0x4c, 0x41, + 0x4e, 0x41, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x5a, 0x4b, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x43, + 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x4b, 0x4e, + 0x45, 0x54, 0x10, 0x04, 0x32, 0xd8, 0x02, 0x0a, 0x0c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, + 0x76, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, + 0x63, 0x66, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x18, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x52, 0x65, 0x6a, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, + 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x18, 0x2e, 0x63, 0x66, 0x6d, + 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0xc4, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x3d, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x16, 0x2e, + 0x63, 0x66, 0x6d, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, + 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x2e, 0x63, 0x66, + 0x6d, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x63, 0x66, 0x6d, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3d, 0x5a, 0x3b, 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, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2d, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x72, 0x70, 0x63, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2354,6 +2377,7 @@ func file_pkg_noderpc_proto_feeds_manager_proto_init() { } } file_pkg_noderpc_proto_feeds_manager_proto_msgTypes[4].OneofWrappers = []interface{}{} + file_pkg_noderpc_proto_feeds_manager_proto_msgTypes[5].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/core/services/feeds/service.go b/core/services/feeds/service.go index 701cff03c81..4e159cbd0bb 100644 --- a/core/services/feeds/service.go +++ b/core/services/feeds/service.go @@ -1210,7 +1210,7 @@ func (s *service) newChainConfigMsg(cfg ChainConfig) (*pb.ChainConfig, error) { return nil, err } - return &pb.ChainConfig{ + pbChainConfig := pb.ChainConfig{ Chain: &pb.Chain{ Id: cfg.ChainID, Type: pb.ChainType_CHAIN_TYPE_EVM, @@ -1220,7 +1220,13 @@ func (s *service) newChainConfigMsg(cfg ChainConfig) (*pb.ChainConfig, error) { FluxMonitorConfig: s.newFluxMonitorConfigMsg(cfg.FluxMonitorConfig), Ocr1Config: ocr1Cfg, Ocr2Config: ocr2Cfg, - }, nil + } + + if cfg.AccountAddressPublicKey.Valid { + pbChainConfig.AccountAddressPublicKey = &cfg.AccountAddressPublicKey.String + } + + return &pbChainConfig, nil } // newFluxMonitorConfigMsg generates a FMConfig protobuf message. Flux Monitor does not diff --git a/core/services/feeds/service_test.go b/core/services/feeds/service_test.go index 09c710fff9e..10dd1d8cfab 100644 --- a/core/services/feeds/service_test.go +++ b/core/services/feeds/service_test.go @@ -367,11 +367,12 @@ func Test_Service_CreateChainConfig(t *testing.T) { Version: "1.0.0", } cfg = feeds.ChainConfig{ - FeedsManagerID: mgr.ID, - ChainID: "42", - ChainType: feeds.ChainTypeEVM, - AccountAddress: "0x0000000000000000000000000000000000000000", - AdminAddress: "0x0000000000000000000000000000000000000001", + FeedsManagerID: mgr.ID, + ChainID: "42", + ChainType: feeds.ChainTypeEVM, + AccountAddress: "0x0000000000000000000000000000000000000000", + AccountAddressPublicKey: null.StringFrom("0x0000000000000000000000000000000000000002"), + AdminAddress: "0x0000000000000000000000000000000000000001", FluxMonitorConfig: feeds.FluxMonitorConfig{ Enabled: true, }, @@ -398,11 +399,12 @@ func Test_Service_CreateChainConfig(t *testing.T) { Id: cfg.ChainID, Type: proto.ChainType_CHAIN_TYPE_EVM, }, - AccountAddress: cfg.AccountAddress, - AdminAddress: cfg.AdminAddress, - FluxMonitorConfig: &proto.FluxMonitorConfig{Enabled: true}, - Ocr1Config: &proto.OCR1Config{Enabled: false}, - Ocr2Config: &proto.OCR2Config{Enabled: false}, + AccountAddress: cfg.AccountAddress, + AccountAddressPublicKey: &cfg.AccountAddressPublicKey.String, + AdminAddress: cfg.AdminAddress, + FluxMonitorConfig: &proto.FluxMonitorConfig{Enabled: true}, + Ocr1Config: &proto.OCR1Config{Enabled: false}, + Ocr2Config: &proto.OCR2Config{Enabled: false}, }, }, }).Return(&proto.UpdateNodeResponse{}, nil) @@ -489,14 +491,15 @@ func Test_Service_UpdateChainConfig(t *testing.T) { Version: "1.0.0", } cfg = feeds.ChainConfig{ - FeedsManagerID: mgr.ID, - ChainID: "42", - ChainType: feeds.ChainTypeEVM, - AccountAddress: "0x0000000000000000000000000000000000000000", - AdminAddress: "0x0000000000000000000000000000000000000001", - FluxMonitorConfig: feeds.FluxMonitorConfig{Enabled: false}, - OCR1Config: feeds.OCR1Config{Enabled: false}, - OCR2Config: feeds.OCR2ConfigModel{Enabled: false}, + FeedsManagerID: mgr.ID, + ChainID: "42", + ChainType: feeds.ChainTypeEVM, + AccountAddress: "0x0000000000000000000000000000000000000000", + AccountAddressPublicKey: null.StringFrom("0x0000000000000000000000000000000000000002"), + AdminAddress: "0x0000000000000000000000000000000000000001", + FluxMonitorConfig: feeds.FluxMonitorConfig{Enabled: false}, + OCR1Config: feeds.OCR1Config{Enabled: false}, + OCR2Config: feeds.OCR2ConfigModel{Enabled: false}, } svc = setupTestService(t) @@ -514,11 +517,12 @@ func Test_Service_UpdateChainConfig(t *testing.T) { Id: cfg.ChainID, Type: proto.ChainType_CHAIN_TYPE_EVM, }, - AccountAddress: cfg.AccountAddress, - AdminAddress: cfg.AdminAddress, - FluxMonitorConfig: &proto.FluxMonitorConfig{Enabled: false}, - Ocr1Config: &proto.OCR1Config{Enabled: false}, - Ocr2Config: &proto.OCR2Config{Enabled: false}, + AccountAddress: cfg.AccountAddress, + AdminAddress: cfg.AdminAddress, + AccountAddressPublicKey: &cfg.AccountAddressPublicKey.String, + FluxMonitorConfig: &proto.FluxMonitorConfig{Enabled: false}, + Ocr1Config: &proto.OCR1Config{Enabled: false}, + Ocr2Config: &proto.OCR2Config{Enabled: false}, }, }, }).Return(&proto.UpdateNodeResponse{}, nil) diff --git a/core/store/migrate/migrations/0242_add_account_public_key_to_fms_chain_config.sql b/core/store/migrate/migrations/0242_add_account_public_key_to_fms_chain_config.sql new file mode 100644 index 00000000000..d5b9584d3ec --- /dev/null +++ b/core/store/migrate/migrations/0242_add_account_public_key_to_fms_chain_config.sql @@ -0,0 +1,11 @@ +-- +goose Up +-- +goose StatementBegin +ALTER TABLE feeds_manager_chain_configs +ADD COLUMN account_address_public_key VARCHAR; + +-- +goose StatementEnd +-- +goose Down +-- +goose StatementBegin +ALTER TABLE feeds_manager_chain_configs DROP COLUMN account_address_public_key; + +-- +goose StatementEnd diff --git a/core/web/resolver/feeds_manager_chain_config.go b/core/web/resolver/feeds_manager_chain_config.go index 6d4e4c88e55..1afcd2b5f0a 100644 --- a/core/web/resolver/feeds_manager_chain_config.go +++ b/core/web/resolver/feeds_manager_chain_config.go @@ -43,6 +43,11 @@ func (r *FeedsManagerChainConfigResolver) AccountAddr() string { return r.cfg.AccountAddress } +// AccountAddrPubKey resolves the chain configs's account address public key. +func (r *FeedsManagerChainConfigResolver) AccountAddrPubKey() *string { + return r.cfg.AccountAddressPublicKey.Ptr() +} + // AdminAddr resolves the chain configs's admin address. func (r *FeedsManagerChainConfigResolver) AdminAddr() string { return r.cfg.AdminAddress diff --git a/core/web/resolver/feeds_manager_chain_config_test.go b/core/web/resolver/feeds_manager_chain_config_test.go index c5dd77c14a1..bd4c1e05aeb 100644 --- a/core/web/resolver/feeds_manager_chain_config_test.go +++ b/core/web/resolver/feeds_manager_chain_config_test.go @@ -15,14 +15,15 @@ import ( func Test_CreateFeedsManagerChainConfig(t *testing.T) { var ( - mgrID = int64(100) - cfgID = int64(1) - chainID = "42" - accountAddr = "0x0000001" - adminAddr = "0x0000002" - forwarderAddr = "0x0000003" - peerID = null.StringFrom("p2p_12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw") - keyBundleID = null.StringFrom("6fdb8235e16e099de91df7ef8a8088e9deea0ed6ae106b133e5d985a8a9e1562") + mgrID = int64(100) + cfgID = int64(1) + chainID = "42" + accountAddr = "0x0000001" + acctAddrPubKey = "0x0000004" + adminAddr = "0x0000002" + forwarderAddr = "0x0000003" + peerID = null.StringFrom("p2p_12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw") + keyBundleID = null.StringFrom("6fdb8235e16e099de91df7ef8a8088e9deea0ed6ae106b133e5d985a8a9e1562") mutation = ` mutation CreateFeedsManagerChainConfig($input: CreateFeedsManagerChainConfigInput!) { @@ -51,6 +52,7 @@ func Test_CreateFeedsManagerChainConfig(t *testing.T) { "chainID": chainID, "chainType": "EVM", "accountAddr": accountAddr, + "accountAddrPubKey": acctAddrPubKey, "adminAddr": adminAddr, "fluxMonitorEnabled": false, "ocr1Enabled": true, @@ -75,11 +77,12 @@ func Test_CreateFeedsManagerChainConfig(t *testing.T) { before: func(ctx context.Context, f *gqlTestFramework) { f.App.On("GetFeedsService").Return(f.Mocks.feedsSvc) f.Mocks.feedsSvc.On("CreateChainConfig", mock.Anything, feeds.ChainConfig{ - FeedsManagerID: mgrID, - ChainType: feeds.ChainTypeEVM, - ChainID: chainID, - AccountAddress: accountAddr, - AdminAddress: adminAddr, + FeedsManagerID: mgrID, + ChainType: feeds.ChainTypeEVM, + ChainID: chainID, + AccountAddress: accountAddr, + AccountAddressPublicKey: null.StringFrom(acctAddrPubKey), + AdminAddress: adminAddr, FluxMonitorConfig: feeds.FluxMonitorConfig{ Enabled: false, }, @@ -103,11 +106,12 @@ func Test_CreateFeedsManagerChainConfig(t *testing.T) { }, }).Return(cfgID, nil) f.Mocks.feedsSvc.On("GetChainConfig", mock.Anything, cfgID).Return(&feeds.ChainConfig{ - ID: cfgID, - ChainType: feeds.ChainTypeEVM, - ChainID: chainID, - AccountAddress: accountAddr, - AdminAddress: adminAddr, + ID: cfgID, + ChainType: feeds.ChainTypeEVM, + ChainID: chainID, + AccountAddress: accountAddr, + AccountAddressPublicKey: null.StringFrom(acctAddrPubKey), + AdminAddress: adminAddr, FluxMonitorConfig: feeds.FluxMonitorConfig{ Enabled: false, }, @@ -272,12 +276,13 @@ func Test_DeleteFeedsManagerChainConfig(t *testing.T) { func Test_UpdateFeedsManagerChainConfig(t *testing.T) { var ( - cfgID = int64(1) - peerID = null.StringFrom("p2p_12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw") - keyBundleID = null.StringFrom("6fdb8235e16e099de91df7ef8a8088e9deea0ed6ae106b133e5d985a8a9e1562") - accountAddr = "0x0000001" - adminAddr = "0x0000002" - forwarderAddr = "0x0000003" + cfgID = int64(1) + peerID = null.StringFrom("p2p_12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw") + keyBundleID = null.StringFrom("6fdb8235e16e099de91df7ef8a8088e9deea0ed6ae106b133e5d985a8a9e1562") + accountAddr = "0x0000001" + adminAddr = "0x0000002" + forwarderAddr = "0x0000003" + accountAddrPubKey = "0x0000004" mutation = ` mutation UpdateFeedsManagerChainConfig($id: ID!, $input: UpdateFeedsManagerChainConfigInput!) { @@ -304,6 +309,7 @@ func Test_UpdateFeedsManagerChainConfig(t *testing.T) { "id": "1", "input": map[string]interface{}{ "accountAddr": accountAddr, + "accountAddrPubKey": accountAddrPubKey, "adminAddr": adminAddr, "fluxMonitorEnabled": false, "ocr1Enabled": true, @@ -328,9 +334,10 @@ func Test_UpdateFeedsManagerChainConfig(t *testing.T) { before: func(ctx context.Context, f *gqlTestFramework) { f.App.On("GetFeedsService").Return(f.Mocks.feedsSvc) f.Mocks.feedsSvc.On("UpdateChainConfig", mock.Anything, feeds.ChainConfig{ - ID: cfgID, - AccountAddress: accountAddr, - AdminAddress: adminAddr, + ID: cfgID, + AccountAddress: accountAddr, + AccountAddressPublicKey: null.StringFrom(accountAddrPubKey), + AdminAddress: adminAddr, FluxMonitorConfig: feeds.FluxMonitorConfig{ Enabled: false, }, @@ -354,9 +361,10 @@ func Test_UpdateFeedsManagerChainConfig(t *testing.T) { }, }).Return(cfgID, nil) f.Mocks.feedsSvc.On("GetChainConfig", mock.Anything, cfgID).Return(&feeds.ChainConfig{ - ID: cfgID, - AccountAddress: accountAddr, - AdminAddress: adminAddr, + ID: cfgID, + AccountAddress: accountAddr, + AdminAddress: adminAddr, + AccountAddressPublicKey: null.StringFrom(accountAddrPubKey), FluxMonitorConfig: feeds.FluxMonitorConfig{ Enabled: false, }, diff --git a/core/web/resolver/mutation.go b/core/web/resolver/mutation.go index 25019df9761..08b435e82ce 100644 --- a/core/web/resolver/mutation.go +++ b/core/web/resolver/mutation.go @@ -157,6 +157,7 @@ type createFeedsManagerChainConfigInput struct { ChainID string ChainType string AccountAddr string + AccountAddrPubKey *string AdminAddr string FluxMonitorEnabled bool OCR1Enabled bool @@ -203,6 +204,10 @@ func (r *Resolver) CreateFeedsManagerChainConfig(ctx context.Context, args struc }, } + if args.Input.AccountAddrPubKey != nil { + params.AccountAddressPublicKey = null.StringFromPtr(args.Input.AccountAddrPubKey) + } + if args.Input.OCR1Enabled { params.OCR1Config = feeds.OCR1Config{ Enabled: args.Input.OCR1Enabled, @@ -292,6 +297,7 @@ func (r *Resolver) DeleteFeedsManagerChainConfig(ctx context.Context, args struc type updateFeedsManagerChainConfigInput struct { AccountAddr string + AccountAddrPubKey *string AdminAddr string FluxMonitorEnabled bool OCR1Enabled bool @@ -332,6 +338,10 @@ func (r *Resolver) UpdateFeedsManagerChainConfig(ctx context.Context, args struc }, } + if args.Input.AccountAddrPubKey != nil { + params.AccountAddressPublicKey = null.StringFromPtr(args.Input.AccountAddrPubKey) + } + if args.Input.OCR1Enabled { params.OCR1Config = feeds.OCR1Config{ Enabled: args.Input.OCR1Enabled, diff --git a/core/web/schema/type/feeds_manager.graphql b/core/web/schema/type/feeds_manager.graphql index a6301c9ef6b..12e8732c8e0 100644 --- a/core/web/schema/type/feeds_manager.graphql +++ b/core/web/schema/type/feeds_manager.graphql @@ -28,6 +28,7 @@ type FeedsManagerChainConfig { chainID: String! chainType: String! accountAddr: String! + accountAddrPubKey: String adminAddr: String! fluxMonitorJobConfig: FluxMonitorJobConfig! ocr1JobConfig: OCR1JobConfig! @@ -109,6 +110,7 @@ input CreateFeedsManagerChainConfigInput { chainID: String! chainType: String! accountAddr: String! + accountAddrPubKey: String adminAddr: String! fluxMonitorEnabled: Boolean! ocr1Enabled: Boolean! @@ -150,6 +152,7 @@ union DeleteFeedsManagerChainConfigPayload = DeleteFeedsManagerChainConfigSucces input UpdateFeedsManagerChainConfigInput { accountAddr: String! + accountAddrPubKey: String adminAddr: String! fluxMonitorEnabled: Boolean! ocr1Enabled: Boolean!