Versions in this module Expand all Collapse all v1 v1.0.0 Sep 20, 2023 Changes in this version + const AccessListTxType + const BlobTxType + const DynamicFeeTxType + const LegacyTxType + var ErrAlreadyKnown = errors.New("already known") + var ErrParseTxn = fmt.Errorf("%w transaction", rlp.ErrParse) + var ErrRejected = errors.New("rejected") + var ErrRlpTooBig = errors.New("txn rlp too big") + var TxParseMainnetTests = []parseTxTest + func DecodeSender(enc []byte) (nonce uint64, balance uint256.Int, err error) + func EncodeGetPooledTransactions66(hashes []byte, requestID uint64, encodeBuf []byte) ([]byte, error) + func EncodeHashes(hashes []byte, encodeBuf []byte) []byte + func EncodePooledTransactions66(txsRlp [][]byte, requestID uint64, encodeBuf []byte) []byte + func EncodeSender(nonce uint64, balance uint256.Int, buffer []byte) + func EncodeSenderLengthForStorage(nonce uint64, balance uint256.Int) uint + func EncodeTransactions(txsRlp [][]byte, encodeBuf []byte) []byte + func ParseGetPooledTransactions66(payload []byte, pos int, hashbuf []byte) (requestID uint64, hashes []byte, newPos int, err error) + func ParseHash(payload []byte, pos int, hashbuf []byte) ([]byte, int, error) + func ParseHashesCount(payload []byte, pos int) (count int, dataPos int, err error) + func ParsePooledTransactions66(payload []byte, pos int, ctx *TxParseContext, txSlots *TxSlots, ...) (requestID uint64, newPos int, err error) + func ParseTransactions(payload []byte, pos int, ctx *TxParseContext, txSlots *TxSlots, ...) (newPos int, err error) + func PeekTransactionType(serialized []byte) (byte, error) + type AccessList []AccessTuple + func (al AccessList) StorageKeys() int + type AccessTuple struct + Address common.Address + StorageKeys []common.Hash + type Addresses []byte + func (h Addresses) AddressAt(i int) common.Address + func (h Addresses) At(i int) []byte + func (h Addresses) Len() int + type Announcements struct + func (a *Announcements) Append(t byte, size uint32, hash []byte) + func (a *Announcements) AppendOther(other Announcements) + func (a *Announcements) Reset() + func (a Announcements) At(i int) (byte, uint32, []byte) + func (a Announcements) Copy() Announcements + func (a Announcements) DedupCopy() Announcements + func (a Announcements) DedupHashes() Hashes + func (a Announcements) Hashes() Hashes + func (a Announcements) Len() int + func (a Announcements) Less(i, j int) bool + func (a Announcements) Swap(i, j int) + type Hashes []byte + func (h Hashes) At(i int) []byte + func (h Hashes) DedupCopy() Hashes + func (h Hashes) Len() int + func (h Hashes) Less(i, j int) bool + func (h Hashes) Swap(i, j int) + type NewPooledTransactionHashesPacket [][length.Hash]byte + type PeerID *types.H512 + type TxParseConfig struct + ChainID uint256.Int + type TxParseContext struct + ChainID uint256.Int + ChainIDMul uint256.Int + DeriveChainID uint256.Int + IsProtected bool + Keccak1 hash.Hash + Keccak2 hash.Hash + R uint256.Int + S uint256.Int + Sig [65]byte + Sighash [32]byte + V uint256.Int + func NewTxParseContext(chainID uint256.Int) *TxParseContext + func (ctx *TxParseContext) ChainIDRequired() *TxParseContext + func (ctx *TxParseContext) ParseTransaction(payload []byte, pos int, slot *TxSlot, sender []byte, ...) (p int, err error) + func (ctx *TxParseContext) ValidateRLP(f func(txnRlp []byte) error) + func (ctx *TxParseContext) WithAllowPreEip2s(v bool) + func (ctx *TxParseContext) WithSender(v bool) + type TxSlot struct + AlAddrCount int + AlStorCount int + BlobFeeCap uint256.Int + BlobHashes []common.Hash + Blobs [][]byte + Commitments []gokzg4844.KZGCommitment + Creation bool + DataLen int + DataNonZeroLen int + FeeCap uint256.Int + Gas uint64 + IDHash [32]byte + Nonce uint64 + Proofs []gokzg4844.KZGProof + Rlp []byte + SenderID uint64 + Size uint32 + Tip uint256.Int + Traced bool + Type byte + Value uint256.Int + func (tx *TxSlot) PrintDebug(prefix string) + type TxSlots struct + IsLocal []bool + Senders Addresses + Txs []*TxSlot + func (s *TxSlots) Append(slot *TxSlot, sender []byte, isLocal bool) + func (s *TxSlots) Resize(targetSize uint) + func (s *TxSlots) Valid() error + type TxsRlp struct + IsLocal []bool + Senders Addresses + Txs [][]byte + func (s *TxsRlp) Resize(targetSize uint)