Documentation
¶
Index ¶
Constants ¶
View Source
const ( CUSyscallBaseCost = 100 CULog64Units = 100 CULogPubkeyUnits = 100 CUMemOpBaseCost = 10 CUCpiBytesPerUnit = 250 CUSha256BaseCost = 85 CUSha256ByteCost = 1 CUCreateProgramAddressUnits = 1500 CUSecP256k1RecoverCost = 25000 CUInvokeUnits = 1000 CUConfigProcessorDefaultComputeUnits = 450 CUSystemProgramDefaultComputeUnits = 150 CUVoteProgramDefaultComputeUnits = 2100 CUStakeProgramDefaultComputeUnits = 750 CUSha256MaxSlices = 20000 CUMaxCpiInstructionSize = 1280 CUUpgradeableLoaderComputeUnits = 2370 CUDeprecatedLoaderComputeUnits = 1140 CUDefaultLoaderComputeUnits = 570 CUHeapCostDefault = 8 CUAddressLookupTableDefaultComputeUnits = 750 CUComputeBudgetProgramDefaultComputeUnits = 150 CUCurve25519EdwardsValidatePointCost = 159 CUCurve25519RistrettoValidatePointCost = 169 CUCurve25519EdwardsMsmBaseCost = 2273 CUCurve25519EdwardsMsmIncrementalCost = 758 CUCurve25519RistrettoMsmBaseCost = 2303 CUCurve25519RistrettoMsmIncrementalCost = 788 CUCurve25519EdwardsAddCost = 473 CUCurve25519EdwardsSubCost = 475 CUCurve25519EdwardsMulCost = 2177 CUCurve25519RistrettoAddCost = 521 CUCurve25519RistrettoSubCost = 519 CUCurve25519RistrettoMulCost = 2208 CUBn128G1Compress = 30 CUBn128G1Decompress = 398 CUBn128G2Compress = 86 CUBn128G2Decompress = 13610 CUBn128AdditionCost = 334 CUBn128MultiplicationCost = 3840 CUBn128PairingOnePairCostFirst = 36364 CUBn128PairingOnePairCostOther = 12121 CUSysvarBaseCost = 100 CUCloseContextStateComputeUnits = 3300 CUVerifyZeroCiphertextComputeUnits = 6000 CUVerifyCiphertextCiphertextEqualityComputeUnits = 8000 CUVerifyCiphertextCommitmentEqualityComputeUnits = 6400 CUVerifyPubkeyValidityComputeUnits = 2600 CUVerifyPercentageWithCapComputeUnits = 6500 CUVerifyBatchedRangeProofU64ComputeUnits = 111000 CUVerifyBatchedRangeProofU128ComputeUnits = 200000 CUVerifyBatchedRangeProofU256ComputeUnits = 368000 CUVerifyGroupedCiphertext2HandlesValidityComputeUnits = 6400 CUVerifyBatchedGroupedCiphertext2HandlesValidityComputeUnits = 13000 CUVerifyGroupedCiphertext3HandlesValidityComputeUnits = 8100 CUVerifyBatchedGroupedCiphertext3HandlesValidityComputeUnits = 16400 CULoaderV4ComputeUnits = 2000 )
Variables ¶
View Source
var ErrComputeExceeded = errors.New("Compute exceeded")
Functions ¶
This section is empty.
Types ¶
type ComputeMeter ¶
type ComputeMeter struct {
// contains filtered or unexported fields
}
func NewComputeMeter ¶
func NewComputeMeter(budget uint64) ComputeMeter
func NewComputeMeterDefault ¶
func NewComputeMeterDefault() ComputeMeter
func (*ComputeMeter) Consume ¶
func (cm *ComputeMeter) Consume(cost uint64) error
func (*ComputeMeter) Disable ¶
func (cm *ComputeMeter) Disable()
func (*ComputeMeter) Enable ¶
func (cm *ComputeMeter) Enable()
func (*ComputeMeter) Remaining ¶
func (cm *ComputeMeter) Remaining() uint64
func (*ComputeMeter) Used ¶
func (cm *ComputeMeter) Used() uint64
Click to show internal directories.
Click to hide internal directories.