-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add gateway connector capability config #14325
Changes from 1 commit
fc3bc6b
6bcb60d
80b5f62
518b858
6f0e185
b07269a
21b241c
9e6cc1c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -509,11 +509,9 @@ DeltaReconcile = '1m' # Default | |||||
# but the host and port must be fully specified and cannot be empty. You can specify `0.0.0.0` (IPv4) or `::` (IPv6) to listen on all interfaces, but that is not recommended. | ||||||
ListenAddresses = ['1.2.3.4:9999', '[a52d:0:a88:1274::abcd]:1337'] # Example | ||||||
|
||||||
[Capabilities.WorkflowConnectorConfig] | ||||||
[Capabilities.GatewayConnectorConfig] | ||||||
# ChainIDForNodeKey is the ChainID of the network | ||||||
ChainIDForNodeKey = '1' # Example | ||||||
|
||||||
[Capabilities.WorkflowConnectorConfig.GatewayConnectorConfig] | ||||||
ChainIDForNodeKey = '0xfd29Dd9C980D715a64dace97F7A2AB98bcaE0fed' # Default | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The default here is an integer such as 11155111 for Ethereum Sepolia, not a hex address. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But still a string to be agnostic? And this should be an example, no?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, a string, thanks |
||||||
# NodeAddress is Workflow Node address | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "NodeAddress is the address of the desired private key to be used for authentication with Gateway nodes" |
||||||
NodeAddress = '0x68902d681c28119f9b2531473a417088bf008e59' # Example | ||||||
# DonID is the Id of the Don | ||||||
|
@@ -525,7 +523,7 @@ AuthMinChallengeLen = 10 # Example | |||||
# AuthTimestampToleranceSec is Authentication timestamp tolerance | ||||||
AuthTimestampToleranceSec = 10 # Example | ||||||
|
||||||
[[Capabilities.WorkflowConnectorConfig.GatewayConnectorConfig.Gateways]] | ||||||
[[Capabilities.GatewayConnectorConfig.Gateways]] | ||||||
# ID of the Gateway | ||||||
ID = 'example_gateway' # Example | ||||||
# URL of the Gateway | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1481,6 +1481,7 @@ func (drl *DispatcherRateLimit) setFrom(f *DispatcherRateLimit) { | |
} | ||
|
||
type GatewayConnectorConfig struct { | ||
ChainIDForNodeKey *string | ||
NodeAddress *string | ||
DonID *string | ||
Gateways []ConnectorGatewayConfig | ||
|
@@ -1490,6 +1491,10 @@ type GatewayConnectorConfig struct { | |
} | ||
|
||
func (r *GatewayConnectorConfig) setFrom(f *GatewayConnectorConfig) { | ||
if f.ChainIDForNodeKey != nil { | ||
r.ChainIDForNodeKey = f.ChainIDForNodeKey | ||
} | ||
|
||
if f.NodeAddress != nil { | ||
r.NodeAddress = f.NodeAddress | ||
} | ||
|
@@ -1520,31 +1525,19 @@ type ConnectorGatewayConfig struct { | |
ID *string | ||
URL *string | ||
} | ||
type WorkflowConnectorConfig struct { | ||
ChainIDForNodeKey *string | ||
GatewayConnectorConfig GatewayConnectorConfig `json:"gatewayConnectorConfig"` | ||
} | ||
|
||
func (r *WorkflowConnectorConfig) setFrom(f *WorkflowConnectorConfig) { | ||
if f.ChainIDForNodeKey != nil { | ||
r.ChainIDForNodeKey = f.ChainIDForNodeKey | ||
} | ||
|
||
r.GatewayConnectorConfig.setFrom(&f.GatewayConnectorConfig) | ||
} | ||
|
||
type Capabilities struct { | ||
Peering P2P `toml:",omitempty"` | ||
Dispatcher Dispatcher `toml:",omitempty"` | ||
ExternalRegistry ExternalRegistry `toml:",omitempty"` | ||
WorkflowConnectorConfig WorkflowConnectorConfig `toml:", omitempty"` | ||
Peering P2P `toml:",omitempty"` | ||
Dispatcher Dispatcher `toml:",omitempty"` | ||
ExternalRegistry ExternalRegistry `toml:",omitempty"` | ||
GatewayConnectorConfig GatewayConnectorConfig `toml:", omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: unnecessary space before "omitempty" |
||
} | ||
|
||
func (c *Capabilities) setFrom(f *Capabilities) { | ||
c.Peering.setFrom(&f.Peering) | ||
c.ExternalRegistry.setFrom(&f.ExternalRegistry) | ||
c.Dispatcher.setFrom(&f.Dispatcher) | ||
c.WorkflowConnectorConfig.setFrom(&f.WorkflowConnectorConfig) | ||
c.GatewayConnectorConfig.setFrom(&f.GatewayConnectorConfig) | ||
} | ||
|
||
type ThresholdKeyShareSecrets struct { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,7 @@ func TestScripts(t *testing.T) { | |
Dir: path, | ||
Setup: commonEnv, | ||
ContinueOnError: true, | ||
// UpdateScripts: true, // uncomment to update golden files | ||
UpdateScripts: true, // uncomment to update golden files | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-comment |
||
}) | ||
}) | ||
return nil | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like you ran update with a production (non dev/test mode) chainlink binary There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIK, my build has always been a dev binary via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,11 @@ USAGE: | |
chainlink node db command [command options] [arguments...] | ||
|
||
COMMANDS: | ||
reset Drop, create and migrate database. Useful for setting up the database in order to run tests or resetting the dev database. WARNING: This will ERASE ALL DATA for the specified database, referred to by CL_DATABASE_URL env variable or by the Database.URL field in a secrets TOML config. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure why this changed...? try reverting maybe? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to alternate back and forth. I have no idea how or why tbh. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are more commands available in dev mode. If you just use |
||
preparetest Reset database and load fixtures. | ||
version Display the current database version. | ||
status Display the current database migration status. | ||
migrate Migrate the database to the latest version. | ||
rollback Roll back the database to a previous <version>. Rolls back a single migration if no version specified. | ||
create-migration Create a new migration. | ||
delete-chain Commands for cleaning up chain specific db tables. WARNING: This will ERASE ALL chain specific data referred to by --type and --id options for the specified database, referred to by CL_DATABASE_URL env variable or by the Database.URL field in a secrets TOML config. | ||
version Display the current database version. | ||
status Display the current database migration status. | ||
migrate Migrate the database to the latest version. | ||
rollback Roll back the database to a previous <version>. Rolls back a single migration if no version specified. | ||
delete-chain Commands for cleaning up chain specific db tables. WARNING: This will ERASE ALL chain specific data referred to by --type and --id options for the specified database, referred to by CL_DATABASE_URL env variable or by the Database.URL field in a secrets TOML config. | ||
|
||
OPTIONS: | ||
--help, -h show help | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ChainIDForNodeKey is the ChainID of the network associated with a private key to be used for authentication with Gateway nodes"