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: Pass original txn RLP encodings #62

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

Nashtare
Copy link
Contributor

The parser currently proceeds to a sanity check on the decoded transaction, as some tests have a different hardcoded RLP txn encoding than what we get when re-encoding the decoded txn (usually through a zero scalar encoded via 0x0000000000000000000000000000000000000000000000000000000000000000 instead of 0x).

This is actually not problematic if we reuse this original encoding when generating the associated test GenerationInputs (so that we can still verify the txn trie insertion matches with the final root). By only testing txn decoding and storing the initial encoded bytes from the test suite, we can parse successfully an additional 347 tests.

@Nashtare Nashtare requested a review from BGluth June 11, 2024 21:17
@Nashtare Nashtare self-assigned this Jun 11, 2024
Cargo.toml Outdated Show resolved Hide resolved
)
})
.collect();
let storage_trie = HashedPartialTrie::try_from_iter(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This and below are due to the refactoring on latest mpt_trie versions

Copy link
Contributor

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

Yeah LGTM!

@Nashtare Nashtare merged commit 49b6fda into 0xPolygonZero:main Jun 12, 2024
2 checks passed
@Nashtare Nashtare deleted the pass_encoded_txns branch June 12, 2024 20:21
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.

2 participants