@@ -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 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 ;
1721}
1822
1923// Represents a namespace within a transaction.
@@ -44,10 +48,56 @@ message Write {
4448 bytes value = 2 ; // The value associated with the key being written.
4549}
4650
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+
4780// Represents a namespace policy.
4881message 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 ;
51101}
52102
53103message BlockInfo {
@@ -78,7 +128,7 @@ message NamespacePolicies {
78128
79129message PolicyItem {
80130 string namespace = 1 ;
81- bytes policy = 2 ;
131+ bytes policy = 2 ; // This holds the complete NamespacePolicy.
82132 uint64 version = 3 ;
83133}
84134
0 commit comments