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

Block hash table: don't iterate over entire trace to find HALT #1344

Open
plafer opened this issue May 28, 2024 · 0 comments
Open

Block hash table: don't iterate over entire trace to find HALT #1344

plafer opened this issue May 28, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@plafer
Copy link
Contributor

plafer commented May 28, 2024

Originally posted by @bobbinth in #1333 (comment)

Probably not for this PR, but I wonder how expensive this .find() is. Basically, we need to iterate through the whole trace to find the first HALT row.

One alternative to this is to get the program hash from the last row (excluding the random rows at the end). This should be possible because because the semantics of HALT are such that it copies over the entire state of the VM (including the decoder registers) to the next cycle. So, program hash should be the same in the last row as in the first HALT row.

@plafer plafer added the good first issue Good for newcomers label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant