MCPcopy Create free account

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

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

↓ 4 callersMethodRunUntilPc
run until the program counter equals the `pc` parameter
pkg/runner/runner.go:399
↓ 4 callersFunctionSafeDiv
(x, y *big.Int)
pkg/utils/math.go:208
↓ 4 callersFunctionSha256Compress
(state [8]uint32, w []uint32)
pkg/utils/sha256.go:32
↓ 4 callersMethodSignedOffset
()
pkg/assembler/grammar.go:170
↓ 4 callersFunctioncreateProgram
(code string)
pkg/runner/runner_test.go:491
↓ 4 callersFunctionfeltAdd
(x, y *fp.Element)
pkg/hintrunner/zero/zerohint_utils_test.go:64
↓ 4 callersFunctionfeltToInt64
(felt *fp.Element)
pkg/disasm/utils.go:9
↓ 4 callersMethodformatOperand1
(inst casmInstruction)
pkg/disasm/casm_formatter.go:83
↓ 4 callersMethodinitializeEntrypoint
( initialPCOffset uint64, arguments []*fp.Element, returnFp *mem.MemoryValue, memory *mem.Memory, stack []mem
pkg/runner/runner.go:309
↓ 4 callersFunctionnewAssertNNHint
AssertNN hint asserts that a given value is non-negative within the range `0 <= value % PRIME < range-check builtin bound` `newAssertNNHint` takes 1
pkg/hintrunner/zero/zerohint_math.go:166
↓ 4 callersFunctionnewCompareKeccakFullRateInBytesHint
CompareKeccakFullRateInBytes hint compares a value to KECCAK_FULL_RATE_IN_BYTES constant, i.e., 136 `newCompareKeccakFullRateInBytesHint` takes 1 ope
pkg/hintrunner/zero/zerohint_keccak.go:435
↓ 4 callersFunctionnewDictSquashCopyDictHint
DictSquashCopyDict hint prepares arguments for creating a new dictionary with `dict_new` by copying the existing one in the context of squashing `new
pkg/hintrunner/zero/zerohint_dictionaries.go:199
↓ 4 callersFunctionnewDivModSafeDivHint
DivModSafeDiv hint computes a safe division in the context of the N constant `newDivModSafeDivHint` doesn't take any operander as argument `newDivMo
pkg/hintrunner/zero/zerohint_signature.go:349
↓ 4 callersFunctionnewEcDoubleAssignNewYV1Hint
EcDoubleAssignNewYV1 hint computes a new y-coordinate when doubling a point on an elliptic curve This hint is ultimately used for either multiplying a
pkg/hintrunner/zero/zerohint_ec.go:1082
↓ 4 callersFunctionnewFastEcAddAssignNewYHint
FastEcAddAssignNewY hint computes a new y-coordinate for fast elliptic curve addition of two different points This hint is ultimately used for either
pkg/hintrunner/zero/zerohint_ec.go:613
↓ 4 callersFunctionnewGetPointFromXHint
GetPointFromX hint calculates the y-coordinate of a point on an elliptic curve for a given x-coordinate `newGetPointFromXHint` takes 2 operanders as
pkg/hintrunner/zero/zerohint_signature.go:240
↓ 4 callersFunctionnewIs250BitsHint
is250Bits hint checks whether an address is lower than 2**250 or not and it assigns 1 or 0 to `is_250` variable, respectively `newIs250Bits` takes 2
pkg/hintrunner/zero/zerohint_math.go:1257
↓ 4 callersFunctionnewIsLeFeltHint
IsLeFelt hint determines if one value is less than or equal to another within a finite field `newIsLeFeltHint` takes 2 operanders as arguments - `a`
pkg/hintrunner/zero/zerohint_math.go:26
↓ 4 callersFunctionnewIsNNHint
IsNN hint checks if a value is non-negative within the range `0 <= value % PRIME < range-check builtin bound` `newIsNNHint` takes 1 operander as arg
pkg/hintrunner/zero/zerohint_math.go:415
↓ 4 callersFunctionnewSha256AndBlake2sInputHint
Sha256AndBlake2sInput hint writes 1 or 0 at `full_word` address, whether `n_bytes“ is greater than or equal to 4 or not `newSha256AndBlake2sInputHint
pkg/hintrunner/zero/zerohint_others.go:790
↓ 4 callersFunctionnewSignedPowHint
SignedPow hint asserts that the value of base is not zero `newSignedPowHint` takes 1 operander as argument - `base` is the value that will be checked
pkg/hintrunner/zero/zerohint_math.go:739
↓ 4 callersFunctionnewSplit128Hint
Split128 hint splits a field element value into two 128-bit values, low and high `newSplit128Hint` takes 3 operanders as arguments - `low` and `high`
pkg/hintrunner/zero/zerohint_math.go:1198
↓ 4 callersFunctionnewSplit64Hint
Split64 hint splits a field element in the range [0, 2^192) to its low 64-bit and high 128-bit parts `newSplit64Hint` takes 3 operanders as arguments
pkg/hintrunner/zero/zerohint_uint256.go:119
↓ 4 callersFunctionnewSquashDictInnerCheckAccessIndexHint
SquashDictInnerCheckAccessIndex hint updates the access index during the dictionary squashing process `newSquashDictInnerCheckAccessIndexHint` takes
pkg/hintrunner/zero/zerohint_dictionaries.go:647
↓ 4 callersFunctionnewSquashDictInnerFirstIterationHint
SquashDictInnerFirstIteration hint sets up the first iteration of a loop for dictionary squashing, extracting `current_access_index` from the `current
pkg/hintrunner/zero/zerohint_dictionaries.go:771
↓ 4 callersFunctionnewSquashDictInnerNextKeyHint
SquashDictInnerNextKey hint retrieves the next key for processing during dictionary squashing after checking that the array of keys is not empty `new
pkg/hintrunner/zero/zerohint_dictionaries.go:914
↓ 4 callersFunctionnewUint256MulDivModHint
Uint256MulDivMod hint multiplies two `uint256` variables, divides the result by another `uint256` variable, and computes the quotient and the remainde
pkg/hintrunner/zero/zerohint_uint256.go:499
↓ 4 callersFunctionnewUint256SubHint
Uint256Sub hint computes the difference of two `uint256` variables in the field of integers modulo 2**256. Then it splits the result into `low` and `h
pkg/hintrunner/zero/zerohint_uint256.go:623
↓ 4 callersFunctionnewVerifyZeroHint
VerifyZero hint verifies that a packed value is zero modulo the secp256k1 prime and stores in memory the quotient of the modular division of the packe
pkg/hintrunner/zero/zerohint_signature.go:26
↓ 4 callersFunctionparseImmediateInstruction
(casmCode string)
pkg/assembler/assembler_test.go:627
↓ 4 callersMethodpc
()
pkg/runner/runner.go:578
↓ 4 callersFunctionrequireEqualSegments
compare two segments ignoring builtins
pkg/runner/runner_test.go:474
↓ 4 callersFunctionrunAndTestFile
(t *testing.T, path string, name string, benchmarkMap map[string][]int, benchmark bool, errorExpected bool, in
integration_tests/cairo1_test.go:18
↓ 4 callersFunctiontrimmedSegment
modifies a segment in place to reduce its real length to its effective lenth. It returns the same segment
pkg/runner/runner_test.go:486
↓ 4 callersFunctionzeroDictInScopeEquals
(dictAddress memory.MemoryAddress, expectedData map[memory.MemoryValue]memory.MemoryValue, expectedDefaultValu
pkg/hintrunner/zero/zerohint_utils_test.go:283
↓ 3 callersMethodAddSignature
* Hint that will call this function looks like this: "hints": { "6": [ { "accessible_scopes": [ "starkwa
pkg/vm/builtins/ecdsa.go:122
↓ 3 callersMethodAsImmediate
()
pkg/assembler/grammar.go:118
↓ 3 callersFunctionCairoKeccak
(input []uint64, lastInputWord uint64, lastInputNumBytes int)
pkg/utils/keccak.go:47
↓ 3 callersFunctionDivmod
(n, m, p *big.Int)
pkg/hintrunner/utils/math_utils.go:56
↓ 3 callersFunctionEmptyMemoryValueAsFelt
()
pkg/vm/memory/memory_value.go:186
↓ 3 callersFunctionEvaluateRegister
(register string, offset int16)
pkg/hintrunner/zero/hintparser.go:299
↓ 3 callersMethodExecute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:44
↓ 3 callersMethodExecute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:111
↓ 3 callersMethodExecute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:253
↓ 3 callersMethodExecute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:336
↓ 3 callersMethodExecute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:410
↓ 3 callersMethodExecute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:485
↓ 3 callersMethodExecute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:882
↓ 3 callersMethodExecute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:1469
↓ 3 callersMethodExitScope
()
pkg/hintrunner/hinter/scope.go:39
↓ 3 callersFunctionFeltDivRem
(a, b *fp.Element)
pkg/utils/math.go:94
↓ 3 callersMethodFinalize
(newSize uint64, publicMemoryOffsets []PublicMemoryOffset)
pkg/vm/memory/memory.go:166
↓ 3 callersFunctionGetBaseBig
()
pkg/hintrunner/utils/secp_utils.go:11
↓ 3 callersMethodGetCellsPerInstance
()
pkg/vm/memory/memory.go:15
↓ 3 callersMethodIncrementFreeOffset
Given a memory address and a incrementBy, it increments the freeOffset field of dictionary by it.
pkg/hintrunner/hinter/zero_dict.go:126
↓ 3 callersFunctionInt16FromBigInt
(n *big.Int)
pkg/utils/math.go:121
↓ 3 callersMethodIsFp
()
pkg/assembler/grammar.go:166
↓ 3 callersMethodJumpTarget
()
pkg/disasm/casm.go:15
↓ 3 callersFunctionKeccakAddU256LE
Little Endian way for Keccak256 KeccakAddU256LE appends the low and high 64-bit words of a U256 value to a keccak input.
pkg/utils/keccak.go:122
↓ 3 callersFunctionKeccakF1600
KeccakF1600 applies the Keccak permutation to a 1600b-wide state represented as a slice of 25 uint64s.
pkg/vm/builtins/keccak_math.go:37
↓ 3 callersMethodLastIndex
It returns smallest index associated with the smallest key
pkg/hintrunner/hinter/dict.go:177
↓ 3 callersFunctionLoadCairoZeroProgram
(cairoZeroJson *zero.ZeroProgram)
pkg/runner/program.go:27
↓ 3 callersFunctionMemoryValueFromAny
(anyType any)
pkg/vm/memory/memory_value.go:171
↓ 3 callersFunctionNewScopeManager
(globals map[string]any)
pkg/hintrunner/hinter/scope.go:22
↓ 3 callersFunctionNextPowerOfTwo
Given a number returns its closest power of two bigger than the number
pkg/utils/math.go:50
↓ 3 callersMethodReadFromAddressAsAddress
Works the same as `ReadFromAddress` but `MemoryValue` is converted to `MemoryAddress` first
pkg/vm/memory/memory.go:368
↓ 3 callersMethodRelocateMemory
It returns all segments in memory but relocated as a single segment Each element is a pointer to a field element, if the cell was not accessed, nil is
pkg/vm/vm.go:560
↓ 3 callersMethodRelocationOffsets
It returns all segment offsets and max memory used
pkg/vm/memory/memory.go:420
↓ 3 callersMethodResolveAsEcPoint
(valAddr MemoryAddress)
pkg/vm/memory/memory_value.go:430
↓ 3 callersFunctionStringToUint256
This function converts a string to a uint256.Int by taking the byte representation
pkg/utils/keccak_test.go:229
↓ 3 callersFunctionU128Split
U128Split splits a uint128 (represented as a uint256.Int) into two uint64s.
pkg/utils/keccak.go:18
↓ 3 callersFunctioncreateUint256IntFromBytes
Converts a byte slice into a uint256.Int
pkg/utils/keccak_test.go:242
↓ 3 callersFunctioncreateVerifyZeroHinter
(resolver hintReferenceResolver)
pkg/hintrunner/zero/zerohint_signature.go:79
↓ 3 callersFunctionecadd
performs elliptic curve addition over two points. Assumes `x` ordinates are always different
pkg/vm/builtins/ecop.go:189
↓ 3 callersMethodfillValue
Fills a value in the values table, if exactly one value is missing. Returns 1 on success or if all values are already known. Returns 0 if there is an
pkg/vm/builtins/modulo.go:327
↓ 3 callersFunctionfindBiasedOffset
(value int16)
pkg/assembler/instruction.go:436
↓ 3 callersMethodgetCurrentScope
()
pkg/hintrunner/hinter/scope.go:107
↓ 3 callersMethodinferOperand
when there is an assertion with a substraction or division like : x = y - z the compiler treats it as y = x + z. This means that the VM knows the dstC
pkg/vm/vm.go:305
↓ 3 callersMethodinitializeMainEntrypoint
()
pkg/runner/runner.go:228
↓ 3 callersFunctionnewAssertNotZeroHint
AssertNotZero hint asserts that a value is not zero `newAssertNotZeroHint` takes 1 operander as argument - `value` is the value that will be compared
pkg/hintrunner/zero/zerohint_math.go:127
↓ 3 callersFunctionnewBigIntPackDivModHint
BigIntPackDivMod hint divides two values modulo a prime number `newBigIntPackDivModHint` takes 3 operanders as arguments - `P` is the prime modulus -
pkg/hintrunner/zero/zerohint_ec.go:2294
↓ 3 callersFunctionnewBigIntSafeDivHint
BigIntSafeDiv hint safely divides two numbers and assigns the result based on a condition `newBigIntSafeDivHint` does not take any arguments `newBig
pkg/hintrunner/zero/zerohint_ec.go:2420
↓ 3 callersFunctionnewBlockPermutationHint
BlockPermutation hint executes the Keccak block permutation function to a segment of memory `newBlockPermutationHint` takes 1 operander as argument -
pkg/hintrunner/zero/zerohint_keccak.go:479
↓ 3 callersFunctionnewCairoKeccakFinalizeHint
CairoKeccakFinalize writes the result of F1600 Keccak permutation padded by __keccak_state_size_felts__ zeros to consecutive memory cells, __block_siz
pkg/hintrunner/zero/zerohint_keccak.go:25
↓ 3 callersFunctionnewCompareBytesInWordHint
CompareBytesInWord hint compares a value to BYTES_IN_WORD constant, i.e., 8 `newCompareBytesInWordHint` takes 1 operander as argument - `nBytes` is t
pkg/hintrunner/zero/zerohint_keccak.go:556
↓ 3 callersFunctionnewComputeSlopeV1Hint
ComputeSlopeV1 hint computes the slope between two points on the Secp256k1 elliptic curve `newComputeSlopeV1Hint` takes 2 operanders as arguments - `
pkg/hintrunner/zero/zerohint_ec.go:1131
↓ 3 callersFunctionnewDictUpdateHint
DictUpdate hint updates the value of given key in a dictionary and asserts the previous value of the key in the dictionary before the update `newDict
pkg/hintrunner/zero/zerohint_dictionaries.go:352
↓ 3 callersFunctionnewEcMulInnerHint
(scalar hinter.Reference)
pkg/hintrunner/zero/zerohint_ec.go:1493
↓ 3 callersFunctionnewGetHighLenHint
GetHighLen hint calculates the highest bit length between `scalar_u.d2` and `scalar_v.d2`, subtracts 1 from the result, and assigns it to `ids.len_hi`
pkg/hintrunner/zero/zerohint_ec.go:23
↓ 3 callersFunctionnewIsZeroNondetHint
IsZeroNondet hint computes whether a value is zero or not `newIsZeroNondetHint` doesn't take any operander as argument `newIsZeroNondetHint` writes
pkg/hintrunner/zero/zerohint_ec.go:1532
↓ 3 callersFunctionnewMemContinueHint
(continueTarget hinter.Reference, memset bool)
pkg/hintrunner/zero/zerohint_others.go:17
↓ 3 callersFunctionnewNondetElementsOverXHint
NondetElementsOverX hint compares the offset difference between two memory address and writes 1 or 0 at `ap` memory address, depending on whether the
pkg/hintrunner/zero/zerohint_others.go:684
↓ 3 callersFunctionnewNormalizeAddressHint
NormalizeAddress hint checks if given addr value is less than ADDR_BOUND or not and writes the result as 1 or 0 to is_small `newNormalizeAddressHint`
pkg/hintrunner/zero/zerohint_others.go:733
↓ 3 callersFunctionnewPowHint
Pow hint calculates the least significant bit of the exponent of a number within a prime field `newPowHint` takes 2 operanders as arguments - `locs`
pkg/hintrunner/zero/zerohint_math.go:671
↓ 3 callersFunctionnewRandomEcPointHint
RandomEcPoint hint returns a random non-zero point on the STARK curve y^2 = x^3 + alpha * x + beta (mod field_prime). The point is created determinist
pkg/hintrunner/zero/zerohint_ec.go:1740
↓ 3 callersFunctionnewSplitFeltHint
SplitFelt hint splits a finite field element into high and low components `newSplitFeltHint` takes 3 operanders as arguments - `low` and `high` are t
pkg/hintrunner/zero/zerohint_math.go:774
↓ 3 callersFunctionnewSplitIntAssertRangeHint
SplitIntAssertRange hint asserts that the value to split in `SplitInt` function is zero once there are no more limbs to create `newSplitIntAssertRang
pkg/hintrunner/zero/zerohint_math.go:559
↓ 3 callersFunctionnewSquashDictInnerAssertLenKeysHint
SquashDictInnerAssertLenKeys hint asserts that the length of the `keys` descending list is zero during the squashing process `newSquashDictInnerAsser
pkg/hintrunner/zero/zerohint_dictionaries.go:605
↓ 3 callersFunctionnewSquashDictInnerContinueLoopHint
SquashDictInnerContinueLoop hint determines if the loop should continue based on remaining access indices `newSquashDictInnerContinueLoopHint` takes
pkg/hintrunner/zero/zerohint_dictionaries.go:724
↓ 3 callersFunctionnewSquashDictInnerLenAssertHint
SquashDictInnerAssertLenKeys hint asserts the length of the current access indices for a given key is zero `current_access_indices` is a reversed orde
pkg/hintrunner/zero/zerohint_dictionaries.go:885
← previousnext →201–300 of 1,195, ranked by callers