-
Notifications
You must be signed in to change notification settings - Fork 515
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull in all latest fabric proto files. Update new chain flow with new structure. Change-Id: Ie9042e2019ee096f0530dcc3caa4071d656e7204 Signed-off-by: Bret Harrison <[email protected]>
- Loading branch information
Showing
13 changed files
with
241 additions
and
148 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* | ||
Copyright IBM Corp. 2017 All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
// XXX This is the older mechanism for specifying channel configuration | ||
// it is intended to be removed once there is no more dependency on it. | ||
|
||
syntax = "proto3"; | ||
|
||
import "common.proto"; | ||
|
||
option go_package = "github.com/hyperledger/fabric/protos/common"; | ||
|
||
package common; | ||
|
||
// ConfigurationEnvelope is designed to contain _all_ configuration for a chain with no dependency | ||
// on previous configuration transactions. | ||
// | ||
// It is generated with the following scheme: | ||
// 1. Retrieve the existing configuration | ||
// 2. Note the highest configuration sequence number, store it and increment it by one | ||
// 3. Modify desired ConfigurationItems, setting each LastModified to the stored and incremented sequence number | ||
// a) Note that the ConfigurationItem has a ChainHeader header attached to it, who's type is set to CONFIGURATION_ITEM | ||
// 4. Update SignedConfigurationItem with appropriate signatures over the modified ConfigurationItem | ||
// a) Each signature is of type ConfigurationSignature | ||
// b) The ConfigurationSignature signature is over the concatenation of signatureHeader and the ConfigurationItem bytes (which includes a ChainHeader) | ||
// 5. Submit new Configuration for ordering in Envelope signed by submitter | ||
// a) The Envelope Payload has data set to the marshaled ConfigurationEnvelope | ||
// b) The Envelope Payload has a header of type Header.Type.CONFIGURATION_TRANSACTION | ||
// | ||
// The configuration manager will verify: | ||
// 1. All configuration items and the envelope refer to the correct chain | ||
// 2. Some configuration item has been added or modified | ||
// 3. No existing configuration item has been ommitted | ||
// 4. All configuration changes have a LastModification of one more than the last configuration's highest LastModification number | ||
// 5. All configuration changes satisfy the corresponding modification policy | ||
message ConfigurationEnvelope { | ||
repeated SignedConfigurationItem Items = 1; | ||
|
||
// XXX This needs to be signed over, purely temporary pending completion of https://jira.hyperledger.org/browse/FAB-1880 | ||
ChainHeader header = 2; | ||
} | ||
|
||
// ConfigurationTemplate is used as a serialization format to share configuration templates | ||
// The orderer supplies a configuration template to the user to use when constructing a new | ||
// chain creation transaction, so this is used to facilitate that. | ||
message ConfigurationTemplate { | ||
repeated ConfigurationItem Items = 1; | ||
} | ||
|
||
// This message may change slightly depending on the finalization of signature schemes for transactions | ||
message SignedConfigurationItem { | ||
bytes ConfigurationItem = 1; | ||
repeated ConfigurationSignature Signatures = 2; | ||
} | ||
|
||
message ConfigurationItem { | ||
enum ConfigurationType { | ||
Policy = 0; // Implies that the Value is a marshaled Policy message, and may be referred to by Key as a ModificationPolicy | ||
Chain = 1; // Marshaled format for this type is yet to be determined | ||
Orderer = 2; // Marshaled format for this type is yet to be determined | ||
Peer = 3; // Marshaled format for this type is yet to be determined | ||
MSP = 4; // Marshaled MSPConfig proto | ||
} | ||
ConfigurationType Type = 1; // The type of configuration this is. | ||
uint64 LastModified = 2; // The Sequence number in the ConfigurationEnvelope this item was last modified | ||
string ModificationPolicy = 3; // What policy to check before allowing modification | ||
string Key = 4; // A unique ID, unique scoped by Type, to reference the value by | ||
bytes Value = 5; // The byte representation of this configuration, usually a marshaled message | ||
} | ||
|
||
message ConfigurationSignature { | ||
bytes signatureHeader = 1; // A marshaled SignatureHeader | ||
bytes signature = 2; // Signature over the concatenation of configurationItem bytes and signatureHeader bytes | ||
} |
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
Oops, something went wrong.