fetcher

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxSupportedTransactionVersion = uint64(0)
View Source
var PrintFreq = uint64(10)

Functions

func WriteString

func WriteString(b string, e *bin.Encoder) error

Types

type BigtableBlockReader

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

func NewBigtableReader

func NewBigtableReader(bt *bigtable.Client, maxConnectionAttempt uint64, logger *zap.Logger, tracer logging.Tracer) *BigtableBlockReader

func (*BigtableBlockReader) ProcessRow

func (r *BigtableBlockReader) ProcessRow(row bigtable.Row) (*pbsolv1.Block, *zap.Logger, error)

func (*BigtableBlockReader) Read

func (r *BigtableBlockReader) Read(
	ctx context.Context,
	startBlockNum,
	stopBlockNum uint64,
	processBlock func(block *pbsolv1.Block) error,
) error

type BorshIoError

type BorshIoError struct {
	Msg string
}

func MustNewBorshIoError

func MustNewBorshIoError(a any) BorshIoError

func (BorshIoError) Encode

func (b BorshIoError) Encode(encoder *bin.Encoder) error

type DuplicateInstructionError

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

func MustNewDuplicateInstructionError

func MustNewDuplicateInstructionError(e any) *DuplicateInstructionError

func (*DuplicateInstructionError) Encode

func (e *DuplicateInstructionError) Encode(encoder *bin.Encoder) error

type InstructionCustomError

type InstructionCustomError struct {
	CustomErrorCode uint32
}

func MustNewInstructionCustomError

func MustNewInstructionCustomError(e any) InstructionCustomError

func (InstructionCustomError) Encode

func (i InstructionCustomError) Encode(encoder *bin.Encoder) error

type InstructionError

type InstructionError struct {
	InstructionErrorCode
	InstructionIndex byte
	// contains filtered or unexported fields
}

func MustNewInstructionError

func MustNewInstructionError(e any) *InstructionError

func (*InstructionError) Encode

func (i *InstructionError) Encode(encoder *bin.Encoder) error

type InstructionErrorCode

type InstructionErrorCode uint32
const (
	InstructionError_GenericError InstructionErrorCode = iota
	InstructionError_InvalidArgument
	InstructionError_InvalidInstructionData
	InstructionError_InvalidAccountData
	InstructionError_AccountDataTooSmall
	InstructionError_InsufficientFunds
	InstructionError_IncorrectProgramId
	InstructionError_MissingRequiredSignature
	InstructionError_AccountAlreadyInitialized
	InstructionError_UninitializedAccount
	InstructionError_UnbalancedInstruction
	InstructionError_ModifiedProgramId
	InstructionError_ExternalAccountLamportSpend
	InstructionError_ExternalAccountDataModified
	InstructionError_ReadonlyLamportChange
	InstructionError_ReadonlyDataModified
	InstructionError_DuplicateAccountIndex
	InstructionError_ExecutableModified
	InstructionError_RentEpochModified
	InstructionError_NotEnoughAccountKeys
	InstructionError_AccountDataSizeChanged
	InstructionError_AccountNotExecutable
	InstructionError_AccountBorrowFailed
	InstructionError_AccountBorrowOutstanding
	InstructionError_DuplicateAccountOutOfSync
	InstructionError_Custom
	InstructionError_InvalidError
	InstructionError_ExecutableDataModified
	InstructionError_ExecutableLamportChange
	InstructionError_ExecutableAccountNotRentExempt
	InstructionError_UnsupportedProgramId
	InstructionError_CallDepth
	InstructionError_MissingAccount
	InstructionError_ReentrancyNotAllowed
	InstructionError_MaxSeedLengthExceeded
	InstructionError_InvalidSeeds
	InstructionError_InvalidRealloc
	InstructionError_ComputationalBudgetExceeded
	InstructionError_PrivilegeEscalation
	InstructionError_ProgramEnvironmentSetupFailure
	InstructionError_ProgramFailedToComplete
	InstructionError_ProgramFailedToCompile
	InstructionError_Immutable
	InstructionError_IncorrectAuthority
	InstructionError_BorshIoError
	InstructionError_AccountNotRentExempt
	InstructionError_InvalidAccountOwner
	InstructionError_ArithmeticOverflow
	InstructionError_UnsupportedSysvar
	InstructionError_IllegalOwner
	InstructionError_MaxAccountsDataAllocationsExceeded
	InstructionError_MaxAccountsExceeded
	InstructionError_MaxInstructionTraceLengthExceeded
	InstructionError_BuiltinProgramsMustConsumeComputeUnits
)

