builder

package
v0.0.0-...-d8e7745 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func New

func New(
	mpool *mempool.Pool,
	app monomer.Application,
	blockStore store.BlockStore,
	txStore txstore.TxStore,
	eventBus *bfttypes.EventBus,
	chainID monomer.ChainID,
) *Builder

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, payload *Payload) (*monomer.Block, error)

func (*Builder) Rollback

func (b *Builder) Rollback(ctx context.Context, head, safe, finalized common.Hash) error

Rollback rolls back the block store, tx store, and application. TODO does anything need to be done with the event bus? assumptions:

  • all hashes exist in the block store.
  • finalized.Height <= safe.Height <= head.Height

type Payload

type Payload struct {
	// InjectedTransactions functions as an inclusion list. It contains transactions
	// from the consensus layer that must be included in the block.
	InjectedTransactions bfttypes.Txs
	// TODO: make the gas limit actually be enforced. Need to translate between cosmos and op gas limit.
	GasLimit  uint64
	Timestamp uint64
	NoTxPool  bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL