github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/protos/block.proto (about)

     1  // Copyright 2016 Intel Corporation
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  // -----------------------------------------------------------------------------
    15  
    16  syntax = "proto3";
    17  option java_multiple_files = true;
    18  option java_package = "sawtooth.sdk.protobuf";
    19  option go_package = "block_pb2";
    20  
    21  import "batch.proto";
    22  
    23  message BlockHeader {
    24      // Block number in the chain
    25      uint64 block_num = 1;
    26  
    27      // The header_signature of the previous block that was added to the chain.
    28      string previous_block_id = 2;
    29  
    30      // Public key for the component internal to the validator that
    31      // signed the BlockHeader
    32      string signer_public_key = 3;
    33  
    34      // List of batch.header_signatures that match the order of batches
    35      // required for the block
    36      repeated string batch_ids = 4;
    37  
    38      // Bytes that are set and verified by the consensus algorithm used to
    39      // create and validate the block
    40      bytes consensus = 5;
    41  
    42      // The state_root_hash should match the final state_root after all
    43      // transactions in the batches have been applied, otherwise the block
    44      // is not valid
    45      string state_root_hash = 6;
    46  }
    47  
    48  message Block {
    49      // The serialized version of the BlockHeader
    50      bytes header = 1;
    51  
    52      // The signature derived from signing the header
    53      string header_signature = 2;
    54  
    55      // A list of batches. The batches may contain new batches that other
    56      // validators may not have received yet, or they will be all batches needed
    57      // for block validation when passed to the journal
    58      repeated Batch batches = 3;
    59  }