Documentation
¶
Index ¶
- Variables
- type Builder
- func (b *Builder) ClearPending() error
- func (b *Builder) Finalise(signFunc blockchain.BlockSignFunc) error
- func (b *Builder) HighestBlockHeader() *core.Header
- func (b *Builder) InitPendingBlock() error
- func (b *Builder) Pending() (*sync.Pending, error)
- func (b *Builder) PendingBlock() *core.Block
- func (b *Builder) PendingState() (core.StateReader, func() error, error)
- func (b *Builder) Run(ctx context.Context) error
- func (b *Builder) Sign(blockHash, stateDiffCommitment *felt.Felt) ([]*felt.Felt, error)
- func (b *Builder) StartingBlockNumber() (uint64, error)
- func (b *Builder) StorePending(newPending *sync.Pending) error
- func (b *Builder) SubscribeNewHeads() sync.NewHeadSubscription
- func (b *Builder) SubscribePending() sync.PendingSubscription
- func (b *Builder) SubscribeReorg() sync.ReorgSubscription
- func (b *Builder) WithPlugin(junoPlugin plugin.JunoPlugin) *Builder
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NumTxnsToBatchExecute = 10 ErrPendingParentHash = errors.New("pending block parent hash does not match chain head") )
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func New ¶
func New(privKey *ecdsa.PrivateKey, ownAddr *felt.Felt, bc *blockchain.Blockchain, vm vm.VM, blockTime time.Duration, mempool *mempool.Pool, log utils.Logger, disableFees bool, database db.KeyValueStore, ) Builder
func (*Builder) ClearPending ¶
func (*Builder) Finalise ¶
func (b *Builder) Finalise(signFunc blockchain.BlockSignFunc) error
Finalise the pending block and initialise the next one
func (*Builder) HighestBlockHeader ¶
func (*Builder) InitPendingBlock ¶
func (*Builder) PendingBlock ¶
func (*Builder) PendingState ¶
func (b *Builder) PendingState() (core.StateReader, func() error, error)
func (*Builder) StartingBlockNumber ¶
func (*Builder) StorePending ¶
StorePending stores a pending block given that it is for the next height
func (*Builder) SubscribeNewHeads ¶
func (b *Builder) SubscribeNewHeads() sync.NewHeadSubscription
func (*Builder) SubscribePending ¶
func (b *Builder) SubscribePending() sync.PendingSubscription
func (*Builder) SubscribeReorg ¶
func (b *Builder) SubscribeReorg() sync.ReorgSubscription
The builder has no reorg logic (centralised sequencer that can't reorg)
func (*Builder) WithPlugin ¶
func (b *Builder) WithPlugin(junoPlugin plugin.JunoPlugin) *Builder
Click to show internal directories.
Click to hide internal directories.