Documentation
¶
Index ¶
- Constants
- Variables
- func AddressLookupTableCloseLookupTable(execCtx *ExecutionCtx) error
- func AddressLookupTableCreateLookupTable(execCtx *ExecutionCtx, untrustedRecentSlot uint64, bumpSeed byte) error
- func AddressLookupTableDeactivateLookupTable(execCtx *ExecutionCtx) error
- func AddressLookupTableExecute(execCtx *ExecutionCtx) error
- func AddressLookupTableExtendLookupTable(execCtx *ExecutionCtx, newAddresses []solana.PublicKey) error
- func AddressLookupTableFreezeLookupTable(execCtx *ExecutionCtx) error
- func BpfLoaderProgramExecute(execCtx *ExecutionCtx) error
- func CheckAcctForRecentBlockHashesSysvar(txCtx *TransactionCtx, instrCtx *InstructionCtx, instrAcctIdx uint64) error
- func ComputeBudgetExecute(execCtx *ExecutionCtx) error
- func ConfigProgramExecute(ctx *ExecutionCtx) error
- func Ed25519GetDataSlice(txCtx *TransactionCtx, index uint16, offset uint16, size uint16) ([]byte, error)
- func Ed25519ProgramExecute(execCtx *ExecutionCtx) error
- func ElGamalProofProgramExecute(execCtx *ExecutionCtx) error
- func IsCustomErr(err error) bool
- func IsNativeProgram(pubkey solana.PublicKey) bool
- func IsNonceInstr(instr Instruction) bool
- func IsSysvar(pubkey solana.PublicKey) bool
- func IsTransactionAgeValid(tx *solana.Transaction, instrs []Instruction, slotCtx *SlotCtx) bool
- func IsWritable(tx *solana.Transaction, am *AccountMeta, f *features.Features) bool
- func LoaderV4Execute(execCtx *ExecutionCtx) error
- func LoaderV4ProcessCopy(execCtx *ExecutionCtx, destinationOffset uint32, sourceOffset uint32, ...) error
- func LoaderV4ProcessDeploy(execCtx *ExecutionCtx) error
- func LoaderV4ProcessFinalize(execCtx *ExecutionCtx) error
- func LoaderV4ProcessRetract(execCtx *ExecutionCtx) error
- func LoaderV4ProcessSetProgramLength(execCtx *ExecutionCtx, newLen uint32) error
- func LoaderV4ProcessTransferAuthority(execCtx *ExecutionCtx) error
- func LoaderV4ProcessWrite(execCtx *ExecutionCtx, offset uint32, bytes []byte) error
- func MakeInstructionsSysvarAccount(instructions []Instruction) *accounts.Account
- func MarshalStakeStake(state *StakeStateV2) ([]byte, error)
- func MaybeAdvanceNonceAccountForFailedTx(slotCtx *SlotCtx, tx *solana.Transaction, instr Instruction) (solana.PublicKey, bool)
- func MemOpConsume(execCtx *ExecutionCtx, n uint64) error
- func NewWarmupCooldownRateEpoch(execCtx *ExecutionCtx) (*uint64, error)
- func NewWarmupCooldownRateEpochWithSlotCtx(slotCtx *SlotCtx, epochSchedule *SysvarEpochSchedule) *uint64
- func PoseidonHash(input [][]byte, isBigEndian bool) ([]byte, error)
- func ProcessUpgradeableLoaderInstruction(execCtx *ExecutionCtx) error
- func ReadBool(decoder *bin.Decoder) (bool, error)
- func Secp256k1GetDataSlice(txCtx *TransactionCtx, index uint16, offset uint16, size uint64) ([]byte, error)
- func Secp256k1ProgramExecute(execCtx *ExecutionCtx) error
- func Secp256r1GetDataSlice(txCtx *TransactionCtx, index uint16, offset uint16, size uint64) ([]byte, error)
- func Secp256r1ProgramExecute(execCtx *ExecutionCtx) error
- func StakeProgramAuthorize(stakeAcct *BorrowedAccount, signers []solana.PublicKey, ...) error
- func StakeProgramAuthorizeWithSeed(txCtx *TransactionCtx, instrCtx *InstructionCtx, stakeAcct *BorrowedAccount, ...) error
- func StakeProgramDeactivate(execCtx *ExecutionCtx, stakeAcct *BorrowedAccount, clock SysvarClock, ...) error
- func StakeProgramDeactivateDelinquent(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, ...) error
- func StakeProgramDelegate(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, ...) error
- func StakeProgramExecute(execCtx *ExecutionCtx) error
- func StakeProgramInitialize(stakeAcct *BorrowedAccount, authorized Authorized, lockup StakeLockup, ...) error
- func StakeProgramMerge(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, ...) error
- func StakeProgramMoveLamports(execCtx *ExecutionCtx, instrCtx *InstructionCtx, srcAcctIdx uint64, ...) error
- func StakeProgramMoveStake(execCtx *ExecutionCtx, instrCtx *InstructionCtx, srcAcctIdx uint64, ...) error
- func StakeProgramRedelegate(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, ...) error
- func StakeProgramSetLockup(stakeAcct *BorrowedAccount, lockup StakeInstrSetLockup, ...) error
- func StakeProgramSplit(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, ...) error
- func StakeProgramWithdraw(txCtx *TransactionCtx, instrCtx *InstructionCtx, stakeAcctIdx uint64, ...) error
- func SwapEndianness(xs []byte) []byte
- func SyscallAbortImpl(_ sbpf.VM) (uint64, error)
- func SyscallAllocFreeImpl(vm sbpf.VM, size, freeAddr uint64) (uint64, error)
- func SyscallAltBn128CompressionImpl(vm sbpf.VM, op, inputAddr, inputLen, resultAddr uint64) (uint64, error)
- func SyscallAltBn128Impl(vm sbpf.VM, groupOp, inputAddr, inputLen, resultAddr uint64) (uint64, error)
- func SyscallBlake3Impl(vm sbpf.VM, valsAddr, valsLen, resultsAddr uint64) (uint64, error)
- func SyscallCreateProgramAddressImpl(vm sbpf.VM, seedsAddr, seedsLen, programIdAddr, addressAddr uint64) (uint64, error)
- func SyscallCurveGroupOpsImpl(vm sbpf.VM, ...) (uint64, error)
- func SyscallCurveMultiscalarMultiplicationImpl(vm sbpf.VM, ...) (uint64, error)
- func SyscallCurveValidatePointImpl(vm sbpf.VM, curveId, pointAddr uint64) (uint64, error)
- func SyscallGetClockSysvarImpl(vm sbpf.VM, addr uint64) (uint64, error)
- func SyscallGetEpochRewardsSysvarImpl(vm sbpf.VM, addr uint64) (uint64, error)
- func SyscallGetEpochScheduleSysvarImpl(vm sbpf.VM, addr uint64) (uint64, error)
- func SyscallGetEpochStakeImpl(vm sbpf.VM, varAddr uint64) (uint64, error)
- func SyscallGetLastRestartSlotSysvarImpl(vm sbpf.VM, addr uint64) (uint64, error)
- func SyscallGetProcessedSiblingInstructionImpl(vm sbpf.VM, index, metaAddr, programIdAddr, dataAddr, accountsAddr uint64) (uint64, error)
- func SyscallGetRentSysvarImpl(vm sbpf.VM, addr uint64) (uint64, error)
- func SyscallGetReturnDataImpl(vm sbpf.VM, returnDataAddr, length, programIdAddr uint64) (uint64, error)
- func SyscallGetStackHeightImpl(vm sbpf.VM) (uint64, error)
- func SyscallGetSysvarImpl(vm sbpf.VM, sysvarIdAddr uint64, varAddr uint64, offset uint64, length uint64) (uint64, error)
- func SyscallInvokeSignedCImpl(vm sbpf.VM, ...) (uint64, error)
- func SyscallInvokeSignedRustImpl(vm sbpf.VM, ...) (uint64, error)
- func SyscallKeccak256Impl(vm sbpf.VM, valsAddr, valsLen, resultsAddr uint64) (uint64, error)
- func SyscallLog64Impl(vm sbpf.VM, r1, r2, r3, r4, r5 uint64) (uint64, error)
- func SyscallLogCUsImpl(vm sbpf.VM) (uint64, error)
- func SyscallLogDataImpl(vm sbpf.VM, addr uint64, len uint64) (uint64, error)
- func SyscallLogImpl(vm sbpf.VM, ptr, strlen uint64) (uint64, error)
- func SyscallLogPubkeyImpl(vm sbpf.VM, pubkeyAddr uint64) (uint64, error)
- func SyscallMemcmpImpl(vm sbpf.VM, addr1, addr2, n, resultAddr uint64) (uint64, error)
- func SyscallMemcpyImpl(vm sbpf.VM, dst, src, n uint64) (uint64, error)
- func SyscallMemmoveImpl(vm sbpf.VM, dst, src, n uint64) (uint64, error)
- func SyscallMemsetImpl(vm sbpf.VM, dst, c, n uint64) (uint64, error)
- func SyscallPanicImpl(vm sbpf.VM, fileNameAddr, len, line, column uint64) (uint64, error)
- func SyscallPoseidonImpl(vm sbpf.VM, parameters, endianness, valsAddr, valsLen, resultAddr uint64) (uint64, error)
- func SyscallSecp256k1RecoverImpl(vm sbpf.VM, hashAddr, recoveryIdVal, signatureAddr, resultAddr uint64) (uint64, error)
- func SyscallSetReturnDataImpl(vm sbpf.VM, addr, length uint64) (uint64, error)
- func SyscallSha256Impl(vm sbpf.VM, valsAddr, valsLen, resultsAddr uint64) (uint64, error)
- func SyscallTryFindProgramAddressImpl(vm sbpf.VM, ...) (uint64, error)
- func Syscalls(ft *features.Features, isDeploy bool, h uint32) (f sbpf.Syscall, ok bool)
- func SystemProgramAdvanceNonceAccount(execCtx *ExecutionCtx, acct *BorrowedAccount, signers []solana.PublicKey, ...) error
- func SystemProgramAllocate(execCtx *ExecutionCtx, acct *BorrowedAccount, address solana.PublicKey, ...) error
- func SystemProgramAllocateAndAssign(execCtx *ExecutionCtx, toAcct *BorrowedAccount, toAddr solana.PublicKey, ...) error
- func SystemProgramAssign(execCtx *ExecutionCtx, acct *BorrowedAccount, address solana.PublicKey, ...) error
- func SystemProgramAuthorizeNonceAccount(execCtx *ExecutionCtx, acct *BorrowedAccount, nonceAuthority solana.PublicKey, ...) error
- func SystemProgramCreateAccount(execCtx *ExecutionCtx, toAddr solana.PublicKey, lamports uint64, space uint64, ...) error
- func SystemProgramExecute(execCtx *ExecutionCtx) error
- func SystemProgramInitializeNonceAccount(execCtx *ExecutionCtx, acct *BorrowedAccount, nonceAuthority solana.PublicKey, ...) error
- func SystemProgramTransfer(execCtx *ExecutionCtx, fromAcctIdx uint64, toAcctIdx uint64, lamports uint64) error
- func SystemProgramTransferWithSeed(execCtx *ExecutionCtx, fromAcctIdx uint64, fromBaseAcctIdx uint64, ...) error
- func SystemProgramUpgradeNonceAccount(execCtx *ExecutionCtx, acct *BorrowedAccount) error
- func SystemProgramWithdrawNonceAccount(execCtx *ExecutionCtx, instrCtx *InstructionCtx, fromAcctIdx uint64, ...) error
- func TranslateErrToErrCode(err error) int
- func UpgradeableLoaderClose(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx) error
- func UpgradeableLoaderDeployWithMaxDataLen(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, ...) error
- func UpgradeableLoaderExtendProgram(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, ...) error
- func UpgradeableLoaderInitializeBuffer(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx) error
- func UpgradeableLoaderSetAuthority(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx) error
- func UpgradeableLoaderSetAuthorityChecked(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx) error
- func UpgradeableLoaderUpgrade(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx) error
- func UpgradeableLoaderWrite(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, ...) error
- func ValidateAndCreateWithSeed(base solana.PublicKey, seed string, owner solana.PublicKey) (solana.PublicKey, error)
- func VoteProgramAuthorize(execCtx *ExecutionCtx, voteAcct *BorrowedAccount, authorized solana.PublicKey, ...) error
- func VoteProgramAuthorizeWithSeed(execCtx *ExecutionCtx, instrCtx *InstructionCtx, voteAcct *BorrowedAccount, ...) error
- func VoteProgramExecute(execCtx *ExecutionCtx) error
- func VoteProgramInitializeAccount(execCtx *ExecutionCtx, voteAccount *BorrowedAccount, ...) error
- func VoteProgramProcessTowerSync(execCtx *ExecutionCtx, voteAcct *BorrowedAccount, slotHashes SysvarSlotHashes, ...) error
- func VoteProgramProcessVote(execCtx *ExecutionCtx, voteAcct *BorrowedAccount, slotHashes SysvarSlotHashes, ...) error
- func VoteProgramProcessVoteStateUpdate(execCtx *ExecutionCtx, voteAcct *BorrowedAccount, slotHashes SysvarSlotHashes, ...) error
- func VoteProgramUpdateCommission(execCtx *ExecutionCtx, voteAcct *BorrowedAccount, commission byte, ...) error
- func VoteProgramUpdateValidatorIdentity(execCtx *ExecutionCtx, voteAcct *BorrowedAccount, nodePubkey solana.PublicKey, ...) error
- func VoteProgramWithdraw(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, ...) error
- func WriteClockSysvar(accts *accounts.Accounts, clock SysvarClock)
- func WriteEpochRewardsSysvar(accts *accounts.Accounts, epochRewards SysvarEpochRewards)
- func WriteEpochScheduleSysvar(accts *accounts.Accounts, epochSchedule SysvarEpochSchedule)
- func WriteFeesSysvar(accts *accounts.Accounts, fees SysvarFees)
- func WriteLastRestartSlotSysvar(accts *accounts.Accounts, lastRestartSlot SysvarLastRestartSlot)
- func WriteRentSysvar(accts *accounts.Accounts, rent SysvarRent)
- func WriteSlotHashesSysvar(accts *accounts.Accounts, slotHashes SysvarSlotHashes)
- func WriteSlotHistorySysvar(accts *accounts.Accounts, slotHistory SysvarSlotHistory)
- func WriteStakeHistorySysvar(accts *accounts.Accounts, stakeHistory SysvarStakeHistory)
- type AccountMeta
- type AccountParam
- type AddrLookupTableInstrCreateLookupTable
- type AddrLookupTableInstrExtendLookupTable
- type AddressLookupTable
- type AddressLookupTableStatus
- type Authorized
- func (authorized *Authorized) Authorize(signers []solana.PublicKey, newAuthorized solana.PublicKey, ...) error
- func (authorized *Authorized) Check(signers []solana.PublicKey, stakeAuthorize uint32) error
- func (authorized *Authorized) MarshalWithEncoder(encoder *bin.Encoder) error
- func (authorized *Authorized) UnmarshalWithDecoder(decoder *bin.Decoder) error
- type AuthorizedVoter
- type AuthorizedVoters
- func (authVoters *AuthorizedVoters) GetAndCacheAuthorizedVoterForEpoch(epoch uint64) (solana.PublicKey, error)
- func (authVoters *AuthorizedVoters) GetOrCalculateAuthorizedVoterForEpoch(epoch uint64) (solana.PublicKey, bool, error)
- func (authVoters *AuthorizedVoters) MarshalWithEncoder(encoder *bin.Encoder) error
- func (authVoters *AuthorizedVoters) PurgeAuthorizedVoters(currentEpoch uint64) bool
- func (authVoters *AuthorizedVoters) UnmarshalWithDecoder(decoder *bin.Decoder) error
- type BlockTimestamp
- type BorrowedAccount
- func (acct *BorrowedAccount) AccountExists() bool
- func (acct *BorrowedAccount) CanDataBeResized(newLen uint64) error
- func (acct *BorrowedAccount) CheckedAddLamports(lamports uint64, f features.Features) error
- func (acct *BorrowedAccount) CheckedSubLamports(lamports uint64, f features.Features) error
- func (acct *BorrowedAccount) Data() []byte
- func (acct *BorrowedAccount) DataCanBeChanged(f features.Features) error
- func (acct *BorrowedAccount) DataMutable(f features.Features) ([]byte, error)
- func (acct *BorrowedAccount) Drop()
- func (acct *BorrowedAccount) ExtendFromSlice(f features.Features, data []byte) error
- func (acct *BorrowedAccount) IsExecutable() bool
- func (acct *BorrowedAccount) IsOwnedByCurrentProgram() bool
- func (acct *BorrowedAccount) IsRentExemptAtDataLength(len uint64) bool
- func (acct *BorrowedAccount) IsSigner() bool
- func (acct *BorrowedAccount) IsWritable() bool
- func (acct *BorrowedAccount) IsZeroed() bool
- func (acct *BorrowedAccount) Key() solana.PublicKey
- func (acct *BorrowedAccount) Lamports() uint64
- func (acct *BorrowedAccount) Owner() solana.PublicKey
- func (acct *BorrowedAccount) RentEpoch() uint64
- func (acct *BorrowedAccount) SetData(features features.Features, data []byte) error
- func (acct *BorrowedAccount) SetDataLength(newLength uint64, f features.Features) error
- func (acct *BorrowedAccount) SetExecutable(f features.Features, isExecutable bool) error
- func (acct *BorrowedAccount) SetLamports(lamports uint64, f features.Features) error
- func (acct *BorrowedAccount) SetOwner(f features.Features, owner solana.PublicKey) error
- func (acct *BorrowedAccount) SetState(f features.Features, data []byte) error
- func (acct BorrowedAccount) String() string
- func (acct *BorrowedAccount) Touch() error
- func (acct *BorrowedAccount) UpdateAccountsResizeDelta(newLength uint64)
- type CallerAccount
- type CompactUpdateVoteState
- type ComputeBudgetInstrRequestHeapFrame
- type ComputeBudgetInstrSetComputeUnitLimit
- type ComputeBudgetInstrSetComputeUnitPrice
- type ComputeBudgetInstrSetLoadedAccountsDataSizeLimit
- type ComputeBudgetLimits
- type ConfigKey
- type Delegation
- func (delegation *Delegation) IsBootstrap() bool
- func (delegation *Delegation) MarshalWithEncoder(encoder *bin.Encoder) error
- func (delegation *Delegation) Stake(epoch uint64, stakeHistory *SysvarStakeHistory, newRateActivationEpoch *uint64) uint64
- func (delegation *Delegation) StakeActivatingAndDeactivating(targetEpoch uint64, stakeHistory *SysvarStakeHistory, ...) StakeHistoryEntry
- func (delegation *Delegation) StakeAndActivating(targetEpoch uint64, stakeHistory *SysvarStakeHistory, ...) (uint64, uint64)
- func (delegation *Delegation) UnmarshalWithDecoder(decoder *bin.Decoder) error
- type Ed25519SignatureOffsets
- type ElGamalProofInstruction
- type EpochCredits
- type ExecutionCtx
- func (execCtx *ExecutionCtx) AddModifiedVoteState(pubkey solana.PublicKey, state *VoteStateVersions)
- func (execCtx *ExecutionCtx) CheckAligned() bool
- func (execCtx *ExecutionCtx) ExecuteInstruction() error
- func (execCtx *ExecutionCtx) NativeInvoke(instruction Instruction, signers []solana.PublicKey) error
- func (execCtx *ExecutionCtx) Pop() error
- func (execCtx *ExecutionCtx) PrepareInstruction(ix Instruction, signers []solana.PublicKey) ([]InstructionAccount, []uint64, error)
- func (execCtx *ExecutionCtx) ProcessInstruction(instrData []byte, instructionAccts []InstructionAccount, ...) error
- func (execCtx *ExecutionCtx) Push() error
- func (execCtx *ExecutionCtx) StackHeight() uint64
- type FeeCalculator
- type FeeRateGovernor
- type IPPProof
- type IPProofLr
- type Instruction
- type InstructionAccount
- type InstructionCtx
- func (instrCtx *InstructionCtx) BorrowAccount(txCtx *TransactionCtx, idxInTx uint64, idxInInstr uint64) (*BorrowedAccount, error)
- func (instrCtx *InstructionCtx) BorrowExecutableAccount(txCtx *TransactionCtx, pubkey solana.PublicKey) (*BorrowedAccount, error)
- func (instrCtx *InstructionCtx) BorrowInstructionAccount(txCtx *TransactionCtx, instrAcctIdx uint64) (*BorrowedAccount, error)
- func (instrCtx *InstructionCtx) BorrowLastProgramAccount(txCtx *TransactionCtx) (*BorrowedAccount, error)
- func (instrCtx *InstructionCtx) BorrowProgramAccount(txCtx *TransactionCtx, programAcctIdx uint64) (*BorrowedAccount, error)
- func (instrCtx *InstructionCtx) CheckNumOfInstructionAccounts(num uint64) error
- func (instrCtx *InstructionCtx) Configure(programAccts []uint64, instrAccts []InstructionAccount, instrData []byte)
- func (instrCtx *InstructionCtx) IndexOfInstructionAccount(txCtx *TransactionCtx, pubkey solana.PublicKey) (uint64, error)
- func (instrCtx *InstructionCtx) IndexOfInstructionAccountInTransaction(instrAcctIdx uint64) (uint64, error)
- func (instrCtx *InstructionCtx) IndexOfProgramAccountInTransaction(programAccountIndex uint64) (uint64, error)
- func (instrCtx *InstructionCtx) IsInstructionAccountDuplicate(instrAcctIdx uint64) (bool, uint64, error)
- func (instrCtx *InstructionCtx) IsInstructionAccountSigner(instrAcctIdx uint64) (bool, error)
- func (instrCtx *InstructionCtx) IsInstructionAccountWritable(instrAcctIdx uint64) (bool, error)
- func (instrCtx *InstructionCtx) LastProgramKey(txCtx *TransactionCtx) (solana.PublicKey, error)
- func (instrCtx *InstructionCtx) NumberOfInstructionAccounts() uint64
- func (instrCtx *InstructionCtx) NumberOfProgramAccounts() uint64
- func (instrCtx *InstructionCtx) ProgramId() solana.PublicKey
- func (instrCtx *InstructionCtx) Signers(txCtx *TransactionCtx) ([]solana.PublicKey, error)
- func (instrCtx *InstructionCtx) StackHeight() uint64
- type LandedVote
- type LoaderV4Copy
- type LoaderV4SetProgramLength
- type LoaderV4State
- type LoaderV4Write
- type LockoutOffset
- type LogRecorder
- type Logger
- type LookupTableMeta
- type MergeKind
- type MergeKindActivationEpoch
- type MergeKindFullyActive
- type MergeKindInactive
- type Meta
- type NonceData
- type NonceStateVersions
- func (nonceStateVersions *NonceStateVersions) Deinitialize()
- func (nonceStateVersions *NonceStateVersions) IsUpgradeable() bool
- func (nonceStateVersions *NonceStateVersions) Marshal() ([]byte, error)
- func (nonceStateVersions *NonceStateVersions) State() *NonceData
- func (nonceStateVersions *NonceStateVersions) UnmarshalWithDecoder(decoder *bin.Decoder) error
- func (nonceStateVersions *NonceStateVersions) Upgrade() bool
- type Params
- type PriorVoter
- type PriorVoters
- type PriorVoters0_23_5
- type ProcessedSiblingInstruction
- type RangeProof
- type RangeProofData
- type RecentBlockHashesEntry
- type RefCellRust
- type RefCellVecRust
- type Secp256r1SignatureOffsets
- type SecppSignatureOffsets
- type SlotBank
- type SlotCtx
- func (slotCtx *SlotCtx) GetAccount(pubkey solana.PublicKey) (*accounts.Account, error)
- func (slotCtx *SlotCtx) GetAccountFromAccountsDb(pubkey solana.PublicKey) (*accounts.Account, error)
- func (slotCtx *SlotCtx) GetParentAccount(pubkey solana.PublicKey) (*accounts.Account, error)
- func (slotCtx *SlotCtx) RecordModifiedAcct(pubkey solana.PublicKey)
- func (slotCtx *SlotCtx) RecordWritableAcct(pubkey solana.PublicKey)
- func (slotCtx *SlotCtx) SetAccount(pubkey solana.PublicKey, acct *accounts.Account) error
- type SlotHash
- type SlotHistoryBitvec
- type SlotHistoryInner
- type SolAccountInfoC
- type SolAccountInfoRust
- type SolAccountMetaC
- type SolAccountMetaRust
- type SolInstructionC
- type SolInstructionRust
- type Stake
- func (stake *Stake) Deactivate(epoch uint64) error
- func (stake *Stake) MarshalWithEncoder(encoder *bin.Encoder) error
- func (stake *Stake) MergeDelegationStakeAndCreditsObserved(absorbedLamports uint64, absorbedCreditsObserved uint64) error
- func (stake *Stake) Split(remainingStakeDelta uint64, splitStakeAmount uint64) (Stake, error)
- func (stake *Stake) Stake(epoch uint64, stakeHistory *SysvarStakeHistory, newRateActivationEpoch *uint64) uint64
- func (stake *Stake) StakeWeightCreditsObserved(absorbedLamports uint64, absorbedCreditsObserved uint64) (uint64, error)
- func (stake *Stake) UnmarshalWithDecoder(decoder *bin.Decoder) error
- type StakeConfig
- type StakeFlags
- func (stakeFlags *StakeFlags) Contains(other StakeFlags) bool
- func (stakeFlags *StakeFlags) MarshalWithEncoder(encoder *bin.Encoder) error
- func (stakeFlags *StakeFlags) Remove(other StakeFlags)
- func (stakeFlags *StakeFlags) Union(other StakeFlags) StakeFlags
- func (stakeFlags *StakeFlags) UnmarshalWithDecoder(decoder *bin.Decoder) error
- type StakeHistoryEntry
- type StakeHistoryPair
- type StakeInstrAuthorize
- type StakeInstrAuthorizeChecked
- type StakeInstrAuthorizeCheckedWithSeed
- type StakeInstrAuthorizeWithSeed
- type StakeInstrInitialize
- type StakeInstrMoveLamports
- type StakeInstrMoveStake
- type StakeInstrSetLockup
- type StakeInstrSetLockupChecked
- type StakeInstrSplit
- type StakeInstrWithdraw
- type StakeLockup
- type StakeStateV2
- type StakeStateV2Initialized
- type StakeStateV2Stake
- type SystemInstrAllocate
- type SystemInstrAllocateWithSeed
- type SystemInstrAssign
- type SystemInstrAssignWithSeed
- type SystemInstrAuthorizeNonceAccount
- type SystemInstrCreateAccount
- type SystemInstrCreateAccountWithSeed
- type SystemInstrInitializeNonceAccount
- type SystemInstrTransfer
- type SystemInstrTransferWithSeed
- type SystemInstrWithdrawNonceAccount
- type SysvarClock
- type SysvarEpochRewards
- func (sr *SysvarEpochRewards) Distribute(amount uint64)
- func (ser *SysvarEpochRewards) MarshalWithEncoder(encoder *bin.Encoder) error
- func (sr *SysvarEpochRewards) MustMarshalWithEncoder(encoder *bin.Encoder)
- func (sr *SysvarEpochRewards) MustUnmarshalWithDecoder(decoder *bin.Decoder)
- func (sr SysvarEpochRewards) String() string
- func (ser *SysvarEpochRewards) UnmarshalWithDecoder(decoder *bin.Decoder) error
- type SysvarEpochSchedule
- func (sr *SysvarEpochSchedule) FirstSlotInEpoch(epoch uint64) uint64
- func (sr *SysvarEpochSchedule) GetEpoch(slot uint64) uint64
- func (sr *SysvarEpochSchedule) GetEpochAndSlotIndex(slot uint64) (uint64, uint64)
- func (sr *SysvarEpochSchedule) LeaderScheduleEpoch(slot uint64) uint64
- func (sr *SysvarEpochSchedule) MustUnmarshalWithDecoder(decoder *bin.Decoder)
- func (sr *SysvarEpochSchedule) Slot0(epoch uint64) uint64
- func (sr *SysvarEpochSchedule) SlotsInEpoch(epoch uint64) uint64
- func (ses *SysvarEpochSchedule) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
- type SysvarFees
- type SysvarLastRestartSlot
- type SysvarRecentBlockhashes
- func (recentBlockhashes *SysvarRecentBlockhashes) GetLatest() RecentBlockHashesEntry
- func (recentBlockhashes *SysvarRecentBlockhashes) IsBlockhashAgeValid(hash [32]byte) bool
- func (recentBlockhashes *SysvarRecentBlockhashes) MarshalWithEncoder(encoder *bin.Encoder) error
- func (recentBlockhashes *SysvarRecentBlockhashes) MustMarshal() []byte
- func (recentBlockhashes *SysvarRecentBlockhashes) MustUnmarshalWithDecoder(decoder *bin.Decoder)
- func (recentBlockhashes *SysvarRecentBlockhashes) PushLatest(latest [32]byte, lamportsPerSignature uint64) [32]byte
- func (recentBlockhashes *SysvarRecentBlockhashes) UnmarshalWithDecoder(decoder *bin.Decoder) error
- type SysvarRent
- func (sr *SysvarRent) InitializeDefault()
- func (sr *SysvarRent) IsExempt(balance uint64, dataLen uint64) bool
- func (sr *SysvarRent) MinimumBalance(dataLen uint64) uint64
- func (sr *SysvarRent) MustUnmarshalWithDecoder(decoder *bin.Decoder)
- func (sr *SysvarRent) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
- type SysvarSlotHashes
- func (slotHashes *SysvarSlotHashes) FromInstrAcct(execCtx *ExecutionCtx, instrAcctIdx uint64) error
- func (sh *SysvarSlotHashes) Get(slot uint64) ([32]byte, error)
- func (sh *SysvarSlotHashes) MustMarshal() []byte
- func (sh *SysvarSlotHashes) MustUnmarshalWithDecoder(decoder *bin.Decoder)
- func (sh *SysvarSlotHashes) Position(slot uint64) (uint64, error)
- func (sh *SysvarSlotHashes) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
- func (sh *SysvarSlotHashes) Update(slot uint64, parentSlot uint64, hash [32]byte)
- func (sh *SysvarSlotHashes) UpdateWithSlotCtx(slotCtx *SlotCtx)
- type SysvarSlotHistory
- func (sr *SysvarSlotHistory) Add(slot uint64)
- func (sr *SysvarSlotHistory) MustMarshal() []byte
- func (sr *SysvarSlotHistory) MustUnmarshalWithDecoder(decoder *bin.Decoder)
- func (sr *SysvarSlotHistory) SetNextSlot(nextSlot uint64)
- func (sh *SysvarSlotHistory) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
- type SysvarStakeHistory
- func (sh *SysvarStakeHistory) Get(epoch uint64) *StakeHistoryEntry
- func (sh *SysvarStakeHistory) MarshalWithEncoder(encoder *bin.Encoder) error
- func (sh *SysvarStakeHistory) MustMarshalWithEncoder(encoder *bin.Encoder)
- func (sh *SysvarStakeHistory) MustUnmarshalWithDecoder(decoder *bin.Decoder)
- func (sh *SysvarStakeHistory) String() string
- func (sh *SysvarStakeHistory) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
- func (sh *SysvarStakeHistory) Update(epoch uint64, entry StakeHistoryEntry)
- type TransactionAccounts
- func (txAccounts *TransactionAccounts) GetAccount(idx uint64) (*accounts.Account, error)
- func (txAccounts *TransactionAccounts) IsLocked(idx uint64) bool
- func (txAccounts *TransactionAccounts) Lock(idx uint64)
- func (txAccounts *TransactionAccounts) Touch(idx uint64) error
- func (txAccounts *TransactionAccounts) Unlock(idx uint64)
- type TransactionCtx
- func (txCtx *TransactionCtx) AccountAtIndex(idxInTx uint64) (*accounts.Account, error)
- func (txCtx *TransactionCtx) CurrentInstructionCtx() (*InstructionCtx, error)
- func (txCtx *TransactionCtx) IndexOfAccount(pubkey solana.PublicKey) (uint64, error)
- func (txCtx *TransactionCtx) InstructionAccountsLamportSum(instrCtx *InstructionCtx) (wide.Uint128, error)
- func (txCtx *TransactionCtx) InstructionCtxAtIndexInTrace(idxInTrace uint64) (*InstructionCtx, error)
- func (txCtx *TransactionCtx) InstructionCtxAtNestingLevel(nestingLevel uint64) (*InstructionCtx, error)
- func (txCtx *TransactionCtx) InstructionCtxStackHeight() uint64
- func (txCtx *TransactionCtx) InstructionTraceLength() uint64
- func (txCtx *TransactionCtx) KeyOfAccountAtIndex(index uint64) (solana.PublicKey, error)
- func (txCtx *TransactionCtx) NextInstructionCtx() (*InstructionCtx, error)
- func (txCtx *TransactionCtx) Pop() error
- func (txCtx *TransactionCtx) Push() error
- func (txCtx *TransactionCtx) PushInstructionCtx(ixCtx InstructionCtx)
- func (txCtx *TransactionCtx) ReturnData() (solana.PublicKey, []byte)
- func (txCtx *TransactionCtx) SetReturnData(programId solana.PublicKey, data []byte)
- type TranslatedAccount
- type TranslatedAccounts
- type TxReturnData
- type UpgradeableLoaderInstrDeployWithMaxDataLen
- type UpgradeableLoaderInstrExtendProgram
- type UpgradeableLoaderInstrWrite
- type UpgradeableLoaderState
- type UpgradeableLoaderStateBuffer
- type UpgradeableLoaderStateProgram
- type UpgradeableLoaderStateProgramData
- type ValidatedProgram
- type VectorDescrC
- type VectorDescrRust
- type VoteInstrAuthorizeCheckedWithSeed
- type VoteInstrAuthorizeWithSeed
- type VoteInstrCompactUpdateVoteState
- type VoteInstrCompactUpdateVoteStateSwitch
- type VoteInstrTowerSync
- type VoteInstrTowerSyncSwitch
- type VoteInstrUpdateCommission
- type VoteInstrUpdateVoteState
- type VoteInstrUpdateVoteStateSwitch
- type VoteInstrVote
- type VoteInstrVoteAuthorize
- type VoteInstrVoteAuthorizeChecked
- type VoteInstrVoteInit
- type VoteInstrVoteSwitch
- type VoteInstrWithdraw
- type VoteLockout
- func (lockout *VoteLockout) IncreaseConfirmationCount(by uint32)
- func (lockout *VoteLockout) IsLockedOutAtSlot(slot uint64) bool
- func (lockout *VoteLockout) LastLockedOutSlot() uint64
- func (lockout *VoteLockout) Lockout() uint64
- func (lockout *VoteLockout) MarshalWithEncoder(encoder *bin.Encoder) error
- func (lockout *VoteLockout) UnmarshalWithDecoder(decoder *bin.Decoder) error
- type VoteState
- func (voteState *VoteState) ContainsSlot(candidateSlot uint64) bool
- func (voteState *VoteState) Credits() uint64
- func (voteState *VoteState) CreditsForVoteAtIndex(index uint64, timelyVoteCredits, deprecateUnusedLegacyVotePlumbing bool) uint64
- func (voteState *VoteState) DoubleLockouts()
- func (voteState *VoteState) GetAndUpdateAuthorizedVoter(currentEpoch uint64) (solana.PublicKey, error)
- func (voteState *VoteState) IncrementCredits(epoch uint64, credits uint64)
- func (voteState *VoteState) LastLockout() *VoteLockout
- func (voteState *VoteState) LastVotedSlot() (uint64, bool)
- func (voteState *VoteState) MarshalWithEncoder(encoder *bin.Encoder) error
- func (voteState *VoteState) PopExpiredVotes(nextVoteSlot uint64)
- func (voteState *VoteState) ProcessNextVoteSlot(nextVoteSlot uint64, epoch uint64, currentSlot uint64, ...)
- func (voteState *VoteState) ProcessTimestamp(slot uint64, timestamp int64) error
- func (voteState *VoteState) SetNewAuthorizedVoter(authorized solana.PublicKey, currentEpoch uint64, targetEpoch uint64, ...) error
- func (voteState *VoteState) UnmarshalWithDecoder(decoder *bin.Decoder) error
- type VoteState0_23_5
- type VoteState1_14_11
- type VoteStateVersions
- func (voteStateVersions *VoteStateVersions) ConvertToCurrent() *VoteState
- func (voteStateVersions *VoteStateVersions) IsInitialized() bool
- func (voteStateVersions *VoteStateVersions) LastTimestamp() *BlockTimestamp
- func (voteStateVersions *VoteStateVersions) MarshalWithEncoder(encoder *bin.Encoder) error
- func (voteStateVersions *VoteStateVersions) NodePubkey() solana.PublicKey
- func (voteStateVersions *VoteStateVersions) UnmarshalWithDecoder(decoder *bin.Decoder) error
Constants ¶
const ( AddrLookupTableInstrTypeCreateLookupTable = iota AddrLookupTableInstrTypeFreezeLookupTable AddrLookupTableInstrTypeExtendLookupTable AddrLookupTableInstrTypeDeactivateLookupTable AddrLookupTableInstrTypeCloseLookupTable )
const ( AddressLookupTableProgramStateUninitialized = iota AddressLookupTableProgramStateLookupTable )
account states
const ( AddressLookupTableStatusTypeActivated = iota AddressLookupTableStatusTypeDeactivating AddressLookupTableStatusTypeDeactivated )
address lookup table statuses
const ( UpgradeableLoaderInstrTypeInitializeBuffer = iota UpgradeableLoaderInstrTypeWrite UpgradeableLoaderInstrTypeDeployWithMaxDataLen UpgradeableLoaderInstrTypeUpgrade UpgradeableLoaderInstrTypeSetAuthority UpgradeableLoaderInstrTypeClose UpgradeableLoaderInstrTypeExtendProgram UpgradeableLoaderInstrTypeSetAuthorityChecked )
const ( UpgradeableLoaderStateTypeUninitialized = iota UpgradeableLoaderStateTypeBuffer UpgradeableLoaderStateTypeProgram UpgradeableLoaderStateTypeProgramData )
const ( MinHeapFrameBytes = (32 * 1024) MaxHeapFrameBytes = (256 * 1024) HeapFrameBytesMultiple = 1024 DefaultInstructionComputeUnitLimit = 200000 MaxComputeUnitLimit = 1400000 MaxLoadedAccountsDataSizeBytes = (64 * 1024 * 1024) MaxBuiltinAllocationComputeUnitLimit = 3000 )
const ( ComputeBudgetInstrTypeRequestHeapFrame = 1 ComputeBudgetInstrTypeSetComputeUnitLimit = 2 ComputeBudgetInstrTypeSetComputeUnitPrice = 3 ComputeBudgetInstrTypeSetLoadedAccountsDataSizeLimit = 4 )
const ( InstrErrCodeSuccess = 0 InstrErrCodeGenericError = 0 InstrErrCodeInvalidArgument = 1 InstrErrCodeInvalidInstructionData = 2 InstrErrCodeInvalidAccountData = 3 InstrErrCodeAccountDataTooSmall = 4 InstrErrCodeInsufficientFunds = 5 InstrErrCodeIncorrectProgramId = 6 InstrErrCodeMissingRequiredSignature = 7 InstrErrCodeAccountAlreadyInitialized = 8 InstrErrCodeUninitializedAccount = 9 InstrErrCodeUnbalancedInstruction = 10 InstrErrCodeModifiedProgramId = 11 InstrErrCodeExternalAccountLamportSpend = 12 InstrErrCodeExternalAccountDataModified = 13 InstrErrCodeReadonlyLamportChange = 14 InstrErrCodeReadonlyDataModified = 15 InstrErrCodeDuplicateAccountIndex = 16 InstrErrCodeExecutableModified = 17 InstrErrCodeRentEpochModified = 18 InstrErrCodeNotEnoughAccountKeys = 19 InstrErrCodeAccountDataSizeChanged = 20 InstrErrCodeAccountNotExecutable = 21 InstrErrCodeAccountBorrowFailed = 22 InstrErrCodeAccountBorrowOutstanding = 23 InstrErrCodeDuplicateAccountOutOfSync = 24 InstrErrCodeCustom = 25 InstrErrCodeInvalidError = 26 InstrErrCodeExecutableDataModified = 27 InstrErrCodeExecutableLamportChange = 28 InstrErrCodeExecutableAccountNotRentExempt = 29 InstrErrCodeUnsupportedProgramId = 30 InstrErrCodeCallDepth = 31 InstrErrCodeMissingAccount = 32 InstrErrCodeReentrancyNotAllowed = 33 InstrErrCodeMaxSeedLengthExceeded = 34 InstrErrCodeInvalidSeeds = 35 InstrErrCodeInvalidRealloc = 36 InstrErrCodeComputationalBudgetExceeded = 37 InstrErrCodePrivilegeEscalation = 38 InstrErrCodeProgramEnvironmentSetupFailure = 39 InstrErrCodeProgramFailedToComplete = 40 InstrErrCodeProgramFailedToCompile = 41 InstrErrCodeImmutable = 42 InstrErrCodeIncorrectAuthority = 43 InstrErrCodeBorshIoError = 44 InstrErrCodeAccountNotRentExempt = 45 InstrErrCodeInvalidAccountOwner = 46 InstrErrCodeArithmeticOverflow = 47 InstrErrCodeUnsupportedSysvar = 48 InstrErrCodeIllegalOwner = 49 InstrErrCodeMaxAccountsDataAllocationsExceeded = 50 InstrErrCodeMaxAccountsExceeded = 51 InstrErrCodeMaxInstructionTraceLengthExceeded = 52 InstrErrCodeBuiltinProgramsMustConsumeComputeUnits = 53 )
instruction errors - Solana numerical error codes
const ( PrecompileErrCodeInvalidDataOffsets = 100 PrecompileErrCodeInvalidInstructionDataSize = 101 PrecompileErrCodeInvalidSignature = 102 PrecompileErrCodeInvalidRecoveryId = 103 // TODO: not sure this is correct )
precompile program errors - Solana numerical error codes
const ( LoaderV4InstrTypeWrite = iota LoaderV4InstrTypeCopy LoaderV4InstrTypeSetProgramLength LoaderV4InstrTypeDeploy LoaderV4InstrTypeRetract LoaderV4InstrTypeTransferAuthority LoaderV4InstrTypeFinalize )
const ( LoaderV4StatusRetracted = iota LoaderV4StatusDeployed LoaderV4StatusFinalized )
const ( Secp256r1CompressedPubkeySerializedSize = 33 Secp256r1SignatureSerializedSize = 64 Secp256r1SignatureOffsetsSerializedSize = 14 Secp256r1SignatureOffsetsStart = 2 Secp256r1DataStart = Secp256r1SignatureOffsetsSerializedSize + Secp256r1SignatureOffsetsStart )
const ( StakeProgramInstrTypeInitialize = iota StakeProgramInstrTypeAuthorize StakeProgramInstrTypeDelegateStake StakeProgramInstrTypeSplit StakeProgramInstrTypeWithdraw StakeProgramInstrTypeDeactivate StakeProgramInstrTypeSetLockup StakeProgramInstrTypeMerge StakeProgramInstrTypeAuthorizeWithSeed StakeProgramInstrTypeInitializeChecked StakeProgramInstrTypeAuthorizeChecked StakeProgramInstrTypeAuthorizeCheckedWithSeed StakeProgramInstrTypeSetLockupChecked StakeProgramInstrTypeGetMinimumDelegation StakeProgramInstrTypeDeactivateDelinquent StakeProgramInstrTypeRedelegate StakeProgramInstrTypeMoveStake StakeProgramInstrTypeMoveLamports )
const ( StakeStateV2StatusUninitialized = iota StakeStateV2StatusInitialized StakeStateV2StatusStake StakeStateV2StatusRewardsPool )
const ( StakeAuthorizeStaker = iota StakeAuthorizeWithdrawer )
const ( MergeKindStatusInactive = iota MergeKindStatusActivationEpoch MergeKindStatusFullyActive )
const ( MaxSigners = 16 MaxCpiInstructionDataLen = 10 * 1024 MaxCpiInstructionAccounts = 255 MaxCpiAccountInfos = 128 )
const ( Curve25519Edwards = 0 Curve25519Ristretto = 1 )
curve types
const ( CurvePointBytesLen = 32 CurveScalarBytesLen = 32 )
const ( CurveOpAdd = 0 CurveOpSub = 1 CurveOpMul = 2 )
curve operations
const ( AltBn128G1Compress = 0 AltBn128G1Decompress = 1 AltBn128G2Compress = 2 AltBn128G2Decompress = 3 )
alt bn128 compression operations
const ( Bn128G1Len = 64 Bn128G2Len = 128 Bn128G1CompressedLen = 32 Bn128G2CompressedLen = 64 )
const ( AltBn128Add = 0 AltBn128Sub = 1 AltBn128Mul = 2 AltBn128Pairing = 3 )
alt bn128 operations
const ( AltBn128AdditionInputLen = 128 AltBn128MultiplicationInputLen = 128 AltBn128PairingElementLen = 192 AltBn128AdditionOutputLen = 64 AltBn128MultiplicationOutputLen = 64 AltBn128PairingOutputLen = 32 )
alt bn128 input/output lengths
const ( SystemProgramInstrTypeCreateAccount = iota SystemProgramInstrTypeAssign SystemProgramInstrTypeTransfer SystemProgramInstrTypeCreateAccountWithSeed SystemProgramInstrTypeAdvanceNonceAccount SystemProgramInstrTypeWithdrawNonceAccount SystemProgramInstrTypeInitializeNonceAccount SystemProgramInstrTypeAuthorizeNonceAccount SystemProgramInstrTypeAllocate SystemProgramInstrTypeAllocateWithSeed SystemProgramInstrTypeAssignWithSeed SystemProgramInstrTypeTransferWithSeed SystemProgramInstrTypeUpgradeNonceAccount )
const ( NonceVersionLegacy = 0 NonceVersionCurrent = 1 )
const ( VoteProgramInstrTypeInitializeAccount = iota VoteProgramInstrTypeAuthorize VoteProgramInstrTypeVote VoteProgramInstrTypeWithdraw VoteProgramInstrTypeUpdateValidatorIdentity VoteProgramInstrTypeUpdateCommission VoteProgramInstrTypeVoteSwitch VoteProgramInstrTypeAuthorizeChecked VoteProgramInstrTypeUpdateVoteState VoteProgramInstrTypeUpdateVoteStateSwitch VoteProgramInstrTypeAuthorizeWithSeed VoteProgramInstrTypeAuthorizeCheckedWithSeed VoteProgramInstrTypeCompactUpdateVoteState VoteProgramInstrTypeCompactUpdateVoteStateSwitch VoteProgramInstrTypeTowerSync VoteProgramInstrTypeTowerSyncSwitch )
const ( VoteAuthorizeTypeVoter = iota VoteAuthorizeTypeWithdrawer )
const ( VoteStateVersionV0_23_5 = iota VoteStateVersionV1_14_11 VoteStateVersionCurrent )
const ( VoteStateV2Size = 3731 VoteStateV3Size = 3762 )
const ( MaxLockoutHistory = 31 VoteCreditsGraceSlots = 2 VoteCreditsMaximumPerSlot = 16 VoteCreditsMaximumPerSlotOld = 8 MaxEpochCreditsHistory = 64 )
const AccountMetaSize = 34
const AddressLookupTableMetaSize = 56
const DataStart = (SignatureOffsetsSerializedSize + SignatureOffsetStarts)
const Ed25519SignatureOffsetsSize = 14
const InitialLockout = 2
const LookupTableMaxAddresses = 256
const MaxInstructionAccounts = 255
const MaxPermittedDataIncrease = 1024 * 10
const MaxPermittedDataLength = 10 * 1024 * 1024
const MaxReturnData = 1024
const MaxSeedLen = 32
const MaxSeeds = 16
const MinimumDelinquentEpochsForDeactivation = 5
const MinimumSlotsPerEpoch = 32
const PoseidonCostCoefficientA = 61
const PoseidonCostCoefficientC = 542
const ProcessedSiblingInstructionSize = 16
const PubkeySerializedSize = 32
const ReallocAlign = 8
ReallocAlign is the byte amount by which the data following a realloc is aligned.
const ReallocSpace = 1024 * 10
ReallocSpace is the allowed length by which an account is allowed to grow.
const RefCellRustSize = 32
const RefCellVecRustSize = 40
const Secp256k1DataStart = (Secp256k1SignatureOffsetsSerializedSize + Secp256k1SignatureOffsetsStart)
const Secp256k1HashedPubkeySerializedSize = 20
const Secp256k1SignatureOffsetsSerializedSize = 11
const Secp256k1SignatureOffsetsStart = 1
const Secp256k1SignatureSerializedSize = 64
const SignatureOffsetStarts = 2
const SignatureOffsetsSerializedSize = 14
const SignatureSerializedSize = 64
const SlotHashesMaxEntries = 512
const SolAccountInfoCSize = 56
const SolAccountInfoRustSize = 48
const SolAccountMetaCSize = 16
const SolAccountMetaRustSize = 34
const SolInstructionCStructSize = 40
const SolInstructionRustStructSize = 80
const SolSignerSeedsCSize = 16
const (
StakeStateV2Size = 200
)
const SystemProgMaxPermittedDataLen = 10 * 1024 * 1024
const SysvarClockAddrStr = "SysvarC1ock11111111111111111111111111111111"
const SysvarClockStructLen = 40
const SysvarEpochRewardsAddrStr = "SysvarEpochRewards1111111111111111111111111"
const SysvarEpochRewardsStructLen = 96
const SysvarEpochScheduleAddrStr = "SysvarEpochSchedu1e111111111111111111111111"
const SysvarEpochScheduleStructLen = 40
const SysvarFeesAddrStr = "SysvarFees111111111111111111111111111111111"
const SysvarFeesStructLen = 8
const SysvarInstructionsAddrStr = "Sysvar1nstructions1111111111111111111111111"
const SysvarLastRestartSlotAddrStr = "SysvarLastRestartS1ot1111111111111111111111"
const SysvarLastRestartSlotStructLen = 8
const SysvarRecentBlockHashesAddrStr = "SysvarRecentB1ockHashes11111111111111111111"
const SysvarRentAddrStr = "SysvarRent111111111111111111111111111111111"
const SysvarRentStructLen = 24
const SysvarSlotHashesAddrStr = "SysvarS1otHashes111111111111111111111111111"
const SysvarSlotHistoryAddrStr = "SysvarS1otHistory11111111111111111111111111"
const SysvarStakeHistoryAddrStr = "SysvarStakeHistory1111111111111111111111111"
const SysvarStakeHistoryMaxEntries = 512
Variables ¶
var ( InstrErrInvalidInstructionData = errors.New("InstrErrInvalidInstructionData") InstrErrNotEnoughAccountKeys = errors.New("InstrErrNotEnoughAccountKeys") InstrErrComputationalBudgetExceeded = errors.New("InstrErrComputationalBudgetExceeded") InstrErrMissingAccount = errors.New("InstrErrMissingAccount") InstrErrInvalidAccountOwner = errors.New("InstrErrInvalidAccountOwner") InstrErrInvalidAccountData = errors.New("InstrErrInvalidAccountData") InstrErrMissingRequiredSignature = errors.New("InstrErrMissingRequiredSignature") InstrErrInvalidArgument = errors.New("InstrErrInvalidArgument") InstrErrExecutableDataModified = errors.New("InstrErrExecutableDataModified") InstrErrReadonlyDataModified = errors.New("InstrErrReadonlyDataModified") InstrErrExternalAccountDataModified = errors.New("InstrErrExternalAccountDataModified") InstrErrPrivilegeEscalation = errors.New("InstrErrPrivilegeEscalation") InstrErrAccountNotExecutable = errors.New("InstrErrAccountNotExecutable") InstrErrAccountDataSizeChanged = errors.New("InstrErrAccountDataSizeChanged") InstrErrInvalidRealloc = errors.New("InstrErrInvalidRealloc") InstrErrModifiedProgramId = errors.New("InstrErrModifiedProgramId") InstrErrCallDepth = errors.New("InstrErrCallDepth") InstrErrUnsupportedProgramId = errors.New("InstrErrUnsupportedProgramId") InstrErrReentrancyNotAllowed = errors.New("InstrErrReentrancyNotAllowed") InstrErrArithmeticOverflow = errors.New("InstrErrArithmeticOverflow") InstrErrUnbalancedInstruction = errors.New("InstrErrUnbalancedInstruction") InstrErrAccountDataTooSmall = errors.New("InstrErrAccountDataTooSmall") InstrErrAccountBorrowOutstanding = errors.New("InstrErrAccountBorrowOutstanding") InstrErrExternalAccountLamportSpend = errors.New("InstrErrExternalAccountLamportSpend") InstrErrReadonlyLamportChange = errors.New("InstrErrReadonlyLamportChange") InstrErrExecutableLamportChange = errors.New("InstrErrExecutableLamportChange") InstrErrInsufficientFunds = errors.New("InstrErrInsufficientFunds") InstrErrAccountAlreadyInitialized = errors.New("InstrErrAccountAlreadyInitialized") InstrErrUninitializedAccount = errors.New("InstrErrUninitializedAccount") InstrErrIncorrectProgramId = errors.New("InstrErrIncorrectProgramId") InstrErrImmutable = errors.New("InstrErrImmutable") InstrErrIncorrectAuthority = errors.New("InstrErrIncorrectAuthority") InstrErrExecutableAccountNotRentExempt = errors.New("InstrErrExecutableAccountNotRentExempt") InstrErrExecutableModified = errors.New("InstrErrExecutableModified") InstrErrMaxAccountsExceeded = errors.New("InstrErrMaxAccountsExceeded") InstrErrAccountBorrowFailed = errors.New("InstrErrAccountBorrowFailed") InstrErrDuplicateAccountIndex = errors.New("InstrErrDuplicateAccountIndex") InstrErrRentEpochModified = errors.New("InstrErrRentEpochModified") InstrErrDuplicateAccountOutOfSync = errors.New("InstrErrDuplicateAccountOutOfSync") InstrErrCustom = errors.New("InstrErrCustom") InstrErrInvalidError = errors.New("InstrErrInvalidError") InstrErrGenericError = errors.New("InstrErrGenericError") InstrErrMaxSeedLengthExceeded = errors.New("InstrErrMaxSeedLengthExceeded") InstrErrInvalidSeeds = errors.New("InstrErrInvalidSeeds") InstrErrProgramEnvironmentSetupFailure = errors.New("InstrErrProgramEnvironmentSetupFailure") InstrErrProgramFailedToComplete = errors.New("InstrErrProgramFailedToComplete") InstrErrProgramFailedToCompile = errors.New("InstrErrProgramFailedToCompile") InstrErrBorshIoError = errors.New("InstrErrBorshIoError") InstrErrAccountNotRentExempt = errors.New("InstrErrAccountNotRentExempt") InstrErrUnsupportedSysvar = errors.New("InstrErrUnsupportedSysvar") InstrErrIllegalOwner = errors.New("InstrErrIllegalOwner") InstrErrMaxAccountsDataAllocationsExceeded = errors.New("InstrErrMaxAccountsDataAllocationsExceeded") InstrErrMaxInstructionTraceLengthExceeded = errors.New("InstrErrMaxInstructionTraceLengthExceeded") InstrErrBuiltinProgramsMustConsumeComputeUnits = errors.New("InstrErrBuiltinProgramsMustConsumeComputeUnits") )
instruction errors
var ( SyscallErrCopyOverlapping = errors.New("SyscallErrCopyOverlapping") SyscallErrTooManySlices = errors.New("SyscallErrTooManySlices") SyscallErrInvalidLength = errors.New("SyscallErrInvalidLength") SyscallErrInvalidString = errors.New("SyscallErrInvalidString") SyscallErrMaxSeedLengthExceeded = errors.New("SyscallErrMaxSeedLengthExceeded") SyscallErrReturnDataTooLarge = errors.New("SyscallErrReturnDataTooLarge") SyscallErrInvalidArgument = errors.New("SyscallErrInvalidArgument") SyscallErrNotEnoughAccountKeys = errors.New("SyscallErrNotEnoughAccountKeys") SyscallErrTooManySigners = errors.New("SyscallErrTooManySigners") SyscallErrTooManyBytesConsumed = errors.New("SyscallErrTooManyBytesConsumed") SyscallErrMalformedBool = errors.New("SyscallErrMalformedBool") SyscallErrProgramNotSupported = errors.New("SyscallErrProgramNotSupported") SyscallErrMaxInstructionDataLenExceeded = errors.New("SyscallErrMaxInstructionDataLenExceeded") SyscallErrMaxInstructionAccountsExceeded = errors.New("SyscallErrMaxInstructionAccountsExceeded") SyscallErrInstructionTooLarge = errors.New("SyscallErrInstructionTooLarge") SyscallErrMaxInstructionAccountInfosExceeded = errors.New("SyscallErrMaxInstructionAccountInfosExceeded") SyscallErrTooManyAccounts = errors.New("SyscallErrTooManyAccounts") )
syscall errors
var ( PubkeyErrIllegalOwner = errors.New("PubkeyErrIllegalOwner") PubkeyErrInvalidSeeds = errors.New("PubkeyErrInvalidSeeds") PubkeyErrMaxSeedLengthExceeded = errors.New("PubkeyErrMaxSeedLengthExceeded") )
var ( PrecompileErrPublicKey = errors.New("PrecompileErrPublicKey") PrecompileErrRecoveryId = errors.New("PrecompileErrRecoveryId") PrecompileErrSignature = errors.New("PrecompileErrSignature") PrecompileErrDataOffset = errors.New("PrecompileErrDataOffset") PrecompileErrInstrDataSize = errors.New("PrecompileErrInstrDataSize") )
precompile errors
var ( StakeErrCustodianMissing = errors.New("StakeErrCustodianMissing") StakeErrCustodianSignatureMissing = errors.New("StakeErrCustodianSignatureMissing") StakeErrLockupInForce = errors.New("StakeErrLockupInForce") StakeErrInsufficientDelegation = errors.New("StakeErrInsufficientDelegation") StakeErrTooSoonToRedelegate = errors.New("StakeErrTooSoonToRedelegate") StakeErrInsufficientStake = errors.New("StakeErrInsufficientStake") StakeErrMergeTransientStake = errors.New("StakeErrMergeTransientStake") StakeErrMergeMismatch = errors.New("StakeErrMergeMismatch") StakeErrAlreadyDeactivated = errors.New("StakeErrAlreadyDeactivated") StakeErrRedelegatedStakeMustFullyActivateBeforeDeactivationIsPermitted = errors.New("StakeErrRedelegatedStakeMustFullyActivateBeforeDeactivationIsPermitted") StakeErrInsufficientReferenceVotes = errors.New("StakeErrInsufficientReferenceVotes") StakeErrVoteAddressMismatch = errors.New("StakeErrVoteAddressMismatch") StakeErrMinimumDelinquentEpochsForDeactivationNotMet = errors.New("StakeErrMinimumDelinquentEpochsForDeactivationNotMet") StakeErrRedelegateTransientOrInactiveStake = errors.New("StakeErrRedelegateTransientOrInactiveStake") StakeErrRedelegateToSameVoteAccount = errors.New("StakeErrRedelegateToSameVoteAccount") StakeErrEpochRewardsActive = errors.New("StakeErrEpochRewardsActive") )
stake errors
var ( SystemProgErrAccountAlreadyInUse = errors.New("SystemProgErrAccountAlreadyInUse") SystemProgErrInvalidAccountDataLength = errors.New("SystemProgErrInvalidAccountDataLength") SystemProgErrResultWithNegativeLamports = errors.New("SystemProgErrResultWithNegativeLamports") SystemProgErrAddressWithSeedMismatch = errors.New("SystemProgErrAddressWithSeedMismatch") SystemProgErrNonceNoRecentBlockhashes = errors.New("SystemProgErrNonceNoRecentBlockhashes") SystemProgErrNonceBlockhashNotExpired = errors.New("SystemProgErrNonceBlockhashNotExpired") )
var ( VoteErrCommissionUpdateTooLate = errors.New("VoteErrCommissionUpdateTooLate") VoteErrEmptySlots = errors.New("VoteErrEmptySlots") VoteErrVotesTooOldAllFiltered = errors.New("VoteErrVotesTooOldAllFiltered") VoteErrVoteTooOld = errors.New("VoteErrVoteTooOld") VoteErrSlotsMismatch = errors.New("VoteErrSlotsMismatch") VoteErrSlotHashMismatch = errors.New("VoteErrSlotHashMismatch") VoteErrTimestampTooOld = errors.New("VoteErrTimestampTooOld") VoteErrSlotsNotOrdered = errors.New("VoteErrSlotsNotOrdered") VoteErrRootOnDifferentFork = errors.New("VoteErrRootOnDifferentFork") VoteErrTooManyVotes = errors.New("VoteErrTooManyVotes") VoteErrRootRollback = errors.New("VoteErrRootRollback") VoteErrZeroConfirmations = errors.New("VoteErrZeroConfirmations") VoteErrConfirmationTooLarge = errors.New("VoteErrConfirmationTooLarge") VoteErrSlotSmallerThanRoot = errors.New("VoteErrSlotSmallerThanRoot") VoteErrConfirmationsNotOrdered = errors.New("VoteErrConfirmationsNotOrdered") VoteErrNewVoteStateLockoutMismatch = errors.New("VoteErrNewVoteStateLockoutMismatch") VoteErrLockoutConflict = errors.New("VoteErrLockoutConflict") VoteErrConfirmationRollback = errors.New("VoteErrConfirmationRollback") VoteErrActiveVoteAccountClose = errors.New("VoteErrActiveVoteAccountClose") )
var BorrowedAccountArenas []*arena.Arena[BorrowedAccount]
One per tx processor.
var DefaultWarmupCooldownRate float64 = 0.25
var ErrInvalidProof = errors.New("invalid proof")
var IsPrecompile = errors.New("IsPrecompile")
var NewWarmupCooldownRate float64 = 0.09
var SECP256K1_N = [8]uint32{0xD0364141, 0xBFD25E8C, 0xAF48A03B, 0xBAAEDCE6, 0xFFFFFFFE, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}
var (
StakeFlagsMustFullyActivateBeforeDeactivationIsPermitted = StakeFlags{Bits: 1}
)
var SyscallAbort = sbpf.SyscallFunc0(SyscallAbortImpl)
var SyscallAllocFree = sbpf.SyscallFunc2(SyscallAllocFreeImpl)
var SyscallAltBn128 = sbpf.SyscallFunc4(SyscallAltBn128Impl)
var SyscallAltBn128Compression = sbpf.SyscallFunc4(SyscallAltBn128CompressionImpl)
var SyscallBlake3 = sbpf.SyscallFunc3(SyscallBlake3Impl)
var SyscallCreateProgramAddress = sbpf.SyscallFunc4(SyscallCreateProgramAddressImpl)
var SyscallCurveGroupOps = sbpf.SyscallFunc5(SyscallCurveGroupOpsImpl)
var SyscallCurveMultiscalarMultiplication = sbpf.SyscallFunc5(SyscallCurveMultiscalarMultiplicationImpl)
var SyscallGetClockSysvar = sbpf.SyscallFunc1(SyscallGetClockSysvarImpl)
var SyscallGetEpochRewardsSysvar = sbpf.SyscallFunc1(SyscallGetEpochRewardsSysvarImpl)
var SyscallGetEpochScheduleSysvar = sbpf.SyscallFunc1(SyscallGetEpochScheduleSysvarImpl)
var SyscallGetEpochStake = sbpf.SyscallFunc1(SyscallGetEpochStakeImpl)
var SyscallGetLastRestartSlotSysvar = sbpf.SyscallFunc1(SyscallGetLastRestartSlotSysvarImpl)
var SyscallGetProcessedSiblingInstruction = sbpf.SyscallFunc5(SyscallGetProcessedSiblingInstructionImpl)
var SyscallGetRentSysvar = sbpf.SyscallFunc1(SyscallGetRentSysvarImpl)
var SyscallGetReturnData = sbpf.SyscallFunc3(SyscallGetReturnDataImpl)
var SyscallGetStackHeight = sbpf.SyscallFunc0(SyscallGetStackHeightImpl)
var SyscallGetSysvar = sbpf.SyscallFunc4(SyscallGetSysvarImpl)
var SyscallKeccak256 = sbpf.SyscallFunc3(SyscallKeccak256Impl)
var SyscallLog = sbpf.SyscallFunc2(SyscallLogImpl)
var SyscallLog64 = sbpf.SyscallFunc5(SyscallLog64Impl)
var SyscallLogCUs = sbpf.SyscallFunc0(SyscallLogCUsImpl)
var SyscallLogData = sbpf.SyscallFunc2(SyscallLogDataImpl)
var SyscallLogPubkey = sbpf.SyscallFunc1(SyscallLogPubkeyImpl)
var SyscallMemcmp = sbpf.SyscallFunc4(SyscallMemcmpImpl)
var SyscallMemcpy = sbpf.SyscallFunc3(SyscallMemcpyImpl)
var SyscallMemmove = sbpf.SyscallFunc3(SyscallMemmoveImpl)
var SyscallMemset = sbpf.SyscallFunc3(SyscallMemsetImpl)
var SyscallPanic = sbpf.SyscallFunc4(SyscallPanicImpl)
var SyscallPoseidon = sbpf.SyscallFunc5(SyscallPoseidonImpl)
var SyscallSecp256k1Recover = sbpf.SyscallFunc4(SyscallSecp256k1RecoverImpl)
var SyscallSetReturnData = sbpf.SyscallFunc2(SyscallSetReturnDataImpl)
var SyscallSha256 = sbpf.SyscallFunc3(SyscallSha256Impl)
var SyscallTryFindProgramAddress = sbpf.SyscallFunc5(SyscallTryFindProgramAddressImpl)
var SyscallValidatePoint = sbpf.SyscallFunc2(SyscallCurveValidatePointImpl)
var SysvarCache = sysvarCache{}
var SysvarClockAddr = base58.MustDecodeFromString(SysvarClockAddrStr)
var SysvarEpochRewardsAddr = base58.MustDecodeFromString(SysvarEpochRewardsAddrStr)
var SysvarEpochScheduleAddr = base58.MustDecodeFromString(SysvarEpochScheduleAddrStr)
var SysvarFeesAddr = base58.MustDecodeFromString(SysvarFeesAddrStr)
var SysvarInstructionsAddr = base58.MustDecodeFromString(SysvarInstructionsAddrStr)
var SysvarLastRestartSlotAddr = base58.MustDecodeFromString(SysvarLastRestartSlotAddrStr)
var SysvarRecentBlockHashesAddr = base58.MustDecodeFromString(SysvarRecentBlockHashesAddrStr)
var SysvarRentAddr = base58.MustDecodeFromString(SysvarRentAddrStr)
var SysvarSlotHashesAddr = base58.MustDecodeFromString(SysvarSlotHashesAddrStr)
var SysvarSlotHistoryAddr = base58.MustDecodeFromString(SysvarSlotHistoryAddrStr)
var SysvarStakeHistoryAddr = base58.MustDecodeFromString(SysvarStakeHistoryAddrStr)
Functions ¶
func AddressLookupTableCloseLookupTable ¶
func AddressLookupTableCloseLookupTable(execCtx *ExecutionCtx) error
func AddressLookupTableCreateLookupTable ¶
func AddressLookupTableCreateLookupTable(execCtx *ExecutionCtx, untrustedRecentSlot uint64, bumpSeed byte) error
func AddressLookupTableDeactivateLookupTable ¶
func AddressLookupTableDeactivateLookupTable(execCtx *ExecutionCtx) error
func AddressLookupTableExecute ¶
func AddressLookupTableExecute(execCtx *ExecutionCtx) error
func AddressLookupTableExtendLookupTable ¶
func AddressLookupTableExtendLookupTable(execCtx *ExecutionCtx, newAddresses []solana.PublicKey) error
func AddressLookupTableFreezeLookupTable ¶
func AddressLookupTableFreezeLookupTable(execCtx *ExecutionCtx) error
func BpfLoaderProgramExecute ¶
func BpfLoaderProgramExecute(execCtx *ExecutionCtx) error
func CheckAcctForRecentBlockHashesSysvar ¶
func CheckAcctForRecentBlockHashesSysvar(txCtx *TransactionCtx, instrCtx *InstructionCtx, instrAcctIdx uint64) error
func ComputeBudgetExecute ¶
func ComputeBudgetExecute(execCtx *ExecutionCtx) error
func ConfigProgramExecute ¶
func ConfigProgramExecute(ctx *ExecutionCtx) error
func Ed25519GetDataSlice ¶
func Ed25519ProgramExecute ¶
func Ed25519ProgramExecute(execCtx *ExecutionCtx) error
func ElGamalProofProgramExecute ¶
func ElGamalProofProgramExecute(execCtx *ExecutionCtx) error
func IsCustomErr ¶
func IsNativeProgram ¶
func IsNonceInstr ¶
func IsNonceInstr(instr Instruction) bool
func IsTransactionAgeValid ¶
func IsTransactionAgeValid(tx *solana.Transaction, instrs []Instruction, slotCtx *SlotCtx) bool
func IsWritable ¶
func IsWritable(tx *solana.Transaction, am *AccountMeta, f *features.Features) bool
func LoaderV4Execute ¶
func LoaderV4Execute(execCtx *ExecutionCtx) error
func LoaderV4ProcessCopy ¶
func LoaderV4ProcessCopy(execCtx *ExecutionCtx, destinationOffset uint32, sourceOffset uint32, length uint32) error
func LoaderV4ProcessDeploy ¶
func LoaderV4ProcessDeploy(execCtx *ExecutionCtx) error
func LoaderV4ProcessFinalize ¶
func LoaderV4ProcessFinalize(execCtx *ExecutionCtx) error
func LoaderV4ProcessRetract ¶
func LoaderV4ProcessRetract(execCtx *ExecutionCtx) error
func LoaderV4ProcessSetProgramLength ¶
func LoaderV4ProcessSetProgramLength(execCtx *ExecutionCtx, newLen uint32) error
func LoaderV4ProcessTransferAuthority ¶
func LoaderV4ProcessTransferAuthority(execCtx *ExecutionCtx) error
func LoaderV4ProcessWrite ¶
func LoaderV4ProcessWrite(execCtx *ExecutionCtx, offset uint32, bytes []byte) error
func MakeInstructionsSysvarAccount ¶
func MakeInstructionsSysvarAccount(instructions []Instruction) *accounts.Account
func MarshalStakeStake ¶
func MarshalStakeStake(state *StakeStateV2) ([]byte, error)
func MaybeAdvanceNonceAccountForFailedTx ¶
func MaybeAdvanceNonceAccountForFailedTx(slotCtx *SlotCtx, tx *solana.Transaction, instr Instruction) (solana.PublicKey, bool)
func MemOpConsume ¶
func MemOpConsume(execCtx *ExecutionCtx, n uint64) error
func NewWarmupCooldownRateEpoch ¶
func NewWarmupCooldownRateEpoch(execCtx *ExecutionCtx) (*uint64, error)
func NewWarmupCooldownRateEpochWithSlotCtx ¶
func NewWarmupCooldownRateEpochWithSlotCtx(slotCtx *SlotCtx, epochSchedule *SysvarEpochSchedule) *uint64
func ProcessUpgradeableLoaderInstruction ¶
func ProcessUpgradeableLoaderInstruction(execCtx *ExecutionCtx) error
func Secp256k1GetDataSlice ¶
func Secp256k1ProgramExecute ¶
func Secp256k1ProgramExecute(execCtx *ExecutionCtx) error
func Secp256r1GetDataSlice ¶
func Secp256r1ProgramExecute ¶
func Secp256r1ProgramExecute(execCtx *ExecutionCtx) error
func StakeProgramAuthorize ¶
func StakeProgramAuthorizeWithSeed ¶
func StakeProgramAuthorizeWithSeed(txCtx *TransactionCtx, instrCtx *InstructionCtx, stakeAcct *BorrowedAccount, authorityBaseIndex uint64, authoritySeed string, authorityOwner solana.PublicKey, newAuthority solana.PublicKey, stakeAuthorize uint32, clock SysvarClock, custodian *solana.PublicKey, f features.Features) error
func StakeProgramDeactivate ¶
func StakeProgramDeactivate(execCtx *ExecutionCtx, stakeAcct *BorrowedAccount, clock SysvarClock, signers []solana.PublicKey) error
func StakeProgramDeactivateDelinquent ¶
func StakeProgramDeactivateDelinquent(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, stakeAcct *BorrowedAccount, delinquentVoteAcctIdx uint64, referenceVoteAcctIdx uint64, currentEpoch uint64) error
func StakeProgramDelegate ¶
func StakeProgramDelegate(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, stakeAcctIdx uint64, voteAcctIdx uint64, clock SysvarClock, stakeHistory SysvarStakeHistory, signers []solana.PublicKey, f features.Features) error
func StakeProgramExecute ¶
func StakeProgramExecute(execCtx *ExecutionCtx) error
func StakeProgramInitialize ¶
func StakeProgramInitialize(stakeAcct *BorrowedAccount, authorized Authorized, lockup StakeLockup, rent SysvarRent, f features.Features) error
func StakeProgramMerge ¶
func StakeProgramMerge(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, stakeAcctIdx uint64, srcAcctIdx uint64, clock SysvarClock, stakeHistory SysvarStakeHistory, signers []solana.PublicKey) error
func StakeProgramMoveLamports ¶
func StakeProgramMoveLamports(execCtx *ExecutionCtx, instrCtx *InstructionCtx, srcAcctIdx uint64, lamports uint64, dstAcctIdx uint64, stakeAuthorityIdx uint64) error
func StakeProgramMoveStake ¶
func StakeProgramMoveStake(execCtx *ExecutionCtx, instrCtx *InstructionCtx, srcAcctIdx uint64, lamports uint64, dstAcctIdx uint64, stakeAuthorityIdx uint64) error
func StakeProgramRedelegate ¶
func StakeProgramRedelegate(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, stakeAcct *BorrowedAccount, uninitializedStakeAcctIdx uint64, voteAcctIdx uint64, signers []solana.PublicKey) error
func StakeProgramSetLockup ¶
func StakeProgramSetLockup(stakeAcct *BorrowedAccount, lockup StakeInstrSetLockup, signers []solana.PublicKey, clock SysvarClock, f features.Features) error
func StakeProgramSplit ¶
func StakeProgramSplit(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, stakeAcctIdx uint64, lamports uint64, splitIdx uint64, signers []solana.PublicKey) error
func StakeProgramWithdraw ¶
func StakeProgramWithdraw(txCtx *TransactionCtx, instrCtx *InstructionCtx, stakeAcctIdx uint64, lamports uint64, toIndex uint64, clock SysvarClock, stakeHistory SysvarStakeHistory, withdrawAuthorityIdx uint64, custodianIdx *uint64, newRateActivationEpoch *uint64, f features.Features) error
func SwapEndianness ¶
func SyscallAllocFreeImpl ¶
SyscallMemcmpImpl is the implementation for the memset (sol_memset_) syscall.
func SyscallAltBn128Impl ¶
func SyscallBlake3Impl ¶
SyscallBlake3Impl is the implementation for the sol_blake3 syscall
func SyscallGetClockSysvarImpl ¶
SyscallGetClockSysvarImpl is an implementation of the sol_get_clock_sysvar syscall
func SyscallGetEpochRewardsSysvarImpl ¶
SyscallGetEpochRewardsSysvarImpl is an implementation of the sol_get_epoch_rewards_sysvar syscall
func SyscallGetEpochScheduleSysvarImpl ¶
SyscallGetEpochScheduleSysvarImpl is an implementation of the sol_get_epoch_schedule_sysvar syscall
func SyscallGetLastRestartSlotSysvarImpl ¶
SyscallGetLastRestartSlotSysvarImpl is an implementation of the sol_get_last_restart_slot_sysvar syscall
func SyscallGetProcessedSiblingInstructionImpl ¶
func SyscallGetProcessedSiblingInstructionImpl(vm sbpf.VM, index, metaAddr, programIdAddr, dataAddr, accountsAddr uint64) (uint64, error)
SyscallGetProcessedSiblingInstructionImpl is an implementation of the sol_get_processed_sibling_instruction syscall
func SyscallGetRentSysvarImpl ¶
SyscallGetRentSysvarImpl is an implementation of the sol_get_rent_sysvar syscall
func SyscallGetReturnDataImpl ¶
func SyscallGetReturnDataImpl(vm sbpf.VM, returnDataAddr, length, programIdAddr uint64) (uint64, error)
SyscallGetReturnDataImpl is an implementation of the sol_get_return_data syscall
func SyscallGetStackHeightImpl ¶
SyscallGetStackHeightImpl is an implementation of the sol_get_stack_height syscall
func SyscallGetSysvarImpl ¶
func SyscallInvokeSignedCImpl ¶
func SyscallInvokeSignedCImpl(vm sbpf.VM, instructionAddr, accountInfosAddr, accountInfosLen, signerSeedsAddr, signerSeedsLen uint64) (uint64, error)
SyscallInvokeSignedCImpl is an implementation of the sol_invoke_signed_c syscall
func SyscallInvokeSignedRustImpl ¶
func SyscallInvokeSignedRustImpl(vm sbpf.VM, instructionAddr, accountInfosAddr, accountInfosLen, signerSeedsAddr, signerSeedsLen uint64) (uint64, error)
SyscallInvokeSignedRustImpl is an implementation of the sol_invoke_signed_rust syscall
func SyscallKeccak256Impl ¶
SyscallKeccak256Impl is the implementation for the sol_keccak256 syscall
func SyscallLog64Impl ¶
func SyscallLogDataImpl ¶
func SyscallLogPubkeyImpl ¶
func SyscallMemcmpImpl ¶
SyscallMemcmpImpl is the implementation for the memcmp (sol_memcmp_) syscall.
func SyscallMemcpyImpl ¶
SyscallMemcpyImpl is the implementation of the memcpy (sol_memcpy_) syscall. Overlapping src and dst for a given n bytes to be copied results in an error being returned.
func SyscallMemmoveImpl ¶
SyscallMemmoveImpl is the implementation for the memmove (sol_memmove_) syscall.
func SyscallMemsetImpl ¶
SyscallMemcmpImpl is the implementation for the memset (sol_memset_) syscall.
func SyscallPanicImpl ¶
SyscallPanicImpl is the implementation for the panic (sol_panic_) syscall. The Labs client implementation does CU accounting, checks for NULL termination, validates the utf8 string, etc, but we don't actually need to do this because this syscall returns an error and aborts the transaction either way, and the exact error returned does not matter for consensus.
func SyscallPoseidonImpl ¶
func SyscallSecp256k1RecoverImpl ¶
func SyscallSecp256k1RecoverImpl(vm sbpf.VM, hashAddr, recoveryIdVal, signatureAddr, resultAddr uint64) (uint64, error)
SyscallSecp256k1Recover is an implementation of the sol_secp256k1_recover syscall
func SyscallSetReturnDataImpl ¶
SyscallSetReturnDataImpl is an implementation of the sol_set_return_data syscall
func SyscallSha256Impl ¶
SyscallSha256Impl is the implementation for the sol_sha256 syscall
func SystemProgramAdvanceNonceAccount ¶
func SystemProgramAdvanceNonceAccount(execCtx *ExecutionCtx, acct *BorrowedAccount, signers []solana.PublicKey, recentBlockhashes *SysvarRecentBlockhashes) error
func SystemProgramAllocate ¶
func SystemProgramAllocate(execCtx *ExecutionCtx, acct *BorrowedAccount, address solana.PublicKey, space uint64, signers []solana.PublicKey) error
func SystemProgramAllocateAndAssign ¶
func SystemProgramAllocateAndAssign(execCtx *ExecutionCtx, toAcct *BorrowedAccount, toAddr solana.PublicKey, space uint64, owner solana.PublicKey, signers []solana.PublicKey) error
func SystemProgramAssign ¶
func SystemProgramAssign(execCtx *ExecutionCtx, acct *BorrowedAccount, address solana.PublicKey, owner solana.PublicKey, signers []solana.PublicKey) error
func SystemProgramAuthorizeNonceAccount ¶
func SystemProgramAuthorizeNonceAccount(execCtx *ExecutionCtx, acct *BorrowedAccount, nonceAuthority solana.PublicKey, signers []solana.PublicKey) error
func SystemProgramExecute ¶
func SystemProgramExecute(execCtx *ExecutionCtx) error
func SystemProgramInitializeNonceAccount ¶
func SystemProgramInitializeNonceAccount(execCtx *ExecutionCtx, acct *BorrowedAccount, nonceAuthority solana.PublicKey, rent *SysvarRent, recentBlockhashes *SysvarRecentBlockhashes) error
func SystemProgramTransfer ¶
func SystemProgramTransfer(execCtx *ExecutionCtx, fromAcctIdx uint64, toAcctIdx uint64, lamports uint64) error
func SystemProgramUpgradeNonceAccount ¶
func SystemProgramUpgradeNonceAccount(execCtx *ExecutionCtx, acct *BorrowedAccount) error
func SystemProgramWithdrawNonceAccount ¶
func SystemProgramWithdrawNonceAccount(execCtx *ExecutionCtx, instrCtx *InstructionCtx, fromAcctIdx uint64, lamports uint64, toAcctIdx uint64, rent *SysvarRent, signers []solana.PublicKey, recentBlockhashes *SysvarRecentBlockhashes) error
func TranslateErrToErrCode ¶
TODO: add additional error conversions
func UpgradeableLoaderClose ¶
func UpgradeableLoaderClose(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx) error
func UpgradeableLoaderDeployWithMaxDataLen ¶
func UpgradeableLoaderDeployWithMaxDataLen(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, deploy UpgradeableLoaderInstrDeployWithMaxDataLen) error
func UpgradeableLoaderExtendProgram ¶
func UpgradeableLoaderExtendProgram(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, additionalBytes uint32) error
func UpgradeableLoaderInitializeBuffer ¶
func UpgradeableLoaderInitializeBuffer(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx) error
func UpgradeableLoaderSetAuthority ¶
func UpgradeableLoaderSetAuthority(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx) error
func UpgradeableLoaderSetAuthorityChecked ¶
func UpgradeableLoaderSetAuthorityChecked(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx) error
func UpgradeableLoaderUpgrade ¶
func UpgradeableLoaderUpgrade(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx) error
func UpgradeableLoaderWrite ¶
func UpgradeableLoaderWrite(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, write UpgradeableLoaderInstrWrite) error
func VoteProgramAuthorize ¶
func VoteProgramAuthorize(execCtx *ExecutionCtx, voteAcct *BorrowedAccount, authorized solana.PublicKey, voteAuthorize uint32, signers []solana.PublicKey, clock SysvarClock, f features.Features) error
func VoteProgramAuthorizeWithSeed ¶
func VoteProgramAuthorizeWithSeed(execCtx *ExecutionCtx, instrCtx *InstructionCtx, voteAcct *BorrowedAccount, newAuthority solana.PublicKey, authorizationType uint32, currentAuthorityDerivedKeyOwner solana.PublicKey, currentAuthorityDerivedKeySeed string) error
func VoteProgramExecute ¶
func VoteProgramExecute(execCtx *ExecutionCtx) error
func VoteProgramInitializeAccount ¶
func VoteProgramInitializeAccount(execCtx *ExecutionCtx, voteAccount *BorrowedAccount, voteInit VoteInstrVoteInit, signers []solana.PublicKey, clock SysvarClock, f features.Features) error
func VoteProgramProcessTowerSync ¶
func VoteProgramProcessTowerSync(execCtx *ExecutionCtx, voteAcct *BorrowedAccount, slotHashes SysvarSlotHashes, clock SysvarClock, towerSync *VoteInstrTowerSync, signers []solana.PublicKey, f features.Features) error
func VoteProgramProcessVote ¶
func VoteProgramProcessVote(execCtx *ExecutionCtx, voteAcct *BorrowedAccount, slotHashes SysvarSlotHashes, clock SysvarClock, vote *VoteInstrVote, signers []solana.PublicKey, f features.Features) error
func VoteProgramProcessVoteStateUpdate ¶
func VoteProgramProcessVoteStateUpdate(execCtx *ExecutionCtx, voteAcct *BorrowedAccount, slotHashes SysvarSlotHashes, clock SysvarClock, voteStateUpdate *VoteInstrUpdateVoteState, signers []solana.PublicKey, f features.Features) error
func VoteProgramUpdateCommission ¶
func VoteProgramUpdateCommission(execCtx *ExecutionCtx, voteAcct *BorrowedAccount, commission byte, signers []solana.PublicKey, epochSchedule SysvarEpochSchedule, clock SysvarClock, f features.Features) error
func VoteProgramUpdateValidatorIdentity ¶
func VoteProgramUpdateValidatorIdentity(execCtx *ExecutionCtx, voteAcct *BorrowedAccount, nodePubkey solana.PublicKey, signers []solana.PublicKey, f features.Features) error
func VoteProgramWithdraw ¶
func VoteProgramWithdraw(execCtx *ExecutionCtx, txCtx *TransactionCtx, instrCtx *InstructionCtx, voteAcctIdx uint64, lamports uint64, toAcctIdx uint64, signers []solana.PublicKey, rent SysvarRent, clock SysvarClock, f features.Features) error
func WriteClockSysvar ¶
func WriteClockSysvar(accts *accounts.Accounts, clock SysvarClock)
func WriteEpochRewardsSysvar ¶
func WriteEpochRewardsSysvar(accts *accounts.Accounts, epochRewards SysvarEpochRewards)
func WriteEpochScheduleSysvar ¶
func WriteEpochScheduleSysvar(accts *accounts.Accounts, epochSchedule SysvarEpochSchedule)
func WriteFeesSysvar ¶
func WriteFeesSysvar(accts *accounts.Accounts, fees SysvarFees)
func WriteLastRestartSlotSysvar ¶
func WriteLastRestartSlotSysvar(accts *accounts.Accounts, lastRestartSlot SysvarLastRestartSlot)
func WriteRentSysvar ¶
func WriteRentSysvar(accts *accounts.Accounts, rent SysvarRent)
func WriteSlotHashesSysvar ¶
func WriteSlotHashesSysvar(accts *accounts.Accounts, slotHashes SysvarSlotHashes)
func WriteSlotHistorySysvar ¶
func WriteSlotHistorySysvar(accts *accounts.Accounts, slotHistory SysvarSlotHistory)
func WriteStakeHistorySysvar ¶
func WriteStakeHistorySysvar(accts *accounts.Accounts, stakeHistory SysvarStakeHistory)
Types ¶
type AccountMeta ¶
func (*AccountMeta) Marshal ¶
func (accountMeta *AccountMeta) Marshal() []byte
type AccountParam ¶
type AccountParam struct {
IsDuplicate bool
DuplicateIndex uint8 // must not be 0xFF
IsSigner bool
IsWritable bool
IsExecutable bool
Key solana.PublicKey
Owner solana.PublicKey
Lamports uint64
Data []byte
Padding int // ignored, written by serializer
RentEpoch uint64
}
AccountParam is an account input to a program execution.
type AddrLookupTableInstrCreateLookupTable ¶
func (*AddrLookupTableInstrCreateLookupTable) MarshalWithEncoder ¶
func (createLookupTable *AddrLookupTableInstrCreateLookupTable) MarshalWithEncoder(encoder *bin.Encoder) error
func (*AddrLookupTableInstrCreateLookupTable) UnmarshalWithDecoder ¶
func (createLookupTable *AddrLookupTableInstrCreateLookupTable) UnmarshalWithDecoder(decoder *bin.Decoder) error
type AddrLookupTableInstrExtendLookupTable ¶
func (*AddrLookupTableInstrExtendLookupTable) MarshalWithEncoder ¶
func (extendLookupTable *AddrLookupTableInstrExtendLookupTable) MarshalWithEncoder(encoder *bin.Encoder) error
func (*AddrLookupTableInstrExtendLookupTable) UnmarshalWithDecoder ¶
func (extendLookupTable *AddrLookupTableInstrExtendLookupTable) UnmarshalWithDecoder(decoder *bin.Decoder) error
type AddressLookupTable ¶
type AddressLookupTable struct {
State uint32
Meta LookupTableMeta
Addresses []solana.PublicKey
}
func UnmarshalAddressLookupTable ¶
func UnmarshalAddressLookupTable(data []byte) (*AddressLookupTable, error)
type Authorized ¶
func (*Authorized) Authorize ¶
func (authorized *Authorized) Authorize(signers []solana.PublicKey, newAuthorized solana.PublicKey, stakeAuthorize uint32, lockup StakeLockup, clock SysvarClock, custodian *solana.PublicKey) error
func (*Authorized) Check ¶
func (authorized *Authorized) Check(signers []solana.PublicKey, stakeAuthorize uint32) error
func (*Authorized) MarshalWithEncoder ¶
func (authorized *Authorized) MarshalWithEncoder(encoder *bin.Encoder) error
func (*Authorized) UnmarshalWithDecoder ¶
func (authorized *Authorized) UnmarshalWithDecoder(decoder *bin.Decoder) error
type AuthorizedVoter ¶
func (*AuthorizedVoter) MarshalWithEncoder ¶
func (authVoter *AuthorizedVoter) MarshalWithEncoder(encoder *bin.Encoder) error
func (*AuthorizedVoter) UnmarshalWithDecoder ¶
func (authVoter *AuthorizedVoter) UnmarshalWithDecoder(decoder *bin.Decoder) error
type AuthorizedVoters ¶
func (*AuthorizedVoters) GetAndCacheAuthorizedVoterForEpoch ¶
func (authVoters *AuthorizedVoters) GetAndCacheAuthorizedVoterForEpoch(epoch uint64) (solana.PublicKey, error)
func (*AuthorizedVoters) GetOrCalculateAuthorizedVoterForEpoch ¶
func (*AuthorizedVoters) MarshalWithEncoder ¶
func (authVoters *AuthorizedVoters) MarshalWithEncoder(encoder *bin.Encoder) error
func (*AuthorizedVoters) PurgeAuthorizedVoters ¶
func (authVoters *AuthorizedVoters) PurgeAuthorizedVoters(currentEpoch uint64) bool
func (*AuthorizedVoters) UnmarshalWithDecoder ¶
func (authVoters *AuthorizedVoters) UnmarshalWithDecoder(decoder *bin.Decoder) error
type BlockTimestamp ¶
func (*BlockTimestamp) MarshalWithEncoder ¶
func (blockTimestamp *BlockTimestamp) MarshalWithEncoder(encoder *bin.Encoder) error
func (*BlockTimestamp) UnmarshalWithDecoder ¶
func (blockTimestamp *BlockTimestamp) UnmarshalWithDecoder(decoder *bin.Decoder) error
type BorrowedAccount ¶
type BorrowedAccount struct {
TxCtx *TransactionCtx
InstrCtx *InstructionCtx
IndexInTransaction uint64
IndexInInstruction uint64
Account *accounts.Account
}
func (*BorrowedAccount) AccountExists ¶
func (acct *BorrowedAccount) AccountExists() bool
func (*BorrowedAccount) CanDataBeResized ¶
func (acct *BorrowedAccount) CanDataBeResized(newLen uint64) error
func (*BorrowedAccount) CheckedAddLamports ¶
func (acct *BorrowedAccount) CheckedAddLamports(lamports uint64, f features.Features) error
func (*BorrowedAccount) CheckedSubLamports ¶
func (acct *BorrowedAccount) CheckedSubLamports(lamports uint64, f features.Features) error
func (*BorrowedAccount) Data ¶
func (acct *BorrowedAccount) Data() []byte
func (*BorrowedAccount) DataCanBeChanged ¶
func (acct *BorrowedAccount) DataCanBeChanged(f features.Features) error
func (*BorrowedAccount) DataMutable ¶
func (acct *BorrowedAccount) DataMutable(f features.Features) ([]byte, error)
func (*BorrowedAccount) Drop ¶
func (acct *BorrowedAccount) Drop()
func (*BorrowedAccount) ExtendFromSlice ¶
func (acct *BorrowedAccount) ExtendFromSlice(f features.Features, data []byte) error
func (*BorrowedAccount) IsExecutable ¶
func (acct *BorrowedAccount) IsExecutable() bool
func (*BorrowedAccount) IsOwnedByCurrentProgram ¶
func (acct *BorrowedAccount) IsOwnedByCurrentProgram() bool
func (*BorrowedAccount) IsRentExemptAtDataLength ¶
func (acct *BorrowedAccount) IsRentExemptAtDataLength(len uint64) bool
func (*BorrowedAccount) IsSigner ¶
func (acct *BorrowedAccount) IsSigner() bool
func (*BorrowedAccount) IsWritable ¶
func (acct *BorrowedAccount) IsWritable() bool
func (*BorrowedAccount) IsZeroed ¶
func (acct *BorrowedAccount) IsZeroed() bool
func (*BorrowedAccount) Key ¶
func (acct *BorrowedAccount) Key() solana.PublicKey
func (*BorrowedAccount) Lamports ¶
func (acct *BorrowedAccount) Lamports() uint64
func (*BorrowedAccount) Owner ¶
func (acct *BorrowedAccount) Owner() solana.PublicKey
func (*BorrowedAccount) RentEpoch ¶
func (acct *BorrowedAccount) RentEpoch() uint64
func (*BorrowedAccount) SetData ¶
func (acct *BorrowedAccount) SetData(features features.Features, data []byte) error
func (*BorrowedAccount) SetDataLength ¶
func (acct *BorrowedAccount) SetDataLength(newLength uint64, f features.Features) error
func (*BorrowedAccount) SetExecutable ¶
func (acct *BorrowedAccount) SetExecutable(f features.Features, isExecutable bool) error
func (*BorrowedAccount) SetLamports ¶
func (acct *BorrowedAccount) SetLamports(lamports uint64, f features.Features) error
func (*BorrowedAccount) SetState ¶
func (acct *BorrowedAccount) SetState(f features.Features, data []byte) error
func (BorrowedAccount) String ¶
func (acct BorrowedAccount) String() string
func (*BorrowedAccount) Touch ¶
func (acct *BorrowedAccount) Touch() error
func (*BorrowedAccount) UpdateAccountsResizeDelta ¶
func (acct *BorrowedAccount) UpdateAccountsResizeDelta(newLength uint64)
type CallerAccount ¶
type CompactUpdateVoteState ¶
type CompactUpdateVoteState struct {
Root uint64
LockoutOffsets []LockoutOffset
Hash [32]byte
Timestamp *int64
}
func (*CompactUpdateVoteState) UnmarshalWithDecoder ¶
func (cuvs *CompactUpdateVoteState) UnmarshalWithDecoder(decoder *bin.Decoder) error
type ComputeBudgetInstrRequestHeapFrame ¶
type ComputeBudgetInstrRequestHeapFrame struct {
Bytes uint32
}
func (*ComputeBudgetInstrRequestHeapFrame) MarshalWithEncoder ¶
func (requestHeapFrame *ComputeBudgetInstrRequestHeapFrame) MarshalWithEncoder(encoder *bin.Encoder) error
func (*ComputeBudgetInstrRequestHeapFrame) UnmarshalWithDecoder ¶
func (requestHeapFrame *ComputeBudgetInstrRequestHeapFrame) UnmarshalWithDecoder(decoder *bin.Decoder) error
type ComputeBudgetInstrSetComputeUnitLimit ¶
type ComputeBudgetInstrSetComputeUnitLimit struct {
ComputeUnitLimit uint32
}
func (*ComputeBudgetInstrSetComputeUnitLimit) MarshalWithEncoder ¶
func (setComputeUnitLimit *ComputeBudgetInstrSetComputeUnitLimit) MarshalWithEncoder(encoder *bin.Encoder) error
func (*ComputeBudgetInstrSetComputeUnitLimit) UnmarshalWithDecoder ¶
func (setComputeUnitLimit *ComputeBudgetInstrSetComputeUnitLimit) UnmarshalWithDecoder(decoder *bin.Decoder) error
type ComputeBudgetInstrSetComputeUnitPrice ¶
type ComputeBudgetInstrSetComputeUnitPrice struct {
MicroLamports uint64
}
func (*ComputeBudgetInstrSetComputeUnitPrice) MarshalWithEncoder ¶
func (setComputeUnitPrice *ComputeBudgetInstrSetComputeUnitPrice) MarshalWithEncoder(encoder *bin.Encoder) error
func (*ComputeBudgetInstrSetComputeUnitPrice) UnmarshalWithDecoder ¶
func (setComputeUnitPrice *ComputeBudgetInstrSetComputeUnitPrice) UnmarshalWithDecoder(decoder *bin.Decoder) error
type ComputeBudgetInstrSetLoadedAccountsDataSizeLimit ¶
type ComputeBudgetInstrSetLoadedAccountsDataSizeLimit struct {
Bytes uint32
}
func (*ComputeBudgetInstrSetLoadedAccountsDataSizeLimit) MarshalWithEncoder ¶
func (setLoadedAccountsDataSizeLimit *ComputeBudgetInstrSetLoadedAccountsDataSizeLimit) MarshalWithEncoder(encoder *bin.Encoder) error
func (*ComputeBudgetInstrSetLoadedAccountsDataSizeLimit) UnmarshalWithDecoder ¶
func (setLoadedAccountsDataSizeLimit *ComputeBudgetInstrSetLoadedAccountsDataSizeLimit) UnmarshalWithDecoder(decoder *bin.Decoder) error
type ComputeBudgetLimits ¶
type ComputeBudgetLimits struct {
UpdatedHeapBytes uint32
ComputeUnitLimit uint32
ComputeUnitPrice uint64
LoadedAccountBytes uint32
}
func ComputeBudgetExecuteInstructions ¶
func ComputeBudgetExecuteInstructions(instructions []Instruction, f *features.Features) (*ComputeBudgetLimits, error)
type ConfigKey ¶
func (*ConfigKey) MarshalWithEncoder ¶
type Delegation ¶
type Delegation struct {
VoterPubkey solana.PublicKey
StakeLamports uint64
ActivationEpoch uint64
DeactivationEpoch uint64
WarmupCooldownRate float64
CreditsObserved uint64
}
func (*Delegation) IsBootstrap ¶
func (delegation *Delegation) IsBootstrap() bool
func (*Delegation) MarshalWithEncoder ¶
func (delegation *Delegation) MarshalWithEncoder(encoder *bin.Encoder) error
func (*Delegation) Stake ¶
func (delegation *Delegation) Stake(epoch uint64, stakeHistory *SysvarStakeHistory, newRateActivationEpoch *uint64) uint64
func (*Delegation) StakeActivatingAndDeactivating ¶
func (delegation *Delegation) StakeActivatingAndDeactivating(targetEpoch uint64, stakeHistory *SysvarStakeHistory, newRateActivationEpoch *uint64) StakeHistoryEntry
func (*Delegation) StakeAndActivating ¶
func (delegation *Delegation) StakeAndActivating(targetEpoch uint64, stakeHistory *SysvarStakeHistory, newRateActivationEpoch *uint64) (uint64, uint64)
func (*Delegation) UnmarshalWithDecoder ¶
func (delegation *Delegation) UnmarshalWithDecoder(decoder *bin.Decoder) error
type Ed25519SignatureOffsets ¶
type Ed25519SignatureOffsets struct {
SignatureOffset uint16
SignatureInstructionIndex uint16
PublicKeyOffset uint16
PublicKeyInstructionIndex uint16
MessageDataOffset uint16
MessageDataSize uint16
MessageInstructionIndex uint16
}
func (*Ed25519SignatureOffsets) UnmarshalWithDecoder ¶
func (offsets *Ed25519SignatureOffsets) UnmarshalWithDecoder(buf io.Reader) error
type ElGamalProofInstruction ¶
type ElGamalProofInstruction uint8
const ( CloseContextState ElGamalProofInstruction = 0 VerifyZeroCiphertext ElGamalProofInstruction = 1 VerifyCiphertextCiphertextEquality ElGamalProofInstruction = 2 VerifyCiphertextCommitmentEquality ElGamalProofInstruction = 3 VerifyPubkeyValidity ElGamalProofInstruction = 4 VerifyPercentageWithCap ElGamalProofInstruction = 5 VerifyBatchedRangeProofU64 ElGamalProofInstruction = 6 VerifyBatchedRangeProofU128 ElGamalProofInstruction = 7 VerifyBatchedRangeProofU256 ElGamalProofInstruction = 8 VerifyGroupedCiphertext2HandlesValidity ElGamalProofInstruction = 9 VerifyBatchedGroupedCiphertext2HandlesValidity ElGamalProofInstruction = 10 VerifyGroupedCiphertext3HandlesValidity ElGamalProofInstruction = 11 VerifyBatchedGroupedCiphertext3HandlesValidity ElGamalProofInstruction = 12 )
type EpochCredits ¶
func (*EpochCredits) MarshalWithEncoder ¶
func (epochCredits *EpochCredits) MarshalWithEncoder(encoder *bin.Encoder) error
func (*EpochCredits) UnmarshalWithDecoder ¶
func (epochCredits *EpochCredits) UnmarshalWithDecoder(decoder *bin.Decoder) error
type ExecutionCtx ¶
type ExecutionCtx struct {
Log Logger
Accounts accounts.Accounts
TransactionContext *TransactionCtx
Features features.Features
ComputeMeter cu.ComputeMeter
Blockhash [32]byte
PrevLamportsPerSignature uint64
SlotCtx *SlotCtx
ModifiedVoteStates map[solana.PublicKey]*VoteStateVersions
}
func (*ExecutionCtx) AddModifiedVoteState ¶
func (execCtx *ExecutionCtx) AddModifiedVoteState(pubkey solana.PublicKey, state *VoteStateVersions)
func (*ExecutionCtx) CheckAligned ¶
func (execCtx *ExecutionCtx) CheckAligned() bool
func (*ExecutionCtx) ExecuteInstruction ¶
func (execCtx *ExecutionCtx) ExecuteInstruction() error
func (*ExecutionCtx) NativeInvoke ¶
func (execCtx *ExecutionCtx) NativeInvoke(instruction Instruction, signers []solana.PublicKey) error
func (*ExecutionCtx) Pop ¶
func (execCtx *ExecutionCtx) Pop() error
func (*ExecutionCtx) PrepareInstruction ¶
func (execCtx *ExecutionCtx) PrepareInstruction(ix Instruction, signers []solana.PublicKey) ([]InstructionAccount, []uint64, error)
func (*ExecutionCtx) ProcessInstruction ¶
func (execCtx *ExecutionCtx) ProcessInstruction(instrData []byte, instructionAccts []InstructionAccount, programIndices []uint64) error
func (*ExecutionCtx) Push ¶
func (execCtx *ExecutionCtx) Push() error
func (*ExecutionCtx) StackHeight ¶
func (execCtx *ExecutionCtx) StackHeight() uint64
type FeeCalculator ¶
type FeeCalculator struct {
LamportsPerSignature uint64
}
type FeeRateGovernor ¶
type FeeRateGovernor struct {
TargetLamportsPerSignature uint64
TargetSignaturesPerSlot uint64
MinLamportsPerSignature uint64
MaxLamportsPerSignature uint64
BurnPercent byte
LamportsPerSignature uint64
PrevLamportsPerSignature uint64
}
func NewFeeRateGovernorDerived ¶
func NewFeeRateGovernorDerived(baseFeeRateGovernor *FeeRateGovernor, latestSignaturesPerSlot uint64) *FeeRateGovernor
func (*FeeRateGovernor) Clone ¶
func (rateGovernor *FeeRateGovernor) Clone() *FeeRateGovernor
func (*FeeRateGovernor) UnmarshalWithDecoder ¶
func (rateGovernor *FeeRateGovernor) UnmarshalWithDecoder(decoder *bin.Decoder) error
type Instruction ¶
type Instruction struct {
Accounts []AccountMeta
Data []byte
ProgramId solana.PublicKey
}
type InstructionAccount ¶
type InstructionAccount struct {
IndexInTransaction uint64
IndexInCaller uint64
IndexInCallee uint64
IsSigner bool
IsWritable bool
}
func InstructionAcctsFromAccountMetas ¶
func InstructionAcctsFromAccountMetas(instrAcctMetas []AccountMeta, txAccounts TransactionAccounts) []InstructionAccount
type InstructionCtx ¶
type InstructionCtx struct {
ProgramAccounts []uint64
InstructionAccounts []InstructionAccount
Data []byte
InstructionAccountsLamportSum wide.Uint128
NestingLevel uint64
// contains filtered or unexported fields
}
func (*InstructionCtx) BorrowAccount ¶
func (instrCtx *InstructionCtx) BorrowAccount(txCtx *TransactionCtx, idxInTx uint64, idxInInstr uint64) (*BorrowedAccount, error)
func (*InstructionCtx) BorrowExecutableAccount ¶
func (instrCtx *InstructionCtx) BorrowExecutableAccount(txCtx *TransactionCtx, pubkey solana.PublicKey) (*BorrowedAccount, error)
func (*InstructionCtx) BorrowInstructionAccount ¶
func (instrCtx *InstructionCtx) BorrowInstructionAccount(txCtx *TransactionCtx, instrAcctIdx uint64) (*BorrowedAccount, error)
func (*InstructionCtx) BorrowLastProgramAccount ¶
func (instrCtx *InstructionCtx) BorrowLastProgramAccount(txCtx *TransactionCtx) (*BorrowedAccount, error)
func (*InstructionCtx) BorrowProgramAccount ¶
func (instrCtx *InstructionCtx) BorrowProgramAccount(txCtx *TransactionCtx, programAcctIdx uint64) (*BorrowedAccount, error)
func (*InstructionCtx) CheckNumOfInstructionAccounts ¶
func (instrCtx *InstructionCtx) CheckNumOfInstructionAccounts(num uint64) error
func (*InstructionCtx) Configure ¶
func (instrCtx *InstructionCtx) Configure(programAccts []uint64, instrAccts []InstructionAccount, instrData []byte)
func (*InstructionCtx) IndexOfInstructionAccount ¶
func (instrCtx *InstructionCtx) IndexOfInstructionAccount(txCtx *TransactionCtx, pubkey solana.PublicKey) (uint64, error)
func (*InstructionCtx) IndexOfInstructionAccountInTransaction ¶
func (instrCtx *InstructionCtx) IndexOfInstructionAccountInTransaction(instrAcctIdx uint64) (uint64, error)
func (*InstructionCtx) IndexOfProgramAccountInTransaction ¶
func (instrCtx *InstructionCtx) IndexOfProgramAccountInTransaction(programAccountIndex uint64) (uint64, error)
func (*InstructionCtx) IsInstructionAccountDuplicate ¶
func (instrCtx *InstructionCtx) IsInstructionAccountDuplicate(instrAcctIdx uint64) (bool, uint64, error)
func (*InstructionCtx) IsInstructionAccountSigner ¶
func (instrCtx *InstructionCtx) IsInstructionAccountSigner(instrAcctIdx uint64) (bool, error)
func (*InstructionCtx) IsInstructionAccountWritable ¶
func (instrCtx *InstructionCtx) IsInstructionAccountWritable(instrAcctIdx uint64) (bool, error)
func (*InstructionCtx) LastProgramKey ¶
func (instrCtx *InstructionCtx) LastProgramKey(txCtx *TransactionCtx) (solana.PublicKey, error)
func (*InstructionCtx) NumberOfInstructionAccounts ¶
func (instrCtx *InstructionCtx) NumberOfInstructionAccounts() uint64
func (*InstructionCtx) NumberOfProgramAccounts ¶
func (instrCtx *InstructionCtx) NumberOfProgramAccounts() uint64
func (*InstructionCtx) ProgramId ¶
func (instrCtx *InstructionCtx) ProgramId() solana.PublicKey
func (*InstructionCtx) Signers ¶
func (instrCtx *InstructionCtx) Signers(txCtx *TransactionCtx) ([]solana.PublicKey, error)
func (*InstructionCtx) StackHeight ¶
func (instrCtx *InstructionCtx) StackHeight() uint64
type LandedVote ¶
type LandedVote struct {
Latency byte
Lockout VoteLockout
}
func (*LandedVote) MarshalWithEncoder ¶
func (landedVote *LandedVote) MarshalWithEncoder(encoder *bin.Encoder) error
func (*LandedVote) UnmarshalWithDecoder ¶
func (landedVote *LandedVote) UnmarshalWithDecoder(decoder *bin.Decoder) error
type LoaderV4Copy ¶
func (*LoaderV4Copy) UnmarshalWithDecoder ¶
func (copy *LoaderV4Copy) UnmarshalWithDecoder(decoder *bin.Decoder) error
type LoaderV4SetProgramLength ¶
type LoaderV4SetProgramLength struct {
NewSize uint32
}
func (*LoaderV4SetProgramLength) UnmarshalWithDecoder ¶
func (setProgramLen *LoaderV4SetProgramLength) UnmarshalWithDecoder(decoder *bin.Decoder) error
type LoaderV4State ¶
func (*LoaderV4State) Marshal ¶
func (state *LoaderV4State) Marshal() []byte
func (*LoaderV4State) UnmarshalWithDecoder ¶
func (state *LoaderV4State) UnmarshalWithDecoder(decoder *bin.Decoder) error
type LoaderV4Write ¶
func (*LoaderV4Write) UnmarshalWithDecoder ¶
func (write *LoaderV4Write) UnmarshalWithDecoder(decoder *bin.Decoder) error
type LockoutOffset ¶
func (*LockoutOffset) UnmarshalWithDecoder ¶
func (lockoutOffset *LockoutOffset) UnmarshalWithDecoder(decoder *bin.Decoder) error
type LogRecorder ¶
type LogRecorder struct {
Logs []string
}
func (*LogRecorder) Log ¶
func (r *LogRecorder) Log(s string)
type LookupTableMeta ¶
type LookupTableMeta struct {
DeactivationSlot uint64
LastExtendedSlot uint64
LastExtendedSlotStartIndex byte
Authority *solana.PublicKey
Padding uint16
}
func (*LookupTableMeta) MarshalWithEncoder ¶
func (lookupTableMeta *LookupTableMeta) MarshalWithEncoder(encoder *bin.Encoder) error
func (*LookupTableMeta) Status ¶
func (lookupTableMeta *LookupTableMeta) Status(currentSlot uint64, slotHashes SysvarSlotHashes) AddressLookupTableStatus
func (*LookupTableMeta) UnmarshalWithDecoder ¶
func (lookupTableMeta *LookupTableMeta) UnmarshalWithDecoder(decoder *bin.Decoder) error
type MergeKind ¶
type MergeKind struct {
Status uint64
Inactive MergeKindInactive
ActivationEpoch MergeKindActivationEpoch
FullyActive MergeKindFullyActive
}
func (*MergeKind) ActiveStake ¶
func (*MergeKind) Merge ¶
func (mergeKind *MergeKind) Merge(execCtx *ExecutionCtx, src *MergeKind, clock SysvarClock) (*StakeStateV2, error)
type MergeKindActivationEpoch ¶
type MergeKindActivationEpoch struct {
Meta Meta
Stake Stake
StakeFlags StakeFlags
}
type MergeKindFullyActive ¶
type MergeKindInactive ¶
type MergeKindInactive struct {
Meta Meta
StakeLamports uint64
StakeFlags StakeFlags
}
type Meta ¶
type Meta struct {
RentExemptReserve uint64
Authorized Authorized
Lockup StakeLockup
}
func (*Meta) SetLockup ¶
func (meta *Meta) SetLockup(lockup StakeInstrSetLockup, signers []solana.PublicKey, clock SysvarClock) error
type NonceData ¶
type NonceData struct {
IsInitialized bool
Authority solana.PublicKey
DurableNonce [32]byte
FeeCalculator FeeCalculator
}
func (*NonceData) IsSignerAuthority ¶
type NonceStateVersions ¶
func UnmarshalNonceStateVersions ¶
func UnmarshalNonceStateVersions(data []byte) (*NonceStateVersions, error)
func (*NonceStateVersions) Deinitialize ¶
func (nonceStateVersions *NonceStateVersions) Deinitialize()
func (*NonceStateVersions) IsUpgradeable ¶
func (nonceStateVersions *NonceStateVersions) IsUpgradeable() bool
func (*NonceStateVersions) Marshal ¶
func (nonceStateVersions *NonceStateVersions) Marshal() ([]byte, error)
func (*NonceStateVersions) State ¶
func (nonceStateVersions *NonceStateVersions) State() *NonceData
func (*NonceStateVersions) UnmarshalWithDecoder ¶
func (nonceStateVersions *NonceStateVersions) UnmarshalWithDecoder(decoder *bin.Decoder) error
func (*NonceStateVersions) Upgrade ¶
func (nonceStateVersions *NonceStateVersions) Upgrade() bool
type Params ¶
type Params struct {
Accounts []AccountParam
Data []byte // per-instruction data
ProgramID solana.PublicKey
Features features.Features
}
Params is the data passed to programs via the Sealevel VM input segment.
type PriorVoter ¶
func (*PriorVoter) MarshalWithEncoder ¶
func (priorVoter *PriorVoter) MarshalWithEncoder(encoder *bin.Encoder, isVersion0_23_5 bool) error
func (*PriorVoter) UnmarshalWithDecoder ¶
func (priorVoter *PriorVoter) UnmarshalWithDecoder(decoder *bin.Decoder, isVersion0_23_5 bool) error
type PriorVoters ¶
type PriorVoters struct {
Buf [32]PriorVoter
Index uint64
IsEmpty bool
}
func (*PriorVoters) Append ¶
func (priorVoters *PriorVoters) Append(priorVoter PriorVoter)
func (*PriorVoters) Last ¶
func (priorVoters *PriorVoters) Last() *PriorVoter
func (*PriorVoters) MarshalWithEncoder ¶
func (priorVoters *PriorVoters) MarshalWithEncoder(encoder *bin.Encoder) error
func (*PriorVoters) UnmarshalWithDecoder ¶
func (priorVoters *PriorVoters) UnmarshalWithDecoder(decoder *bin.Decoder) error
type PriorVoters0_23_5 ¶
type PriorVoters0_23_5 struct {
Buf [32]PriorVoter
Index uint64
}
func (*PriorVoters0_23_5) Append ¶
func (priorVoters *PriorVoters0_23_5) Append(priorVoter PriorVoter)
func (*PriorVoters0_23_5) MarshalWithEncoder ¶
func (priorVoters *PriorVoters0_23_5) MarshalWithEncoder(encoder *bin.Encoder) error
func (*PriorVoters0_23_5) UnmarshalWithDecoder ¶
func (priorVoters *PriorVoters0_23_5) UnmarshalWithDecoder(decoder *bin.Decoder) error
type ProcessedSiblingInstruction ¶
func (*ProcessedSiblingInstruction) Marshal ¶
func (psi *ProcessedSiblingInstruction) Marshal() []byte
type RangeProof ¶
type RangeProof struct {
RangeProof RangeProofData
IppLrVec []IPProofLr
IppA [32]byte
IppB [32]byte
}
type RangeProofData ¶
type RecentBlockHashesEntry ¶
type RecentBlockHashesEntry struct {
Blockhash [32]byte
FeeCalculator FeeCalculator
}
type RefCellRust ¶
type RefCellVecRust ¶
type SecppSignatureOffsets ¶
type SecppSignatureOffsets struct {
SignatureOffset uint16
SignatureInstructionIndex byte
EthAddressOffset uint16
EthAddressInstructionIndex byte
MessageDataOffset uint16
MessageDataSize uint16
MessageInstructionIndex byte
}
func (*SecppSignatureOffsets) UnmarshalWithDecoder ¶
func (so *SecppSignatureOffsets) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type SlotCtx ¶
type SlotCtx struct {
Accounts accounts.Accounts
ParentAccts accounts.Accounts
AccountsDb *accountsdb.AccountsDb
FeeRateGovernor *FeeRateGovernor
Slot uint64
ParentSlot uint64
Epoch uint64
AcctMapsMu *sync.Mutex // AcctMapsMu protects the next 2 maps
ModifiedAccts map[solana.PublicKey]bool
WritableAccts map[solana.PublicKey]bool
NumSignatures uint64
Blockhash [32]byte
LastBlockhash [32]byte
SlotBank SlotBank
Features *features.Features
VoteTimestampMu *sync.Mutex
// VoteTimestampsMu protects VoteTimestamps
VoteTimestamps map[solana.PublicKey]BlockTimestamp
StakeCache map[solana.PublicKey]*Delegation
VoteAccts map[solana.PublicKey]uint64
TotalEpochStake uint64
FinalBankhash []byte
AcctsLtHash *lthash.LtHash
EpochsAcctHash []byte
Replay bool
LamportsBurnt uint64
EahWorkaroundBankhash []byte
HasEahWorkaround bool
LatestEvictedBlockhash [32]byte
SerializedParameterArena *arena.Arena[byte]
}
func (*SlotCtx) GetAccount ¶
func (*SlotCtx) GetAccountFromAccountsDb ¶
func (*SlotCtx) GetParentAccount ¶
func (*SlotCtx) RecordModifiedAcct ¶
func (*SlotCtx) RecordWritableAcct ¶
type SlotHistoryBitvec ¶
type SlotHistoryBitvec struct {
Bits SlotHistoryInner
Len uint64
}
type SlotHistoryInner ¶
type SolAccountInfoC ¶
type SolAccountInfoRust ¶
type SolAccountInfoRust struct {
PubkeyAddr uint64 // points to uchar[32]
LamportsBoxAddr uint64 // points to Rc with embedded RefCell which points to u64
DataBoxAddr uint64 // points to Rc with embedded RefCell which contains slice which points to bytes
OwnerAddr uint64 // points to uchar[32]
RentEpoch uint64
IsSigner byte
IsWritable byte
Executable byte
}
type SolAccountMetaC ¶
func (*SolAccountMetaC) Marshal ¶
func (accountMeta *SolAccountMetaC) Marshal() ([]byte, error)
just for testing
type SolAccountMetaRust ¶
type SolInstructionC ¶
type SolInstructionC struct {
ProgramIdAddr uint64
AccountsAddr uint64
AccountsLen uint64
DataAddr uint64
DataLen uint64
}
func (*SolInstructionC) Marshal ¶
func (solInstr *SolInstructionC) Marshal() ([]byte, error)
just for testing
type SolInstructionRust ¶
type SolInstructionRust struct {
Accounts VectorDescrRust
Data VectorDescrRust
Pubkey solana.PublicKey
}
type Stake ¶
type Stake struct {
Delegation Delegation
CreditsObserved uint64
}
func (*Stake) Deactivate ¶
func (*Stake) MarshalWithEncoder ¶
func (*Stake) MergeDelegationStakeAndCreditsObserved ¶
func (*Stake) Stake ¶
func (stake *Stake) Stake(epoch uint64, stakeHistory *SysvarStakeHistory, newRateActivationEpoch *uint64) uint64
func (*Stake) StakeWeightCreditsObserved ¶
type StakeConfig ¶
func (*StakeConfig) UnmarshalWithDecoder ¶
func (config *StakeConfig) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeFlags ¶
type StakeFlags struct {
Bits byte
}
func (*StakeFlags) Contains ¶
func (stakeFlags *StakeFlags) Contains(other StakeFlags) bool
func (*StakeFlags) MarshalWithEncoder ¶
func (stakeFlags *StakeFlags) MarshalWithEncoder(encoder *bin.Encoder) error
func (*StakeFlags) Remove ¶
func (stakeFlags *StakeFlags) Remove(other StakeFlags)
func (*StakeFlags) Union ¶
func (stakeFlags *StakeFlags) Union(other StakeFlags) StakeFlags
func (*StakeFlags) UnmarshalWithDecoder ¶
func (stakeFlags *StakeFlags) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeHistoryEntry ¶
type StakeHistoryPair ¶
type StakeHistoryPair struct {
Epoch uint64
Entry StakeHistoryEntry
}
type StakeInstrAuthorize ¶
func (*StakeInstrAuthorize) UnmarshalWithDecoder ¶
func (auth *StakeInstrAuthorize) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeInstrAuthorizeChecked ¶
type StakeInstrAuthorizeChecked struct {
StakeAuthorize uint32
}
func (*StakeInstrAuthorizeChecked) UnmarshalWithDecoder ¶
func (authChecked *StakeInstrAuthorizeChecked) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeInstrAuthorizeCheckedWithSeed ¶
type StakeInstrAuthorizeCheckedWithSeed struct {
StakeAuthorize uint32
AuthoritySeed string
AuthorityOwner solana.PublicKey
}
func (*StakeInstrAuthorizeCheckedWithSeed) UnmarshalWithDecoder ¶
func (authCheckedWithSeed *StakeInstrAuthorizeCheckedWithSeed) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeInstrAuthorizeWithSeed ¶
type StakeInstrAuthorizeWithSeed struct {
NewAuthorizedPubkey solana.PublicKey
StakeAuthorize uint32
AuthoritySeed string
AuthorityOwner solana.PublicKey
}
func (*StakeInstrAuthorizeWithSeed) UnmarshalWithDecoder ¶
func (authWithSeed *StakeInstrAuthorizeWithSeed) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeInstrInitialize ¶
type StakeInstrInitialize struct {
Authorized Authorized
Lockup StakeLockup
}
func (*StakeInstrInitialize) UnmarshalWithDecoder ¶
func (initialize *StakeInstrInitialize) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeInstrMoveLamports ¶
type StakeInstrMoveLamports struct {
Lamports uint64
}
func (*StakeInstrMoveLamports) UnmarshalWithDecoder ¶
func (moveLamports *StakeInstrMoveLamports) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeInstrMoveStake ¶
type StakeInstrMoveStake struct {
Lamports uint64
}
func (*StakeInstrMoveStake) UnmarshalWithDecoder ¶
func (moveStake *StakeInstrMoveStake) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeInstrSetLockup ¶
func (*StakeInstrSetLockup) UnmarshalWithDecoder ¶
func (lockup *StakeInstrSetLockup) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeInstrSetLockupChecked ¶
func (*StakeInstrSetLockupChecked) UnmarshalWithDecoder ¶
func (lockup *StakeInstrSetLockupChecked) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeInstrSplit ¶
type StakeInstrSplit struct {
Lamports uint64
}
func (*StakeInstrSplit) UnmarshalWithDecoder ¶
func (split *StakeInstrSplit) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeInstrWithdraw ¶
type StakeInstrWithdraw struct {
Lamports uint64
}
func (*StakeInstrWithdraw) UnmarshalWithDecoder ¶
func (withdraw *StakeInstrWithdraw) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeLockup ¶
func (*StakeLockup) IsInForce ¶
func (lockup *StakeLockup) IsInForce(clock SysvarClock, custodian *solana.PublicKey) bool
func (*StakeLockup) MarshalWithEncoder ¶
func (lockup *StakeLockup) MarshalWithEncoder(encoder *bin.Encoder) error
func (*StakeLockup) UnmarshalWithDecoder ¶
func (lockup *StakeLockup) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeStateV2 ¶
type StakeStateV2 struct {
Status uint32
Initialized StakeStateV2Initialized
Stake StakeStateV2Stake
}
func UnmarshalStakeState ¶
func UnmarshalStakeState(data []byte) (*StakeStateV2, error)
func (*StakeStateV2) MarshalWithEncoder ¶
func (state *StakeStateV2) MarshalWithEncoder(encoder *bin.Encoder) error
func (*StakeStateV2) UnmarshalWithDecoder ¶
func (state *StakeStateV2) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeStateV2Initialized ¶
type StakeStateV2Initialized struct {
Meta Meta
}
func (*StakeStateV2Initialized) MarshalWithEncoder ¶
func (initialized *StakeStateV2Initialized) MarshalWithEncoder(encoder *bin.Encoder) error
func (*StakeStateV2Initialized) UnmarshalWithDecoder ¶
func (initialized *StakeStateV2Initialized) UnmarshalWithDecoder(decoder *bin.Decoder) error
type StakeStateV2Stake ¶
type StakeStateV2Stake struct {
Meta Meta
Stake Stake
StakeFlags StakeFlags
}
func (*StakeStateV2Stake) MarshalWithEncoder ¶
func (stake *StakeStateV2Stake) MarshalWithEncoder(encoder *bin.Encoder) error
func (*StakeStateV2Stake) UnmarshalWithDecoder ¶
func (stake *StakeStateV2Stake) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SystemInstrAllocate ¶
type SystemInstrAllocate struct {
Space uint64
}
func (*SystemInstrAllocate) MarshalWithEncoder ¶
func (instr *SystemInstrAllocate) MarshalWithEncoder(encoder *bin.Encoder) error
func (*SystemInstrAllocate) UnmarshalWithDecoder ¶
func (instr *SystemInstrAllocate) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SystemInstrAllocateWithSeed ¶
type SystemInstrAllocateWithSeed struct {
Base solana.PublicKey
Seed string
Space uint64
Owner solana.PublicKey
}
func (*SystemInstrAllocateWithSeed) UnmarshalWithDecoder ¶
func (instr *SystemInstrAllocateWithSeed) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SystemInstrAssign ¶
func (*SystemInstrAssign) MarshalWithEncoder ¶
func (instr *SystemInstrAssign) MarshalWithEncoder(encoder *bin.Encoder) error
func (*SystemInstrAssign) UnmarshalWithDecoder ¶
func (instr *SystemInstrAssign) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SystemInstrAssignWithSeed ¶
func (*SystemInstrAssignWithSeed) MarshalWithEncoder ¶
func (instr *SystemInstrAssignWithSeed) MarshalWithEncoder(encoder *bin.Encoder) error
func (*SystemInstrAssignWithSeed) UnmarshalWithDecoder ¶
func (instr *SystemInstrAssignWithSeed) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SystemInstrAuthorizeNonceAccount ¶
func (*SystemInstrAuthorizeNonceAccount) UnmarshalWithDecoder ¶
func (instr *SystemInstrAuthorizeNonceAccount) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SystemInstrCreateAccount ¶
func (*SystemInstrCreateAccount) MarshalWithEncoder ¶
func (instr *SystemInstrCreateAccount) MarshalWithEncoder(encoder *bin.Encoder) error
func (*SystemInstrCreateAccount) UnmarshalWithDecoder ¶
func (instr *SystemInstrCreateAccount) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SystemInstrCreateAccountWithSeed ¶
type SystemInstrCreateAccountWithSeed struct {
Base solana.PublicKey
Seed string
Lamports uint64
Space uint64
Owner solana.PublicKey
}
func (*SystemInstrCreateAccountWithSeed) UnmarshalWithDecoder ¶
func (instr *SystemInstrCreateAccountWithSeed) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SystemInstrInitializeNonceAccount ¶
func (*SystemInstrInitializeNonceAccount) UnmarshalWithDecoder ¶
func (instr *SystemInstrInitializeNonceAccount) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SystemInstrTransfer ¶
type SystemInstrTransfer struct {
Lamports uint64
}
func (*SystemInstrTransfer) MarshalWithEncoder ¶
func (instr *SystemInstrTransfer) MarshalWithEncoder(encoder *bin.Encoder) error
func (*SystemInstrTransfer) UnmarshalWithDecoder ¶
func (instr *SystemInstrTransfer) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SystemInstrTransferWithSeed ¶
type SystemInstrTransferWithSeed struct {
Lamports uint64
FromSeed string
FromOwner solana.PublicKey
}
func (*SystemInstrTransferWithSeed) UnmarshalWithDecoder ¶
func (instr *SystemInstrTransferWithSeed) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SystemInstrWithdrawNonceAccount ¶
type SystemInstrWithdrawNonceAccount struct {
Lamports uint64
}
func (*SystemInstrWithdrawNonceAccount) UnmarshalWithDecoder ¶
func (instr *SystemInstrWithdrawNonceAccount) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SysvarClock ¶
type SysvarClock struct {
Slot uint64
EpochStartTimestamp int64
Epoch uint64
LeaderScheduleEpoch uint64
UnixTimestamp int64
}
func ReadClockSysvar ¶
func ReadClockSysvar(execCtx *ExecutionCtx) (SysvarClock, error)
func (*SysvarClock) MustMarshal ¶
func (sc *SysvarClock) MustMarshal() []byte
func (*SysvarClock) MustUnmarshalWithDecoder ¶
func (sc *SysvarClock) MustUnmarshalWithDecoder(decoder *bin.Decoder)
func (*SysvarClock) UnmarshalWithDecoder ¶
func (sc *SysvarClock) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type SysvarEpochRewards ¶
type SysvarEpochRewards struct {
DistributionStartingBlockHeight uint64
NumPartitions uint64
ParentBlockhash [32]byte
TotalPoints wide.Uint128
TotalRewards uint64
DistributedRewards uint64
Active bool
}
func ReadEpochRewardsSysvar ¶
func ReadEpochRewardsSysvar(execCtx *ExecutionCtx) (SysvarEpochRewards, error)
func (*SysvarEpochRewards) Distribute ¶
func (sr *SysvarEpochRewards) Distribute(amount uint64)
func (*SysvarEpochRewards) MarshalWithEncoder ¶
func (ser *SysvarEpochRewards) MarshalWithEncoder(encoder *bin.Encoder) error
func (*SysvarEpochRewards) MustMarshalWithEncoder ¶
func (sr *SysvarEpochRewards) MustMarshalWithEncoder(encoder *bin.Encoder)
func (*SysvarEpochRewards) MustUnmarshalWithDecoder ¶
func (sr *SysvarEpochRewards) MustUnmarshalWithDecoder(decoder *bin.Decoder)
func (SysvarEpochRewards) String ¶
func (sr SysvarEpochRewards) String() string
func (*SysvarEpochRewards) UnmarshalWithDecoder ¶
func (ser *SysvarEpochRewards) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SysvarEpochSchedule ¶
type SysvarEpochSchedule struct {
SlotsPerEpoch uint64
LeaderScheduleSlotOffset uint64
Warmup bool
FirstNormalEpoch uint64
FirstNormalSlot uint64
}
func ReadEpochScheduleSysvar ¶
func ReadEpochScheduleSysvar(execCtx *ExecutionCtx) (SysvarEpochSchedule, error)
func (*SysvarEpochSchedule) FirstSlotInEpoch ¶
func (sr *SysvarEpochSchedule) FirstSlotInEpoch(epoch uint64) uint64
func (*SysvarEpochSchedule) GetEpoch ¶
func (sr *SysvarEpochSchedule) GetEpoch(slot uint64) uint64
func (*SysvarEpochSchedule) GetEpochAndSlotIndex ¶
func (sr *SysvarEpochSchedule) GetEpochAndSlotIndex(slot uint64) (uint64, uint64)
func (*SysvarEpochSchedule) LeaderScheduleEpoch ¶
func (sr *SysvarEpochSchedule) LeaderScheduleEpoch(slot uint64) uint64
func (*SysvarEpochSchedule) MustUnmarshalWithDecoder ¶
func (sr *SysvarEpochSchedule) MustUnmarshalWithDecoder(decoder *bin.Decoder)
func (*SysvarEpochSchedule) Slot0 ¶
func (sr *SysvarEpochSchedule) Slot0(epoch uint64) uint64
func (*SysvarEpochSchedule) SlotsInEpoch ¶
func (sr *SysvarEpochSchedule) SlotsInEpoch(epoch uint64) uint64
func (*SysvarEpochSchedule) UnmarshalWithDecoder ¶
func (ses *SysvarEpochSchedule) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type SysvarFees ¶
type SysvarFees struct {
FeeCalculator FeeCalculator
}
func ReadFeesSysvar ¶
func ReadFeesSysvar(accts *accounts.Accounts) SysvarFees
func (*SysvarFees) MustUnmarshalWithDecoder ¶
func (sf *SysvarFees) MustUnmarshalWithDecoder(decoder *bin.Decoder)
func (*SysvarFees) UnmarshalWithDecoder ¶
func (sf *SysvarFees) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
func (*SysvarFees) Update ¶
func (sf *SysvarFees) Update(lamportsPerSignature uint64)
type SysvarLastRestartSlot ¶
type SysvarLastRestartSlot struct {
LastRestartSlot uint64
}
func ReadLastRestartSlotSysvar ¶
func ReadLastRestartSlotSysvar(execCtx *ExecutionCtx) SysvarLastRestartSlot
func (*SysvarLastRestartSlot) MustUnmarshalWithDecoder ¶
func (sr *SysvarLastRestartSlot) MustUnmarshalWithDecoder(decoder *bin.Decoder)
func (*SysvarLastRestartSlot) UnmarshalWithDecoder ¶
func (lrs *SysvarLastRestartSlot) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type SysvarRecentBlockhashes ¶
type SysvarRecentBlockhashes []RecentBlockHashesEntry
func ReadRecentBlockHashesSysvar ¶
func ReadRecentBlockHashesSysvar(execCtx *ExecutionCtx) (SysvarRecentBlockhashes, error)
func (*SysvarRecentBlockhashes) GetLatest ¶
func (recentBlockhashes *SysvarRecentBlockhashes) GetLatest() RecentBlockHashesEntry
func (*SysvarRecentBlockhashes) IsBlockhashAgeValid ¶
func (recentBlockhashes *SysvarRecentBlockhashes) IsBlockhashAgeValid(hash [32]byte) bool
func (*SysvarRecentBlockhashes) MarshalWithEncoder ¶
func (recentBlockhashes *SysvarRecentBlockhashes) MarshalWithEncoder(encoder *bin.Encoder) error
func (*SysvarRecentBlockhashes) MustMarshal ¶
func (recentBlockhashes *SysvarRecentBlockhashes) MustMarshal() []byte
func (*SysvarRecentBlockhashes) MustUnmarshalWithDecoder ¶
func (recentBlockhashes *SysvarRecentBlockhashes) MustUnmarshalWithDecoder(decoder *bin.Decoder)
func (*SysvarRecentBlockhashes) PushLatest ¶
func (recentBlockhashes *SysvarRecentBlockhashes) PushLatest(latest [32]byte, lamportsPerSignature uint64) [32]byte
func (*SysvarRecentBlockhashes) UnmarshalWithDecoder ¶
func (recentBlockhashes *SysvarRecentBlockhashes) UnmarshalWithDecoder(decoder *bin.Decoder) error
type SysvarRent ¶
func NewDefaultRentSysvar ¶
func NewDefaultRentSysvar() SysvarRent
func ReadRentSysvar ¶
func ReadRentSysvar(execCtx *ExecutionCtx) (SysvarRent, error)
func (*SysvarRent) InitializeDefault ¶
func (sr *SysvarRent) InitializeDefault()
func (*SysvarRent) MinimumBalance ¶
func (sr *SysvarRent) MinimumBalance(dataLen uint64) uint64
func (*SysvarRent) MustUnmarshalWithDecoder ¶
func (sr *SysvarRent) MustUnmarshalWithDecoder(decoder *bin.Decoder)
func (*SysvarRent) UnmarshalWithDecoder ¶
func (sr *SysvarRent) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type SysvarSlotHashes ¶
type SysvarSlotHashes []SlotHash
func ReadSlotHashesSysvar ¶
func ReadSlotHashesSysvar(execCtx *ExecutionCtx) (SysvarSlotHashes, error)
func (*SysvarSlotHashes) FromInstrAcct ¶
func (slotHashes *SysvarSlotHashes) FromInstrAcct(execCtx *ExecutionCtx, instrAcctIdx uint64) error
func (*SysvarSlotHashes) MustMarshal ¶
func (sh *SysvarSlotHashes) MustMarshal() []byte
func (*SysvarSlotHashes) MustUnmarshalWithDecoder ¶
func (sh *SysvarSlotHashes) MustUnmarshalWithDecoder(decoder *bin.Decoder)
func (*SysvarSlotHashes) Position ¶
func (sh *SysvarSlotHashes) Position(slot uint64) (uint64, error)
func (*SysvarSlotHashes) UnmarshalWithDecoder ¶
func (sh *SysvarSlotHashes) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
func (*SysvarSlotHashes) Update ¶
func (sh *SysvarSlotHashes) Update(slot uint64, parentSlot uint64, hash [32]byte)
func (*SysvarSlotHashes) UpdateWithSlotCtx ¶
func (sh *SysvarSlotHashes) UpdateWithSlotCtx(slotCtx *SlotCtx)
type SysvarSlotHistory ¶
type SysvarSlotHistory struct {
Bits SlotHistoryBitvec
NextSlot uint64
}
func ReadSlotHistorySysvar ¶
func ReadSlotHistorySysvar(execCtx *ExecutionCtx) SysvarSlotHistory
func (*SysvarSlotHistory) Add ¶
func (sr *SysvarSlotHistory) Add(slot uint64)
func (*SysvarSlotHistory) MustMarshal ¶
func (sr *SysvarSlotHistory) MustMarshal() []byte
func (*SysvarSlotHistory) MustUnmarshalWithDecoder ¶
func (sr *SysvarSlotHistory) MustUnmarshalWithDecoder(decoder *bin.Decoder)
func (*SysvarSlotHistory) SetNextSlot ¶
func (sr *SysvarSlotHistory) SetNextSlot(nextSlot uint64)
func (*SysvarSlotHistory) UnmarshalWithDecoder ¶
func (sh *SysvarSlotHistory) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type SysvarStakeHistory ¶
type SysvarStakeHistory []StakeHistoryPair
func ReadStakeHistorySysvar ¶
func ReadStakeHistorySysvar(execCtx *ExecutionCtx) (SysvarStakeHistory, error)
func (*SysvarStakeHistory) Get ¶
func (sh *SysvarStakeHistory) Get(epoch uint64) *StakeHistoryEntry
func (*SysvarStakeHistory) MarshalWithEncoder ¶
func (sh *SysvarStakeHistory) MarshalWithEncoder(encoder *bin.Encoder) error
func (*SysvarStakeHistory) MustMarshalWithEncoder ¶
func (sh *SysvarStakeHistory) MustMarshalWithEncoder(encoder *bin.Encoder)
func (*SysvarStakeHistory) MustUnmarshalWithDecoder ¶
func (sh *SysvarStakeHistory) MustUnmarshalWithDecoder(decoder *bin.Decoder)
func (*SysvarStakeHistory) String ¶
func (sh *SysvarStakeHistory) String() string
func (*SysvarStakeHistory) UnmarshalWithDecoder ¶
func (sh *SysvarStakeHistory) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
func (*SysvarStakeHistory) Update ¶
func (sh *SysvarStakeHistory) Update(epoch uint64, entry StakeHistoryEntry)
type TransactionAccounts ¶
type TransactionAccounts struct {
Accounts []*accounts.Account
Locked []bool
Touched []bool
AcctMetas []*AccountMeta
}
func NewTransactionAccounts ¶
func NewTransactionAccounts(accts []accounts.Account) *TransactionAccounts
func (*TransactionAccounts) GetAccount ¶
func (txAccounts *TransactionAccounts) GetAccount(idx uint64) (*accounts.Account, error)
func (*TransactionAccounts) IsLocked ¶
func (txAccounts *TransactionAccounts) IsLocked(idx uint64) bool
func (*TransactionAccounts) Lock ¶
func (txAccounts *TransactionAccounts) Lock(idx uint64)
func (*TransactionAccounts) Touch ¶
func (txAccounts *TransactionAccounts) Touch(idx uint64) error
func (*TransactionAccounts) Unlock ¶
func (txAccounts *TransactionAccounts) Unlock(idx uint64)
type TransactionCtx ¶
type TransactionCtx struct {
InstructionTrace []InstructionCtx
InstructionStack []uint64
RetData TxReturnData
AccountKeys []solana.PublicKey
Accounts TransactionAccounts
ExecutableAccounts []BorrowedAccount
InstructionTraceCapacity uint64
AccountsResizeDelta int64
Rent SysvarRent
HeapSize uint32
AllInstructions []Instruction
ComputeBudgetLimits *ComputeBudgetLimits
Signature solana.Signature
ModifiedStakeAccts bool
ModifiedVoteAccts bool
NonceAcctAdvanced bool
BorrowedAccountArena *arena.Arena[BorrowedAccount]
}
func NewTransactionCtx ¶
func NewTransactionCtx(txAccts TransactionAccounts, instrStackCapacity uint64, instrTraceCapacity uint64) *TransactionCtx
func (*TransactionCtx) AccountAtIndex ¶
func (txCtx *TransactionCtx) AccountAtIndex(idxInTx uint64) (*accounts.Account, error)
func (*TransactionCtx) CurrentInstructionCtx ¶
func (txCtx *TransactionCtx) CurrentInstructionCtx() (*InstructionCtx, error)
func (*TransactionCtx) IndexOfAccount ¶
func (txCtx *TransactionCtx) IndexOfAccount(pubkey solana.PublicKey) (uint64, error)
func (*TransactionCtx) InstructionAccountsLamportSum ¶
func (txCtx *TransactionCtx) InstructionAccountsLamportSum(instrCtx *InstructionCtx) (wide.Uint128, error)
func (*TransactionCtx) InstructionCtxAtIndexInTrace ¶
func (txCtx *TransactionCtx) InstructionCtxAtIndexInTrace(idxInTrace uint64) (*InstructionCtx, error)
func (*TransactionCtx) InstructionCtxAtNestingLevel ¶
func (txCtx *TransactionCtx) InstructionCtxAtNestingLevel(nestingLevel uint64) (*InstructionCtx, error)
func (*TransactionCtx) InstructionCtxStackHeight ¶
func (txCtx *TransactionCtx) InstructionCtxStackHeight() uint64
func (*TransactionCtx) InstructionTraceLength ¶
func (txCtx *TransactionCtx) InstructionTraceLength() uint64
func (*TransactionCtx) KeyOfAccountAtIndex ¶
func (txCtx *TransactionCtx) KeyOfAccountAtIndex(index uint64) (solana.PublicKey, error)
func (*TransactionCtx) NextInstructionCtx ¶
func (txCtx *TransactionCtx) NextInstructionCtx() (*InstructionCtx, error)
func (*TransactionCtx) Pop ¶
func (txCtx *TransactionCtx) Pop() error
func (*TransactionCtx) Push ¶
func (txCtx *TransactionCtx) Push() error
func (*TransactionCtx) PushInstructionCtx ¶
func (txCtx *TransactionCtx) PushInstructionCtx(ixCtx InstructionCtx)
func (*TransactionCtx) ReturnData ¶
func (txCtx *TransactionCtx) ReturnData() (solana.PublicKey, []byte)
func (*TransactionCtx) SetReturnData ¶
func (txCtx *TransactionCtx) SetReturnData(programId solana.PublicKey, data []byte)
type TranslatedAccount ¶
type TranslatedAccount struct {
IndexOfAccount uint64
CallerAccount *CallerAccount
}
type TranslatedAccounts ¶
type TranslatedAccounts []TranslatedAccount
type TxReturnData ¶
type TxReturnData struct {
// contains filtered or unexported fields
}
type UpgradeableLoaderInstrDeployWithMaxDataLen ¶
type UpgradeableLoaderInstrDeployWithMaxDataLen struct {
MaxDataLen uint64
}
func (*UpgradeableLoaderInstrDeployWithMaxDataLen) MarshalWithEncoder ¶
func (deploy *UpgradeableLoaderInstrDeployWithMaxDataLen) MarshalWithEncoder(encoder *bin.Encoder) error
func (*UpgradeableLoaderInstrDeployWithMaxDataLen) UnmarshalWithDecoder ¶
func (deploy *UpgradeableLoaderInstrDeployWithMaxDataLen) UnmarshalWithDecoder(decoder *bin.Decoder) error
type UpgradeableLoaderInstrExtendProgram ¶
type UpgradeableLoaderInstrExtendProgram struct {
AdditionalBytes uint32
}
func (*UpgradeableLoaderInstrExtendProgram) MarshalWithEncoder ¶
func (extendProgram *UpgradeableLoaderInstrExtendProgram) MarshalWithEncoder(encoder *bin.Encoder) error
func (*UpgradeableLoaderInstrExtendProgram) UnmarshalWithDecoder ¶
func (extendProgram *UpgradeableLoaderInstrExtendProgram) UnmarshalWithDecoder(decoder *bin.Decoder) error
type UpgradeableLoaderInstrWrite ¶
instructions
func (*UpgradeableLoaderInstrWrite) MarshalWithEncoder ¶
func (write *UpgradeableLoaderInstrWrite) MarshalWithEncoder(encoder *bin.Encoder) error
func (*UpgradeableLoaderInstrWrite) UnmarshalWithDecoder ¶
func (write *UpgradeableLoaderInstrWrite) UnmarshalWithDecoder(decoder *bin.Decoder) error
type UpgradeableLoaderState ¶
type UpgradeableLoaderState struct {
Type uint32
Buffer UpgradeableLoaderStateBuffer
Program UpgradeableLoaderStateProgram
ProgramData UpgradeableLoaderStateProgramData
}
func UnmarshalUpgradeableLoaderState ¶
func UnmarshalUpgradeableLoaderState(data []byte) (*UpgradeableLoaderState, error)
func (*UpgradeableLoaderState) MarshalWithEncoder ¶
func (state *UpgradeableLoaderState) MarshalWithEncoder(encoder *bin.Encoder) error
func (*UpgradeableLoaderState) UnmarshalWithDecoder ¶
func (state *UpgradeableLoaderState) UnmarshalWithDecoder(decoder *bin.Decoder) error
type UpgradeableLoaderStateBuffer ¶
upgradeable loader account states
func (*UpgradeableLoaderStateBuffer) MarshalWithEncoder ¶
func (buffer *UpgradeableLoaderStateBuffer) MarshalWithEncoder(encoder *bin.Encoder) error
func (*UpgradeableLoaderStateBuffer) UnmarshalWithDecoder ¶
func (buffer *UpgradeableLoaderStateBuffer) UnmarshalWithDecoder(decoder *bin.Decoder) error
type UpgradeableLoaderStateProgram ¶
func (*UpgradeableLoaderStateProgram) MarshalWithEncoder ¶
func (program *UpgradeableLoaderStateProgram) MarshalWithEncoder(encoder *bin.Encoder) error
func (*UpgradeableLoaderStateProgram) UnmarshalWithDecoder ¶
func (program *UpgradeableLoaderStateProgram) UnmarshalWithDecoder(decoder *bin.Decoder) error
type UpgradeableLoaderStateProgramData ¶
type UpgradeableLoaderStateProgramData struct {
Slot uint64
UpgradeAuthorityAddress *solana.PublicKey
}
func (*UpgradeableLoaderStateProgramData) MarshalWithEncoder ¶
func (programData *UpgradeableLoaderStateProgramData) MarshalWithEncoder(encoder *bin.Encoder) error
func (*UpgradeableLoaderStateProgramData) UnmarshalWithDecoder ¶
func (programData *UpgradeableLoaderStateProgramData) UnmarshalWithDecoder(decoder *bin.Decoder) error
type ValidatedProgram ¶
type VectorDescrC ¶
func (*VectorDescrC) Marshal ¶
func (vectorDescr *VectorDescrC) Marshal() ([]byte, error)
just for testing
type VectorDescrRust ¶
type VoteInstrAuthorizeCheckedWithSeed ¶
type VoteInstrAuthorizeCheckedWithSeed struct {
AuthorizationType uint32
CurrentAuthorityDerivedKeyOwner solana.PublicKey
CurrentAuthorityDerivedKeySeed string
}
func (*VoteInstrAuthorizeCheckedWithSeed) UnmarshalWithDecoder ¶
func (acws *VoteInstrAuthorizeCheckedWithSeed) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrAuthorizeWithSeed ¶
type VoteInstrAuthorizeWithSeed struct {
AuthorizationType uint32
CurrentAuthorityDerivedKeyOwner solana.PublicKey
CurrentAuthorityDerivedKeySeed string
NewAuthority solana.PublicKey
}
func (*VoteInstrAuthorizeWithSeed) UnmarshalWithDecoder ¶
func (authWithSeed *VoteInstrAuthorizeWithSeed) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrCompactUpdateVoteState ¶
type VoteInstrCompactUpdateVoteState struct {
UpdateVoteState VoteInstrUpdateVoteState
}
func (*VoteInstrCompactUpdateVoteState) UnmarshalWithDecoder ¶
func (compactUpdateVoteState *VoteInstrCompactUpdateVoteState) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrCompactUpdateVoteStateSwitch ¶
type VoteInstrCompactUpdateVoteStateSwitch struct {
UpdateVoteState VoteInstrUpdateVoteState
Hash [32]byte
}
func (*VoteInstrCompactUpdateVoteStateSwitch) UnmarshalWithDecoder ¶
func (compactUpdateVoteState *VoteInstrCompactUpdateVoteStateSwitch) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrTowerSync ¶
type VoteInstrTowerSync struct {
Lockouts deque.Deque[VoteLockout]
Root *uint64
Hash [32]byte
Timestamp *int64
BlockId [32]byte
}
func (*VoteInstrTowerSync) UnmarshalWithDecoder ¶
func (towerSync *VoteInstrTowerSync) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrTowerSyncSwitch ¶
type VoteInstrTowerSyncSwitch struct {
TowerSync VoteInstrTowerSync
Hash [32]byte
}
func (*VoteInstrTowerSyncSwitch) UnmarshalWithDecoder ¶
func (towerSyncSwitch *VoteInstrTowerSyncSwitch) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrUpdateCommission ¶
type VoteInstrUpdateCommission struct {
Commission byte
}
func (*VoteInstrUpdateCommission) UnmarshalWithDecoder ¶
func (updateCommission *VoteInstrUpdateCommission) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrUpdateVoteState ¶
type VoteInstrUpdateVoteState struct {
Lockouts deque.Deque[VoteLockout]
Root *uint64
Hash [32]byte
Timestamp *int64
}
func (*VoteInstrUpdateVoteState) BuildFromCompactUpdateVoteState ¶
func (updateVoteState *VoteInstrUpdateVoteState) BuildFromCompactUpdateVoteState(compactUpdateVoteState *CompactUpdateVoteState) error
func (*VoteInstrUpdateVoteState) UnmarshalWithDecoder ¶
func (updateVoteState *VoteInstrUpdateVoteState) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrUpdateVoteStateSwitch ¶
type VoteInstrUpdateVoteStateSwitch struct {
UpdateVoteState VoteInstrUpdateVoteState
Hash [32]byte
}
func (*VoteInstrUpdateVoteStateSwitch) UnmarshalWithDecoder ¶
func (uvss *VoteInstrUpdateVoteStateSwitch) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrVote ¶
func (*VoteInstrVote) UnmarshalWithDecoder ¶
func (vote *VoteInstrVote) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrVoteAuthorize ¶
func (*VoteInstrVoteAuthorize) UnmarshalWithDecoder ¶
func (voteAuthorize *VoteInstrVoteAuthorize) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrVoteAuthorizeChecked ¶
func (*VoteInstrVoteAuthorizeChecked) UnmarshalWithDecoder ¶
func (voteAuthChecked *VoteInstrVoteAuthorizeChecked) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrVoteInit ¶
type VoteInstrVoteInit struct {
NodePubkey solana.PublicKey
AuthorizedVoter solana.PublicKey
AuthorizedWithdrawer solana.PublicKey
Commission byte
}
func (*VoteInstrVoteInit) UnmarshalWithDecoder ¶
func (voteInit *VoteInstrVoteInit) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrVoteSwitch ¶
type VoteInstrVoteSwitch struct {
Vote VoteInstrVote
Hash [32]byte
}
func (*VoteInstrVoteSwitch) UnmarshalWithDecoder ¶
func (voteSwitch *VoteInstrVoteSwitch) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteInstrWithdraw ¶
type VoteInstrWithdraw struct {
Lamports uint64
}
func (*VoteInstrWithdraw) UnmarshalWithDecoder ¶
func (withdraw *VoteInstrWithdraw) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteLockout ¶
func (*VoteLockout) IncreaseConfirmationCount ¶
func (lockout *VoteLockout) IncreaseConfirmationCount(by uint32)
func (*VoteLockout) IsLockedOutAtSlot ¶
func (lockout *VoteLockout) IsLockedOutAtSlot(slot uint64) bool
func (*VoteLockout) LastLockedOutSlot ¶
func (lockout *VoteLockout) LastLockedOutSlot() uint64
func (*VoteLockout) Lockout ¶
func (lockout *VoteLockout) Lockout() uint64
func (*VoteLockout) MarshalWithEncoder ¶
func (lockout *VoteLockout) MarshalWithEncoder(encoder *bin.Encoder) error
func (*VoteLockout) UnmarshalWithDecoder ¶
func (lockout *VoteLockout) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteState ¶
type VoteState struct {
NodePubkey solana.PublicKey
AuthorizedWithdrawer solana.PublicKey
Commission byte
Votes deque.Deque[LandedVote]
RootSlot *uint64
AuthorizedVoters AuthorizedVoters
PriorVoters PriorVoters
EpochCredits []EpochCredits
LastTimestamp BlockTimestamp
}
func (*VoteState) ContainsSlot ¶
func (*VoteState) CreditsForVoteAtIndex ¶
func (*VoteState) DoubleLockouts ¶
func (voteState *VoteState) DoubleLockouts()
func (*VoteState) GetAndUpdateAuthorizedVoter ¶
func (*VoteState) IncrementCredits ¶
func (*VoteState) LastLockout ¶
func (voteState *VoteState) LastLockout() *VoteLockout
func (*VoteState) LastVotedSlot ¶
func (*VoteState) MarshalWithEncoder ¶
func (*VoteState) PopExpiredVotes ¶
func (*VoteState) ProcessNextVoteSlot ¶
func (*VoteState) ProcessTimestamp ¶
func (*VoteState) SetNewAuthorizedVoter ¶
type VoteState0_23_5 ¶
type VoteState0_23_5 struct {
NodePubkey solana.PublicKey
AuthorizedVoter solana.PublicKey
AuthorizedVoterEpoch uint64
PriorVoters PriorVoters0_23_5
AuthorizedWithdrawer solana.PublicKey
Commission byte
Votes deque.Deque[VoteLockout]
RootSlot *uint64
EpochCredits []EpochCredits
LastTimestamp BlockTimestamp
}
func (*VoteState0_23_5) MarshalWithEncoder ¶
func (voteState *VoteState0_23_5) MarshalWithEncoder(encoder *bin.Encoder) error
func (*VoteState0_23_5) UnmarshalWithDecoder ¶
func (voteState *VoteState0_23_5) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteState1_14_11 ¶
type VoteState1_14_11 struct {
NodePubkey solana.PublicKey
AuthorizedWithdrawer solana.PublicKey
Commission byte
Votes deque.Deque[VoteLockout]
RootSlot *uint64
AuthorizedVoters AuthorizedVoters
PriorVoters PriorVoters
EpochCredits []EpochCredits
LastTimestamp BlockTimestamp
}
func (*VoteState1_14_11) MarshalWithEncoder ¶
func (voteState *VoteState1_14_11) MarshalWithEncoder(encoder *bin.Encoder) error
func (*VoteState1_14_11) UnmarshalWithDecoder ¶
func (voteState *VoteState1_14_11) UnmarshalWithDecoder(decoder *bin.Decoder) error
type VoteStateVersions ¶
type VoteStateVersions struct {
Type uint32
V0_23_5 VoteState0_23_5
V1_14_11 VoteState1_14_11
Current VoteState
}
func UnmarshalVersionedVoteState ¶
func UnmarshalVersionedVoteState(data []byte) (*VoteStateVersions, error)
func (*VoteStateVersions) ConvertToCurrent ¶
func (voteStateVersions *VoteStateVersions) ConvertToCurrent() *VoteState
func (*VoteStateVersions) IsInitialized ¶
func (voteStateVersions *VoteStateVersions) IsInitialized() bool
func (*VoteStateVersions) LastTimestamp ¶
func (voteStateVersions *VoteStateVersions) LastTimestamp() *BlockTimestamp
func (*VoteStateVersions) MarshalWithEncoder ¶
func (voteStateVersions *VoteStateVersions) MarshalWithEncoder(encoder *bin.Encoder) error
func (*VoteStateVersions) NodePubkey ¶
func (voteStateVersions *VoteStateVersions) NodePubkey() solana.PublicKey
func (*VoteStateVersions) UnmarshalWithDecoder ¶
func (voteStateVersions *VoteStateVersions) UnmarshalWithDecoder(decoder *bin.Decoder) error
Source Files
¶
- address_lookup_table_program.go
- blockhash_nonce.go
- borrowed_account.go
- bpf_loader.go
- compute_budget_program.go
- config_program.go
- ed25519_program.go
- el_gamal_proof_program.go
- errors.go
- execution_ctx.go
- fee_rate_governor.go
- instr_common.go
- instruction_ctx.go
- loader_v4.go
- logging.go
- native_programs_common.go
- params.go
- program.go
- sealevel.go
- secp256k1_program.go
- secp256r1_program.go
- stake_program.go
- stake_state.go
- syscalls.go
- syscalls_call.go
- syscalls_common.go
- syscalls_cpi.go
- syscalls_curve.go
- syscalls_hash.go
- syscalls_log.go
- syscalls_mem.go
- syscalls_misc.go
- syscalls_pda.go
- syscalls_sysvar.go
- system_program.go
- sysvar_cache.go
- sysvar_clock.go
- sysvar_common.go
- sysvar_epoch_rewards.go
- sysvar_epoch_schedule.go
- sysvar_fees.go
- sysvar_instructions.go
- sysvar_last_restart_slot.go
- sysvar_recent_blockhashes.go
- sysvar_rent.go
- sysvar_slot_hashes.go
- sysvar_slot_history.go
- sysvar_stake_history.go
- transaction_ctx.go
- types.go
- vote_program.go
- vote_state.go