txinclude

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInteropAccessListRejected = errors.New("interop filter rejected access list")

ErrInteropAccessListRejected matches op-reth's definitive rejection of an invalid executing message. Its transient interop failures have other messages and are retried.

Functions

This section is empty.

Types

type EL

type EL interface {
	Sender
	ReceiptGetter
}

EL represents an EVM execution layer. It is responsible for handling transport errors, such as HTTP 429s.

func NewReliableEL

func NewReliableEL(el EL, blockTime time.Duration) EL

NewReliableEL turns an implementation of the EL interface into one that will retry on intermittent failures.

type IncludedTx

type IncludedTx struct {
	Transaction *types.Transaction
	Receipt     *optypes.Receipt
}

type Includer

type Includer interface {
	Include(ctx context.Context, tx types.TxData) (*IncludedTx, error)
}

type Limit

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

func NewLimit

func NewLimit(inner Includer, limit int) *Limit

func (*Limit) Include

func (l *Limit) Include(ctx context.Context, tx types.TxData) (*IncludedTx, error)

type Monitor

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

Monitor is a ReceiptGetter that will continue looking for a receipt even when it doesn't find it right away.

func NewMonitor

func NewMonitor(inner ReceiptGetter, blockTime time.Duration) *Monitor

func (*Monitor) TransactionReceipt

func (m *Monitor) TransactionReceipt(ctx context.Context, hash common.Hash) (*optypes.Receipt, error)

type NoOpResubmitterObserver

type NoOpResubmitterObserver struct{}

func (NoOpResubmitterObserver) SubmissionError

func (NoOpResubmitterObserver) SubmissionError(error)

type Persistent

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

Persistent is an Includer that persists transactions to an execution layer. It owns the account used by its signer: callers must not submit transactions from that account through another path while the Persistent is in use.

func NewPersistent

func NewPersistent(signer Signer, el EL, opts ...PersistentOption) *Persistent

NewPersistent creates a Persistent Includer. The returned includer exclusively owns the account used by signer and manages all of its transaction nonces.

It assumes el is reliable:

  • el.SendTransaction guarantees mempool inclusion without the possibility of eviction.
  • el.TransactionReceipt will return a valid receipt if one eventually exists.

func (*Persistent) Include

func (p *Persistent) Include(ctx context.Context, tx types.TxData) (*IncludedTx, error)

Include attempts to persist tx to p's EL. It fails on an error from the context, signer, or EL, except that it takes the next nonce on a too-low nonce and retries an underpriced transaction unchanged (fee bumping is TODO(16368)).

type PersistentOption

type PersistentOption func(cfg *persistentConfig)

func WithStartNonce

func WithStartNonce(nonce uint64) PersistentOption

WithStartNonce instructs the Persistent includer to use nonce as a starting nonce. The default is zero.

type PkSigner

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

func NewPkSigner

func NewPkSigner(pk *ecdsa.PrivateKey, chainID *big.Int) *PkSigner

func (*PkSigner) Sign

type ReceiptGetter

type ReceiptGetter interface {
	TransactionReceipt(context.Context, common.Hash) (*optypes.Receipt, error)
}

type Resubmitter

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

func NewResubmitter

func NewResubmitter(inner Sender, blockTime time.Duration, opts ...ResubmitterOption) *Resubmitter

func (*Resubmitter) SendTransaction

func (r *Resubmitter) SendTransaction(ctx context.Context, tx *types.Transaction) error

SendTransaction implements Sender. It will continue resubmitting unless an error is hit that the resubmitter considers unfixable with resubmissions alone (e.g., requiring modifications to tx). See fatalErrs for the list; ErrNonceTooLow remains retryable after a possibly successful submission.

type ResubmitterObserver

type ResubmitterObserver interface {
	SubmissionError(error)
}

type ResubmitterOption

type ResubmitterOption func(*resubmitterConfig)

func WithObserver

func WithObserver(observer ResubmitterObserver) ResubmitterOption

type Sender

type Sender interface {
	SendTransaction(context.Context, *types.Transaction) error
}

type Signer

type Signer interface {
	Sign(context.Context, *types.Transaction) (*types.Transaction, error)
}

Jump to

Keyboard shortcuts

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