OSDN Git Service

add dpos consensus
[bytom/vapor.git] / protocol / bc / bc.proto
index d333667..59d70c2 100644 (file)
@@ -51,6 +51,19 @@ message ValueDestination {
 message Proof {
        bytes sign           = 1;
        bytes controlProgram = 2;
+  bytes address        = 3;
+}
+
+message BytomBlockHeader {
+  uint64            version                 = 1;
+  uint64            height                  = 2;
+  Hash              previous_block_id       = 3;
+  uint64            timestamp               = 4;
+  Hash              transactions_root       = 5;
+  Hash              transaction_status_hash = 6;
+  uint64            nonce                   = 7;
+  uint64            bits                    = 8;
+  TransactionStatus transaction_status      = 9;
 }
 
 message BlockHeader {
@@ -64,6 +77,8 @@ message BlockHeader {
   uint64            bits                    = 8;
   TransactionStatus transaction_status      = 9;
   Proof             Proof                   = 10;
+  bytes             extra                   = 11;
+  bytes             coinbase                = 12;
 }
 
 message TxHeader {
@@ -127,4 +142,16 @@ message Claim {
   repeated bytes   witness_arguments   = 3;
   uint64           ordinal             = 4;
   repeated bytes   Peginwitness        = 5;
-}
\ No newline at end of file
+}
+
+message Dpos {
+  Hash             spent_output_id     = 1;
+  ValueDestination witness_destination = 2;
+  repeated bytes   witness_arguments   = 3;
+  uint64           ordinal             = 4;
+  uint32           type                = 5;
+  string           from                = 6;
+  string           to                  = 7;
+  uint64           stake               = 8;
+  string           data                = 9;
+}