Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

Gerson2102
Copy link
Contributor

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

Copy link

vercel bot commented Sep 6, 2024

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
Copy link
Contributor Author

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
Copy link
Collaborator

maciejka commented Sep 6, 2024

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
Copy link
Collaborator

m-kus commented Sep 6, 2024

@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

@Gerson2102
Copy link
Contributor Author

@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
Copy link
Collaborator

m-kus commented Sep 6, 2024

@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.

scripts/data/generate_data.py Outdated Show resolved Hide resolved
scripts/data/generate_data.py Outdated Show resolved Hide resolved
scripts/data/generate_data.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@maciejka maciejka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @m-kus

@maciejka maciejka requested a review from m-kus September 9, 2024 08:49
@maciejka
Copy link
Collaborator

maciejka commented Sep 9, 2024

@Gerson2102 fix conflicts, please.

@Gerson2102
Copy link
Contributor Author

Conflicts fixed

@m-kus m-kus merged commit 248d589 into keep-starknet-strange:main Sep 9, 2024
5 checks passed
@Gerson2102 Gerson2102 deleted the cache-hints branch September 9, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants