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

fake_v5_round_trip test fails on blocks but not in transactions #2023

Closed
oxarbitrage opened this issue Apr 16, 2021 · 1 comment · Fixed by #2057
Closed

fake_v5_round_trip test fails on blocks but not in transactions #2023

oxarbitrage opened this issue Apr 16, 2021 · 1 comment · Fixed by #2057
Assignees
Labels
A-rust Area: Updates to Rust code C-bug Category: This is a bug C-cleanup Category: This is a cleanup NU-5 Network Upgrade: NU5 specific tasks
Milestone

Comments

@oxarbitrage
Copy link
Contributor

oxarbitrage commented Apr 16, 2021

In #2020 we added support for sapling shielded data in V5 transactions and we added a good amount of test coverage for the new feature.

One of the tests is failing not working as we expect, the following piece of code can be found in zebra-chain/src/transaction/tests/vectors.rs where tracing was added to debug the issue.

        let fake_block2 = match fake_bytes.zcash_deserialize_into::<Block>() {
            Ok(fake_block2) => fake_block2,
            Err(err) => {
                // TODO: work out why transaction parsing succeeds,
                //       but block parsing doesn't
                tracing::info!(
                    ?err,
                    ?original_block,
                    ?fake_block,
                    hex_original_bytes = ?hex::encode(&original_bytes),
                    hex_fake_bytes = ?hex::encode(&fake_bytes),
                    original_bytes_len = %original_bytes.len(),
                    fake_bytes_len = %fake_bytes.len(),
                    %MAX_BLOCK_BYTES,
                    "unexpected structurally invalid block during deserialization"
                );

                continue;
            }
        };

This ticket is to research the problem and fix it but it is blocked by #2021 that we want to try first for a possible fix.

@oxarbitrage oxarbitrage added the S-blocked Status: Blocked on other tasks label Apr 16, 2021
@teor2345 teor2345 added this to the 2021 Sprint 8 milestone Apr 17, 2021
@teor2345
Copy link
Contributor

We might also want to create some hard-coded test vectors to check our implementation, see #2047.

That way we have some fixed data to test against when we're trying to fix these tests.

@oxarbitrage oxarbitrage self-assigned this Apr 21, 2021
@teor2345 teor2345 added A-rust Area: Updates to Rust code C-bug Category: This is a bug C-cleanup Category: This is a cleanup NU-5 Network Upgrade: NU5 specific tasks P-Medium and removed S-blocked Status: Blocked on other tasks labels Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust Area: Updates to Rust code C-bug Category: This is a bug C-cleanup Category: This is a cleanup NU-5 Network Upgrade: NU5 specific tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants