Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Add "newer" snapshot serde style with accounts_data_len (and more!)#22467

Closed
brooksprumo wants to merge 8 commits intosolana-labs:masterfrom
brooksprumo:serde-snapshot-3
Closed

Add "newer" snapshot serde style with accounts_data_len (and more!)#22467
brooksprumo wants to merge 8 commits intosolana-labs:masterfrom
brooksprumo:serde-snapshot-3

Conversation

@brooksprumo
Copy link
Copy Markdown
Contributor

@brooksprumo brooksprumo commented Jan 12, 2022

  • Rename current serde style to "older" (for snapshot version 1.2.0)
  • Add a new... "newer"... serde style (for snapshot version 1.3.0)
  • Remove unused bits from Bank and newer snapshot stuffs
  • Add snapshot version 1.3.0
  • Put accounts_data_len into snapshot (for snapshot version 1.3.0)
  • New banks gets accounts_data_len from snapshot, if possible

Problem

Summary of Changes

Fixes #

Updated frozen ABI digests. Here's a diff of the previous "newer" and the current "older" style; the only changes are due to FQNs:

$ diff serde_snapshot__tests__test_bank_serialize__BankAbiTestWrapperOlder_frozen_abi__test_abi_digest_5zTpYmVsKjkvpJB8o95LJWyXe2rV7bnxRPmmfKk75brf serde_snapshot__tests__test_bank_serialize__BankAbiTestWrapperNewer_frozen_abi__test_abi_digest_7PcarCw6gpw9Yw8xypdxQP24TFjLiaHyuDkq95cgwtte
1c1
< struct BankAbiTestWrapperOlder (fields = 1)
---
> struct BankAbiTestWrapperNewer (fields = 1)
4c4
<             element solana_runtime::serde_snapshot::older::SerializableVersionedBank
---
>             element solana_runtime::serde_snapshot::newer::SerializableVersionedBank
803c803
<                     field unused_accounts: solana_runtime::serde_snapshot::older::UnusedAccounts
---
>                     field unused_accounts: solana_runtime::serde_snapshot::common::UnusedAccounts
1621c1621
<             element solana_runtime::serde_snapshot::SerializableAccountsDb<solana_runtime::serde_snapshot::older::Context>
---
>             element solana_runtime::serde_snapshot::SerializableAccountsDb<solana_runtime::serde_snapshot::newer::Context>
1623c1623
<                     element solana_runtime::serde_snapshot::utils::serialize_iter_as_map::SerializableMappedIterator<core::iter::adapters::map::Map<core::slice::iter::Iter<alloc::vec::Vec<alloc::sync::Arc<solana_runtime::accounts_db::AccountStorageEntry>>>, <solana_runtime::serde_snapshot::older::Context as solana_runtime::serde_snapshot::TypeContext>::serialize_accounts_db_fields<solana_frozen_abi::abi_digester::AbiDigester>::{{closure}}>>
---
>                     element solana_runtime::serde_snapshot::utils::serialize_iter_as_map::SerializableMappedIterator<core::iter::adapters::map::Map<core::slice::iter::Iter<alloc::vec::Vec<alloc::sync::Arc<solana_runtime::accounts_db::AccountStorageEntry>>>, <solana_runtime::serde_snapshot::newer::Context as solana_runtime::serde_snapshot::TypeContext>::serialize_accounts_db_fields<solana_frozen_abi::abi_digester::AbiDigester>::{{closure}}>>
1627c1627
<                             value solana_runtime::serde_snapshot::utils::serialize_iter_as_seq::SerializableSequencedIterator<core::iter::adapters::map::Map<core::slice::iter::Iter<alloc::sync::Arc<solana_runtime::accounts_db::AccountStorageEntry>>, <solana_runtime::serde_snapshot::older::Context as solana_runtime::serde_snapshot::TypeContext>::serialize_accounts_db_fields<solana_frozen_abi::abi_digester::AbiDigester>::{{closure}}::{{closure}}>>
---
>                             value solana_runtime::serde_snapshot::utils::serialize_iter_as_seq::SerializableSequencedIterator<core::iter::adapters::map::Map<core::slice::iter::Iter<alloc::sync::Arc<solana_runtime::accounts_db::AccountStorageEntry>>, <solana_runtime::serde_snapshot::newer::Context as solana_runtime::serde_snapshot::TypeContext>::serialize_accounts_db_fields<solana_frozen_abi::abi_digester::AbiDigester>::{{closure}}::{{closure}}>>

@brooksprumo brooksprumo force-pushed the serde-snapshot-3 branch 3 times, most recently from 0e75bdc to e862e52 Compare January 13, 2022 18:51
@brooksprumo brooksprumo changed the title serde snapshot 3: Make "newer" style with accounts_data_len (and more!) Add "newer" snapshot serde style with accounts_data_len (and more!) Jan 13, 2022
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 13, 2022

Codecov Report

Merging #22467 (17c49bc) into master (e291342) will increase coverage by 0.0%.
The diff coverage is 80.0%.

@@           Coverage Diff            @@
##           master   #22467    +/-   ##
========================================
  Coverage    81.1%    81.1%            
========================================
  Files         556      556            
  Lines      150655   150843   +188     
========================================
+ Hits       122268   122423   +155     
- Misses      28387    28420    +33     

@stale
Copy link
Copy Markdown

stale Bot commented Mar 2, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale Bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Mar 2, 2022
@stale
Copy link
Copy Markdown

stale Bot commented Apr 16, 2022

This stale pull request has been automatically closed. Thank you for your contributions.

@stale stale Bot closed this Apr 16, 2022
@brooksprumo brooksprumo deleted the serde-snapshot-3 branch June 28, 2023 12:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

stale [bot only] Added to stale content; results in auto-close after a week.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant