mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 19:40:37 +00:00
Persist ETH1 Information (#4305)
* add data structures * generate proto * add in new fields * Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into saveETH1Data * add comments * Merge branch 'master' into saveETH1Data * remove file * Merge branch 'saveETH1Data' of https://github.com/prysmaticlabs/geth-sharding into saveETH1Data * Merge branch 'master' into saveETH1Data * Merge branch 'master' into saveETH1Data * Merge refs/heads/master into saveETH1Data * Merge refs/heads/master into saveETH1Data
This commit is contained in:
parent
78968c1e29
commit
e27bc8312f
@ -7,6 +7,7 @@ proto_library(
|
||||
srcs = [
|
||||
"attestation_container.proto",
|
||||
"finalized_block_root_container.proto",
|
||||
"powchain.proto",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
@ -44,8 +45,8 @@ go_test(
|
||||
srcs = ["attestation_container_helper_test.go"],
|
||||
deps = [
|
||||
":go_default_library",
|
||||
"@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library",
|
||||
"//shared/bls:go_default_library",
|
||||
"@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library",
|
||||
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
|
||||
],
|
||||
)
|
||||
|
1599
proto/beacon/db/powchain.pb.go
generated
Executable file
1599
proto/beacon/db/powchain.pb.go
generated
Executable file
File diff suppressed because it is too large
Load Diff
45
proto/beacon/db/powchain.proto
Normal file
45
proto/beacon/db/powchain.proto
Normal file
@ -0,0 +1,45 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package prysm.beacon.db;
|
||||
|
||||
import "eth/v1alpha1/beacon_block.proto";
|
||||
|
||||
option go_package = "github.com/prysmaticlabs/prysm/proto/beacon/db";
|
||||
|
||||
// ETH1ChainData is a container which holds all the relevant eth1
|
||||
// information
|
||||
message ETH1ChainData {
|
||||
LatestETH1Data current_eth1_data = 1 ;
|
||||
ChainStartData chainstart_data = 2;
|
||||
SparseMerkleTrie trie = 3;
|
||||
}
|
||||
|
||||
// LatestETH1Data contains the current state of the eth1 chain.
|
||||
message LatestETH1Data {
|
||||
uint64 block_height = 2;
|
||||
uint64 block_time = 3;
|
||||
repeated bytes block_hash = 4;
|
||||
uint64 last_requested_block = 5;
|
||||
}
|
||||
|
||||
// ChainStartData contains all the information related to chainstart.
|
||||
message ChainStartData {
|
||||
bool chainstarted = 1;
|
||||
uint64 genesis_time = 2;
|
||||
uint64 genesis_block = 3;
|
||||
ethereum.eth.v1alpha1.Eth1Data eth1_data = 4;
|
||||
repeated ethereum.eth.v1alpha1.Deposit chainstart_deposits = 5;
|
||||
}
|
||||
|
||||
// SparseMerkleTrie is used to describe the model of our deposit trie.
|
||||
message SparseMerkleTrie {
|
||||
uint64 depth = 1;
|
||||
repeated TrieLayer layers = 2;
|
||||
repeated bytes original_items = 3;
|
||||
}
|
||||
|
||||
// TrieLayer is used to represent each layer in the deposit tree due to
|
||||
// the lack of protobuf support for multi-dimensional arrays.(Ex: 3d,4d,...)
|
||||
message TrieLayer {
|
||||
repeated bytes layer = 1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user