@@ -10,10 +10,14 @@ option go_package = "github.com/hyperledger/fabric-x-committer/api/protoblocktx"
10
10
11
11
package protoblocktx ;
12
12
13
- // Represents a transaction in the blockchain.
14
13
message 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 signature sets.
18
+ // IMPORTANT: This list MUST be the same size as the namespaces list.
19
+ // The SignatureSet at index i corresponds to the namespace at index i.
20
+ repeated SignatureSet signature_sets = 2 ;
17
21
}
18
22
19
23
// Represents a namespace within a transaction.
@@ -44,10 +48,56 @@ message Write {
44
48
bytes value = 2 ; // The value associated with the key being written.
45
49
}
46
50
51
+ // SignatureSet holds all the signatures that correspond to a single namespace
52
+ // in the transaction's namespaces list.
53
+ message SignatureSet {
54
+ // The list of individual signatures for the corresponding namespace.
55
+ repeated SignatureWithIdentity signatures_with_identity = 1 ;
56
+ }
57
+
58
+ // SignatureWithIdentity bundles a single signature with the identity of its creator.
59
+ message SignatureWithIdentity {
60
+ // The actual cryptographic signature bytes.
61
+ bytes signature = 1 ;
62
+
63
+ // The identity of the creator who produced the signature.
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
+
47
80
// Represents a namespace policy.
48
81
message NamespacePolicy {
49
- string scheme = 1 ; // The scheme for signature verification.
50
- bytes public_key = 2 ; // The public key for signature verification.
82
+ string scheme = 1 ; // The scheme for signature verification.
83
+ bytes policy = 2 ; // The policy rule.
84
+ PolicyType type = 3 ; // The type of policy used.
85
+ }
86
+
87
+ enum PolicyType {
88
+ // A policy for verifying a single signature that was generated via a Threshold Signature
89
+ // Scheme (TSS). In a TSS, a threshold (T) of N parties must cooperate to
90
+ // collectively compute and produce the single signature.
91
+ THRESHOLD_RULE = 0 ;
92
+
93
+ // A policy defined by an explicit rule that evaluates one or more required signatures.
94
+ // For example: "OR('Org1MSP.admin', 'Org2MSP.admin')"
95
+ SIGNATURE_RULE = 1 ;
96
+
97
+ // A policy that implicitly aggregates the results of policies defined at a lower
98
+ // level in the configuration hierarchy. For example, a MAJORITY rule on the
99
+ // Admins policies of all member organizations.
100
+ HIERARCHICAL_RULE = 2 ;
51
101
}
52
102
53
103
message BlockInfo {
@@ -78,7 +128,7 @@ message NamespacePolicies {
78
128
79
129
message PolicyItem {
80
130
string namespace = 1 ;
81
- bytes policy = 2 ;
131
+ bytes policy = 2 ; // This holds the complete NamespacePolicy.
82
132
uint64 version = 3 ;
83
133
}
84
134
0 commit comments