forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Updates frozen abi test for bank snapshot serialization #1544
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```diff ❯ diff -u bank__serde_snapshot__tests__test_bank_serialize__BankAbiTestWrapperNewer_frozen_abi__test_abi_digest_7K1xfUkoCwhxssszgoSpbeMCcX3KEyjycGyLXrpFaJNe bank__serde_snapshot__tests__test_bank_serialize__BankAbiTestWrapper_frozen_abi__test_abi_digest_6riNuebfnAUpS2e3GYb5G8udH5PoEtep48ULchLjRDCB --- bank__serde_snapshot__tests__test_bank_serialize__BankAbiTestWrapperNewer_frozen_abi__test_abi_digest_7K1xfUkoCwhxssszgoSpbeMCcX3KEyjycGyLXrpFaJNe 2024-05-30 11:28:12 +++ bank__serde_snapshot__tests__test_bank_serialize__BankAbiTestWrapper_frozen_abi__test_abi_digest_6riNuebfnAUpS2e3GYb5G8udH5PoEtep48ULchLjRDCB 2024-05-30 11:56:46 @@ -1,4 +1,4 @@ -struct BankAbiTestWrapperNewer (fields = 1) +struct BankAbiTestWrapper (fields = 1) field bank: __SerializeWith tuple (elements = 5) element solana_runtime::serde_snapshot::SerializableVersionedBank @@ -2009,73 +2009,74 @@ primitive u8 field incremental_capitalization: u64 primitive u64 - element core::option::Option<solana_program::hash::Hash> + element core::option::Option<solana_accounts_db::epoch_accounts_hash::EpochAccountsHash> enum Option (variants = 2) variant(0) None (unit) - variant(1) Some(solana_program::hash::Hash) (newtype) - struct Hash([u8; 32]) (newtype) - tuple (elements = 32) - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 - element u8 - primitive u8 + variant(1) Some(solana_accounts_db::epoch_accounts_hash::EpochAccountsHash) (newtype) + struct EpochAccountsHash(solana_program::hash::Hash) (newtype) + struct Hash([u8; 32]) (newtype) + tuple (elements = 32) + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 + element u8 + primitive u8 ```
jeffwashington
approved these changes
May 30, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The frozen abi test that we have for the bank serialization is not accurate/up to date with what we actually are serializing!
Summary of Changes
Update the test to use the same serializing function that real snapshotting uses.
Updated frozen abi digest details
The frozen abi digest for the test changed. This is expected, as we weren't testing the same thing as what is actually used by a real validator.
Here's the diff of the changes.
Hash
for the epoch accounts hash, but real validators useEpochAccountsHash
. So now the test correctly reflects that.