Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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.
type IncludedTx ¶
type IncludedTx struct {
Transaction *types.Transaction
Receipt *optypes.Receipt
}
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
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 ¶
func (s *PkSigner) Sign(_ context.Context, tx *types.Transaction) (*types.Transaction, error)
type ReceiptGetter ¶
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 Signer ¶
type Signer interface {
Sign(context.Context, *types.Transaction) (*types.Transaction, error)
}