juno icon indicating copy to clipboard operation
juno copied to clipboard

Pps sandbox

Open rianhughes opened this issue 1 year ago • 5 comments

Note: this is an exercise - it's NOT to be merged

rianhughes avatar May 07 '24 12:05 rianhughes

You should also remove the changes to cmd/juno, and the juno/*.sst files.

After that run make format, make lint, and fix any lint errors.

Finally, just make sure the tests pass on the workflows (you may need to ping someone from the juno team to run the workflows)

rianhughes avatar May 09 '24 07:05 rianhughes

Hi.. I'm getting this error image

on running the tests. Can anyone help?

I think I am getting error here..

func (h *Handler) JunoGetNodesFromRoot(key felt.Felt) (string, *jsonrpc.Error) {
	stateReader, _, error := h.bcReader.HeadState()
	if error != nil {
		return "", ErrBlockNotFound
	}
@>	try, _, errTry := stateReader.NodeFromRoot()
@>	if errTry != nil {
@>		return "", ErrBlockNotFound
@>	}

	k := try.FeltToKeyConverter(&key)
	storageNodes, err := try.GetNodesFromRoot(&k)
	if err != nil {
		return "", ErrBlockNotFound
	}

	parsedNodes := try.NodeParser(storageNodes)

	jsonBytes, err := json.Marshal(parsedNodes)
	if err != nil {
		return "", ErrParsingError
	}
	return string(jsonBytes), nil
}

PsychoPunkSage avatar May 11 '24 07:05 PsychoPunkSage

Hi @rianhughes Please have a look at task 5

PsychoPunkSage avatar May 13 '24 05:05 PsychoPunkSage

Hi @rianhughes I tried to implement NodesFromRoot Mock... but I'm facing little difficulty in doing so... Can you please have a look at the code and tell me what I'm doing Wrong?? Or what changes I have to make??

Link to Mocks

PsychoPunkSage avatar May 17 '24 12:05 PsychoPunkSage

I also want to ask one more thing... I have to also do exercise 6?? Or after completing 5 I can do some contribution to juno??

PsychoPunkSage avatar May 17 '24 12:05 PsychoPunkSage

Closing the PR since there is more fresh impl here https://github.com/NethermindEth/juno/pull/1870

kirugan avatar Jul 15 '24 14:07 kirugan