1message InternalBlock {2// block version3// 區塊版本4int32 version =1;5// Random number used to avoid replay attacks6// 隨機數,用來避免重放攻擊7int32 nonce =2;8// blockid generate the hash sign of the block used by sha2569// 區塊的唯一標識10 bytes blockid =3;11// pre_hash is the parent blockid of the block12// 區塊的前置依賴區塊ID13 bytes pre_hash =4;14// The miner id15// 礦工ID16 bytes proposer =5;17// 礦工對區塊的簽名18// The sign which miner signed: blockid + nonce + timestamp19 bytes sign =6;20// The pk of the miner21// 礦工公鑰22 bytes pubkey =7;23// The Merkle Tree root24// 默克爾樹樹根25 bytes merkle_root =8;26// The height of the blockchain27// 區塊所在高度28int64 height =9;29// Timestamp of the block30// 打包區塊的時間戳31int64 timestamp =10;32// Transactions of the block, only txid stored on kv, the detail information33// stored in another table34// 交易內容35 repeated Transaction transactions =11;36// The transaction count of the block37// 區塊中包含的交易數量38int32 tx_count =12;39// 所有交易hash的merkle tree40 repeated bytes merkle_tree =13;41// 采用DPOS共識算法時,當前是第幾輪42int64 curTerm =16;43int64 curBlockNum =17;44// 區塊中執行失敗的交易以及對應的失敗原因45map<string,string> failed_txs =18;// txid -> failed reason46// 采用POW共識算法時,對應的挖礦難度值47int32 targetBits =19;48// 下面的屬性會動態變化49// If the block is on the trunk50// 該區塊是否在主干上51bool in_trunk =14;52// Next next block which on trunk53// 當前區塊的后繼區塊ID54 bytes next_hash =15;55}