Documentation ¶
Index ¶
Constants ¶
View Source
const ( BEACON_STATE_GINDEX = 11 RECEIPTS_ROOT_GINDEX = 6435 BLOCK_ROOTS_GINDEX int64 = 37 SLOTS_PER_HISTORICAL_LIMIT = 8192 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeaconClient ¶
type BeaconClient interface { BeaconBlockHeader( ctx context.Context, opts *api.BeaconBlockHeaderOpts, ) ( *api.Response[*apiv1.BeaconBlockHeader], error, ) BeaconState( ctx context.Context, opts *api.BeaconStateOpts, ) ( *api.Response[*spec.VersionedBeaconState], error, ) SignedBeaconBlock(ctx context.Context, opts *api.SignedBeaconBlockOpts, ) ( *api.Response[*spec.VersionedSignedBeaconBlock], error, ) }
type ReceiptProver ¶
type ReceiptProver struct {
// contains filtered or unexported fields
}
func NewReceiptProver ¶
func NewReceiptProver(txFetcher TransactionFetcher) *ReceiptProver
func (*ReceiptProver) ReceiptProof ¶
func (p *ReceiptProver) ReceiptProof(txHash common.Hash) ([][]byte, error)
ReceiptProof calculates the Ethereum receipt proof for the specified transaction hash. The root hash of the proof is the block `receiptRoof` field.
type ReceiptRootProver ¶
type ReceiptRootProver struct {
// contains filtered or unexported fields
}
func NewReceiptRootProver ¶
func NewReceiptRootProver(beaconClient BeaconClient, spec config.Spec) *ReceiptRootProver
func (*ReceiptRootProver) ReceiptsRootProof ¶
func (p *ReceiptRootProver) ReceiptsRootProof(ctx context.Context, currentSlot *big.Int, targetSlot *big.Int) ([][]byte, error)
ReceiptRootProof returns the prove from the beacon block root to the receipt roof of the given slot. The path for the proof is beacon block -> beacon state -> block roots -> execution payload header -> receipt root.
Click to show internal directories.
Click to hide internal directories.