Closed yuvalelmo closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Are you sure this code is working? AFAIK, the code will fail to generate the proof if it tries to create it with an outdated checkpoint. From here, it seems that when it fails to do so, you simply return the error instead of updating the state and trying again. Am I missing something?
Yes, I am pretty sure this code works. :) The code does not generate any proof. It makes an RPC call to the ethereum execution rpc and gets the proof. If it fails - then something is wrong with either the rpc or the response form - not with the checkpoint.
If you call the proof endpoint with an outdated state it would not fail. you would still get a response with a proof, it would just have some of the fields empty.
Are you sure this code is working? AFAIK, the code will fail to generate the proof if it tries to create it with an outdated checkpoint. From here, it seems that when it fails to do so, you simply return the error instead of updating the state and trying again. Am I missing something?
Yes, I am pretty sure this code works. :) The code does not generate any proof. It makes an RPC call to the ethereum execution rpc and gets the proof. If it fails - then something is wrong with either the rpc or the response form - not with the checkpoint.
If you call the proof endpoint with an outdated state it would not fail. you would still get a response with a proof, it would just have some of the fields empty.
gotcha cool - maybe add a comment with this explanation? Was not intuitive for me.
Updating the state now only happens if the message cannot be verified using the current state. If the current state includes the message then it won't be updated.