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

add print_latest_block_transactions toy hint #13

Merged

Conversation

tcoratger
Copy link
Contributor

Should close #10.

The goal of this PR is simply to print the hashes of the transactions inside the blocks received by the ExEx via a custom hint inside the Cairo VM. The approach used is as follows:

  • We define a custom hint print_latest_block_transactions that fetches the latest block in our SQLite and goes through all the transactions inside to print their hash. This is done each time we receive a new block notification so that we go through the tip of the chain each time to print the transaction hashes for this tip.
  • When starting the cairo run, we define a particular hint processor that takes this hint into account.
  • We also leave for now the possibility of running with Fibonacci (start_with_fibonacci vs start_with_transaction_logging) so we can play with both options at the start.

@ClementWalter ClementWalter merged commit ee5c038 into kkrt-labs:main Aug 30, 2024
3 checks passed
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.

Load the block's transactions into the Cairo vm using a hint and log the hashes.
2 participants