Documentation
¶
Index ¶
- Variables
- type Publisher
- func (p *Publisher) ExtractRollupTxs(block *types.Block) []*ethadapter.L1RollupTx
- func (p *Publisher) ExtractSecretResponses(block *types.Block) []*ethadapter.L1RespondSecretTx
- func (p *Publisher) FetchLatestPeersList() ([]string, error)
- func (p *Publisher) FetchLatestSeqNo() (*big.Int, error)
- func (p *Publisher) HealthStatus() host.HealthStatus
- func (p *Publisher) InitializeSecret(attestation *common.AttestationReport, ...) error
- func (p *Publisher) PublishRollup(producedRollup *common.ExtRollup)
- func (p *Publisher) PublishSecretResponse(secretResponse *common.ProducedSecretResponse) error
- func (p *Publisher) RequestSecret(attestation *common.AttestationReport) (gethcommon.Hash, error)
- func (p *Publisher) Start() error
- func (p *Publisher) Stop() error
- type Repository
- func (r *Repository) FetchBlockByHeight(height *big.Int) (*types.Block, error)
- func (r *Repository) FetchNextBlock(prevBlockHash gethcommon.Hash) (*types.Block, bool, error)
- func (r *Repository) FetchObscuroReceipts(block *common.L1Block) (types.Receipts, error)
- func (r *Repository) HealthStatus() host.HealthStatus
- func (r *Repository) Start() error
- func (r *Repository) Stop() error
- func (r *Repository) Subscribe(handler host.L1BlockHandler) func()
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoNextBlock = errors.New("no next block")
)
Functions ¶
This section is empty.
Types ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewL1Publisher ¶
func NewL1Publisher( hostData host.Identity, hostWallet wallet.Wallet, client ethadapter.EthClient, mgmtContract mgmtcontractlib.MgmtContractLib, repository host.L1BlockRepository, hostStopper *stopcontrol.StopControl, logger gethlog.Logger, maxWaitForL1Receipt time.Duration, retryIntervalForL1Receipt time.Duration, ) *Publisher
func (*Publisher) ExtractRollupTxs ¶
func (p *Publisher) ExtractRollupTxs(block *types.Block) []*ethadapter.L1RollupTx
func (*Publisher) ExtractSecretResponses ¶
func (p *Publisher) ExtractSecretResponses(block *types.Block) []*ethadapter.L1RespondSecretTx
func (*Publisher) FetchLatestPeersList ¶
func (*Publisher) HealthStatus ¶
func (p *Publisher) HealthStatus() host.HealthStatus
func (*Publisher) InitializeSecret ¶
func (p *Publisher) InitializeSecret(attestation *common.AttestationReport, encSecret common.EncryptedSharedEnclaveSecret) error
func (*Publisher) PublishRollup ¶
func (*Publisher) PublishSecretResponse ¶
func (p *Publisher) PublishSecretResponse(secretResponse *common.ProducedSecretResponse) error
func (*Publisher) RequestSecret ¶
func (p *Publisher) RequestSecret(attestation *common.AttestationReport) (gethcommon.Hash, error)
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository is a host service for subscribing to new blocks and looking up L1 data
func NewL1Repository ¶
func NewL1Repository(ethClient ethadapter.EthClient, obscuroRelevantContracts []gethcommon.Address, logger gethlog.Logger) *Repository
func (*Repository) FetchBlockByHeight ¶
func (*Repository) FetchNextBlock ¶
func (r *Repository) FetchNextBlock(prevBlockHash gethcommon.Hash) (*types.Block, bool, error)
FetchNextBlock calculates the next canonical block that should be sent to requester after a given hash. It returns the block and a bool for whether it is the latest known head
func (*Repository) FetchObscuroReceipts ¶ added in v0.17.0
FetchObscuroReceipts returns all obscuro-relevant receipts for an L1 block
func (*Repository) HealthStatus ¶
func (r *Repository) HealthStatus() host.HealthStatus
func (*Repository) Start ¶
func (r *Repository) Start() error
func (*Repository) Stop ¶
func (r *Repository) Stop() error
func (*Repository) Subscribe ¶
func (r *Repository) Subscribe(handler host.L1BlockHandler) func()
Subscribe will register a new block handler to receive new blocks as they arrive, returns unsubscribe func
Click to show internal directories.
Click to hide internal directories.