@@ -10,10 +10,14 @@ option go_package = "github.com/hyperledger/fabric-x-committer/api/protoblocktx"
1010
1111package protoblocktx ;
1212
13- // Represents a transaction in the blockchain.
1413message Tx {
15- repeated TxNamespace namespaces = 1 ; // Namespaces associated with the transaction.
16- repeated bytes signatures = 2 ; // Signature per namespace.
14+ // A list of namespaces that define the transaction's scope.
15+ repeated TxNamespace namespaces = 1 ;
16+
17+ // A list of endorsements.
18+ // IMPORTANT: This list MUST be the same size as the namespaces list.
19+ // The Endorsement at index i corresponds to the namespace at index i.
20+ repeated Endorsements endorsements = 2 ;
1721}
1822
1923// Represents a namespace within a transaction.
@@ -44,9 +48,54 @@ message Write {
4448 bytes value = 2 ; // The value associated with the key being written.
4549}
4650
51+ // Endorsements holds all the signatures that correspond to a single namespace
52+ // in the transaction's namespaces list.
53+ message Endorsements {
54+ // The list of individual signatures for the corresponding namespace.
55+ repeated EndorsementWithIdentity endorsements_with_identity = 1 ;
56+ }
57+
58+ // EndorsementWithIdentity bundles a single signature with the identity of its creator.
59+ message EndorsementWithIdentity {
60+ // The actual cryptographic signature bytes.
61+ bytes endorsement = 1 ;
62+
63+ // The identity of the creator who produced the signature, i.e., the endorsement.
64+ Identity identity = 2 ;
65+ }
66+
67+ message Identity {
68+ // The identifier of the associated membership service provider
69+ string msp_id = 1 ;
70+
71+ oneof creator {
72+ // The full raw bytes of the creator's certificate (e.g., an X.509 certificate).
73+ bytes certificate = 2 ;
74+
75+ // An identifier for a certificate that is pre-stored or known by the committer.
76+ string certificate_id = 3 ;
77+ }
78+ }
79+
4780// Represents a namespace policy.
4881message NamespacePolicy {
49- string scheme = 1 ; // The scheme for signature verification.
82+ PolicyType type = 1 ; // The type of policy used.
83+ bytes policy = 2 ; // The policy rule.
84+ }
85+
86+ enum PolicyType {
87+ // A policy for verifying a single signature that was generated via a Threshold Signature
88+ // Scheme (TSS). In a TSS, a threshold (T) of N parties must cooperate to
89+ // collectively compute and produce the single signature.
90+ THRESHOLD_RULE = 0 ;
91+
92+ // A policy defined by an explicit rule that evaluates one or more required signatures.
93+ // For example: "OR('Org1MSP.admin', 'Org2MSP.admin')"
94+ SIGNATURE_RULE = 1 ;
95+ }
96+
97+ message ThresholdRule {
98+ string scheme = 1 ; // The scheme for signature verification.
5099 bytes public_key = 2 ; // The public key for signature verification.
51100}
52101
@@ -78,7 +127,7 @@ message NamespacePolicies {
78127
79128message PolicyItem {
80129 string namespace = 1 ;
81- bytes policy = 2 ;
130+ bytes policy = 2 ; // This holds the complete NamespacePolicy.
82131 uint64 version = 3 ;
83132}
84133
0 commit comments