Commit Graph

25 Commits

Author SHA1 Message Date
Yueh-Hsuan Chiang 71b6370426
Abstract out StoredAccountMeta as an Enum (#30478)
#### Problem
The existing StoredAccountMeta requires the file and in-memory layout of
account metadata to match StoredMeta and AccountMeta.  This limits the
flexibility to implement different accounts storage file formats.

#### Summary of Changes
This PR abstracts out StoredAccountMeta as an Enum.
2023-03-09 15:52:51 -08:00
Yueh-Hsuan Chiang 33e179905f
getter functions for StoredAccountMeta (#30447)
This PR makes all the StoredAccountMeta fields pub(crate)
and provides getter functions to access its member fields.

This PR is a preparation step for abstracting out StoredAccountMeta.
2023-02-27 10:03:22 -08:00
Yueh-Hsuan Chiang ac7e7aa8f0
Move account-meta structs from append_vec.rs to account_meta.rs (#30443)
#### Problem
As we start supporting new storage formats, those account-meta
structs will be shared by different storage formats and thus need
a new home.

#### Summary of Changes
This PR creates meta.rs under account_storage and moves all the account-meta
structs out from append_vec.rs.
2023-02-22 16:10:34 -08:00
Jeff Washington (jwash) 1c4e84b8ca
impl default version of contains_multiple_slots (#30055) 2023-02-01 13:01:01 -08:00
Jeff Washington (jwash) 3b2c2ebf9e
add StorableAccountsBySlot to move accounts from multiple slots to 1 (#30023) 2023-02-01 12:10:12 -08:00
Jeff Washington (jwash) c8ed54acbd
simplify 2 StorableAccounts impls (#30054) 2023-02-01 12:08:28 -08:00
behzad nouri 272e667cb2
deprecates Pubkey::new in favor of Pubkey::{,try_}from (#29805)
The commit deprecates Pubkey::new which lacks type-safety and instead
implements TryFrom<&[u8]> and TryFrom<Vec<u8>> for Pubkey.
2023-01-21 18:06:27 +00:00
Jeff Washington (jwash) 0f16120b03
remove FoundStoredAccount (#29591) 2023-01-10 13:57:34 -08:00
behzad nouri 5c9beef498
fixes errors from clippy::useless_conversion (#29534)
https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2023-01-05 18:05:32 +00:00
Jeff Washington (jwash) b77bef4ee3
write_version -> write_version_obsolete (#29176) 2022-12-14 07:43:40 -08:00
Jeff Washington (jwash) 58e12cf963
avoid copies when writing to an ancient append vec (#28981)
* avoid copies when writing to an ancient append vec

* update comments
2022-11-30 10:09:23 -08:00
Jeff Washington (jwash) 5d88a9b32b
improve perf of storing accounts for shrink/ancient (#28880)
* improve perf of storing accounts for shrink/ancient

* rename

* phantom data

* update comment

* make impl Borrow<Hash> consistent

* remove unused static
2022-11-22 15:36:57 -08:00
Jeff Washington (jwash) 9acfa08838
remove per-account slot in ancient append vecs (#28851)
* remove per-account slot in ancient append vecs

* review fixes
2022-11-18 10:15:41 -08:00
Brooks Prumo d1ba42180d
clippy for rust 1.65.0 (#28765) 2022-11-09 19:39:38 +00:00
Jeff Washington (jwash) 0b51b15af2
remove duplicate pubkey during shrink (#28689) 2022-11-01 07:45:52 -07:00
Jeff Washington (jwash) c47515d055
remove duplicate pubkey when shrinking or combining ancient (#28678) 2022-10-31 12:00:55 -07:00
Jeff Washington (jwash) fd2e671861
remove slot# from account hash (#28405)
* remove slot# from account hash

* add feature

* fix tests

* constants to help clarify 'irrelevant' changes

* move to enum for enforcing irrelevancy

* ignore unsupported tests
2022-10-18 08:03:37 -07:00
Brennan Watt e4a7d01e10
Rust v1.63 (#27303)
* Upgrade to Rust v1.63.0

* Add nightly_clippy_allows

* Resolve some new clippy nightly lints

* Increase QUIC packets completion timeout

* Update quinn-udp crate

Co-authored-by: Michael Vines <mvines@gmail.com>
2022-08-22 18:01:03 -07:00
Brennan Watt 7573000d87
Revert "Rust v1.63.0 (#27148)" (#27245)
This reverts commit a2e7bdf50a.
2022-08-19 09:19:44 +01:00
Brennan Watt a2e7bdf50a
Rust v1.63.0 (#27148)
* Upgrade to Rust v1.63.0

* Add nightly_clippy_allows

* Resolve some new clippy nightly lints

* Increase QUIC packets completion timeout

Co-authored-by: Michael Vines <mvines@gmail.com>
2022-08-17 15:48:33 -07:00
Jeff Washington (jwash) a0c4be8cd7
add StorableAccountsMovingSlots (#24555) 2022-04-21 15:48:20 -05:00
Jeff Washington (jwash) 3f7b8d3d2c
provide default impl of 'is_empty' (#24554) 2022-04-21 12:49:44 -05:00
Jeff Washington (jwash) 0d797e2fff
contains_multiple_slots (#24500) 2022-04-20 09:53:36 -05:00
Jeff Washington (jwash) 2b0f16e7c3
slot per account in StorableAccounts (#23313) 2022-02-24 10:34:38 -06:00
Jeff Washington (jwash) a245efe83d
trait for acct data with slot per item (#23285) 2022-02-23 15:22:29 -06:00