Commit Graph

674 Commits

Author SHA1 Message Date
Yueh-Hsuan Chiang
f999eef452 (LedgerStore) Rename BlockstoreAdvancedOptions to LedgerColumnOptions (#23764)
This PR renames BlockstoreAdvancedOptions to LedgerColumnOptions, as we will
pass-down this struct to LedgerColumn to allow it to perform metric reporting.
2022-03-18 11:13:35 -07:00
behzad nouri
6b0d34d70d removes redundant Arcs from Blockstore (#23735) 2022-03-17 19:43:57 +00:00
Yueh-Hsuan Chiang
86c695268e (LedgerStore) Improve the function API of new_cf_descriptor (#23696)
As we start adding more options into BlockstoreOptions, it's better to allow
new_cf_descriptor to take the reference to BlockstoreOptions so that
we can avoid future function API changes on new_cf_descriptor.
2022-03-16 11:47:49 -07:00
Michael Vines
390c5667f7 Setup bank hard_forks in load_bank_forks() 2022-03-15 23:08:07 -07:00
steviez
e7cf84a593 Remove AccessType arg from create_new_ledger (#23591)
Creating a new ledger implicitly means that no other process could have
previously held access to it. Additionally, creating a new ledger
implicitly requires writing, so it follows that Primary access is
required and we can drop access type as an argument.
2022-03-15 00:07:16 -05:00
Michael Vines
390dc24608 Create leader schedule before processing blockstore 2022-03-14 15:29:58 -07:00
Michael Vines
115f376465 Factor out bank_forks_utils::load_bank_forks() 2022-03-14 15:29:58 -07:00
Michael Vines
63324be5b3 Remove last_full_snapshot_slot return value when it can be derived by the caller 2022-03-14 15:29:58 -07:00
Michael Vines
cf5048faaa Eliminate to_loadresult() 2022-03-14 15:29:58 -07:00
Michael Vines
3d4bf1d00a Refactor bank_forks_utils::load() to invoke a common process_blockstore_from_root() 2022-03-14 15:29:58 -07:00
Michael Vines
c2ce152be8 Inline do_process_blockstore_from_root 2022-03-14 15:29:58 -07:00
Michael Vines
07d5ee062d Push recyclers down the stack 2022-03-14 15:29:58 -07:00
HaoranYi
fc2d1a61f3 signing_coding_time is not used (#23655) 2022-03-14 17:16:30 -05:00
Yueh-Hsuan Chiang
1e20bd8f9a (LedgerStore) Include storage type as a tag in RocksDB metric reporting (#23523)
#### Summary of Changes
This PR further enables group by operation on storage type in blockstore_rocksdb_cfs metrics.
Such group-by allows us to further compare the performance metrics between rocks-level and
rocks-fifo.

To make things extensible, this PR introduces BlockstoreAdvancedOptions and move shred_storage_type. 
All fields in BlockstoreAdvancedOptions will support group-by operation in blockstore_rocksdb_cfs.

Dependency: #23580
2022-03-11 15:17:34 -08:00
Yueh-Hsuan Chiang
99f1a22b9d (LedgerStore) Generalize RocksDB metric reporting macro (#23580)
#### Summary of Changes

This PR generalizes RocksDB metric reporting macro so that future RocksDB metrics can
reuse the same macro.
2022-03-10 23:13:59 -08:00
HaoranYi
83f5f8bfc3 Move test_purge_huge test (#23587)
* ignore test_purge_huge tests it is expensive.

* move test_purge to integration tests
2022-03-10 15:31:43 -06:00
Brooks Prumo
3c6840050c Ensure blocks do not exceed the max accounts data size during Replay Stage (#23422) 2022-03-10 10:24:31 -06:00
steviez
58c0db9704 Cleanup several blockstore functions (#23390)
* Rename excludes_from_compaction to should_exclude_from_compaction
* Make subfunction to create all cf descriptors
* Condense logic for when to disable compactions
2022-03-10 02:08:38 -06:00
Michael Vines
5599bd9442 Remove BankFromArchiveTimings from ledger/ 2022-03-08 08:11:50 -08:00
Michael Vines
9cfa21f7d1 Inline load_from_genesis 2022-03-08 08:11:50 -08:00
Yueh-Hsuan Chiang
b8b7163b66 (Ledger Store) Report RocksDB Column Family Metrics (#22503)
This PR enables blockstore to periodically report RocksDB column family properties.
The reported properties are under blockstore_rocksdb_cfs, and the properties also
support group by operation on cf_name.
2022-03-05 16:13:03 -08:00
Michael Vines
36ad59673c drop mut 2022-03-04 09:52:46 +01:00
Michael Vines
0d33b54d74 Rework do_process_blockstore_from_root to use BankForks 2022-03-04 09:52:46 +01:00
Michael Vines
93c8e04d51 Simplify do_process_blockstore_from_root slightly 2022-03-04 09:52:46 +01:00
Yueh-Hsuan Chiang
62d2a4cd88 Make ShredStorageType::RocksLevel public (#23272)
#### Summary of Changes
This PR adds two hidden arguments to the validator that allow users to use RocksDB's FIFO compaction for storing shreds.

        --shred-storage <SHRED_STORAGE>
            EXPERIMENTAL: Controls how RocksDB compacts shreds.  *WARNING*: You will lose your ledger data
            when you switch between options. Possible values are: 'level': stores shreds using RocksDB's default (level)
            compaction. 'fifo': stores shreds under RocksDB's FIFO compaction. This option is more efficient on
            disk-write-bytes of the ledger store. [default: level]  [possible values: level, fifo]

        --shred-storage-size <SHRED_STORAGE_SIZE_BYTES>
            The shred storage size in bytes. The suggested value is 50% of your ledger storage size in bytes. [default:
            268435456000]
2022-03-03 12:43:58 -08:00
Yueh-Hsuan Chiang
634f4eb37d (LedgerStore) Use different path for different blockstore storage type. (#23236)
#### Summary of Changes
To avoid mixing the use of different shred storage types, each shred storage type
will have its blockstore in a different directory.

This PR still keeps the RocksFifo setting hidden.  The default ShredStorageType and
blockstore directory are still RocksLevel and `rocksdb`.

Will follow-up with PRs on making FIFO option public in ledger-tool and validator.

#### Test Plan
* Added a new test to verify the existence of `rocksdb-fifo` directory when FIFO compaction is used.
* Updated existing test to verify the current setting still store ledger under `rocksdb` directory.
* Manually ran ledger_cleanup_test with both level and fifo compaction and verified the resulting ledger.
* Ran a validator with this PR.
2022-03-02 18:30:22 -08:00
Jeff Washington (jwash)
ef8b7d9c62 ledger tool halt at slot verify hash (#23424) 2022-03-02 11:11:18 -06:00
Tyera Eulberg
3b5b71ce44 Improve UX querying rpc for blocks at or before the snapshot from boot (#23403)
* Bump first-available block to first complete block

* Remove obsolete purges in tests (PrimaryIndex toggling no longer in use

* Check first-available block in Rpc check_slot_cleaned_up
2022-02-28 23:57:41 -07:00
Jeff Washington (jwash)
39c86c6c44 fmt (#23329) 2022-02-24 12:12:29 -06:00
steviez
12bddbc4ec Use rocksdb property constant instead of local constant (#23147) 2022-02-23 23:02:11 -06:00
Justin Starry
d0e85c293f Fix rustfmt check (#23296) 2022-02-23 16:38:53 +08:00
Gavin Chan
20d031e2b8 Refactor ExecuteTimings w/ enum-indexed array (#23085) 2022-02-22 14:46:56 -08:00
Yueh-Hsuan Chiang
8c872e9ce0 (LedgerStore/FIFO) Refactor FIFO options and sanity check. (#23131) 2022-02-19 00:58:38 -08:00
Justin Starry
1719d2349f Skip adding builtins if they will be removed (#23233)
* Add failing test for precompile transition

* Skip adding builtins if they will be removed

* cargo clean

* nits

* fix abi check

* remove workaround

Co-authored-by: Jack May <jack@solana.com>
2022-02-18 18:36:59 -08:00
Yueh-Hsuan Chiang
7939fdc3e5 Minor refactor on Shreds column family descriptor construction. (#23103) 2022-02-16 00:29:11 -08:00
Lijun Wang
c04438be4b Retaining transaction logs when transaction plugin is loaded. (#22874)
Transaction logs are not being saved to the database through the plugin interface.

Summary of Changes

Retain the transaction logs when transaction notification plugin is loaded.

Fixes #
lijunwangs/solana-accountsdb-plugin-postgres#6
2022-02-11 20:29:07 -08:00
Yueh-Hsuan Chiang
6399647e64 (Ledger Store) Add code comments for SlotMetaWorkingSetEntry. (#22662) 2022-02-11 10:04:26 -08:00
HaoranYi
e4a1799334 fix typos in ledge code comments (#23068) 2022-02-10 20:43:44 -07:00
Yueh-Hsuan Chiang
9213fcb11b Introduce experimental FIFO-compaction option for shreds in blockstore (#22140) 2022-02-10 11:34:03 -08:00
Justin Starry
d5dec989b9 Enforce tx metadata upload with static types (#23028) 2022-02-10 13:28:18 +08:00
Pankaj Garg
a146f2d853 suppress clippy 2022-02-07 08:02:58 -08:00
Pankaj Garg
c5d8560cdb updates to address review feedback 2022-02-07 08:02:58 -08:00
Pankaj Garg
dfef68f985 fix build 2022-02-07 08:02:58 -08:00
Pankaj Garg
4de14e530b Optimize batching of transactions during replay for parallel processing 2022-02-07 08:02:58 -08:00
Yueh-Hsuan Chiang
37afdd1a65 (Ledger Store) Improve comments for blockstore_purge (#22808) 2022-02-06 21:56:23 -08:00
steviez
c7ca2f41f5 Add some comments for RocksDB option configuration (#22655) 2022-02-06 23:28:24 -06:00
Justin Starry
ba215e94f6 Refactor: Add AccountKeys struct for static and dynamic message keys (#22960) 2022-02-05 20:00:31 +08:00
Jeff Washington (jwash)
fb95fa68a2 cleanup api (#22845) 2022-01-31 11:39:23 -06:00
Yueh-Hsuan Chiang
aaae5b3ba6 (Ledger Store) Add comment blocks for six pub functions in blockstore.rs (#22476) 2022-01-28 22:25:07 -08:00
Yueh-Hsuan Chiang
40a49081b9 (Ledger Store) Add comments for find slot functions. (#22666) 2022-01-28 12:07:09 -08:00