go-ethereum: github.com/ethereum/go-ethereum/les/checkpointoracle Index | Files

package checkpointoracle

import "github.com/ethereum/go-ethereum/les/checkpointoracle"

Package checkpointoracle is a wrapper of checkpoint oracle contract with additional rules defined. This package can be used both in LES client or server side for offering oracle related APIs.

Index

Package Files

oracle.go

type CheckpointOracle Uses

type CheckpointOracle struct {
    // contains filtered or unexported fields
}

CheckpointOracle is responsible for offering the latest stable checkpoint generated and announced by the contract admins on-chain. The checkpoint can be verified by clients locally during the checkpoint syncing.

func New Uses

func New(config *params.CheckpointOracleConfig, getLocal func(uint64) params.TrustedCheckpoint) *CheckpointOracle

New creates a checkpoint oracle handler with given configs and callback.

func (*CheckpointOracle) Contract Uses

func (oracle *CheckpointOracle) Contract() *checkpointoracle.CheckpointOracle

Contract returns the underlying raw checkpoint oracle contract.

func (*CheckpointOracle) IsRunning Uses

func (oracle *CheckpointOracle) IsRunning() bool

IsRunning returns an indicator whether the oracle is running.

func (*CheckpointOracle) StableCheckpoint Uses

func (oracle *CheckpointOracle) StableCheckpoint() (*params.TrustedCheckpoint, uint64)

StableCheckpoint returns the stable checkpoint which was generated by local indexers and announced by trusted signers.

func (*CheckpointOracle) Start Uses

func (oracle *CheckpointOracle) Start(backend bind.ContractBackend)

Start binds the contract backend, initializes the oracle instance and marks the status as available.

func (*CheckpointOracle) VerifySigners Uses

func (oracle *CheckpointOracle) VerifySigners(index uint64, hash [32]byte, signatures [][]byte) (bool, []common.Address)

VerifySigners recovers the signer addresses according to the signature and checks whether there are enough approvals to finalize the checkpoint.

Package checkpointoracle imports 8 packages (graph) and is imported by 10 packages. Updated 2020-01-07. Refresh now. Tools for package owners.