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
13 changes: 11 additions & 2 deletions pkg/capabilities/pb/capabilities.pb.go

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

1 change: 1 addition & 0 deletions pkg/capabilities/pb/capabilities.proto
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ message InitialiseRequest {
uint32 org_resolver_id = 11;
uint32 cre_settings_id = 12;
uint32 trigger_event_store_id = 13;
uint32 capability_don_id = 14;
}

message CapabilityInfosReply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ func (c *StandardCapabilitiesClient) Initialise(ctx context.Context, dependencie
OrgResolverId: orgResolverID,
CreSettingsId: creSettingsID,
TriggerEventStoreId: triggerEventStoreID,
CapabilityDonId: dependencies.CapabilityDonID,
})

if err != nil {
Expand Down Expand Up @@ -416,6 +417,7 @@ func (s *standardCapabilitiesServer) Initialise(ctx context.Context, request *ca
OrgResolver: orgResolver,
CRESettings: creSettings,
TriggerEventStore: triggerEventStoreClient,
CapabilityDonID: request.CapabilityDonId,
}

if err = s.impl.Initialise(ctx, dependencies); err != nil {
Expand Down
12 changes: 12 additions & 0 deletions pkg/types/core/standard_capabilities_dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,16 @@ type StandardCapabilitiesDependencies struct {
OrgResolver orgresolver.OrgResolver
CRESettings SettingsBroadcaster
TriggerEventStore capabilities.EventStore
// CapabilityDonID is the on-chain DON ID of the capability DON this plugin
// process was spawned for, resolved authoritatively by the host before
// Initialise is called. Plugins should use this as the source of truth for
// their own DON identity (e.g. when emitting events that need to carry the
// *sending* DON ID, distinct from the consumer workflow's DON ID).
//
// Zero means the host did not provide one — either a legacy core node that
// pre-dates this field, or a boot path that has not yet been updated to
// populate it. Plugins SHOULD fall back to resolving via the capability
// registry in that case, but the fallback path cannot disambiguate when
// the local node belongs to multiple DONs running the same capability.
CapabilityDonID uint32
Comment thread
tarcisiozf marked this conversation as resolved.
}
Loading