MCPcopy Create free account

hub / github.com/NethermindEth/cairo-vm-go / functions

Functions1,195 in github.com/NethermindEth/cairo-vm-go

↓ 9 callersFunctionnewSplitOutputMidLowHighHint
SplitOutputMidLowHigh hint assigns to `ids.output1_low` the remainder of the division of `ids.output1` variable by 256 ** 7 and uses its quotient as a
pkg/hintrunner/zero/zerohint_keccak.go:777
↓ 9 callersFunctionnoErrorAndEqualSegmentRead
compares the memory value match an expected value at the given segment and offset
pkg/vm/memory/memory_test.go:266
↓ 9 callersFunctionparseCode
(code string)
pkg/assembler/grammar_test.go:323
↓ 8 callersMethodGetZeroDictionaryManager
()
pkg/hintrunner/hinter/scope.go:115
↓ 8 callersFunctionNewZeroDictionaryManager
()
pkg/hintrunner/hinter/zero_dict.go:52
↓ 8 callersFunctionStarknetProgramFromJSON
(content json.RawMessage)
pkg/parsers/starknet/starknet.go:102
↓ 8 callersMethodgetOp1Addr
(instruction *asmb.Instruction, op0Addr *mem.MemoryAddress)
pkg/vm/vm.go:270
↓ 8 callersFunctionnewAssertNotEqualHint
AssertNotEqual hint asserts that two given values are not equal `newAssertNotEqualHint` takes 2 operanders as arguments - `a` and `b` are the values
pkg/hintrunner/zero/zerohint_math.go:203
↓ 8 callersFunctionnewSignedDivRemHint
SignedDivRem hint computes a signed division and modulus operation on a given value, ensuring the quotient is within a specified range `newSignedDivR
pkg/hintrunner/zero/zerohint_math.go:865
↓ 8 callersFunctionnewUnsignedDivRemHint
UnsignedDivRem hint computes an unsigned division and modulus operation on a given dividend and divisor `newUnsignedDivRemHinter` takes 4 operanders
pkg/hintrunner/zero/zerohint_math.go:1050
↓ 8 callersMethodupdatePc
( instruction *asmb.Instruction, dstAddr *mem.MemoryAddress, op1Addr *mem.MemoryAddress, res *mem.MemoryVa
pkg/vm/vm.go:433
↓ 7 callersFunctionFeltLe
FeltLe implements `a <= b` felt comparison.
pkg/utils/math.go:66
↓ 7 callersFunctionFeltLt
FeltLt implements `a < b` felt comparison.
pkg/utils/math.go:61
↓ 7 callersMethodIsFelt
()
pkg/vm/memory/memory_value.go:233
↓ 7 callersMethodNewDefaultDictionary
It creates a new segment which will hold dictionary values. It links this segment with the current dictionary and returns the address that points to t
pkg/hintrunner/hinter/zero_dict.go:76
↓ 7 callersMethodPeekFromAddress
Given an address returns the memory value at that position, without modifying it in any way. Errors if peeking from an unallocated segment
pkg/vm/memory/memory.go:391
↓ 7 callersFunctioncreateSegment
utility to create segments easier
pkg/runner/runner_test.go:453
↓ 7 callersFunctiondefaultSegment
creates a default segment with any given data. nil value represents unknown values
pkg/vm/memory/memory_test.go:273
↓ 7 callersFunctiongetBuiltinAllocatedSize
(segmentUsedSize uint64, vmCurrentStep uint64, ratio uint64, inputCellsPerInstance uint64, instancesPerCompone
pkg/vm/builtins/builtin_runner.go:119
↓ 7 callersFunctionnewFindElementHint
FindElement hint finds element in the array by given key. It either returns element at index provided by __find_element_index or searches for the key
pkg/hintrunner/zero/zerohint_others.go:235
↓ 7 callersFunctionnewIsNNOutOfRangeHint
IsNNOutOfRange hint checks if the negation of a value minus one is non-negative within a specific range `newIsNNOutOfRangeHint` takes 1 operander as
pkg/hintrunner/zero/zerohint_math.go:459
↓ 7 callersFunctionnewIsPositiveHint
IsPositive hint checks if a value is positive within a specific range and prime context `newIsPositiveHint` takes 2 operanders as arguments - `value`
pkg/hintrunner/zero/zerohint_math.go:508
↓ 7 callersFunctionnewRecoverYHint
RecoverY hint Recovers the y coordinate of a point on the elliptic curve y^2 = x^3 + alpha * x + beta (mod field_prime) of a given x coordinate. `new
pkg/hintrunner/zero/zerohint_ec.go:1662
↓ 7 callersFunctionnewUint256UnsignedDivRemHint
Uint256UnsignedDivRem hint computes the division and modulus operations on `uint256` variables, combining the `high` and `low` parts of the dividend a
pkg/hintrunner/zero/zerohint_uint256.go:294
↓ 7 callersFunctionparseSingleInstruction
(casmCode string)
pkg/assembler/assembler_test.go:640
↓ 7 callersFunctionparseSingleInstructionToInstrList
(casmCode string)
pkg/assembler/assembler_test.go:652
↓ 6 callersFunctionCasmToBytecode
Given a CASM program it returns its encoded bytecode and a total size of processed instructions
pkg/assembler/assembler.go:22
↓ 6 callersMethodCheckWrite
(segment *memory.Segment, offset uint64, value *memory.MemoryValue)
pkg/vm/builtins/range_check.go:32
↓ 6 callersFunctionIV
()
pkg/utils/blake.go:6
↓ 6 callersMethodIncreaseSegmentSize
Increase a segment allocated space. Panics if the new size is smaller
pkg/vm/memory/memory.go:146
↓ 6 callersFunctionInitializeScopeManager
(ctx *HintRunnerContext, scope map[string]any)
pkg/hintrunner/hinter/scope.go:16
↓ 6 callersMethodLastKey
It returns the smallest key in the key list
pkg/hintrunner/hinter/dict.go:148
↓ 6 callersFunctionNewRunner
Creates a new Runner of a Cairo Zero program
pkg/runner/runner.go:47
↓ 6 callersFunctionSetContextWithScope
(scope map[string]any)
pkg/hintrunner/hinter/hinter.go:35
↓ 6 callersMethodString
()
pkg/vm/builtins/modulo.go:119
↓ 6 callersMethodWriteToNthStructField
(addr MemoryAddress, value MemoryValue, field int16)
pkg/vm/memory/memory.go:456
↓ 6 callersFunctiondecodeProof
(traceLocation string, memoryLocation string)
integration_tests/integration_tests_utils.go:186
↓ 6 callersMethodgetDstAddr
(instruction *asmb.Instruction)
pkg/vm/vm.go:239
↓ 6 callersFunctionmemoryRepr
(memory []*fp.Element)
integration_tests/integration_tests_utils.go:230
↓ 6 callersFunctionnewAssert250bitsHint
Assert250bits hint asserts that a value is within the range of 250 bits `newAssert250bitsHint` takes 3 operanders as arguments - `value` is the value
pkg/hintrunner/zero/zerohint_math.go:264
↓ 6 callersFunctionnewBigIntToUint256Hint
BigIntToUint256 hint guesses the low part of the `x` uint256 variable `newBigIntToUint256Hint` takes 2 operanders as arguments - `low` is the variabl
pkg/hintrunner/zero/zerohint_ec.go:96
↓ 6 callersFunctionnewEcDoubleAssignNewXHint
EcDoubleAssignNewX hint computes a new x-coordinate for a point being doubled on an elliptic curve `newEcDoubleAssignNewXHint` takes 2 operanders as
pkg/hintrunner/zero/zerohint_ec.go:929
↓ 6 callersFunctionnewFastEcAddAssignNewXHint
FastEcAddAssignNewX hint computes a new x-coordinate for fast elliptic curve addition `newFastEcAddAssignNewXHint` takes 3 operanders as arguments -
pkg/hintrunner/zero/zerohint_ec.go:426
↓ 6 callersFunctionnewIsQuadResidueHint
(x, y hinter.Reference)
pkg/hintrunner/zero/zerohint_math.go:1130
↓ 6 callersFunctionnewReduceHint
Reduce hint reduces a packed value modulo the SECP256K1 prime `newReduceHint` takes 1 operander as argument - `x` is the packed value to be reduced
pkg/hintrunner/zero/zerohint_ec.go:819
↓ 6 callersFunctionnewSetAddHint
(elmSize, elmPtr, setPtr, setEndPtr, index, isElmInSet hinter.Reference)
pkg/hintrunner/zero/zerohint_others.go:416
↓ 6 callersFunctionnewSplitInput12Hint
SplitInput12 hint assigns to `ids.high12` and `ids.low12` variables the quotient and remainder of the division of the value at memory address `ids.inp
pkg/hintrunner/zero/zerohint_keccak.go:601
↓ 6 callersFunctionnewSplitInput15Hint
SplitInput15 hint assigns to `ids.high15` and `ids.low15` variables the quotient and remainder of the division of the value at memory address `ids.inp
pkg/hintrunner/zero/zerohint_keccak.go:688
↓ 6 callersFunctionnewSplitInput3Hint
SplitInput3 hint assigns to `ids.high3` and `ids.low3` variables the quotient and remainder of the division of the value at memory address `ids.inputs
pkg/hintrunner/zero/zerohint_keccak.go:1028
↓ 6 callersFunctionnewSplitInput6Hint
SplitInput6 hint assigns to `ids.high6` and `ids.low6` variables the quotient and remainder of the division of the value at memory address `ids.inputs
pkg/hintrunner/zero/zerohint_keccak.go:1114
↓ 6 callersFunctionnewSplitInput9Hint
SplitInput9 hint assigns to `ids.high9` and `ids.low9` variables the quotient and remainder of the division of the value at memory address `ids.inputs
pkg/hintrunner/zero/zerohint_keccak.go:1201
↓ 6 callersFunctionnewSplitNBytesHint
SplitNBytes hint assigns to `ids.n_words_to_copy` and `ids.n_bytes_left` variables the quotient and remainder of the division of `ids.n_bytes` variabl
pkg/hintrunner/zero/zerohint_keccak.go:951
↓ 6 callersFunctionnewSquashDictHint
SquashDict hint as part of the larger dict_squash cairo function does data validation and writes to scope a set of variables which indicate the larges
pkg/hintrunner/zero/zerohint_dictionaries.go:448
↓ 6 callersFunctionnewUnsafeKeccakFinalizeHint
UnsafeKeccakFinalize computes keccak hash of the data in memory without validity enforcement and writes the result in the `low` and `high` memory cell
pkg/hintrunner/zero/zerohint_keccak.go:224
↓ 6 callersFunctionnewUsortBodyHint
UsortBody hint sorts the input array of field elements. The sorting results in generation of output array without duplicates and multiplicities array,
pkg/hintrunner/zero/zerohint_usort.go:49
↓ 6 callersFunctiontraceRepr
(trace []vm.Trace)
integration_tests/integration_tests_utils.go:222
↓ 6 callersMethodupdateAp
(instruction *asmb.Instruction, res *mem.MemoryValue)
pkg/vm/vm.go:499
↓ 5 callersMethodApplyApTracking
(hint, ref zero.ApTracking)
pkg/hintrunner/hinter/operand.go:19
↓ 5 callersMethodAt
Gets the memory value at certain key
pkg/hintrunner/hinter/dict.go:21
↓ 5 callersFunctionBlake2sCompress
(message []uint32, h [8]uint32, t0 uint32, t1 uint32, f0 uint32, f1 uint32)
pkg/utils/blake.go:113
↓ 5 callersFunctionEmptySegment
()
pkg/vm/memory/memory.go:61
↓ 5 callersFunctionFeltIsPositive
(felt *fp.Element)
pkg/utils/math.go:71
↓ 5 callersFunctionIgcdex
(a, b *big.Int)
pkg/utils/math.go:156
↓ 5 callersFunctionPop
(a *[]T)
pkg/utils/arrays.go:13
↓ 5 callersMethodReadAsElement
Works the same as `Read` but `MemoryValue` is converted to `Element` first
pkg/vm/memory/memory.go:337
↓ 5 callersMethodRealLen
returns the real length that a segment has
pkg/vm/memory/memory.go:93
↓ 5 callersMethodSize
()
pkg/disasm/casm.go:30
↓ 5 callersFunctiondefaultVirtualMachineWithBytecode
(bytecode []*f.Element)
pkg/vm/utils.go:23
↓ 5 callersMethodformatMemoryOperand
(reg assembler.Register, offset int)
pkg/disasm/casm_formatter.go:101
↓ 5 callersMethodgetOp0Addr
(instruction *asmb.Instruction)
pkg/vm/vm.go:254
↓ 5 callersFunctionnewAssertLtFeltHint
AssertLtFelt hint asserts that one value is strictly less than another within a finite field `newAssertLtFeltHint` takes 2 operanders as arguments -
pkg/hintrunner/zero/zerohint_math.go:78
↓ 5 callersFunctionnewDivModNPackedDivmodV1Hint
DivModNPackedDivmodV1 hint caculates the division modulo N for packed values `newDivModNPackedDivmodV1Hint` takes 2 operanders as arguments - `a` is
pkg/hintrunner/zero/zerohint_signature.go:397
↓ 5 callersFunctionnewEcDoubleSlopeV1Hint
EcDoubleSlopeV1 hint computes the slope for doubling a point on an elliptic curve `newEcDoubleSlopeV1Hint` takes 1 operander as argument - `point` is
pkg/hintrunner/zero/zerohint_ec.go:661
↓ 5 callersFunctionnewGetFeltBitLengthHint
GetFeltBitLength hint assigns to `bit_length` the bit length of `x` variable `newGetFeltBitLengthHint` takes 2 operanders as arguments - `x` is a fel
pkg/hintrunner/zero/zerohint_others.go:185
↓ 5 callersFunctionnewIsZeroDivModHint
IsZeroDivMod hint computes the division modulo SECP_P prime for a given packed value `newIsZeroDivModHint` doesn't take any operander as argument `n
pkg/hintrunner/zero/zerohint_ec.go:1623
↓ 5 callersFunctionnewIsZeroPackHint
IsZeroPack hint computes packed value modulo SECP_P prime `newIsZeroPackHint` takes 1 operander as argument - `x` is the value that will be packed an
pkg/hintrunner/zero/zerohint_ec.go:1569
↓ 5 callersFunctionnewSplitIntHint
SplitIntHint hint splits an integer in limbs based on a base and asserts that each limb is within a certain range `newSplitIntHint` takes 4 operander
pkg/hintrunner/zero/zerohint_math.go:599
↓ 5 callersFunctionnewSplitOutput0Hint
SplitOutput0 hint splits `output0` into `output0_low` (16 bytes) and `output0_high` (9 bytes) `newSplitOutput0Hint` takes 3 operanders as arguments -
pkg/hintrunner/zero/zerohint_keccak.go:874
↓ 5 callersFunctionnewSqrtHint
Sqrt hint computes the square root of a given value, ensuring it falls within a specific range `newSqrtHint` takes 2 operanders as arguments - `root`
pkg/hintrunner/zero/zerohint_math.go:988
↓ 5 callersFunctionnewSquashDictInnerUsedAccessesAssertHint
SquashDictInnerUsedAccessesAssert hint checks that `n_used_accesses` Cairo local variable is equal to the number of used accesses for a key during dic
pkg/hintrunner/zero/zerohint_dictionaries.go:971
↓ 5 callersFunctionnewUint128AddHint
Uint128Add hint computes the result of the sum of parts of two `uint128` variables(`a` & `b`) and checks for overflow `newUint128AddHint` takes 3 ope
pkg/hintrunner/zero/zerohint_uint256.go:801
↓ 5 callersFunctionnewUint128SqrtHint
Uint128Sqrt hint computes the result of the sum of parts of two `uint128` variables(`a` & `b`) and checks for overflow `newUint128AddHint` takes 3 op
pkg/hintrunner/zero/zerohint_uint256.go:863
↓ 5 callersFunctionnewUint256AddHint
Uint256Add hint computes the sum of the `low` and `high` parts of two `uint256` variables and checks for overflow `newUint256AddHint` takes 4 operand
pkg/hintrunner/zero/zerohint_uint256.go:23
↓ 5 callersFunctionnewUint256SqrtHint
Uint256Sqrt hint computes the square root of a given value, ensuring it falls within a specific range, i.e., `0 <= result < 2 ** 128` `newUint256Sqrt
pkg/hintrunner/zero/zerohint_uint256.go:188
↓ 5 callersFunctionnewUnsafeKeccakHint
UnsafeKeccak computes keccak hash of the data in memory without validity enforcement and writes the result in the `low` and `high` memory cells `newU
pkg/hintrunner/zero/zerohint_keccak.go:88
↓ 5 callersFunctionnewUsortVerifyMultiplicityBodyHint
UsortVerifyMultiplicityBody hint extracts a specific value of the sorted output with `pop`, updating indices for the verification of the next value `
pkg/hintrunner/zero/zerohint_usort.go:283
↓ 5 callersMethodwriteNWordsValue
Given a value, writes its n_words to memory, starting at address = addr.
pkg/vm/builtins/modulo.go:302
↓ 4 callersMethodAddOffset
It crates a new memory address with the modified offset
pkg/vm/memory/memory_value.go:38
↓ 4 callersMethodAsDeref
()
pkg/assembler/grammar.go:115
↓ 4 callersMethodAsDoubleDeref
()
pkg/assembler/grammar.go:116
↓ 4 callersMethodAsMathOperation
()
pkg/assembler/grammar.go:117
↓ 4 callersFunctionComputeMessageSchedule
(input []uint32)
pkg/utils/sha256.go:5
↓ 4 callersMethodExecute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:72
↓ 4 callersMethodExecute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:211
↓ 4 callersMethodExecute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:713
↓ 4 callersMethodExecute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:927
↓ 4 callersMethodGetDictionary
Given a memory address, it looks for the right dictionary using the segment index. If no segment is associated with the given segment index, it errors
pkg/hintrunner/hinter/zero_dict.go:90
↓ 4 callersFunctionInitializeEmptyMemory
todo(rodro): can the amount of segments be known before hand?
pkg/vm/memory/memory.go:221
↓ 4 callersFunctionPack
(numBitsShift int, limbs ...*fp.Element)
pkg/hintrunner/zero/zerohint_utils.go:108
↓ 4 callersMethodReadAsAddress
Works the same as `Read` but `MemoryValue` is converted to `MemoryAddress` first
pkg/vm/memory/memory.go:355
← previousnext →101–200 of 1,195, ranked by callers