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

Added transaction IDs into the Block struct #734

Merged
merged 7 commits into from
Jun 7, 2024
Merged

Conversation

polydez
Copy link
Contributor

@polydez polydez commented Jun 6, 2024

This resolves #722

@polydez polydez requested review from igamigo and bobbinth June 6, 2024 04:40
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Thank you! Overall, looks good but I did leave a couple of questions inline.

Comment on lines 470 to 471
// TODO: Set tx_hash and proof_hash to the correct values once the kernel is available.
let tx_hash = Digest::default();
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure if this comment is still relevant for tx_hash as it no longer has anything to do with the kernel.

It may be tricky to set the tx_hash here correctly as we don't explicitly say which transactions where executed to get this state transition - but the comment should be different.

Also, cc @igamigo as this is probably relevant to the mock object refactoring you are working on.

objects/src/transaction/proven_tx.rs Outdated Show resolved Hide resolved
objects/src/transaction/proven_tx.rs Outdated Show resolved Hide resolved
@polydez polydez requested a review from bobbinth June 7, 2024 05:30
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@bobbinth bobbinth merged commit af0c13f into next Jun 7, 2024
9 checks passed
@bobbinth bobbinth deleted the polydez-block-tx-ids branch June 7, 2024 05:44
@@ -163,7 +163,7 @@ fn block_data_memory_assertions(process: &Process<MockHost>, inputs: &PreparedTr

assert_eq!(
read_root_mem_value(process, BATCH_ROOT_PTR),
inputs.block_header().batch_root().as_elements(),
inputs.block_header().tx_hash().as_elements(),
"The batch root should be stored at the BATCH_ROOT_PTR"
Copy link
Contributor

Choose a reason for hiding this comment

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

should BATCH_ROOT_PTR and the error message refer to the transaction hash?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch! @polydez - could you make a small PR to fix this (and check if we have any other similar references)?

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