Skip to content
This repository has been archived by the owner on Jul 4, 2022. It is now read-only.

Fix light client call_executor execution_proof_is_generated_and_checked test #6

Closed
jordy25519 opened this issue Oct 22, 2019 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@jordy25519
Copy link
Contributor

jordy25519 commented Oct 22, 2019

Migrated from: cennznet/plug-blockchain#62 (comment)

@jordy25519 jordy25519 added the bug Something isn't working label Oct 22, 2019
@cowboy-bebug
Copy link
Contributor

cowboy-bebug commented Oct 23, 2019

On master branch:

failures:

---- tests::voter_catches_up_to_latest_round_when_behind stdout ----
thread 'tests::voter_catches_up_to_latest_round_when_behind' panicked at 'assertion failed: set_state.read().last_completed_round().number >= 4', core/finality-grandpa/src/tests.rs:1501:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.


failures:
    tests::voter_catches_up_to_latest_round_when_behind

test result: FAILED. 58 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '-p substrate-finality-grandpa --lib'

cargo test -p substrate-finality-grandpa --lib passes however

@cowboy-bebug
Copy link
Contributor

cowboy-bebug commented Oct 23, 2019

The cause of error seems to be this:

panic_handler::set("TEST", "1.2.3");

It's a library from substrate that wraps around std::panic::set_hook() (src).
^ I guess one way to fix this bug is to make the test not panic even if panic_handler is set (which is what it's actually testing)

@cowboy-bebug
Copy link
Contributor

cowboy-bebug commented Oct 23, 2019

This test also fails on substrate/master with the same error log:

cargo test -p substrate-client light::call_executor::tests::execution_proof_is_generated_and_checked

Error:
Thread 'light::call_executor::tests::execution_proof_is_generated_and_checked' panicked at 'Externalities not allowed to fail within runtime: "Trie lookup error: Database missing expected key: 0xb3fa3eff4d4d5d287ebc1be63f1d0236b2c21aaea7d0c20fe1e4ca597a0705b3"', src/libcore/result.rs:1165

Our error just has a different key: 0xd8a1f856f5faa67db595950a0b5a965e03b3499aa48c3a05d1f8e948f81a1854

Upon closer examination, the issue is more related to not being able to write to the trie database. Can track this comment: https://matrix.to/#/!HzySYSaIhtyWrwiwEV:matrix.org/$1571969957149258GIffF:matrix.org?via=matrix.org&via=matrix.parity.io

@jordy25519
Copy link
Contributor Author

Seems to be resolved on latest develop

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants