// Copyright 2020 The Exonum Team // // 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"; package exonum; option java_package = "com.exonum.messages.core"; import "exonum/blockchain.proto"; import "exonum/messages.proto"; import "exonum/proof/map_proof.proto"; // Block with its `Precommit` messages. // // This structure contains enough information to prove the correctness of // a block. It consists of the block itself and the `Precommit` // messages related to this block. message BlockProof { // Block header containing such information as the ID of the node which // proposed the block, the height of the block, the number of transactions // in the block, etc. Block block = 1; // List of `Precommit` messages for the block. repeated SignedMessage precommits = 2; } // Proof of authenticity for a single index within the database. message IndexProof { // Proof of authenticity for the block header. BlockProof block_proof = 1; // Proof of authenticity for the index. Must contain a single key - a full index name // in the form `$service_name.$name_within_service`, e.g., `cryptocurrency.wallets`. // The root hash of the proof must be equal to the `state_hash` mentioned in `block_proof`. proof.MapProof index_proof = 2; } // Proof of authenticity for a single top-level call in a block, such as a transaction. message CallProof { // Proof of authenticity for the block header. BlockProof block_proof = 1; // Proof from the error aggregator (i.e., a `ProofMapIndex` the Merkle root // of which is recorded in the block header as `error_hash`). proof.MapProof call_proof = 2; // Human-readable description of an error if the call status is erroneous. string error_description = 3; }