Documentation ¶
Index ¶
- func Hex(b []byte) string
- func ScanBlocks(ctx context.Context, api *gsrpc.SubstrateAPI, startBlock uint64) (chan ScanBlocksResult, error)
- func ScanCommitments(ctx context.Context, api *gsrpc.SubstrateAPI, startBlock uint64) (<-chan ScanCommitmentsResult, error)
- func ScanSafeCommitments(ctx context.Context, meta *types.Metadata, api *gsrpc.SubstrateAPI, ...) (<-chan ScanSafeCommitmentsResult, error)
- type Config
- type ContractsConfig
- type EthereumWriter
- type FinalRequestParams
- type InitialRequestParams
- type PolkadotListener
- type Relay
- type Request
- type ScanBlocksResult
- type ScanCommitmentsResult
- type ScanSafeCommitmentsResult
- type SinkConfig
- type SourceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScanBlocks ¶
func ScanBlocks(ctx context.Context, api *gsrpc.SubstrateAPI, startBlock uint64) (chan ScanBlocksResult, error)
func ScanCommitments ¶
func ScanCommitments(ctx context.Context, api *gsrpc.SubstrateAPI, startBlock uint64) (<-chan ScanCommitmentsResult, error)
func ScanSafeCommitments ¶
func ScanSafeCommitments(ctx context.Context, meta *types.Metadata, api *gsrpc.SubstrateAPI, startBlock uint64) (<-chan ScanSafeCommitmentsResult, error)
Types ¶
type Config ¶
type Config struct { Source SourceConfig `mapstructure:"source"` Sink SinkConfig `mapstructure:"sink"` }
type ContractsConfig ¶
type ContractsConfig struct {
BeefyClient string `mapstructure:"BeefyClient"`
}
type EthereumWriter ¶
type EthereumWriter struct {
// contains filtered or unexported fields
}
func NewEthereumWriter ¶
func NewEthereumWriter( config *SinkConfig, conn *ethereum.Connection, ) *EthereumWriter
type FinalRequestParams ¶
type FinalRequestParams struct { Commitment contracts.BeefyClientCommitment Bitfield []*big.Int Proofs []contracts.BeefyClientValidatorProof Leaf contracts.BeefyClientMMRLeaf LeafProof [][32]byte LeafProofOrder *big.Int }
type InitialRequestParams ¶
type InitialRequestParams struct { Commitment contracts.BeefyClientCommitment Bitfield []*big.Int Proof contracts.BeefyClientValidatorProof }
type PolkadotListener ¶
type PolkadotListener struct {
// contains filtered or unexported fields
}
func NewPolkadotListener ¶
func NewPolkadotListener( config *SourceConfig, conn *relaychain.Connection, ) *PolkadotListener
type Request ¶
type Request struct { Validators []substrate.Authority SignedCommitment types.SignedCommitment Proof merkle.SimplifiedMMRProof IsHandover bool }
func (*Request) CommitmentHash ¶
func (*Request) MakeSubmitFinalParams ¶
func (*Request) MakeSubmitInitialParams ¶
func (r *Request) MakeSubmitInitialParams(valAddrIndex int64, initialBitfield []*big.Int) (*InitialRequestParams, error)
Generate RequestParams which contains merkle proof by validator's index together with the signature which will be verified in BeefyClient contract later
type ScanBlocksResult ¶
type ScanCommitmentsResult ¶
type ScanSafeCommitmentsResult ¶
type ScanSafeCommitmentsResult struct { SignedCommitment types.SignedCommitment MMRProof merkle.SimplifiedMMRProof BlockHash types.Hash Depth uint64 Error error }
type SinkConfig ¶
type SinkConfig struct { Ethereum config.EthereumConfig `mapstructure:"ethereum"` DescendantsUntilFinal uint64 `mapstructure:"descendants-until-final"` Contracts ContractsConfig `mapstructure:"contracts"` }
type SourceConfig ¶
type SourceConfig struct { Polkadot config.PolkadotConfig `mapstructure:"polkadot"` // Depth to ignore the beefy updates too far away (in number of blocks) FastForwardDepth uint64 `mapstructure:"fast-forward-depth"` // Period to sample the beefy updates (in number of blocks) UpdatePeriod uint64 `mapstructure:"update-period"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.