forked from hyperledger-archives/sawtooth-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblock.proto
59 lines (48 loc) · 2 KB
/
block.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright 2016 Intel Corporation
//
// 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.
// -----------------------------------------------------------------------------
syntax = "proto3";
option java_multiple_files = true;
option java_package = "sawtooth.sdk.protobuf";
option go_package = "block_pb2";
import "batch.proto";
message BlockHeader {
// Block number in the chain
uint64 block_num = 1;
// The header_signature of the previous block that was added to the chain.
string previous_block_id = 2;
// Public key for the component internal to the validator that
// signed the BlockHeader
string signer_public_key = 3;
// List of batch.header_signatures that match the order of batches
// required for the block
repeated string batch_ids = 4;
// Bytes that are set and verified by the consensus algorithm used to
// create and validate the block
bytes consensus = 5;
// The state_root_hash should match the final state_root after all
// transactions in the batches have been applied, otherwise the block
// is not valid
string state_root_hash = 6;
}
message Block {
// The serialized version of the BlockHeader
bytes header = 1;
// The signature derived from signing the header
string header_signature = 2;
// A list of batches. The batches may contain new batches that other
// validators may not have received yet, or they will be all batches needed
// for block validation when passed to the journal
repeated Batch batches = 3;
}