Commit 773fb36f authored by Ubuntu's avatar Ubuntu

update tx definition

parent 620cbc8d
...@@ -13,3 +13,5 @@ message Account { ...@@ -13,3 +13,5 @@ message Account {
bytes balance = 3; bytes balance = 3;
Hash state_root = 4; Hash state_root = 4;
} }
...@@ -2,6 +2,9 @@ syntax = "proto3"; ...@@ -2,6 +2,9 @@ syntax = "proto3";
package base.v1; package base.v1;
import "google/protobuf/timestamp.proto";
import "google/protobuf/any.proto";
message Hash { message Hash {
bytes hash = 1; bytes hash = 1;
} }
...@@ -9,3 +12,79 @@ message Hash { ...@@ -9,3 +12,79 @@ message Hash {
message Address { message Address {
bytes address = 1; bytes address = 1;
} }
message EthTransaction {
Txdata data = 1;
google.protobuf.Timestamp time =2;
}
message Txdata{
uint64 account_nonce =1;
bytes price =2 ;
uint64 gas_limit =3;
Address recipient =4;
bytes amount =5;
bytes payload =6;
bytes v =7;
bytes r=8;
bytes s=9;
//This is only used when marshaling to JSON.
Hash hash=10;
}
message CheckTx {
google.protobuf.Any tx = 1;
Address from =2;
}
message transaction{
bytes rset = 1;
bytes wset = 2;
bytes proof =3;
int64 state_block_num =4;
int64 timeout_block_num =5;
CheckTx check_tx =6;
}
//ype checkTx struct{
// tx interface
// From []byte
// type
//}
// type tx struct{
// checkTx
// wset []byte
// rset []byte
// proof []byte
// stateblocknum int64
// }
// type Transaction struct {
// data txdata // Consensus contents of a transaction
// time time.Time // Time first seen locally (spam avoidance)
// // caches
// hash atomic.Value
// size atomic.Value
// from atomic.Value
// }
// type txdata struct {
// AccountNonce uint64 `json:"nonce" gencodec:"required"`
// Price *big.Int `json:"gasPrice" gencodec:"required"`
// GasLimit uint64 `json:"gas" gencodec:"required"`
// Recipient *common.Address `json:"to" rlp:"nil"` // nil means contract creation
// Amount *big.Int `json:"value" gencodec:"required"`
// Payload []byte `json:"input" gencodec:"required"`
// // Signature values
// V *big.Int `json:"v" gencodec:"required"`
// R *big.Int `json:"r" gencodec:"required"`
// S *big.Int `json:"s" gencodec:"required"`
// // This is only used when marshaling to JSON.
// Hash *common.Hash `json:"hash" rlp:"-"`
// }
\ No newline at end of file
...@@ -6,32 +6,28 @@ import "google/protobuf/field_mask.proto"; ...@@ -6,32 +6,28 @@ import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
import "txchecker/v1/resource.proto"; import "txchecker/v1/resource.proto";
// The standard BatchGet request definition. import "google/protobuf/any.proto";
message BatchCheckTxRequest {
// The ids of the requested shelves. import "base/v1/resource.proto";
//repeated bytes tx = 1; //with rw and block hash
//repeated bytes type= 2;
repeated bytes tx = 1;
repeated bytes From =2; message EnumValue {
repeated int8 type =3; // The URL, optionally omitted scheme, for the enumeration type.
string type_url = 1;
int32 value =2;
} }
//ype checkTx struct{
// tx interface enum Corpus {
// From []byte CORPUS_UNIVERSAL = 0;
// type CORPUS_WEB =1;
//} }
// type tx struct{ // The standard BatchGet request definition.
// checkTx message BatchCheckTxRequest {
// RW []byte repeated base.v1.CheckTx txs = 1;
// wset []byte }
// rset []byte
// proof []byte
// stateblocknum int64
// }
// The standard BatchGet response definition. // The standard BatchGet response definition.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment