forked from digital-asset/daml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
6 - Ledger API changes for UM/UP extensions for Hub [DPP-1211] (digit…
…al-asset#14937) changelog_begin [Ledger API Specification]: 1. Add 'is_deactivated' attribute to participant users. 2. Introduce participant server's local metadata for parties and participant users consisting of: - a resource version for optional concurrent change control, - modifiable key-value based annotations. 3. Add experimental update RPCs for parties and participant users: - participant user's modifiable fields are: 'primary_party', 'is_deactivated', 'metadata.annotations', - party's modifiable fields are 'local_metadata.annotations'. 4. Discourage use of 'party_details.display_name' in favor of using party's metadata annotations. changelog_end Other notes: - no-op updates are allowed, - update paths are resource relative, - as annotation deletion is by providing an key with the empty string value, - as a corollary, only non-empty strings are valid annotation values.
- Loading branch information
Showing
84 changed files
with
4,143 additions
and
1,427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
ledger-api/grpc-definitions/com/daml/ledger/api/v1/admin/object_meta.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
syntax = "proto3"; | ||
|
||
package com.daml.ledger.api.v1.admin; | ||
|
||
option java_outer_classname = "ObjectMetaOuterClass"; | ||
option java_package = "com.daml.ledger.api.v1.admin"; | ||
option csharp_namespace = "Com.Daml.Ledger.Api.V1.Admin"; | ||
|
||
// Represents metadata corresponding to a participant resource (e.g. a participant user or participant local information about a party). | ||
// | ||
// Based on ``ObjectMeta`` meta used in Kubernetes API. | ||
// See https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/v1/generated.proto#L640 | ||
message ObjectMeta { | ||
|
||
// An opaque value populated by a participant server which represents the internal version of the resource | ||
// this ``ObjectMeta`` message is attached to. The participant server will change it to a unique value each time the corresponding resource is updated. | ||
// You must not rely on the format of resource version. The participant server might change it without notice. | ||
// | ||
// You can obtain the newest resource version value by issuing a read request. | ||
// You may use it for concurrent change detection by passing it back unmodified in an update request. | ||
// The participant server will then compare the passed value with the value maintained by the system to determine | ||
// if any other updates took place since you had read the resource version. | ||
// Upon a successful update you are guaranteed that no other update took place during your read-modify-write sequence. | ||
// However, if another update took place during your read-modify-write sequence then your update will fail with an appropriate error. | ||
// | ||
// Concurrent change control is optional. It will be applied only if you include a resource version in an update request. | ||
// | ||
// When creating a new instance of a resource you must leave the resource version empty. | ||
// Its value will be populated by the participant server upon successful resource creation. | ||
// | ||
// Optional | ||
string resource_version = 6; | ||
|
||
// A set of modifiable key-value pairs that can be used to represent arbitrary, client-specific metadata. | ||
// | ||
// Constraints: | ||
// 1. The total size over all keys and values cannot exceed 256kb in UTF-8 encoding. | ||
// 2. Keys are composed of an optional prefix segment and a required name segment such that: | ||
// - key prefix, when present, must be a valid DNS subdomain with at most 253 characters, followed by a '/' (forward slash) character, | ||
// - name segment must have at most 63 characters that are either alphanumeric ([a-z0-9A-Z]), or a '.' (dot), '-' (dash) or '_' (underscore); | ||
// and it must start and end with an alphanumeric character. | ||
// 2. Values can be any non-empty strings. | ||
// | ||
// Keys with empty prefix are reserved for end-users. | ||
// Properties set by external tools or internally by the participant server must use non-empty key prefixes. | ||
// | ||
// Duplicate keys are disallowed by the semantics of the protobuf3 maps. | ||
// See: https://developers.google.com/protocol-buffers/docs/proto3#maps | ||
// | ||
// Annotations may be a part of a modifiable resource. | ||
// Use the resource's update RPC to update its annotations. | ||
// In order to add a new annotation or update an existing one using an update RPC, provide the desired annotation in the update request. | ||
// In order to remove an annotation using an update RPC, provide the target annotation's key but set its value to the empty string in the update request. | ||
// | ||
// Optional | ||
// Modifiable | ||
map<string, string> annotations = 12; | ||
} |
Oops, something went wrong.