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

Integrate existing executor tests with the new testing framework #1342

Merged
merged 9 commits into from
Apr 7, 2023

Conversation

NingLin-P
Copy link
Member

This PR integrates all the remaining executor tests with the new test framework.

The only ignored executor test is fraud_proof_verification_in_tx_pool_should_work, to enable it we need to support fetching the call_data of the fraud proof verifier from the original primary block.

Code contributor checklist:

@NingLin-P NingLin-P added the execution Subspace execution label Mar 31, 2023
@NingLin-P NingLin-P added this to the Gemini 3 milestone Mar 31, 2023
vedhavyas
vedhavyas previously approved these changes Apr 4, 2023
Copy link
Contributor

@vedhavyas vedhavyas left a comment

Choose a reason for hiding this comment

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

make sense!
Great work!

@NingLin-P
Copy link
Member Author

The test pallet_domains_unsigned_extrinsics_should_work failed in CI due to take too much time, it is also caused by the ack of slot notification never resolves (perhaps the same issue of #1347).

It can be reproduced in my machine, one interesting glitch I found was that the slot notification could be successfully sent to alice's subscriber even after we manually dropped alice in the test then the test blocks on waiting for ack from alice. I will continue investigating this issue.

@NingLin-P
Copy link
Member Author

The test pallet_domains_unsigned_extrinsics_should_work failed in CI due to the same issue of #1347, but with a slight difference that we have manually dropped alice in the test and its domain worker is terminated asynchronously, and the slot notification may be successfully sent to it but never handled and the slot_acknowledgement_sender never drops due to the same reason mentioned at #1352 (comment) thus the test is blocked forever.

get_bundle_from_tx_pool is used in incoming test and is_bundle_present_in_tx_pool
can be implement by get_bundle_from_tx_pool(..).is_some()

Signed-off-by: linning <linningde25@gmail.com>
produce_block_with_extrinsics is useful when we want to control the exact extrinsic
included in block or for extrinsic that may fail on verification but we still want
to include it in block.

This commit also extract the new block logging in a separated function
so both produce_block_with_slot and produce_block_with_extrinsics can reuse it.

Signed-off-by: linning <linningde25@gmail.com>
…with new testing framework

This test is broken and fixed by adding primary_block_info digest to block header

Signed-off-by: linning <linningde25@gmail.com>
…he new testing framework

The test is still ignored due to we don't support fetch the call_data from the primary chain,
and it will be a ready-made test when we support so, there is also a TODO left to test the
initialize_block fraud proof of block 1 when we can properly handle the genesis receipt on
verify_pre_state_root.

Signed-off-by: linning <linningde25@gmail.com>
…me_should_work with the new testing framework

Signed-off-by: linning <linningde25@gmail.com>
…e new testing framework

Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
The test is still ignored due to we can not construct a proper primary runtime code.

Signed-off-by: linning <linningde25@gmail.com>
@NingLin-P NingLin-P enabled auto-merge April 7, 2023 14:51
@NingLin-P NingLin-P merged commit df8d027 into main Apr 7, 2023
@NingLin-P NingLin-P deleted the executor-tests branch April 7, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execution Subspace execution
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants