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

Fix trace decoder padding with dummy payloads #63

Merged
merged 2 commits into from
Feb 26, 2024
Merged

Fix trace decoder padding with dummy payloads #63

merged 2 commits into from
Feb 26, 2024

Conversation

Nashtare
Copy link
Collaborator

We were always using the final ExtraBlockData when padding a block. In the case of a single txn, when there are no withdrawals, we still prepend the txn with the dummy payload for efficiency, but this was leading to discrepancies when connecting the two.

This fixes it.

@Nashtare Nashtare added the bug Something isn't working label Feb 26, 2024
@Nashtare Nashtare requested a review from BGluth February 26, 2024 23:12
@Nashtare Nashtare self-assigned this Feb 26, 2024
initial_tries: &PartialTrieState,
final_tries: &PartialTrieState,
has_withdrawals: bool,
) -> bool {
match gen_inputs.len() {
0 => {
debug_assert!(initial_tries.state == final_tries.state);
debug_assert!(initial_extra_data == final_extra_data);
Copy link
Member

Choose a reason for hiding this comment

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

nit: Do you think it's worth adding a error string for these? Might be overkill idk.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think the assertions are actually not needed here, as it's solely based on gen_inputs len, meaning the loop wouldn't have been entered before

Copy link
Member

@BGluth BGluth left a comment

Choose a reason for hiding this comment

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

LGTM!

@Nashtare Nashtare enabled auto-merge (squash) February 26, 2024 23:22
@Nashtare Nashtare merged commit 90fa386 into main Feb 26, 2024
5 checks passed
@Nashtare Nashtare deleted the fix_decoder branch February 26, 2024 23:36
BGluth added a commit that referenced this pull request Jun 17, 2024
Fixed txn proof logs not rendering correctly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants