diff --git a/pkg/hintrunner/zero/hintcode.go b/pkg/hintrunner/zero/hintcode.go index 08fec6886..01363f815 100644 --- a/pkg/hintrunner/zero/hintcode.go +++ b/pkg/hintrunner/zero/hintcode.go @@ -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 ------ diff --git a/pkg/hintrunner/zero/zerohint_keccak.go b/pkg/hintrunner/zero/zerohint_keccak.go index 6e00ff58c..8c27a445b 100644 --- a/pkg/hintrunner/zero/zerohint_keccak.go +++ b/pkg/hintrunner/zero/zerohint_keccak.go @@ -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