github.com/amazechain/amc@v0.1.3/api/protocol/types_pb/types.proto (about) 1 // Copyright 2022 The AmazeChain Authors 2 // This file is part of the AmazeChain library. 3 // 4 // The AmazeChain library is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU Lesser General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // The AmazeChain library is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU Lesser General Public License for more details. 13 // 14 // You should have received a copy of the GNU Lesser General Public License 15 // along with the AmazeChain library. If not, see <http://www.gnu.org/licenses/>. 16 17 syntax = "proto3"; 18 package types_pb; 19 20 import "ext/options.proto"; 21 22 option go_package = "github.com/amazechain/amc/api/protocol/types_pb"; 23 24 25 message H128 { 26 uint64 hi = 1; 27 uint64 lo = 2; 28 } 29 30 message H160 { 31 H128 hi = 1; 32 uint32 lo = 2; 33 } 34 35 message H256 { 36 H128 hi = 1; 37 H128 lo = 2; 38 } 39 40 message H384{ // 48 byte 41 H256 hi = 1; 42 H128 lo = 2; 43 } 44 45 message H768 { // 96 byte 46 H384 hi = 1; 47 H384 lo = 2; 48 } 49 50 message H512 { 51 H256 hi = 1; 52 H256 lo = 2; 53 } 54 55 message H1024 { 56 H512 hi = 1; 57 H512 lo = 2; 58 } 59 60 message H2048 { 61 H1024 hi = 1; 62 H1024 lo = 2; 63 } 64 65 66 message Block{ 67 Header Header = 1; 68 Body body = 2; 69 } 70 71 message Header { 72 H256 ParentHash = 1 ; 73 H160 Coinbase = 2 ; 74 H256 Root = 3 ; 75 H256 TxHash = 4 ; 76 H256 ReceiptHash = 5 ; 77 H256 Difficulty = 6; 78 H256 Number = 7; 79 uint64 GasLimit = 8; 80 uint64 GasUsed = 9; 81 uint64 Time = 10; 82 uint64 Nonce = 11; 83 H256 BaseFee = 12 ; 84 // 65+32 byte (clique) 85 bytes Extra = 13 [(ext.ssz_max) = "117"]; 86 H768 Signature = 14; 87 H2048 Bloom = 15; 88 H256 MixDigest = 16; 89 } 90 91 message Verifier { 92 H384 PublicKey = 1; 93 H160 Address = 2; 94 } 95 96 message Reward { 97 H256 Amount = 1; 98 H160 Address = 2; 99 } 100 101 message Body { 102 repeated Transaction txs = 1 [(ext.ssz_max) = "104857600"]; 103 repeated Verifier verifiers = 2 [(ext.ssz_max) = "104857600"]; 104 repeated Reward rewards = 3 [(ext.ssz_max) = "104857600"]; 105 } 106 107 message Transaction { 108 uint64 type = 1; 109 uint64 nonce = 2; 110 H256 gasPrice = 3; 111 uint64 gas = 4; 112 H256 feePerGas = 5; 113 H256 priorityFeePerGas = 6; 114 H256 value = 7; 115 bytes data = 8 [(ext.ssz_max) = "104857600"]; 116 bytes sign = 9 [(ext.ssz_max) = "104857600"]; 117 H160 to = 10; 118 H160 from = 11; 119 uint64 chainID = 12; 120 H256 hash = 13; 121 H256 r = 14; 122 H256 s = 15; 123 H256 v = 16; 124 } 125 126 message Receipts { 127 repeated Receipt receipts = 1; 128 } 129 130 message Receipt { 131 uint32 Type = 1; 132 bytes PostState = 2; 133 uint64 Status = 3; 134 uint64 CumulativeGasUsed = 4; 135 H2048 Bloom = 5; 136 repeated Log Logs = 6; 137 H256 TxHash = 7 ; 138 H160 ContractAddress = 8; 139 uint64 GasUsed = 9; 140 H256 BlockHash = 10; 141 H256 BlockNumber = 11; 142 uint64 TransactionIndex = 12; 143 } 144 145 message Log { 146 H160 Address = 1; 147 repeated H256 Topics = 2; 148 bytes Data = 3; 149 H256 BlockNumber = 4; 150 H256 TxHash = 5; 151 uint64 TxIndex = 6; 152 H256 BlockHash = 7; 153 uint64 Index = 8; 154 bool Removed = 9; 155 } 156 157 message Logs { 158 repeated Log logs = 1; 159 } 160