type InsufficientFundsForRentError

type InsufficientFundsForRentError struct {
	AccountIndex byte
}

func MustNewInsufficientFundsForRentError

func MustNewInsufficientFundsForRentError(e any) *InsufficientFundsForRentError

func (*InsufficientFundsForRentError) Encode

func (e *InsufficientFundsForRentError) Encode(encoder *bin.Encoder) error

type ProgramExecutionTemporarilyRestrictedError

type ProgramExecutionTemporarilyRestrictedError struct {
	AccountIndex byte
}

func MustNewProgramExecutionTemporarilyRestrictedError

func MustNewProgramExecutionTemporarilyRestrictedError(e any) *ProgramExecutionTemporarilyRestrictedError

func (*ProgramExecutionTemporarilyRestrictedError) Encode

type RPCFetcher

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

func NewRPC

func NewRPC(rpcClient *rpc.Client, fetchInterval time.Duration, latestBlockRetryInterval time.Duration, logger *zap.Logger) *RPCFetcher

func (*RPCFetcher) Fetch

func (f *RPCFetcher) Fetch(ctx context.Context, requestedSlot uint64) (out *pbbstream.Block, skip bool, err error)

func (*RPCFetcher) IsBlockAvailable

func (f *RPCFetcher) IsBlockAvailable(requestedSlot uint64) bool

type RowType

type RowType string
const (
	RowTypeProto RowType = "proto"
	RowTypeBin   RowType = "bin"
)

type TransactionError

type TransactionError struct {
	TrxErrCode
	// contains filtered or unexported fields
}

func MustNewTransactionError

func MustNewTransactionError(e any) *TransactionError

func (*TransactionError) Encode

func (e *TransactionError) Encode(encoder *bin.Encoder) error

type TrxErrCode

type TrxErrCode int32
const (
	TrxErr_AccountInUse TrxErrCode = iota
	TrxErr_AccountLoadedTwice
	TrxErr_AccountNotFound
	TrxErr_ProgramAccountNotFound
	TrxErr_InsufficientFundsForFee
	TrxErr_InvalidAccountForFee
	TrxErr_AlreadyProcessed
	TrxErr_BlockhashNotFound
	TrxErr_InstructionError
	TrxErr_CallChainTooDeep
	TrxErr_MissingSignatureForFee
	TrxErr_InvalidAccountIndex
	TrxErr_SignatureFailure
	TrxErr_InvalidProgramForExecution
	TrxErr_SanitizeFailure
	TrxErr_ClusterMaintenance
	TrxErr_AccountBorrowOutstanding
	TrxErr_WouldExceedMaxBlockCostLimit
	TrxErr_UnsupportedVersion
	TrxErr_InvalidWritableAccount
	TrxErr_WouldExceedMaxAccountCostLimit
	TrxErr_WouldExceedAccountDataBlockLimit
	TrxErr_TooManyAccountLocks
	TrxErr_AddressLookupTableNotFound
	TrxErr_InvalidAddressLookupTableOwner
	TrxErr_InvalidAddressLookupTableData
	TrxErr_InvalidAddressLookupTableIndex
	TrxErr_InvalidRentPayingAccount
	TrxErr_WouldExceedMaxVoteCostLimit
	TrxErr_WouldExceedAccountDataTotalLimit
	TrxErr_DuplicateInstruction
	TrxErr_InsufficientFundsForRent
	TrxErr_MaxLoadedAccountsDataSizeExceeded
	TrxErr_InvalidLoadedAccountsDataSizeLimit
	TrxErr_ResanitizationNeeded
	TrxErr_ProgramExecutionTemporarilyRestricted
	TrxErr_UnbalancedTransaction
)

Jump to

Keyboard shortcuts

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