-
Notifications
You must be signed in to change notification settings - Fork 3
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 ocr offchainConfig and chain config structs #36
Conversation
// Writer indicates that the node can contribute by sending reports to the destination chain. | ||
// Being a Writer guarantees that the node can also read from the destination chain. | ||
Writer bool `json:"writer"` | ||
type ExecuteOffchainConfig struct { |
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.
Whats the difference between this and ExecutePluginConfig
? There is some overlap in values.
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.
This will get posted on-chain and will inform what ends up in ExecutePluginConfig
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.
Could you add some comments to the struct to this effect?
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.
I've ended up embedding this struct in the ExecutePluginConfig
struct, which holds configuration not just from the offchain config but from the general OCR config.
pluginconfig/commit.go
Outdated
// ArbitrumPriceSource is the source of the TOKEN/USD price data of a particular token | ||
// on Arbitrum. | ||
type ArbitrumPriceSource struct { |
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.
Why do we need this?
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.
This is so that the commit plugin can fetch token prices from the feeds that are deployed on arbitrum
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.
Can add some more detailed comments.
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.
Changes seem fine. A lot of them aren't used yet, how big of an issue would it be to add them in as needed? I'd be tempted to throw in lots of TODO comments on the things which still need to be implemented.
Agreed @winder I've created a few tickets for what needs to be used. |
Test Coverage
|
// OffchainConfig is the offchain config set for the exec DON. | ||
OffchainConfig ExecuteOffchainConfig `json:"offchainConfig"` |
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.
nice, I was wondering if they overlapped completely like this.
You could fully embed it as well, most off the shelf decoders will append changes rather than overwrite them. Not sure if our custom decoders work that way.
// OffchainConfig is the offchain config set for the exec DON. | |
OffchainConfig ExecuteOffchainConfig `json:"offchainConfig"` | |
// ExecuteOffchainConfig is the offchain config set for the exec DON. | |
ExecuteOffchainConfig` |
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.
You could do this direct embed but I think it makes it harder to determine from the usage sites where that field actually comes from; since we have like 3+ kinds of configs I think the more explicit we can be the better
## Motivation We want to define and use the appropriate OCR offchain config for each plugin. ## Solution Requires smartcontractkit/chainlink-ccip#36
We want to define and use the appropriate OCR offchain config for each plugin. Requires smartcontractkit/chainlink-ccip#36
* Fix compilation for launcher, diff Make application.go ready for adding more fixes * Fix launcher tests * ks-409 fix the mock trigger to ensure events are sent (#14047) * Add ccip to job orm * Add capabilities directory under BUSL license * Prep to instantiate separate registrysyncer for CCIP * Move registrySyncer creation into ccip delegate * [chore] Change registrysyncer config to bytes * Fix launcher diff tests after changing structs in syncer * Fix linting * MAke simulated backend client work with chains other than 1337 * core/capabilities/ccip: use OCR offchain config (#1264) We want to define and use the appropriate OCR offchain config for each plugin. Requires smartcontractkit/chainlink-ccip#36 * Cleaning up * Add capabilities types to mockery --------- Co-authored-by: Cedric Cordenier <cedric.cordenier@smartcontract.com> Co-authored-by: Matthew Pendrey <matthew.pendrey@gmail.com> Co-authored-by: Makram <makramkd@users.noreply.github.com>
* [CCIP Merge] Add ccip capabilities directory [CCIP-2943] (#14044) * Add ccip capabilities directory * [CCIP Merge] Capabilities fix [CCIP-2943] (#14048) * Fix compilation for launcher, diff Make application.go ready for adding more fixes * Fix launcher tests * ks-409 fix the mock trigger to ensure events are sent (#14047) * Add ccip to job orm * Add capabilities directory under BUSL license * Prep to instantiate separate registrysyncer for CCIP * Move registrySyncer creation into ccip delegate * [chore] Change registrysyncer config to bytes * Fix launcher diff tests after changing structs in syncer * Fix linting * MAke simulated backend client work with chains other than 1337 * core/capabilities/ccip: use OCR offchain config (#1264) We want to define and use the appropriate OCR offchain config for each plugin. Requires smartcontractkit/chainlink-ccip#36 * Cleaning up * Add capabilities types to mockery --------- Co-authored-by: Cedric Cordenier <cedric.cordenier@smartcontract.com> Co-authored-by: Matthew Pendrey <matthew.pendrey@gmail.com> Co-authored-by: Makram <makramkd@users.noreply.github.com> * make modgraph * Add changeset * Fix test with new TxMgr constructor --------- Co-authored-by: Cedric Cordenier <cedric.cordenier@smartcontract.com> Co-authored-by: Matthew Pendrey <matthew.pendrey@gmail.com> Co-authored-by: Makram <makramkd@users.noreply.github.com>
We want to define and use the appropriate OCR offchain config for each plugin. Requires smartcontractkit/chainlink-ccip#36
## Motivation We want to define and use the appropriate OCR offchain config for each plugin. ## Solution Requires smartcontractkit/chainlink-ccip#36
## Motivation We want to define and use the appropriate OCR offchain config for each plugin. ## Solution Requires smartcontractkit/chainlink-ccip#36
We want to define and use the appropriate OCR offchain config for each plugin. Requires smartcontractkit/chainlink-ccip#36
We need to define the offchainConfig and chain config structs. The configuration has been organized so as to make maximal use of blue-green deployments. Things in
ChainConfig
should not be changed very often if at all, and will affect all DONs.Things in OCR offchainConfig will be scoped to a particular plugin instance.
Related PR in ccip: smartcontractkit/ccip#1264