Documentation
¶
Index ¶
- type ArweaveBlock
- type ArweaveParser
- type Controller
- type OneBlockDownloader
- func (self *OneBlockDownloader) WithBackoff(maxElapsedTime, maxInterval time.Duration) *OneBlockDownloader
- func (self *OneBlockDownloader) WithClient(client *arweave.Client) *OneBlockDownloader
- func (self *OneBlockDownloader) WithInputChannel(v chan *Payload) *OneBlockDownloader
- func (self *OneBlockDownloader) WithMonitor(monitor monitoring.Monitor) *OneBlockDownloader
- type Parser
- type Payload
- type Source
- type Store
- type Streamer
- type TransactionOrchestrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArweaveBlock ¶ added in v0.2.40
type ArweaveBlock struct {
// Arweave Blocks with L1 transactions, parsed from Sequencer's txs
Message *types.MsgArweaveBlock
// Corresponding block downloaded from Arweave
Block *arweave.Block
// Transactions from the block
Transactions []*arweave.Transaction
}
type ArweaveParser ¶ added in v0.2.40
type ArweaveParser struct {
*task.Task
Output chan *Payload
// contains filtered or unexported fields
}
Gets contract's source and init state
func NewArweaveParser ¶ added in v0.2.40
func NewArweaveParser(config *config.Config) (self *ArweaveParser)
Converts Arweave transactions into Warp's interactions
func (*ArweaveParser) WithInputChannel ¶ added in v0.2.40
func (self *ArweaveParser) WithInputChannel(v chan *Payload) *ArweaveParser
func (*ArweaveParser) WithMonitor ¶ added in v0.2.40
func (self *ArweaveParser) WithMonitor(monitor monitoring.Monitor) *ArweaveParser
type Controller ¶
func NewController ¶
func NewController(config *config.Config) (self *Controller, err error)
type OneBlockDownloader ¶ added in v0.2.40
type OneBlockDownloader struct {
*task.Task
Output chan *Payload
// contains filtered or unexported fields
}
Task for filling in the arweave blocks in Payload
func NewOneBlockDownloader ¶ added in v0.2.40
func NewOneBlockDownloader(config *config.Config) (self *OneBlockDownloader)
Using Arweave client periodically checks for blocks of transactions
func (*OneBlockDownloader) WithBackoff ¶ added in v0.2.40
func (self *OneBlockDownloader) WithBackoff(maxElapsedTime, maxInterval time.Duration) *OneBlockDownloader
func (*OneBlockDownloader) WithClient ¶ added in v0.2.40
func (self *OneBlockDownloader) WithClient(client *arweave.Client) *OneBlockDownloader
func (*OneBlockDownloader) WithInputChannel ¶ added in v0.2.40
func (self *OneBlockDownloader) WithInputChannel(v chan *Payload) *OneBlockDownloader
func (*OneBlockDownloader) WithMonitor ¶ added in v0.2.40
func (self *OneBlockDownloader) WithMonitor(monitor monitoring.Monitor) *OneBlockDownloader
type Parser ¶ added in v0.2.40
Parses Sequencer's blocks into payload
func (*Parser) WithInputChannel ¶ added in v0.2.40
func (*Parser) WithMonitor ¶ added in v0.2.40
func (self *Parser) WithMonitor(monitor monitoring.Monitor) *Parser
type Payload ¶
type Payload struct {
SequencerBlockHash string
SequencerBlockHeight int64
SequencerBlockTimestamp int64
// L2 interactions parsed from Sequencer's txs
Interactions []*model.Interaction
// Bundle items that will be sent to bundlr.network
BundleItems []*model.BundleItem
// Info about Arweave blocks
ArweaveBlocks []*ArweaveBlock
}
type Source ¶
type Source struct {
*task.Task
Output chan *types.Block
// contains filtered or unexported fields
}
Produces a stream of Sequencer's blocks It uses Streamer to get new blocks from the Sequencer It uses Sequencer's REST API for downloading historical blocks Downloads historical blocks in case there's a gap in the stream
func (*Source) WithInputChannel ¶
func (*Source) WithMonitor ¶
func (self *Source) WithMonitor(monitor monitoring.Monitor) *Source
type Store ¶
type Store struct {
*task.Processor[*Payload, *Payload]
DB *gorm.DB
// contains filtered or unexported fields
}
Store handles saving data to the database in na robust way. - groups incoming Interactions into batches, - ensures data isn't stuck even if a batch isn't big enough
func (*Store) WithInputChannel ¶
func (*Store) WithMonitor ¶
func (self *Store) WithMonitor(v monitoring.Monitor) *Store
type Streamer ¶
type Streamer struct {
*task.Task
Output chan *types.Block
// contains filtered or unexported fields
}
Streams new blocks from the sequencer
func NewStreamer ¶
Maintains a persistent websocket connection to the sequencer Gets new blocks through the websocket
func (*Streamer) WithMonitor ¶
func (self *Streamer) WithMonitor(v monitoring.Monitor) *Streamer
type TransactionOrchestrator ¶ added in v0.2.40
type TransactionOrchestrator struct {
*task.Task
Output chan *Payload
TransactionOutput chan *arweave.Block
// contains filtered or unexported fields
}
Task that saves transactions to the payload It reuses listener.TransactionOrchestrator
func NewTransactionOrchestrator ¶ added in v0.2.40
func NewTransactionOrchestrator(config *config.Config) (self *TransactionOrchestrator)
Using Arweave client periodically checks for blocks of transactions
func (*TransactionOrchestrator) WithInputChannel ¶ added in v0.2.40
func (self *TransactionOrchestrator) WithInputChannel(v chan *Payload) *TransactionOrchestrator
func (*TransactionOrchestrator) WithTransactionInput ¶ added in v0.2.40
func (self *TransactionOrchestrator) WithTransactionInput(v chan *listener.Payload) *TransactionOrchestrator