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
↓ 2 callers
Function
newMemEnterScopeHint
MemEnterScope hint enters a new scope for the memory copy/set operation with a specified value `newMemEnterScopeHint` takes 2 operanders as arguments
pkg/hintrunner/zero/zerohint_others.go:139
↓ 2 callers
Function
newPackedSha256Hint
PackedSha256 hint computes the sha2 compress operation on some input and writes the new state at `output` address `newPackedSha256Hint` takes 2 opera
pkg/hintrunner/zero/zerohint_sha256.go:18
↓ 2 callers
Function
newSha256ChunkHint
Sha256Chunk hint computes the sha2 compress operation on some input using a given state and writes the new state at `output` address `newSha256ChunkH
pkg/hintrunner/zero/zerohint_sha256.go:104
↓ 2 callers
Function
newSplitXXHint
SplitXX computes the square root of a 256-bit integer modulo the prime 2^255 - 19, ensures the result is even, and splits it into two 128-bit integers
pkg/hintrunner/zero/zerohint_uint256.go:707
↓ 2 callers
Function
newUsortEnterScopeHint
UsortEnterScope hint enters a new scope with `__usort_max_size` value `newUsortEnterScopeHint` doesn't take any operander as argument `newUsortEnter
pkg/hintrunner/zero/zerohint_usort.go:21
↓ 2 callers
Function
newUsortVerifyHint
UsortVerify hint prepares for verifying the presence of duplicates of a specific value in the sorted output (array of fields) `newUsortVerifyHint` ta
pkg/hintrunner/zero/zerohint_usort.go:232
↓ 2 callers
Function
newVerifyECDSASignatureHint
VerifyECDSASignature hint writes an ECDSA signature to a given address `newVerifyECDSASignatureHint` takes 3 operanders as arguments - `ecdsaPtr` is
pkg/hintrunner/zero/zerohint_signature.go:181
↓ 2 callers
Method
onCurve
returns true if a point `p` belongs to the `ec` curve ruled by the params `alpha` and `beta`. In other words, true if y^2 = x^3 + alpha * x + beta
pkg/vm/builtins/ecop.go:129
↓ 2 callers
Method
opcodeAssertions
( instruction *asmb.Instruction, dstAddr *mem.MemoryAddress, op0Addr *mem.MemoryAddress, res *mem.MemoryVa
pkg/vm/vm.go:401
↓ 2 callers
Method
pushCommentLine
(format string, args ...any)
pkg/disasm/disassembler.go:136
↓ 2 callers
Method
readInputs
Reads the inputs to the builtin (p, p_values, values_ptr, offsets_ptr, n) from the memory at address = addr. Returns an instance of ModBuiltinInputs a
pkg/vm/builtins/modulo.go:161
↓ 2 callers
Function
runAndTestCairoZeroFile
(t *testing.T, path string, name string, benchmarkMap map[string][]int, benchmark bool, errorExpected bool)
integration_tests/cairo0_test.go:17
↓ 2 callers
Function
runVM
( program runner.Program, proofmode bool, maxsteps uint64, entrypointOffset uint64, collectTrace bool, t
cmd/cli/main.go:245
↓ 2 callers
Function
runVmCairo1
given a path to a compiled cairo1 file, execute it using our vm
integration_tests/cairo1_test.go:319
↓ 2 callers
Function
sign
(n *big.Int)
pkg/utils/math.go:199
↓ 2 callers
Function
signedOffset
(neg bool, value int)
pkg/assembler/grammar.go:184
↓ 2 callers
Method
updateFp
(instruction *asmb.Instruction, dstAddr *mem.MemoryAddress)
pkg/vm/vm.go:524
↓ 2 callers
Function
updateMemoryWithValues
(memory *mem.Memory, valuesToWrite []memoryWrite)
pkg/vm/vm_test.go:1374
↓ 2 callers
Function
varValueNotInScope
(varName string)
pkg/hintrunner/zero/zerohint_utils_test.go:162
↓ 1 callers
Method
AddReference
(name string, v hinter.Reference)
pkg/hintrunner/zero/hint_reference_resolver.go:19
↓ 1 callers
Method
AddRelocationRule
(segmentIndex int, addr MemoryAddress)
pkg/vm/memory/memory.go:464
↓ 1 callers
Method
AddressPc
()
pkg/vm/vm.go:52
↓ 1 callers
Method
AllocateEmptyTemporarySegment
Allocates an empty temporary segment and returns its index
pkg/vm/memory/memory.go:258
↓ 1 callers
Function
AsIntBig
(value *big.Int)
pkg/hintrunner/utils/math_utils.go:46
↓ 1 callers
Function
AssembleProgram
(cairoProgram *starknet.StarknetProgram, userArgs []starknet.CairoFuncArgs, availableGas uint64, proofmode boo
pkg/runner/runner.go:99
↓ 1 callers
Method
BuildMemory
BuildMemory relocates the memory and returns it
pkg/runner/runner.go:567
↓ 1 callers
Method
BuildTrace
BuildTrace relocates the trace and returns it
pkg/runner/runner.go:572
↓ 1 callers
Function
BuiltinTypeFromName
(name string)
pkg/vm/builtins/builtin_runner.go:62
↓ 1 callers
Method
BuiltinsFinalStackFromStackPointerDict
(builtinNameToStackPointer map[builtins.BuiltinType]uint64)
pkg/vm/vm.go:683
↓ 1 callers
Function
CheckOnlyArrayFeltInputAndReturntValue
(mainFunc starknet.EntryPointByFunction)
pkg/runner/runner.go:918
↓ 1 callers
Method
CheckWrite
(segment *Segment, offset uint64, value *MemoryValue)
pkg/vm/memory/memory.go:12
↓ 1 callers
Function
ConvertToByteData
ConvertToByteData converts a slice of uint64 to a slice of byte.
pkg/utils/keccak.go:35
↓ 1 callers
Method
Disassemble
()
pkg/disasm/disassembler.go:26
↓ 1 callers
Method
Execute
(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:831
↓ 1 callers
Method
Execute
(vm *VM.VirtualMachine, ctx *hinter.HintRunnerContext)
pkg/hintrunner/core/hint.go:1632
↓ 1 callers
Method
Expression
()
pkg/assembler/grammar.go:93
↓ 1 callers
Function
FeltMod
FeltMod implements `a % b` operation.
pkg/utils/math.go:77
↓ 1 callers
Function
FillMemory
Fills the memory with inputs to the builtin instances based on the inputs to the first instance, pads the offsets table to fit the number of operation
pkg/vm/builtins/modulo.go:486
↓ 1 callers
Method
FinalizeBuiltins
()
pkg/runner/runner.go:901
↓ 1 callers
Method
Get
(vm *VM.VirtualMachine)
pkg/hintrunner/hinter/operand.go:32
↓ 1 callers
Method
Get
(vm *VM.VirtualMachine)
pkg/hintrunner/hinter/operand.go:62
↓ 1 callers
Method
Get
(vm *VM.VirtualMachine)
pkg/hintrunner/hinter/operand.go:91
↓ 1 callers
Method
Get
(vm *VM.VirtualMachine)
pkg/hintrunner/hinter/operand.go:117
↓ 1 callers
Method
GetAirMemorySegmentsAddresses
()
pkg/runner/runner.go:946
↓ 1 callers
Method
GetAirPrivateInput
(tracePath, memoryPath string)
pkg/runner/air_input.go:69
↓ 1 callers
Method
GetAirPublicInput
(relocatedMemory []*fp.Element, publicMemoryAddresses []vm.PublicMemoryAddress)
pkg/runner/air_input.go:9
↓ 1 callers
Function
GetBuiltinAllocatedInstances
GetBuiltinAllocatedInstances calculates the number of instances of given builtin for current step and builtin ratio. Ratio parameter defines the ratio
pkg/vm/builtins/builtin_runner.go:102
↓ 1 callers
Function
GetCairoPrime
()
pkg/hintrunner/utils/math_utils.go:112
↓ 1 callers
Function
GetEntryCodeInstructions
Function derived from the cairo-lang-runner crate. https://github.com/starkware-libs/cairo/blob/40a7b60687682238f7f71ef7c59c986cc5733915/crates/cairo-
pkg/runner/runner.go:634
↓ 1 callers
Function
GetFooterInstructions
()
pkg/runner/runner.go:895
↓ 1 callers
Function
GetHintByName
(hint starknet.Hint)
pkg/hintrunner/core/cairo_hintparser.go:91
↓ 1 callers
Function
GetHintFromCode
(program *zero.ZeroProgram, rawHint zero.Hint)
pkg/hintrunner/zero/zerohint.go:51
↓ 1 callers
Function
GetLayout
(layout string)
pkg/vm/builtins/layouts.go:129
↓ 1 callers
Method
GetOutputPublicMemory
(outputSegment memory.Segment)
pkg/vm/builtins/output.go:53
↓ 1 callers
Method
GetPublicMemoryAddresses
(segmentOffsets []uint64)
pkg/runner/runner.go:964
↓ 1 callers
Method
GetRangeCheckUsage
GetRangeCheckUsage returns the min and max values used in the range check segment. Since each range check instance consists of 16-bit parts, the min a
pkg/vm/builtins/range_check.go:76
↓ 1 callers
Method
GetStopPointer
()
pkg/vm/memory/memory.go:16
↓ 1 callers
Function
GetUint256ExpandAsFelts
(vm *VM.VirtualMachine, ref hinter.Reference)
pkg/hintrunner/zero/zerohint_utils.go:51
↓ 1 callers
Function
GetUint512AsFelts
(vm *VM.VirtualMachine, ref hinter.Reference)
pkg/hintrunner/zero/zerohint_utils.go:81
↓ 1 callers
Method
InferValue
(segment *Segment, offset uint64)
pkg/vm/memory/memory.go:13
↓ 1 callers
Method
InitNumber
Returns the initialization number when the dictionary was created
pkg/hintrunner/hinter/dict.go:38
↓ 1 callers
Function
InitializeDefaultContext
()
pkg/hintrunner/hinter/hinter.go:26
↓ 1 callers
Function
InitializeDictionaryManager
(ctx *HintRunnerContext, useTemporarySegments bool)
pkg/hintrunner/hinter/dict.go:50
↓ 1 callers
Method
Insert
It adds another index to the list of indices associated to the given key If the key is not present, it creates a new entry
pkg/hintrunner/hinter/dict.go:138
↓ 1 callers
Function
IsQuadResidue
(x *fp.Element)
pkg/hintrunner/utils/math_utils.go:69
↓ 1 callers
Function
KeccakAddU256BE
(keccakInput []uint64, value *uint256.Int)
pkg/utils/keccak.go:167
↓ 1 callers
Function
KeccakU256sBEInputs
(inputs []uint256.Int)
pkg/utils/keccak.go:182
↓ 1 callers
Function
KeccakU256sLEInputs
1 initializes an array (u64) 2 converting input into array 3 adds padding to the array 4 put that array into keccak hashing
pkg/utils/keccak.go:143
↓ 1 callers
Method
KnownValue
Given a segment index and offset returns true if the value at that address is known
pkg/vm/memory/memory.go:397
↓ 1 callers
Method
KnownValueAtAddress
Given an address returns true if it contains a known value
pkg/vm/memory/memory.go:415
↓ 1 callers
Function
LoadCairoProgram
(cairoProgram *sn.StarknetProgram)
pkg/runner/program.go:71
↓ 1 callers
Method
MarshalJSON
()
pkg/parsers/starknet/starknet.go:77
↓ 1 callers
Function
NewReferenceResolver
()
pkg/hintrunner/zero/hint_reference_resolver.go:14
↓ 1 callers
Method
PopIndex
It pops out smallest index associated with the smallest key
pkg/hintrunner/hinter/dict.go:192
↓ 1 callers
Method
PopKey
It pops out the smallest key in the key list
pkg/hintrunner/hinter/dict.go:156
↓ 1 callers
Function
PoseidonPerm
(x, y, z *fp.Element)
pkg/vm/builtins/poseidon_math.go:59
↓ 1 callers
Function
RecoverY
(x, beta, fieldPrime *big.Int)
pkg/hintrunner/utils/math_utils.go:104
↓ 1 callers
Method
RelocateAllDictionaries
Relocates all dictionaries into a single segment if proofmode is enabled In LambdaClass VM there is add_relocation_rule() used, which is used only to
pkg/hintrunner/hinter/dict.go:106
↓ 1 callers
Method
RelocateTemporarySegments
()
pkg/runner/runner.go:609
↓ 1 callers
Method
Resolve
(vm *VM.VirtualMachine)
pkg/hintrunner/hinter/operand.go:95
↓ 1 callers
Method
ResolveAsBigInt5
(valAddr MemoryAddress)
pkg/vm/memory/memory_value.go:412
↓ 1 callers
Function
RunBenchmarks
(pkgSubstr, testSubstr string)
scripts/benchmark.go:15
↓ 1 callers
Method
RunEntryPoint
RunEntryPoint is like Run, but it executes the program starting from the given PC offset. This PC offset is expected to be a start from some function
pkg/runner/runner.go:161
↓ 1 callers
Method
RunHint
(vm *VirtualMachine)
pkg/vm/vm.go:25
↓ 1 callers
Method
RunInstruction
(instruction *asmb.Instruction)
pkg/vm/vm.go:176
↓ 1 callers
Function
SIGMA
()
pkg/utils/blake.go:18
↓ 1 callers
Function
SafeDivUint64
(x, y uint64)
pkg/utils/math.go:146
↓ 1 callers
Method
SetEnd
(end mem.MemoryAddress)
pkg/hintrunner/hinter/dict.go:33
↓ 1 callers
Method
SetFreeOffset
Given a memory address and a freeOffset, it sets the freeOffset field of dictionary to it.
pkg/hintrunner/hinter/zero_dict.go:136
↓ 1 callers
Method
SetStopPointer
(stopPointer uint64)
pkg/vm/memory/memory.go:17
↓ 1 callers
Method
Size
()
pkg/assembler/instruction.go:173
↓ 1 callers
Function
Sqrt
(x, p *big.Int)
pkg/hintrunner/utils/math_utils.go:91
↓ 1 callers
Function
StarknetProgramFromFile
(pathToFile string)
pkg/parsers/starknet/starknet.go:94
↓ 1 callers
Method
String
()
pkg/hintrunner/core/hint.go:406
↓ 1 callers
Method
String
func (segment *Segment) String() string { repr := make([]string, len(segment.Data)) for i, cell := range segment.Data { if i < len(segment.Data)-5
pkg/vm/memory/memory.go:193
↓ 1 callers
Method
String
()
pkg/vm/memory/memory_value.go:350
↓ 1 callers
Method
SubAddress
(other *MemoryAddress)
pkg/vm/memory/memory_value.go:53
↓ 1 callers
Function
ZeroProgramFromFile
(filepath string)
pkg/parsers/zero/zero.go:115
↓ 1 callers
Function
addRoundKeys
(state []fp.Element, round int)
pkg/vm/builtins/poseidon_math.go:19
↓ 1 callers
Method
at
Gets the memory value at certain key
pkg/hintrunner/hinter/zero_dict.go:21
← previous
next →
401–500 of 1,195, ranked by callers