Commit Graph

319 Commits

Author SHA1 Message Date
Michael Vines b05c7d91ed Fix derive_partial_eq_without_eq clippy lint 2022-05-22 22:22:21 -07:00
steviez d65aab4d27
Fix ledger-tool slot to output tx even when tx status is missing (#25434) 2022-05-20 20:56:06 -06:00
Jeff Washington (jwash) 467431de89
add ledger-tool accounts-db-skip-initial-hash-calc (#25354) 2022-05-20 10:27:00 -05:00
apfitzge 1e7d877494
Create-snapshot check if slot is available on startup (#25329)
* Add a check during ledger-tool create-snapshot startup to see if the snapshot slot is available

* check all slots from the start to snapshot_slot during load_bank_forks

* unwrap_or_default incremental snapshot slot before comparison

* Improve error messages on missing or not full slots
2022-05-20 09:11:18 -05:00
sakridge cdac141417
Sort per-program and print a summary of all slots in the range (#25267) 2022-05-19 23:26:29 +02:00
apfitzge 83b245642f
--snapshot-archive-format should not conflict w/ --no-snapshot (#25368) 2022-05-19 12:49:59 -05:00
steviez 3d8e5e91ed
Fix ledger-tool from erroring with unspecified archive_format (#25298)
value_t_or_exit()! will error if the user doesn't specify a value at
runtime, use value_of() instead which will give either the default value
or whatever the user specified.
2022-05-17 15:46:31 -06:00
HaoranYi 3e44046a73
Support lz4 for snapshot archives (#25089)
* add lz4

* add cargo package file

* fix tests

* use fast lz4 compression

* report snapshot archive format

* add test

* code review feedback

* add cargo.lock

* fix var name

* refactor archive format parsing and add default compress cli arg

* clippy

* add from_cli_arg test

* update cargo.lock

* add lz4 support for mmap

* cargo.lock

* clippy
2022-05-16 12:44:15 -05:00
Jeff Washington (jwash) a8930ee14b
add --accounts-db-ancient-append-vecs (#25125) 2022-05-11 08:47:07 -05:00
DimAn 2fa9bc3e70
Add options to store full and/or incremental snapshots in separate locations (#24247) 2022-05-10 16:37:41 -04:00
apfitzge b83fd8b958
ledger-tool: clear non-primary access accounts directory in load_bank_forks (#24958) 2022-05-09 13:17:13 -05:00
Justin Starry 082502d4f3
Fail tx sanitization when ix program id uses lookup table (#25035)
* Fail tx sanitization when ix program id uses lookup table

* feedback
2022-05-07 03:19:50 +08:00
HaoranYi 554467ebd3
add no_os_memory_stats_reporting_arg (#24938) 2022-05-03 11:23:30 -05:00
DimAn 8846aa12ca
ledger-tool: save new snapshots to --snapshot-archive-path (#24883) 2022-05-02 11:00:15 -06:00
steviez 428cf54c91
Change BlockStore TryPrimaryThenSecondary to just Secondary (#23391) 2022-04-29 20:05:39 -05:00
Justin Starry 4e58b3870c
Update all BankForks methods to return owned values (#24801) 2022-04-28 18:51:00 +00:00
Ryo Onodera 412a5a0d33
Credits auto rewind on vote recreation (#22546)
* Credits auto rewind on vote recreation

* Update comment

* Improve comments and tests

* Recommended fn rename

* Restore old feature, and replace new feature key

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2022-04-26 15:49:35 -06:00
Michael Vines 533eadd024 Remove StakeState::get_rent_exempt_reserve() 2022-04-25 21:43:04 -07:00
Michael Vines 83e041299a Run real snapshot packager while processing blockstore at validator startup 2022-04-22 21:17:49 -07:00
steviez 2a770e9726
Use unsigned_abs() instead of casting abs() (#24521) 2022-04-20 12:01:33 -05:00
Jeff Washington (jwash) cfe2177e16
validator option: accounts-db-skip-rewrites (#24504) 2022-04-20 09:41:00 -05:00
Michael Vines 9e4999ef6a Remove halt_at_slot from RuntimeConfig, it's not a runtime concern 2022-04-19 19:23:58 -07:00
Michael Vines c6f3da4879 blockstore_processor now accepts an Arc<Rwlock<BankForks>> 2022-04-19 19:23:58 -07:00
Jeff Washington (jwash) 1bc49d219d
IndexLimitMb option adds 'Unspecified' state (#24249) 2022-04-12 09:38:09 -05:00
Jon Cinque 9b8850f99e
test-validator: Add `--max-compute-units` flag (#24130)
* test-validator: Add `--max-compute-units` flag

* Add `RuntimeConfig` for tweaking runtime behavior

* Actually add the file

* Move RuntimeConfig to runtime
2022-04-12 02:28:10 +02:00
Giorgio Gambino 60b2155bd3
Add accounts-filler-size command line option (#23896) 2022-04-11 13:10:09 -05:00
Jeff Washington (jwash) 64abd008ca
make ledger-tool arg help consistent (#24203) 2022-04-08 15:45:09 -05:00
Christian Kamm a058f348a2 Address review comments 2022-04-08 14:37:55 -05:00
Brooks Prumo c322842257
Replace channel with Mutex<Option> for AccountsPackage (#24013) 2022-04-06 05:47:19 -05:00
steviez b61c0a4a21
Add accounts arg to genesis command to dump genesis account info (#23879) 2022-03-24 14:26:08 -05:00
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
Justin Starry 0eccacbd5b
Add CLI support for versioned transactions (#23606) 2022-03-17 11:43:04 +08:00
Michael Vines 2da4e3eb6c Add --no-os-memory-stats-reporting 2022-03-15 17:07:40 -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
Justin Starry 8c8f9694e0
Refactor: Sanitized transaction creation (#23558)
* Refactor: SanitizedTransaction::try_create optionally computes hash

* Refactor: Add SimpleAddressLoader
2022-03-15 12:02:22 +08:00
Michael Vines 115f376465 Factor out bank_forks_utils::load_bank_forks() 2022-03-14 15:29:58 -07: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
Justin Starry 021135978d
Refactor: Split up cli transaction display methods (#23547) 2022-03-11 10:49:53 +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) 4bc440666a
add arg --disable_accounts_disk_index (#23308) 2022-02-23 18:07:24 -06: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 60af1a4cce
Refactor: Add trait for loading addresses (#22903) 2022-02-03 11:00:12 +00:00
Jeff Biseda 8b66625c95
convert std::sync::mpsc to crossbeam_channel (#22264) 2022-01-11 02:44:46 -08:00
Yueh-Hsuan Chiang 5771c36d3f
Rename open_with_access_type() to open_with_options() (#22123) 2022-01-07 12:11:43 -08:00
steviez 9f1f64e384
Cleanup ledger-tool analyze-storage command (#22310)
* Make ledger-tool analyze-storage use Blockstore::open()

Opening a large ledger may require setting a larger open file descriptor
limit. Blockstore::open() does this whereas the underlying Database
object that analyze-storage was opening does not.

* Move key_size call lookup to take advantage of traits

* Fix typo where analyze worked on wrong column

* Make analyze-storage analyze all columns
2022-01-06 23:40:02 -06:00
Yueh-Hsuan Chiang e8b7f96a89
Add struct BlockstoreOptions (#22121) 2022-01-03 18:30:45 -10:00
Justin Starry 6ff0be6a82
Clean up demote program write lock feature (#21949)
* Clean up demote program write lock feature

* fix test
2021-12-16 17:27:22 -05:00
behzad nouri 8d980f07ba
uses Option<Slot> for SlotMeta.parent_slot (#21808)
SlotMeta.parent_slot for the head of a detached chain of slots is
unknown and that is indicated by u64::MAX which lacks type-safety:
https://github.com/solana-labs/solana/blob/6c108c8fc/ledger/src/blockstore_meta.rs#L203-L205

The commit changes the type to Option<Slot>. Backward compatibility is
maintained by customizing serde serialize/deserialize implementations.
2021-12-14 18:57:11 +00:00
steviez 94b1cf47ca
Plumb verbose_level through ledger-tool slot subcommand (#21670)
* Add commas for readability and fix plurality in a printout
* Pass verbose_level into slot subcommand instead of default to max

This is useful for when a full printout isn't necessary, such as just
trying to determine the slot blockhash. The equivalent behavior before
this change would have been using "-vv" with the command.
2021-12-07 15:14:39 -06:00
Tyera Eulberg 2b269dbe0e
Ledger-tool: only require ledger dir when necessary (#21575)
* Don't canonicalize ledger_path unless ledger_path will be used

* Single use statement
2021-12-02 17:23:51 -07:00