Skip to content

Conversation

@smiasojed
Copy link
Collaborator

@smiasojed smiasojed commented Nov 25, 2025

How to reproduce:
cargo test --package forge --test it -- revive::cheats_individual --nocapture
failures:

    revive::cheats_individual::test_dump_state::case_1_evm
    revive::cheats_individual::test_expect_call::case_1_evm
    revive::cheats_individual::test_expect_create::case_1_evm
    revive::cheats_individual::test_expect_revert::case_1_evm
    revive::cheats_individual::test_get_raw_block_header::case_1_evm
    revive::cheats_individual::test_record::case_1_evm
    revive::cheats_individual::test_record_account_accesses::case_1_evm
    revive::cheats_individual::test_record_debug_trace::case_1_evm
    revive::cheats_individual::test_roll::case_1_evm
    revive::cheats_individual::test_set_blockhash::case_1_evm

@smiasojed smiasojed changed the title Add roll cheatcode test Add cheatcode test Nov 26, 2025
// SKIP it should not affect pallet-revive execution
// revive_cheat_test_original!(test_env, "Env");
// EXTCODECOPY compilation issue
revive_cheat_test_original!(test_etch, "Etch");
Copy link

Choose a reason for hiding this comment

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

@smiasojed etch, prank, mock tests were already ported by me and passing here:

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes I saw it, I will clean this up. But anyway original etch is failing - probably issue with EXTCODECOPY - but it should not affect our EVM path.

Copy link

@alexggh alexggh Nov 27, 2025

Choose a reason for hiding this comment

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

yeah EXTCODECOPY compilation was the reason I modified. the test slightly.

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 we should not error out in this case, because it means that we do not have pvm code which is fine for evm path. @pkhry WDYT?

Copy link

Choose a reason for hiding this comment

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

error out

Copy link
Collaborator Author

@smiasojed smiasojed Nov 27, 2025

Choose a reason for hiding this comment

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

It means that if any project uses opcodes not supported in PVM, the EVM tests will fail. I’m not sure if this is the right approach.

Copy link

Choose a reason for hiding this comment

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

It means that if any project uses opcodes not supported in PVM, the EVM tests will fail. I’m not sure if this is the right approach.

then just disable pvm for now i guess

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

or if compilation for pvm fails just skip this bytecode in dualcompiledcontract - the user will not be able to switch to pvm in test

@pkhry
Copy link

pkhry commented Nov 27, 2025

for RecordAccountAcceses, partial, but makes stuff work - #443

#[case::evm(ReviveRuntimeMode::Evm)]
#[tokio::test(flavor = "multi_thread")]
async fn $test_name(#[case] runtime_mode: ReviveRuntimeMode) {
let filter = Filter::new(".*", ".*", &format!(".*/{}/{}.*", $dir, $file_pattern));
Copy link

Choose a reason for hiding this comment

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

shouldn't this be */{}/{}.t.* to correctly grab tests by their filename?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes there is a bug

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.

4 participants