keep-starknet-strange / raito

Bitcoin ZK client written in Cairo.
https://raito.wtf
MIT License
40 stars 34 forks source link

[feat] Provide cache hints via the data generation script #150

Closed Gerson2102 closed 1 month ago

Gerson2102 commented 1 month ago

Adding the cache hints for outpoint transactions. I did not test the code yet.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
raito ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 5:42pm
Gerson2102 commented 1 month ago

I did not test the code yet, since I dont really know how to do it. Can someone help me with that a little bit?

maciejka commented 1 month ago

I did not test the code yet, since I dont really know how to do it. Can someone help me with that a little bit?

You will need access to the node. Contact me on tg.

Right now your pr seems to contain only stylistic changes. It would be better to merge it before you start making substantive changes.

@m-kus are you fine with this style? Should we add a python linter to the CI?

m-kus commented 1 month ago

@maciejka adding linter would be definitely great! I'm ok with the changes, we lacked consistency wrt quotes. But having this automated would help

@Gerson2102 all good, but you have to do another pass and update both outputs and outpoints in the blocks list.

How this will work on the Cairo side:

Gerson2102 commented 1 month ago

@maciejka adding linter would be definitely great! I'm ok with the changes, we lacked consistency wrt quotes. But having this automated would help

@Gerson2102 all good, but you have to do another pass and update both outputs and outpoints in the blocks list.

How this will work on the Cairo side:

  • When we handle transaction outputs and see cache hint, we add new item to the cache
  • When we handle transaction input and see cache hint in the outpoint, we try to pop item from the cache

So... I have to do some Cairo logic for this? Or just the python code? I dont get that part related to Cairo, or u just said it because I need to implement that on python?

m-kus commented 1 month ago

@Gerson2102 no need to implement Cairo logic here, it is just for the context so that you better understand what is it for. You just need to implement the Python part.

maciejka commented 1 month ago

@Gerson2102 fix conflicts, please.

Gerson2102 commented 1 month ago

Conflicts fixed