eth-blob-indexer/pkg/models.go
Roy Crihfield 3d8d84df86 Initial service
Dockerfile & compose file

CI workflow
2024-05-30 13:24:45 +08:00

37 lines
1.5 KiB
Go

package blob_indexer
import "github.com/protolambda/zrnt/eth2/beacon/common"
type VersionedHash = common.Bytes32
type HeadEvent struct {
Slot common.Slot `json:"slot"`
Block common.Root `json:"block"`
State common.Root `json:"state"`
CurrentDutyDependentRoot common.Root `json:"current_duty_dependent_root"`
PreviousDutyDependentRoot common.Root `json:"previous_duty_dependent_root"`
EpochTransition bool `json:"epoch_transition"`
ExecutionOptimistic bool `json:"execution_optimistic"`
}
type BlobSidecarEvent struct {
BlockRoot common.Root `json:"block_root"`
Index string `json:"index"`
Slot common.Slot `json:"slot"`
KzgCommitment common.KZGCommitment `json:"kzg_commitment"`
VersionedHash VersionedHash `json:"versioned_hash"`
}
type BlobSidecarsResponse struct {
Data []BlobSidecar `json:"data"`
}
type BlobSidecar struct {
Index string `json:"index"`
Blob string `json:"blob"`
KzgCommitment common.KZGCommitment `json:"kzg_commitment"`
KzgProof string `json:"kzg_proof"`
SignedBlockHeader common.SignedBeaconBlockHeader `json:"signed_block_header"`
KzgCommitmentInclusionProof []string `json:"kzg_commitment_inclusion_proof"`
}