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

EVM: lifecycle tests #1185

Merged
merged 10 commits into from
Feb 8, 2023
Merged

EVM: lifecycle tests #1185

merged 10 commits into from
Feb 8, 2023

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented Feb 8, 2023

Closes filecoin-project/ref-fvm#1547

  • CREATE
  • CREATE2
  • SELFDESTRUCT

@vyzo vyzo requested a review from Stebalien February 8, 2023 19:39
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

Let's make sure the nonce is incremented.

@codecov-commenter
Copy link

Codecov Report

Merging #1185 (b410c33) into next (e97b8e4) will increase coverage by 0.17%.
The diff coverage is 100.00%.

❗ Current head b410c33 differs from pull request most recent head ccd3a3f. Consider uploading reports for the commit ccd3a3f to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1185      +/-   ##
==========================================
+ Coverage   90.61%   90.78%   +0.17%     
==========================================
  Files         132      132              
  Lines       25992    26313     +321     
==========================================
+ Hits        23552    23888     +336     
+ Misses       2440     2425      -15     
Impacted Files Coverage Δ
actors/evm/src/interpreter/system.rs 95.75% <ø> (+0.38%) ⬆️
...tors/evm/src/interpreter/instructions/lifecycle.rs 98.86% <100.00%> (+3.86%) ⬆️
test_vm/src/lib.rs 84.28% <0.00%> (-0.29%) ⬇️
actors/power/src/lib.rs 83.58% <0.00%> (+0.21%) ⬆️
actors/miner/src/deadline_info.rs 96.62% <0.00%> (+16.85%) ⬆️

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

LGTM with one small change.

}
m.state.stack.push(beneficiary.as_evm_word()).unwrap();
m.step().expect("execution step failed");
assert!(m.system.tombstone.is_some());
Copy link
Member

Choose a reason for hiding this comment

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

Let's check the epoch/origin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done; mock runtime always returns 0 for nonce, but I did set the origin and it stuck around as it should.

@vyzo vyzo enabled auto-merge (squash) February 8, 2023 20:18
@vyzo vyzo merged commit 0964aa8 into next Feb 8, 2023
@vyzo vyzo deleted the next-unit-tests-1547 branch February 8, 2023 20:37
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.

3 participants