Tristan
Tristan
here is a cairo file you can use to test : ``` %builtins output from starkware.cairo.common.serialize import serialize_word from starkware.cairo.common.alloc import alloc from starkware.cairo.common.bool import FALSE, TRUE // Returns TRUE...
just check with the value 2 ``` { operanders: []*hintOperander{ {Name: "y", Kind: uninitialized}, {Name: "x", Kind: fpRelative, Value: feltInt64(2)}, }, makeHinter: func(ctx *hintTestContext) hinter.Hinter { return newIsQuadResidueHint(ctx.operanders["x"], ctx.operanders["y"]) },...
final implementation: ``` func newIsQuadResidueHint(x, y hinter.ResOperander) hinter.Hinter { return &GenericZeroHinter{ Name: "IsQuadResidue", Op: func(vm *VM.VirtualMachine, _ *hinter.HintRunnerContext) error { //> from starkware.crypto.signature.signature import FIELD_PRIME //> from starkware.python.math_utils import div_mod,...
@cicr99 @rodrigo-pino what do you think? Why not using a faster implementation ?
@MaksymMalicki we loop over `inputValuesInRange` to fill the `keccakInput []uint64` array. And `inputValuesInRange` is calculated as follows: ``` inputValuesInRange, err := hinter.GetConsecutiveValues(vm, readAddr, int16(keccakStateSize)) ``` or in the python hint...
@cicr99 @MaksymMalicki @har777 ok so i'm having real difficulty to test in an isolated way this hint. I always get errors like ``` Error: Expected nil, but got: &fmt.wrapError{msg:"segment 1,...
@MaksymMalicki thank you so much for the help !
@rodrigo-pino @har777 ready for review!
@cicr99 @rodrigo-pino waiting for your review to merge
@cicr99 if my understanding is correct, "github.com/holiman/uint256" wont work as it operates on uint256 with standard arithmetic. I guess we can try to find other packages that implement `sqrt` method...