Skip to content
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

Change Workflow Registry Syncer to use less block confirmations #16243

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions core/services/workflows/syncer/workflow_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,30 +379,51 @@ func (w *workflowRegistry) newWorkflowRegistryContractReader(
Configs: map[string]*evmtypes.ChainReaderDefinition{
GetWorkflowMetadataListByDONMethodName: {
ChainSpecificName: GetWorkflowMetadataListByDONMethodName,
ConfidenceConfirmations: map[string]int{
"1.0": 3,
},
},
string(ForceUpdateSecretsEvent): {
ChainSpecificName: string(ForceUpdateSecretsEvent),
ReadType: evmtypes.Event,
ConfidenceConfirmations: map[string]int{
"1.0": 3,
},
},
string(WorkflowActivatedEvent): {
ChainSpecificName: string(WorkflowActivatedEvent),
ReadType: evmtypes.Event,
ConfidenceConfirmations: map[string]int{
"1.0": 3,
},
},
string(WorkflowDeletedEvent): {
ChainSpecificName: string(WorkflowDeletedEvent),
ReadType: evmtypes.Event,
ConfidenceConfirmations: map[string]int{
"1.0": 3,
},
},
string(WorkflowPausedEvent): {
ChainSpecificName: string(WorkflowPausedEvent),
ReadType: evmtypes.Event,
ConfidenceConfirmations: map[string]int{
"1.0": 3,
},
},
string(WorkflowRegisteredEvent): {
ChainSpecificName: string(WorkflowRegisteredEvent),
ReadType: evmtypes.Event,
ConfidenceConfirmations: map[string]int{
"1.0": 3,
},
},
string(WorkflowUpdatedEvent): {
ChainSpecificName: string(WorkflowUpdatedEvent),
ReadType: evmtypes.Event,
ConfidenceConfirmations: map[string]int{
"1.0": 3,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, you'd set a more realistic confidence level for the chain, like "0.9": 3 and pass that instead of Finalized to GetLatestValue , QueryKey, etc. and reserve 1.0 for meaning actually finalized. But if you're sure that nothing else that shares this config will ever need a higher confidence level, this works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EasterTheBunny would know better than I though whether there is any problem with doing it this way

},
},
},
},
Expand Down
Loading