processor

package
v0.0.0-...-0b0ce43 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBlockWorker

func NewBlockWorker(ctx context.Context, solClient *client.Client, slotChan <-chan uint64, resultChan chan<- BlockResp, wg *sync.WaitGroup)

func ProcessBlock

func ProcessBlock(ctx context.Context, blocksChan chan BlockResp, mongoClient *mongo.Database, wg *sync.WaitGroup)

func RetrieveBlockNumbers

func RetrieveBlockNumbers(ctx context.Context, startFrom string, solClient *client.Client, blockChan chan uint64)

Types

type BlockCUStat

type BlockCUStat struct {
	Slot uint64

	CU uint64

	NumTxs uint64
	CBTxs  uint64

	MinFeeSol uint64
	AvgFeeSol uint64
	MaxFeeSol uint64

	MinFee uint64
	AvgFee uint64
	MaxFee uint64
}

func ProcessBlockCLI

func ProcessBlockCLI(block BlockResp) BlockCUStat

type BlockResp

type BlockResp struct {
	Slot  uint64
	Block *client.Block
}

type ComputeBudgetData

type ComputeBudgetData struct {
	ComputeUnitPrice  uint64
	ComputeUnitsLimit uint32
}

func GetComputeBudgetData

func GetComputeBudgetData(tx *client.BlockTransaction) ComputeBudgetData

type ComputeBudgetPriceDecoder

type ComputeBudgetPriceDecoder struct {
	Instruction      uint8
	ComputeUnitPrice uint64
}

type ComputeBudgetUnitLimitDecoder

type ComputeBudgetUnitLimitDecoder struct {
	Instruction       uint8
	ComputeUnitsLimit uint32
}

type ParsedBlock

type ParsedBlock struct {
	Slot uint64

	CU uint64

	NumTxs uint64
	CBTxs  uint64

	Transactions []ParsedTransaction
}

type ParsedTransaction

type ParsedTransaction struct {
	Slot       uint64
	Hash       types.Signature
	Signatures []types.Signature
}

type ServerProcessedBlock

type ServerProcessedBlock struct {
	Slot       uint64    `json:"slot"`
	ParentSlot uint64    `json:"parent_slot"`
	SlotTime   time.Time `json:"slot_time"`

	NumTxs        uint64 `json:"num_txs"`         // Number of transactions in the block
	NumSuccessTxs uint64 `json:"num_success_txs"` // Number of successful transactions in the block
	NumCBTxs      uint64 `json:"num_cb_txs"`      // Number of transactions that have compute budget

	MinCUPrice uint64 `json:"min_cu_price"`
	AvgCUPrice uint64 `json:"avg_cu_price"`
	MaxCUPrice uint64 `json:"max_cu_price"`

	MinPriorityFee uint64 `json:"min_priority_fee"` // Minimum priority fee in lamports
	AvgPriorityFee uint64 `json:"avg_priority_fee"` // Average priority fee in lamports
	MaxPriorityFee uint64 `json:"max_priority_fee"` // Maximum priority fee in lamports

	CU       uint64 `json:"cu"`        // Total compute units consumed in the block
	BlockFee uint64 `json:"block_fee"` // Total block fee in lamports

}

Jump to

Keyboard shortcuts

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