Fix config - #814
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Canton lane configuration defaults, including token price assumptions and per-remote-chain default fee parameters, and introduces stricter defaulting behavior for inbound committee verifiers.
Changes:
- Adjust default native (Amulet) USD-per-token fallback from
0.1to0.15. - Add EVM vs non-EVM branching for Canton default FeeQuoter destination-chain configuration and remote-chain defaults.
- Change default inbound CCV resolution to fail-closed behavior when not explicitly configured.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| deployment/adapters/configure_lanes_token_prices.go | Updates default native token USD price used when FamilyExtras omit a value. |
| deployment/adapters/chain_family_adapter.go | Adds EVM/non-EVM default selection for fee config + remote defaults; changes default inbound CCV resolution behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Hardening: default inbound CCV is invalid-ccv (fail-closed) when not explicitly configured. | ||
| ref, err := findContractRef( | ||
| ds, | ||
| chainSelector, | ||
| datastore.ContractType(committeeverifierop.ContractType), | ||
| committeeverifierop.Version, | ||
| "invalid-ccv", | ||
| ) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("resolve default invalid-ccv inbound qualifier: %w", err) | ||
| } | ||
| return []datastore.AddressRef{ref}, nil |
|
/auto-fix |
This commit was created from the local commit with hash 4ba4973f66d466cbc367f090b31704d1060222a3.
|
✅ Autofix successful |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
deployment/adapters/chain_family_adapter.go:566
- The fallback to a hard-coded CommitteeVerifier qualifier "invalid-ccv" introduces a datastore dependency that doesn't appear to be created/used anywhere else in the repo (no other references found). As written, any remote config that omits DefaultInboundCCVs will now fail during ConfigureChainForLanes with a somewhat indirect error. If the goal is fail-closed hardening, it’s clearer to return an explicit error requiring DefaultInboundCCVs to be set (or to separately ensure an "invalid-ccv" ref is always seeded).
datastore.ContractType(committeeverifierop.ContractType),
committeeverifierop.Version,
"invalid-ccv",
)
if err != nil {
| V2Params: &lanes.FeeQuoterV2Params{ | ||
| LinkFeeMultiplierPercent: 90, | ||
| USDPerUnitGas: big.NewInt(38), | ||
| USDPerUnitGas: big.NewInt(1e6), |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
deployment/adapters/chain_family_adapter.go:90
big.NewInt(1e6)works, but the scientific-notation literal is less readable in Go and can be mistaken for a float-derived value. Prefer an integer literal with separators for clarity.
USDPerUnitGas: big.NewInt(1e6),
| // Hardening: default inbound CCV is invalid-ccv (fail-closed) when not explicitly configured. | ||
| ref, err := findContractRef( | ||
| ds, | ||
| chainSelector, | ||
| datastore.ContractType(committeeverifierop.ContractType), | ||
| committeeverifierop.Version, | ||
| "invalid-ccv", | ||
| ) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("resolve default invalid-ccv inbound qualifier: %w", err) | ||
| } | ||
|
|
||
| return []datastore.AddressRef{ref}, nil |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
deployment/adapters/chain_family_adapter.go:559
- resolveDefaultInboundCCVs now hard-codes a fallback qualifier ("invalid-ccv") when DefaultInboundCCVs is empty. There are no other references/definitions of this qualifier in the repo, so lane configuration will fail at runtime unless the datastore is pre-populated with a CommitteeVerifier address ref using qualifier "invalid-ccv". Consider failing fast with a clear error asking callers to explicitly configure DefaultInboundCCVs (or ensure the qualifier is created as part of deployment/setup).
// Hardening: default inbound CCV is invalid-ccv (fail-closed) when not explicitly configured.
ref, err := findContractRef(
ds,
chainSelector,
datastore.ContractType(committeeverifierop.ContractType),
committeeverifierop.Version,
"invalid-ccv",
No description provided.