Skip to content
Draft
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions pkg/capabilities/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,12 @@ type RemoteExecutableConfig struct {
RequestTimeout time.Duration
ServerMaxParallelRequests uint32
RequestHasherType RequestHasherType

// MinResponsesToAggregate is the minimum number of chain-capability DON nodes that must
// return identical responses before the workflow DON accepts the read result.
// 0 defaults to F+1 of the remote DON.
// Must satisfy F+1 <= MinResponsesToAggregate <= N when non-zero.
MinResponsesToAggregate uint32
}

// NOTE: consider splitting this config into values stored in Registry (KS-118)
Expand Down
21 changes: 17 additions & 4 deletions pkg/capabilities/pb/registry.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions pkg/capabilities/pb/registry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ message RemoteExecutableConfig {
google.protobuf.Duration request_timeout = 6;
uint32 server_max_parallel_requests = 7;
RequestHasherType request_hasher_type = 8;

// minResponsesToAggregate is the minimum number of chain-capability DON nodes that must
// return identical responses before the workflow DON accepts the read result.
// 0 defaults to F+1 of the remote DON
// Must satisfy F+1 <= minResponsesToAggregate <= N when non-zero.
uint32 minResponsesToAggregate = 9;
}

message AggregatorConfig {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@ message ReportingPluginConfig {
uint32 maxReportCount = 5;

uint32 maxBatchSize = 6;

// minResponsesToAggregate is the minimum number of nodes that must report
// identical observations for a value to be accepted as the read result.
// 0 defaults to F+1. Must satisfy F+1 <= minResponsesToAggregate <= N when non-zero.
uint32 minResponsesToAggregate = 7;
}
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ func decodeRemoteExecutableConfig(prtc *capabilitiespb.RemoteExecutableConfig) *
remoteExecutableConfig.RequestTimeout = prtc.RequestTimeout.AsDuration()
remoteExecutableConfig.ServerMaxParallelRequests = prtc.ServerMaxParallelRequests
remoteExecutableConfig.RequestHasherType = capabilities.RequestHasherType(prtc.RequestHasherType)
remoteExecutableConfig.MinResponsesToAggregate = prtc.MinResponsesToAggregate
return remoteExecutableConfig
}

Expand Down Expand Up @@ -451,6 +452,7 @@ func (c *capabilitiesRegistryServer) ConfigForCapability(ctx context.Context, re
RequestTimeout: durationpb.New(cc.RemoteExecutableConfig.RequestTimeout),
ServerMaxParallelRequests: cc.RemoteExecutableConfig.ServerMaxParallelRequests,
RequestHasherType: capabilitiespb.RequestHasherType(cc.RemoteExecutableConfig.RequestHasherType),
MinResponsesToAggregate: cc.RemoteExecutableConfig.MinResponsesToAggregate,
},
}
}
Expand Down Expand Up @@ -485,6 +487,7 @@ func (c *capabilitiesRegistryServer) ConfigForCapability(ctx context.Context, re
RequestTimeout: durationpb.New(mConfig.RemoteExecutableConfig.RequestTimeout),
ServerMaxParallelRequests: mConfig.RemoteExecutableConfig.ServerMaxParallelRequests,
RequestHasherType: capabilitiespb.RequestHasherType(mConfig.RemoteExecutableConfig.RequestHasherType),
MinResponsesToAggregate: mConfig.RemoteExecutableConfig.MinResponsesToAggregate,
},
}
}
Expand Down
Loading