Add ParliaSnapshot table to database for Binance Smart Chain support (#190)

* Add ParliaSnapshot table to database for Binance Smart Chain support

* Add schema description for ParliaSnapshot table
This commit is contained in:
brendan-kelly 2021-11-25 06:48:55 +00:00 committed by GitHub
parent 4258567eb7
commit 057925ba08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -42,6 +42,7 @@ SyncStageUnwind = {}
CliqueSeparate = {} CliqueSeparate = {}
CliqueSnapshot = {} CliqueSnapshot = {}
CliqueLastSnapshot = {} CliqueLastSnapshot = {}
ParliaSnapshot = {}
TxSender = {} TxSender = {}
LastBlock = {} LastBlock = {}
Migration = {} Migration = {}

View File

@ -260,6 +260,19 @@ const (
CliqueSnapshot = "CliqueSnapshot" CliqueSnapshot = "CliqueSnapshot"
CliqueLastSnapshot = "CliqueLastSnapshot" CliqueLastSnapshot = "CliqueLastSnapshot"
// Snapshot table used for Binance Smart Chain's consensus engine Parlia
// Schema of key/value pairs containing:
// Key (string): SnapshotFullKey = SnapshotBucket + num (uint64 big endian) + hash
// Value (JSON blob):
// {
// "number" // Block number where the snapshot was created
// "hash" // Block hash where the snapshot was created
// "validators" // Set of authorized validators at this moment
// "recents" // Set of recent validators for spam protections
// "recent_fork_hashes" // Set of recent forkHash
// }
ParliaSnapshot = "ParliaSnapshot"
// Proof-of-stake // Proof-of-stake
// Beacon chain head that is been executed at the current time // Beacon chain head that is been executed at the current time
CurrentExecutionPayload = "CurrentExecutionPayload" CurrentExecutionPayload = "CurrentExecutionPayload"
@ -337,6 +350,7 @@ var ChaindataTables = []string{
CliqueSeparate, CliqueSeparate,
CliqueLastSnapshot, CliqueLastSnapshot,
CliqueSnapshot, CliqueSnapshot,
ParliaSnapshot,
SyncStageProgress, SyncStageProgress,
PlainState, PlainState,
PlainContractCode, PlainContractCode,