mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
* initial * fixing from self review * changelog * fixing endpoints and adding test * removed unneeded test * self review * fixing mock columns * fixing tests * gofmt * fixing endpoint * gaz * gofmt * fixing tests * gofmt * gaz * radek comments * gaz * fixing formatting * deduplicating and fixing an old bug, will break into separate PR * better way for version * optimizing post merge and fixing tests * Update beacon-chain/rpc/eth/debug/handlers.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/eth/debug/handlers.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/lookup/blocker.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/lookup/blocker.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/lookup/blocker.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * adding some of radek's feedback * reverting and gaz --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl>
75 lines
3.1 KiB
Go
75 lines
3.1 KiB
Go
package structs
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
type GetBeaconStateV2Response struct {
|
|
Version string `json:"version"`
|
|
ExecutionOptimistic bool `json:"execution_optimistic"`
|
|
Finalized bool `json:"finalized"`
|
|
Data json.RawMessage `json:"data"` // represents the state values based on the version
|
|
}
|
|
|
|
type GetForkChoiceHeadsV2Response struct {
|
|
Data []*ForkChoiceHead `json:"data"`
|
|
}
|
|
|
|
type ForkChoiceHead struct {
|
|
Root string `json:"root"`
|
|
Slot string `json:"slot"`
|
|
ExecutionOptimistic bool `json:"execution_optimistic"`
|
|
}
|
|
|
|
type GetForkChoiceDumpResponse struct {
|
|
JustifiedCheckpoint *Checkpoint `json:"justified_checkpoint"`
|
|
FinalizedCheckpoint *Checkpoint `json:"finalized_checkpoint"`
|
|
ForkChoiceNodes []*ForkChoiceNode `json:"fork_choice_nodes"`
|
|
ExtraData *ForkChoiceDumpExtraData `json:"extra_data"`
|
|
}
|
|
|
|
type ForkChoiceDumpExtraData struct {
|
|
UnrealizedJustifiedCheckpoint *Checkpoint `json:"unrealized_justified_checkpoint"`
|
|
UnrealizedFinalizedCheckpoint *Checkpoint `json:"unrealized_finalized_checkpoint"`
|
|
ProposerBoostRoot string `json:"proposer_boost_root"`
|
|
PreviousProposerBoostRoot string `json:"previous_proposer_boost_root"`
|
|
HeadRoot string `json:"head_root"`
|
|
}
|
|
|
|
type ForkChoiceNode struct {
|
|
Slot string `json:"slot"`
|
|
BlockRoot string `json:"block_root"`
|
|
ParentRoot string `json:"parent_root"`
|
|
JustifiedEpoch string `json:"justified_epoch"`
|
|
FinalizedEpoch string `json:"finalized_epoch"`
|
|
Weight string `json:"weight"`
|
|
Validity string `json:"validity"`
|
|
ExecutionBlockHash string `json:"execution_block_hash"`
|
|
ExtraData *ForkChoiceNodeExtraData `json:"extra_data"`
|
|
}
|
|
|
|
type ForkChoiceNodeExtraData struct {
|
|
UnrealizedJustifiedEpoch string `json:"unrealized_justified_epoch"`
|
|
UnrealizedFinalizedEpoch string `json:"unrealized_finalized_epoch"`
|
|
Balance string `json:"balance"`
|
|
ExecutionOptimistic bool `json:"execution_optimistic"`
|
|
TimeStamp string `json:"timestamp"`
|
|
Target string `json:"target"`
|
|
}
|
|
|
|
type GetDebugDataColumnSidecarsResponse struct {
|
|
Version string `json:"version"`
|
|
ExecutionOptimistic bool `json:"execution_optimistic"`
|
|
Finalized bool `json:"finalized"`
|
|
Data []*DataColumnSidecar `json:"data"`
|
|
}
|
|
|
|
type DataColumnSidecar struct {
|
|
Index string `json:"index"`
|
|
Column []string `json:"column"`
|
|
KzgCommitments []string `json:"kzg_commitments"`
|
|
KzgProofs []string `json:"kzg_proofs"`
|
|
SignedBeaconBlockHeader *SignedBeaconBlockHeader `json:"signed_block_header"`
|
|
KzgCommitmentsInclusionProof []string `json:"kzg_commitments_inclusion_proof"`
|
|
}
|