Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MetaProtocol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nebula
MetaProtocol
Commits
1b0e8466
Commit
1b0e8466
authored
Dec 09, 2022
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update base api
parent
0162faf4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
47 deletions
+86
-47
batchtx.proto
baseapi/base/v1/batchtx.proto
+15
-0
eth_blocks.proto
baseapi/base/v1/eth_blocks.proto
+44
-0
eth_tx.proto
baseapi/base/v1/eth_tx.proto
+6
-41
meta.proto
baseapi/base/v1/meta.proto
+21
-6
No files found.
baseapi/base/v1/batchtx.proto
0 → 100644
View file @
1b0e8466
syntax
=
"proto3"
;
package
base
.
v1
;
import
"google/protobuf/timestamp.proto"
;
import
"google/protobuf/any.proto"
;
import
"base/v1/resource.proto"
;
import
"base/v1/meta.proto"
;
// BatchTx include one batchHash and all original tx contained in batch.
// it will broadcast to nebula over p2p module, and then save in p2p module.
message
BatchTx
{
Hash
batch_hash
=
1
;
repeated
MetaProofTx
txs
=
2
;
}
baseapi/base/v1/eth_blocks.proto
0 → 100644
View file @
1b0e8466
syntax
=
"proto3"
;
package
base
.
v1
;
import
"google/protobuf/timestamp.proto"
;
import
"google/protobuf/any.proto"
;
import
"base/v1/resource.proto"
;
import
"base/v1/eth_tx.proto"
;
message
EthBloom
{
bytes
data
=
1
;
}
message
EthBlockHeader
{
Hash
parent_hash
=
1
;
Hash
uncle_hash
=
2
;
Hash
block_hash
=
3
;
Address
miner
=
4
;
Hash
state_root
=
5
;
Hash
txs_root
=
6
;
Hash
receipts_root
=
7
;
BigInt
block_number
=
8
;
EthBloom
block_bloom
=
9
;
BigInt
difficulty
=
10
;
uint64
gas_limit
=
11
;
uint64
gas_used
=
12
;
uint64
timestamp
=
13
;
bytes
extra
=
14
;
Hash
mix_hash
=
15
;
BigInt
block_nonce
=
16
;
BigInt
base_fee
=
17
;
}
message
EthBlockBody
{
repeated
EthTransaction
txs
=
1
;
repeated
EthBlockHeader
uncles
=
2
;
}
message
EthBlock
{
EthBlockHeader
header
=
1
;
repeated
EthBlockHeader
uncles
=
2
;
repeated
EthTransaction
txs
=
3
;
}
\ No newline at end of file
baseapi/base/v1/eth.proto
→
baseapi/base/v1/eth
_tx
.proto
View file @
1b0e8466
...
...
@@ -6,17 +6,13 @@ import "google/protobuf/timestamp.proto";
import
"google/protobuf/any.proto"
;
import
"base/v1/resource.proto"
;
message
Eth
AccessTuple
{
message
AccessTuple
{
Address
address
=
1
;
repeated
Hash
storage_keys
=
2
;
}
message
EthAccessList
{
repeated
EthAccessTuple
access_list
=
1
;
}
message
EthBloom
{
bytes
data
=
1
;
message
AccessList
{
repeated
AccessTuple
access_list
=
1
;
}
message
EthTxParam
{
...
...
@@ -53,7 +49,7 @@ message EthAccessListTx {
Address
to
=
5
;
BigInt
value
=
6
;
bytes
data
=
7
;
Eth
AccessList
access_list
=
8
;
AccessList
access_list
=
8
;
BigInt
v
=
9
;
BigInt
r
=
10
;
BigInt
s
=
11
;
...
...
@@ -68,14 +64,14 @@ message EthDynamicFeeTx {
Address
to
=
6
;
BigInt
value
=
7
;
bytes
data
=
8
;
Eth
AccessList
access_list
=
9
;
AccessList
access_list
=
9
;
BigInt
v
=
10
;
BigInt
r
=
11
;
BigInt
s
=
12
;
}
message
EthTransaction
{
google.protobuf.Any
tx
=
1
;
google.protobuf.Any
tx
=
1
;
// one of EthLegacyTx, EthAccessListTx, EthDynamicFeeTx
}
// EthTxLog reference ethereum Log struct.
...
...
@@ -105,34 +101,3 @@ message Receipt {
BigInt
block_number
=
11
;
uint32
tx_index
=
12
;
}
message
EthBlockHeader
{
Hash
parent_hash
=
1
;
Hash
uncle_hash
=
2
;
Hash
block_hash
=
3
;
Address
miner
=
4
;
Hash
state_root
=
5
;
Hash
txs_root
=
6
;
Hash
receipts_root
=
7
;
BigInt
block_number
=
8
;
EthBloom
block_bloom
=
9
;
BigInt
difficulty
=
10
;
uint64
gas_limit
=
11
;
uint64
gas_used
=
12
;
uint64
timestamp
=
13
;
bytes
extra
=
14
;
Hash
mix_hash
=
15
;
BigInt
block_nonce
=
16
;
BigInt
base_fee
=
17
;
}
message
EthBlockBody
{
repeated
EthTransaction
txs
=
1
;
repeated
EthBlockHeader
uncles
=
2
;
}
message
EthBlock
{
EthBlockHeader
header
=
1
;
repeated
EthBlockHeader
uncles
=
2
;
repeated
EthTransaction
txs
=
3
;
}
\ No newline at end of file
baseapi/base/v1/meta.proto
View file @
1b0e8466
...
...
@@ -5,8 +5,9 @@ package base.v1;
import
"google/protobuf/timestamp.proto"
;
import
"google/protobuf/any.proto"
;
import
"base/v1/resource.proto"
;
import
"base/v1/eth_tx.proto"
;
message
Meta
Tx
Proof
{
message
MetaProof
{
bytes
rset
=
1
;
bytes
wset
=
2
;
bytes
proof
=
3
;
...
...
@@ -14,14 +15,28 @@ message MetaTxProof{
}
message
MetaTxBase
{
EthTransaction
tx
=
1
;
Address
from
=
2
;
google.protobuf.Timestamp
receive_time
=
3
;
BigInt
chain_id
=
1
;
uint64
nonce
=
2
;
BigInt
gas_price
=
3
;
uint64
gas
=
4
;
Address
to
=
5
;
BigInt
value
=
6
;
bytes
data
=
7
;
AccessList
access_list
=
8
;
BigInt
v
=
9
;
BigInt
r
=
10
;
BigInt
s
=
11
;
Address
from
=
12
;
google.protobuf.Timestamp
receive_time
=
13
;
}
message
MetaTx
{
message
Meta
Proof
Tx
{
MetaTxBase
base
=
1
;
MetaTxProof
proof
=
2
;
MetaProof
proof
=
2
;
}
message
MetaTx
{
}
message
MetaBlockHeader
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment