Commit 773fb36f authored by Ubuntu's avatar Ubuntu

update tx definition

parent 620cbc8d
......@@ -12,4 +12,6 @@ message Account {
bytes nonce = 2;
bytes balance = 3;
Hash state_root = 4;
}
\ No newline at end of file
}
......@@ -2,10 +2,89 @@ syntax = "proto3";
package base.v1;
import "google/protobuf/timestamp.proto";
import "google/protobuf/any.proto";
message Hash {
bytes hash = 1;
}
message Address {
bytes address = 1;
}
\ No newline at end of file
}
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";
import "google/protobuf/timestamp.proto";
import "txchecker/v1/resource.proto";
// The standard BatchGet request definition.
message BatchCheckTxRequest {
// The ids of the requested shelves.
//repeated bytes tx = 1; //with rw and block hash
//repeated bytes type= 2;
import "google/protobuf/any.proto";
import "base/v1/resource.proto";
repeated bytes tx = 1;
repeated bytes From =2;
repeated int8 type =3;
message EnumValue {
// The URL, optionally omitted scheme, for the enumeration type.
string type_url = 1;
int32 value =2;
}
//ype checkTx struct{
// tx interface
// From []byte
// type
//}
// type tx struct{
// checkTx
// RW []byte
// wset []byte
// rset []byte
// proof []byte
// stateblocknum int64
// }
enum Corpus {
CORPUS_UNIVERSAL = 0;
CORPUS_WEB =1;
}
// The standard BatchGet request definition.
message BatchCheckTxRequest {
repeated base.v1.CheckTx txs = 1;
}
// 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