Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
TAdev0 committed Jun 28, 2024
1 parent 9546ef3 commit 1970289
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/hintrunner/zero/hintcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ ids.multiplicities = segments.gen_arg([len(positions_dict[k]) for k in output])`
padding = (inp + keccak_func(inp)) * _block_size
segments.write_arg(ids.keccak_ptr_end, padding)`
keccakWriteArgsCode string = "segments.write_arg(ids.inputs, [ids.low % 2 ** 64, ids.low // 2 ** 64])\nsegments.write_arg(ids.inputs + 2, [ids.high % 2 ** 64, ids.high // 2 ** 64])"
compareKeccakFullRateInBytesCode string = "ids.n_bytes >= ids.KECCAK_FULL_RATE_IN_BYTES"
compareKeccakFullRateInBytesCode string = "memory[ap] = to_felt_or_relocatable(ids.n_bytes >= ids.KECCAK_FULL_RATE_IN_BYTES)"
blockPermutationCode string = "from starkware.cairo.common.keccak_utils.keccak_utils import keccak_func\n_keccak_state_size_felts = int(ids.KECCAK_STATE_SIZE_FELTS)\nassert 0 <= _keccak_state_size_felts < 100\noutput_values = keccak_func(memory.get_range(\nids.keccak_ptr - _keccak_state_size_felts, _keccak_state_size_felts))\nsegments.write_arg(ids.keccak_ptr, output_values)"

// ------ Dictionaries hints related code ------
Expand Down
3 changes: 2 additions & 1 deletion pkg/hintrunner/zero/zerohint_keccak.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@ func newCompareKeccakFullRateInBytesHint(nBytes hinter.ResOperander) hinter.Hint
return &GenericZeroHinter{
Name: "CompareKeccakFullRateInBytes",
Op: func(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext) error {
//> ids.n_bytes >= ids.KECCAK_FULL_RATE_IN_BYTES
//> python hint: ids.n_bytes >= ids.KECCAK_FULL_RATE_IN_BYTES
//> JSON file hint: memory[ap] = to_felt_or_relocatable(ids.n_bytes >= ids.KECCAK_FULL_RATE_IN_BYTES)

// n_bytes should fit into a uint64
// we cannot 100% exclude the possibility that it doesn't
Expand Down

0 comments on commit 1970289

Please sign in to comment.