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

SBF test that runs with stable bank and genesis to produce deterministic hash #30945

Merged
merged 3 commits into from
Mar 31, 2023

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented Mar 28, 2023

Problem

No way to test if runtime is returning consistent results for various transaction use-cases after changes to the code base.

Summary of Changes

Add a new test that runs with stable bank and genesis to produce deterministic hash.

Fixes #

@pgarg66 pgarg66 requested a review from Lichtso March 28, 2023 23:10
@pgarg66
Copy link
Contributor Author

pgarg66 commented Mar 28, 2023

This PR disables the assert on hash comparison. So it should not be a maintenance burden. Merging it will help prevent the test from bit rotting.

@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Merging #30945 (caf9ac6) into master (3f6c33d) will increase coverage by 0.0%.
The diff coverage is n/a.

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

@@           Coverage Diff           @@
##           master   #30945   +/-   ##
=======================================
  Coverage    81.5%    81.5%           
=======================================
  Files         728      727    -1     
  Lines      205479   205440   -39     
=======================================
- Hits       167560   167550   -10     
+ Misses      37919    37890   -29     

}
}

#[test]
Copy link
Contributor

@Lichtso Lichtso Mar 31, 2023

Choose a reason for hiding this comment

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

Can we add #[ignore] here?
That way it becomes more clear that this tests needs manual intervention to run and does nothing (additional, which is not already covered by other tests) by default / automatically.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's a good idea. I'll push an update

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, added some comment to the start of test to indicate its purpose.

@pgarg66 pgarg66 merged commit a2f3a21 into solana-labs:master Mar 31, 2023
@pgarg66 pgarg66 deleted the stable-genesis-test branch March 31, 2023 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants