builder

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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(
	bc *blockchain.Blockchain,
	vm vm.VM,
	log utils.Logger,
	disableFees bool,
) Builder

func (*Builder) ClearPending

func (b *Builder) ClearPending() error

func (*Builder) ExecutePending added in v0.14.6

func (b *Builder) ExecutePending() (*core.BlockCommitments, *felt.Felt, error)

ExecutePending updates the pending block and state-update

func (*Builder) ExecuteTxns added in v0.14.6

func (b *Builder) ExecuteTxns(txns []mempool.BroadcastedTransaction) error

func (*Builder) Finalise

func (b *Builder) Finalise(pending *sync.Pending, signer utils.BlockSignFunc, privateKey *ecdsa.PrivateKey) error

func (*Builder) GetRevealedBlockHash added in v0.14.6

func (b *Builder) GetRevealedBlockHash() (*felt.Felt, error)

func (*Builder) InitPendingBlock

func (b *Builder) InitPendingBlock(sequencerAddress *felt.Felt) error

func (*Builder) L2GasConsumed added in v0.14.6

func (b *Builder) L2GasConsumed() uint64

func (*Builder) Pending

func (b *Builder) Pending() (*sync.Pending, error)

func (*Builder) PendingBlock

func (b *Builder) PendingBlock() *core.Block

func (*Builder) PendingState

func (b *Builder) PendingState() (core.StateReader, func() error, error)

func (*Builder) ProposalInit added in v0.14.6

func (b *Builder) ProposalInit(pInit *types.ProposalInit) error

func (*Builder) RunTxns added in v0.14.6

func (b *Builder) RunTxns(txns []mempool.BroadcastedTransaction, blockHashToBeRevealed *felt.Felt) (err error)

RunTxns executes the provided transaction and applies the state changes to the pending state

func (*Builder) SetBlockInfo added in v0.14.6

func (b *Builder) SetBlockInfo(blockInfo *types.BlockInfo)

func (*Builder) StoredExecutedPending added in v0.14.6

func (b *Builder) StoredExecutedPending(commitments *core.BlockCommitments) error

StoredExecutedPending stores the executed pending block

Jump to

Keyboard shortcuts

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