Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NethermindEth/cairo-vm-go
/ functions
Functions
1,195 in github.com/NethermindEth/cairo-vm-go
⨍
Functions
1,195
◇
Types & classes
243
↓ 3 callers
Function
newSquashDictInnerSkipLoopHint
SquashDictInnerSkipLoop hint determines if the loop should be skipped based on remaining access indices `newSquashDictInnerSkipLoopHint` takes 1 oper
pkg/hintrunner/zero/zerohint_dictionaries.go:842
↓ 3 callers
Function
newUint256SignedNNHint
Uint256SignedNN hint checks if a `uint256` variable is non-negative when considered as a signed number `newUint256SignedNNHint` takes 1 operander as
pkg/hintrunner/zero/zerohint_uint256.go:251
↓ 3 callers
Function
newUsortVerifyMultiplicityAssertHint
UsortVerifyMultiplicityAssert hint checks that the `positions` variable in scope doesn't contain any value `newUsortVerifyMultiplicityAssertHint` doe
pkg/hintrunner/zero/zerohint_usort.go:347
↓ 3 callers
Method
readNWordsValue
Reads N_WORDS from memory, starting at address = addr. Returns the words and the value if all words are in memory. Verifies that all words are integer
pkg/vm/builtins/modulo.go:130
↓ 3 callers
Function
valueAtAddressEquals
(addr memory.MemoryAddress, expected *fp.Element)
pkg/hintrunner/zero/zerohint_utils_test.go:81
↓ 3 callers
Function
varListInScopeEquals
(expectedValues map[string]any)
pkg/hintrunner/zero/zerohint_utils_test.go:275
↓ 2 callers
Function
AddPadding
(input []uint64, lastInputWord uint64, lastInputNumBytes int)
pkg/utils/keccak.go:57
↓ 2 callers
Method
AddressFp
()
pkg/vm/vm.go:48
↓ 2 callers
Method
AllocateSegment
Allocates a new segment providing its initial data and returns its index
pkg/vm/memory/memory.go:232
↓ 2 callers
Function
AsInt
(valueFelt *fp.Element)
pkg/hintrunner/utils/math_utils.go:38
↓ 2 callers
Method
At
Given a memory address and a key it returns the value held at that position. The address is used to locate the correct dictionary and the key to index
pkg/hintrunner/hinter/zero_dict.go:103
↓ 2 callers
Function
ComputeYCoordinate
This helper function is used in FastEcAddAssignNewY and EcDoubleAssignNewYV1 hints to compute the y-coordinate of a point on an elliptic curve Comput
pkg/hintrunner/zero/zerohint_utils.go:127
↓ 2 callers
Function
ConvertToUint256
Helper Function for converting various input types to uint256
pkg/utils/keccak_test.go:213
↓ 2 callers
Function
DecodeMemory
DecodeMemory decodes an encoded memory byte array back to a memory array of felts
pkg/vm/vm.go:649
↓ 2 callers
Function
DecodeTrace
(content []byte)
pkg/vm/vm.go:597
↓ 2 callers
Function
DefaultNewScopeManager
()
pkg/hintrunner/hinter/scope.go:31
↓ 2 callers
Method
DeleteVariable
(name string)
pkg/hintrunner/hinter/scope.go:67
↓ 2 callers
Function
EncodeMemory
Encode the relocated memory in the (address, value) form in a consecutive way
pkg/vm/vm.go:617
↓ 2 callers
Function
EncodeTrace
(trace []Trace)
pkg/vm/vm.go:587
↓ 2 callers
Method
EndRun
EndRun is responsible for running the additional steps after the program was executed, until the checkUsedCells doesn't return any error. Since this v
pkg/runner/runner.go:443
↓ 2 callers
Method
Execute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:161
↓ 2 callers
Method
Execute
(vm *VM.VirtualMachine, ctx *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:1667
↓ 2 callers
Method
Execute
(vm *VM.VirtualMachine, ctx *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:1783
↓ 2 callers
Method
Execute
(vm *VM.VirtualMachine, ctx *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:1811
↓ 2 callers
Method
Execute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:1840
↓ 2 callers
Method
Execute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:1900
↓ 2 callers
Method
Execute
(vm *VM.VirtualMachine, ctx *HintRunnerContext)
pkg/hintrunner/hinter/hinter.go:13
↓ 2 callers
Method
FinalizeSegments
FinalizeSegments calculates the final size of the builtins segments, using number of allocated instances and memory cells per builtin instance. Additi
pkg/runner/runner.go:533
↓ 2 callers
Function
FromBytecode
(config Config)
pkg/disasm/disasm.go:22
↓ 2 callers
Method
GetAllocatedSize
(segmentUsedSize uint64, vmCurrentStep uint64)
pkg/vm/memory/memory.go:14
↓ 2 callers
Function
GetCairoHints
(cairoProgramJson *starknet.StarknetProgram)
pkg/hintrunner/core/hint.go:21
↓ 2 callers
Method
GetDictionary
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/dict.go:76
↓ 2 callers
Method
InferValue
(segment *memory.Segment, offset uint64)
pkg/vm/builtins/range_check.go:59
↓ 2 callers
Function
InitializeSquashedDictionaryManager
(ctx *HintRunnerContext)
pkg/hintrunner/hinter/dict.go:126
↓ 2 callers
Function
Int16FromFelt
(n *fp.Element)
pkg/utils/math.go:116
↓ 2 callers
Function
Keccak256
Keccak256 computes the Keccak-256 hash of the input data.
pkg/utils/keccak.go:26
↓ 2 callers
Method
LastIndices
It returns the list of indices associated to the smallest key
pkg/hintrunner/hinter/dict.go:167
↓ 2 callers
Method
NewDictionary
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/dict.go:60
↓ 2 callers
Function
NewHintRunner
(hints map[uint64][]h.Hinter, newHintRunnerContext *h.HintRunnerContext)
pkg/hintrunner/hintrunner.go:17
↓ 2 callers
Function
NewVirtualMachine
NewVirtualMachine creates a VM from the program bytecode using a specified config.
pkg/vm/vm.go:110
↓ 2 callers
Method
Output
Gives the output of the last run. Panics if there hasn't been any runs yet.
pkg/runner/runner.go:588
↓ 2 callers
Function
ParseCairoProgramArgs
(input string)
pkg/parsers/starknet/args.go:16
↓ 2 callers
Function
ParseIdentifier
(value string)
pkg/hintrunner/zero/hintparser.go:375
↓ 2 callers
Function
RandomFeltElementU128
(rand *rand.Rand)
pkg/hintrunner/utils/utils.go:29
↓ 2 callers
Method
Relocate
relocates pc, ap and fp to be their real address value that is, pc + 1, ap + programSegmentOffset, fp + programSegmentOffset
pkg/vm/vm.go:58
↓ 2 callers
Method
RelocateTrace
It returns the trace after relocation, i.e, relocates pc, ap and fp for each step to be their real address value
pkg/vm/vm.go:548
↓ 2 callers
Method
Resolve
(vm *VM.VirtualMachine)
pkg/hintrunner/hinter/operand.go:141
↓ 2 callers
Method
Resolve
(vm *VM.VirtualMachine)
pkg/hintrunner/hinter/operand.go:203
↓ 2 callers
Function
Reverse
(a []T)
pkg/utils/arrays.go:7
↓ 2 callers
Function
ReverseBytes128
Big Endian way codes
pkg/utils/keccak.go:153
↓ 2 callers
Method
RunFor
run until the vm step count reaches the `steps` parameter
pkg/runner/runner.go:417
↓ 2 callers
Method
RunHint
(vm *VM.VirtualMachine)
pkg/hintrunner/hintrunner.go:29
↓ 2 callers
Function
Runner
(name BuiltinType)
pkg/vm/builtins/builtin_runner.go:31
↓ 2 callers
Method
String
()
pkg/hintrunner/zero/zerohint.go:18
↓ 2 callers
Function
WriteBenchMarksToFile
(benchmarkMap map[string][]int)
integration_tests/integration_tests_utils.go:64
↓ 2 callers
Function
astToInstruction
Given a CASM ast it returns a list of instructions
pkg/assembler/assembler.go:37
↓ 2 callers
Function
blakeRound
(state []uint32, message []uint32, sigma [16]uint8)
pkg/utils/blake.go:45
↓ 2 callers
Function
clean
(root string)
integration_tests/integration_tests_utils.go:128
↓ 2 callers
Function
compileCairoCode
given a path to a cairo zero file, it compiles it and return the compilation path
integration_tests/cairo1_test.go:247
↓ 2 callers
Function
createBlake2sAddUint256Hinter
(resolver hintReferenceResolver, bigend bool)
pkg/hintrunner/zero/zerohint_blake.go:102
↓ 2 callers
Function
createBlake2sFinalizeHinter
(resolver hintReferenceResolver)
pkg/hintrunner/zero/zerohint_blake.go:197
↓ 2 callers
Function
createCairoKeccakFinalizeHinter
(resolver hintReferenceResolver)
pkg/hintrunner/zero/zerohint_keccak.go:72
↓ 2 callers
Function
createMemContinueHinter
(resolver hintReferenceResolver, memset bool)
pkg/hintrunner/zero/zerohint_others.go:65
↓ 2 callers
Function
createMemEnterScopeHinter
(resolver hintReferenceResolver, memset bool)
pkg/hintrunner/zero/zerohint_others.go:166
↓ 2 callers
Function
createNondetElementsOverXHinter
(resolver hintReferenceResolver, x uint64)
pkg/hintrunner/zero/zerohint_others.go:714
↓ 2 callers
Function
createReduceHinter
(resolver hintReferenceResolver)
pkg/hintrunner/zero/zerohint_ec.go:855
↓ 2 callers
Function
decodeInstructionValues
break the instruction into 4 segments of 16 bits | off0 | | off1 | | off2 | | flags
pkg/assembler/instruction.go:266
↓ 2 callers
Function
ecdouble
performs elliptic curve doubling over a point. Assumes `y` coordinate is different than 0
pkg/vm/builtins/ecop.go:214
↓ 2 callers
Method
fillInputs
Fills the inputs to the instances of the builtin given the inputs to the first instance.
pkg/vm/builtins/modulo.go:203
↓ 2 callers
Method
fillOffsets
Copies the first offsets into memory, nCopies times.
pkg/vm/builtins/modulo.go:270
↓ 2 callers
Method
filtered
(testFile string)
integration_tests/integration_tests_utils.go:50
↓ 2 callers
Function
getAirPublicInputFile
(airPublicInputPath string)
integration_tests/integration_tests_utils.go:202
↓ 2 callers
Function
getLayoutFromFileName
If any other layouts are needed, add the suffix checks here. The convention would be: ".$layout.cairo" A file without this suffix will use the default
integration_tests/integration_tests_utils.go:163
↓ 2 callers
Method
getPermRangeCheckLimits
getPermRangeCheckLimits returns the minimum and maximum values used by the range check units in the program. To find the values, maximum and minimum v
pkg/runner/runner.go:508
↓ 2 callers
Function
getPlainLayout
()
pkg/vm/builtins/layouts.go:26
↓ 2 callers
Method
init
()
integration_tests/integration_tests_utils.go:35
↓ 2 callers
Method
initializeBuiltins
(memory *mem.Memory)
pkg/runner/runner.go:323
↓ 2 callers
Method
initializeSegments
()
pkg/runner/runner.go:217
↓ 2 callers
Method
initializeVm
( initialPC *mem.MemoryAddress, stack []mem.MemoryValue, memory *mem.Memory, )
pkg/runner/runner.go:373
↓ 2 callers
Function
isGeneratedFile
(path string)
integration_tests/integration_tests_utils.go:150
↓ 2 callers
Method
isProofMode
()
pkg/runner/runner.go:369
↓ 2 callers
Function
newBlake2sCompressHint
Blake2sCompress hint computes the blake2s compress function and fills the value in the right position. `newBlake2sCompressHint` takes 3 operander as
pkg/hintrunner/zero/zerohint_blake.go:440
↓ 2 callers
Function
newBlake2sComputeHint
Blake2sCompute hint computes the blake2s compress function and fills the value in the right position. `newBlake2sComputeHint` takes 1 operander as an
pkg/hintrunner/zero/zerohint_blake.go:298
↓ 2 callers
Function
newBlake2sFinalizeHint
Blake2sFinalize hint finalizes the Blake2s hash computation, ie it verifies that the results of blake2s() are valid `newBlake2sFinalizeHint` takes 1
pkg/hintrunner/zero/zerohint_blake.go:128
↓ 2 callers
Function
newChainedEcOpHint
ChainedEcOp hint returns a random non-zero point on the STARK curve in the context of chained ecop operations. The point is created deterministically
pkg/hintrunner/zero/zerohint_ec.go:1838
↓ 2 callers
Function
newDefaultDictNewHint
DefaultDictNew hint creates a new dictionary with a default value Querying the value of a key which doesn't exist in the dictionary returns the defaul
pkg/hintrunner/zero/zerohint_dictionaries.go:81
↓ 2 callers
Function
newDictNewHint
DictNew hint creates a new dictionary with its initial content seeded from a scope value "initial_dict" Querying the value of a key which doesn't exis
pkg/hintrunner/zero/zerohint_dictionaries.go:28
↓ 2 callers
Function
newDictReadHint
DictRead hint accesses the value of a dictionary for a given key and writes it to a variable `newDictReadHint` takes 3 operanders as argument - `dict
pkg/hintrunner/zero/zerohint_dictionaries.go:134
↓ 2 callers
Function
newDictSquashUpdatePtrHint
DictSquashUpdatePtr updates the DictTracker's current_ptr to point to the end of the squashed dict `newDictSquashUpdatePtrHint` takes two operanders
pkg/hintrunner/zero/zerohint_dictionaries.go:1017
↓ 2 callers
Function
newDictWriteHint
DictWrite hint writes a value for a given key in a dictionary and writes to memory the previous value for the key in the dictionary `newDictWriteHint
pkg/hintrunner/zero/zerohint_dictionaries.go:271
↓ 2 callers
Function
newDivModNPackedDivModExternalN
DivModNPackedDivModExternalN computes the div_mod operation for a given packed value. `newDivModNPackedDivModExternalN` takes 2 operander as arguments
pkg/hintrunner/zero/zerohint_ec.go:281
↓ 2 callers
Function
newDivModNSafeDivPlusOneHint
DivModeNSafeDivPlusOne performs a safe division of the result obtained from the multiplication of `res` and `b` subtracted by `a`, by `N`. It then add
pkg/hintrunner/zero/zerohint_ec.go:230
↓ 2 callers
Function
newEcRecoverDivModNPackedHint
EcRecoverDivModNPacked hint stores the value of div_mod(x, s, N) to scope. `newEcRecoverDivModNPackedHint` takes 3 operanders as arguments - `n` is a
pkg/hintrunner/zero/zerohint_ec.go:1979
↓ 2 callers
Function
newEcRecoverProductDivMHint
EcRecoverProductDivM hint fetches product and m scope variables and stores the result of their division in scope variables value and k `newEcRecoverP
pkg/hintrunner/zero/zerohint_ec.go:2255
↓ 2 callers
Function
newEcRecoverProductModHint
EcRecoverProductMod hint stores the value of (a * b) % m to scope. `newEcRecoverProductModHint` takes 3 operanders as arguments - `a` is an EC point
pkg/hintrunner/zero/zerohint_ec.go:2154
↓ 2 callers
Function
newEcRecoverSubABHint
EcRecoverSubAB hint stores the value of a - b to scope. `newEcRecoverSubABHint` takes 2 operanders as arguments - `a` is an EC point - `b` is an EC p
pkg/hintrunner/zero/zerohint_ec.go:2079
↓ 2 callers
Function
newFinalizeSha256Hint
FinalizeSha256 hint computes the sha2 compress operation using a padding and writes the result at `sha256PtrEnd` address `newFinalizeSha256Hint` take
pkg/hintrunner/zero/zerohint_sha256.go:216
↓ 2 callers
Function
newImportSecp256R1NHint
ImportSecp256R1N hint imports the `SECP256R1_N` constant from SECP256R1 curve utilities in the current scope `newImportSecp256R1NHint` doesn't take a
pkg/hintrunner/zero/zerohint_signature.go:476
↓ 2 callers
Function
newImportSecp256R1PHint
ImportSecp256R1P hint imports the `SECP_P` constant from SECP256R1 curve utilities in the current scope `newImportSecp256R1PHint` doesn't take any op
pkg/hintrunner/zero/zerohint_signature.go:324
↓ 2 callers
Function
newInvModPUint512Hint
InvModPUint512 hint computes the inverse modulo a prime number `p` of 512 bits `newInvModPUint512Hint` takes 2 operanders as arguments - `x` is the `u
pkg/hintrunner/zero/zerohint_uint512.go:22
← previous
next →
301–400 of 1,195, ranked by callers