Commit Graph

60 Commits

Author SHA1 Message Date
Sunny Gleason 323673c3c0
Add `compact_cf` calls to reclaim storage during ledger slot purge (#7264) 2019-12-18 10:29:46 -05:00
Sunny Gleason 84b07c81fd
Fix/remove short circuit logic in ledger_purge_batch (&& -> &), found/fixed by @sdhawan (#7526) 2019-12-17 15:08:40 -05:00
Tyera Eulberg 6b88da2b82
Hook up getBlockTime rpc to real data (#7476)
* Add blocktree timestamp helper functions and tests

* Flesh out blocktree::get_block_time

* Move stakes up into rpc to make testing easier; expand tests

* Review comments
2019-12-14 12:23:02 -07:00
Pankaj Garg 7adc721d96
Generate MAX_DATA_SHREDS_PER_FEC_BLOCK coding shreds for each FEC block (#7474)
* Generate MAX_DATA_SHREDS_PER_FEC_BLOCK coding shreds for each FEC block

* fix tests, and detangle ErasureMeta::status
2019-12-13 14:50:22 -08:00
Pankaj Garg 75d1aa5135 Perform erasure recovery when repaired data shreds are received (#7463)
automerge
2019-12-12 17:50:28 -08:00
Pankaj Garg d94041e98d
Allow coding shred index to be different than data shred index (#7438)
* Allow coding shred index to be different than data shred index

* move fec_set_index to shred's common header

* fix bench
2019-12-12 16:50:29 -08:00
Sunny Gleason 115bf2613d
feat: add analyze-storage command to ledger-tool (#7165) 2019-12-12 18:54:50 -05:00
Sunny Gleason 83218c479a
code cleanup, storage_size() was Option<u64>, now Result<u64> (#7424) 2019-12-12 14:55:30 -05:00
Tyera Eulberg 1d0ba0d1f2
Add special handling for snapshot root slot in get_confirmed_block (#7430)
* Add special handling for snapshot root slot

* Improve test
2019-12-11 15:06:54 -07:00
Sunny Gleason 601d7a52e9
add documentation for storage_size() method (#7416) 2019-12-11 09:47:12 -05:00
Sunny Gleason 06415de8ee
change blocktree*::storage_size() to return Option<u64> to handle live fs changes (#7401) 2019-12-10 19:12:49 -05:00
carllin bee3829960
Remove redundant check (#7369) 2019-12-09 01:12:14 -08:00
carllin b55b646f12
Fix Erasure Index (#7319)
Fix Erasure Index Check to set the erasure presence
2019-12-09 00:13:36 -08:00
Sunny Gleason c00216e3be
feat: ledger size and cleanup metrics (#7335) 2019-12-06 22:32:45 -05:00
Sagar Dhawan a95d37ea25
Fix repair slowness when most peers are unable to serve requests (#7287)
* Fix repair when most peers are incapable of serving requests

* Add a test for getting the lowest slot in blocktree

* Replace some more u64s with Slot
2019-12-05 11:25:13 -08:00
Greg Fitzgerald 6796b08909
Migrate to thiserror (#7177)
* Migrate to thiserror

* Discourage the use of other modules' Result alias

`io::Result` set a bad precedent. Don't import other `Result`
aliases.
2019-12-02 15:42:05 -07:00
carllin c706f9b2cd Change from using fixed number of ticks in delay calculation (#7152)
automerge
2019-11-26 16:21:02 -08:00
Tyera Eulberg 58c144ee55
Add getBlockTime rpc api (#7130)
* Add getBlockTime rpc api

* Add getBlockTime to docs

* Fix duration rounding for common tick/slot durations; add slot duration calculation

* Expose slots_per_year

* Use genesis values instead of clock defaults to calculate block offset

* Add get-block-time cli subcommand

* Fix test_rent: decrease magic number usage
2019-11-26 00:40:36 -07:00
Michael Vines 280315a314
mut 2019-11-25 22:49:15 -07:00
Michael Vines acd1505050
Stop open measurement before logging it 2019-11-25 22:20:34 -07:00
Ryo Onodera 8cbc450192 Create genesis.tar.bz2 in solana-genesis (#7039)
* Use clap_utils

* Create genesis.tar.bz2 in solana-genesis

* Remove shell-based genesis.tar.bz2 generation

* Make Option=>Result conv more rusty

* stop using solana_logger

* Simplify by just using vec!

* clean up abit
2019-11-21 10:57:27 -07:00
Tyera Eulberg 97ca6858b7
Write transaction status and fee into persistent store (#7030)
* Pass blocktree into execute_batch, if persist_transaction_status

* Add validator arg to enable persistent transaction status store

* Pass blocktree into banking_stage, if persist_transaction_status

* Add validator params to bash scripts

* Expose actual transaction statuses outside Bank; add tests

* Fix benches

* Offload transaction status writes to a separate thread

* Enable persistent transaction status along with rpc service

* nudge

* Review comments
2019-11-20 16:43:10 -07:00
Jack May d2ed921bc6
Cleanup nightly warnings (#7055) 2019-11-19 20:15:37 -08:00
Tyera Eulberg ea656b1a3f
Add parent slot to getConfirmedBlock (#7038)
* Add parent slot to getConfirmedBlock

* Fix bad text-replace

* Use camelCase in getConfirmedBlock
2019-11-19 09:39:55 -07:00
Sagar Dhawan 6bfe0fca1f
Add a version field to shreds (#7023)
* Add a version field to shreds

* Clippy

* Fix Chacha Golden

* Fix shredder bench compile

* Fix blocktree bench compile
2019-11-18 18:05:02 -08:00
Tyera Eulberg e0a2bb9d86
Legitimately map transactions to statuses in blocktree (#7011)
* Refactor rocksdb TransactionStatus to store/return struct; hook up map_transactions_to_statuses

* Cleanup use statements
2019-11-18 09:12:42 -07:00
Tyera Eulberg 3bc8d78801
Add ConfirmedBlock struct, and rework Blocktree apis to include block… (#7004)
* Add RpcConfirmedBlock struct, and rework Blocktree apis to include blockhash info and dummy tx statuses

* Remove unused lifetime
2019-11-17 20:17:15 -07:00
Sunny Gleason 086e5da8d0
feat: add TransactionStatus column family and test (#6958) 2019-11-17 11:26:01 -05:00
Tyera Eulberg 852a2146ab
Add Blocktree api to get transactions by slot (#6966)
* Add blocktree method to get confirmed-block txs

* Clean up use statements

* Add test, and fmt

* Plumb new blocktree method into getConfirmedBlock
2019-11-14 16:34:39 -07:00
Sagar Dhawan 79d7090867
Remove obsolete references to Blob (#6957)
* Remove the name "blob" from archivers

* Remove the name "blob" from broadcast

* Remove the name "blob" from Cluset Info

* Remove the name "blob" from Repair

* Remove the name "blob" from a bunch more places

* Remove the name "blob" from tests and book
2019-11-14 11:49:31 -08:00
carllin 43e2301e2c
Fix roots overrunning broadcast (#6884)
* Add trusted pathway for insert_shreds to avoid checks
2019-11-14 00:32:07 -08:00
Michael Vines ee5cc733a1 Log blocktree and snapshot open times (#6930)
automerge
2019-11-13 11:20:39 -08:00
Greg Fitzgerald 30a08f4282 Cleanup ledger macros (#6916)
automerge
2019-11-13 07:14:09 -08:00
Sagar Dhawan 5670cafda4
Fix caching data shreds as coding shreds (#6877) 2019-11-12 10:29:58 -08:00
Pankaj Garg e8e13fdeeb
Insert coding shreds to blocktree only if needed in future (#6836)
* Insert coding shreds to blocktree only if needed in future

* fixes
2019-11-11 13:12:55 -08:00
Justin Starry 9807f47d4e
Rename genesis block to genesis config (#6816) 2019-11-08 23:56:57 -05:00
Justin Starry 02058ea699
Reject blocks with invalid last ticks in replay stage (#6833)
* Reject blocks with invalid last ticks in replay stage

* slot_full
2019-11-08 20:21:54 -05:00
Sagar Dhawan 67d1e2903c
Upgrade Repair be more intelligent and agressive (#6789)
* Upgrade Repair be more intelligent and agressive

* Fix u64 casts

* Fix missing bracket

* Add 1 second delay to test to allow repair to kick in
2019-11-07 11:08:09 -08:00
Pankaj Garg 0ace79939b
Add reference tick to data shreds (#6772)
* Add reference tick to data shreds

* fix tests
2019-11-06 13:27:58 -08:00
carllin 7ff2a44a63 Make last shred for an interrupted slot signed + typed (#6760) 2019-11-06 08:25:17 -07:00
Michael Vines 09e648f957
ledger-tool/: Include full validator voting history in fork-graph (#6756) 2019-11-05 19:40:00 -07:00
Michael Vines 85c9a231c1
Include the affected slot in blocktree error metrics (#6734) 2019-11-05 13:25:21 -07:00
Michael Vines 7203036e3e Adjust nofiles within Blocktree::open() for all ledger/ users (#6737)
automerge
2019-11-05 11:18:49 -08:00
Parth d207a34736
remove duplicate signal handling (#6702) 2019-11-05 11:36:51 +05:30
Michael Vines 50a17fc00b Use Slot and Epoch type aliases instead of raw u64 (#6693)
automerge
2019-11-02 00:38:30 -07:00
carllin c52830980a
Rework get_slot_meta (#6642)
* Assert slotmeta is not orphan

* Clean up get_slot_meta functionality

* Add test
2019-10-31 14:03:41 -07:00
Justin Starry e8e5ddc55d
Verify number of hashes for each block of entries (#6262)
* Verify number of hashes for each block of entries

* Fix blocktree processor tick check

* Rebase once more
2019-10-31 16:38:50 -04:00
carllin 9d65e6f183
Fix check in should_insert_data_shred (#6649) 2019-10-30 23:37:25 -07:00
carllin 6454bfe754
Rework get_index_meta (#6636) 2019-10-30 16:48:59 -07:00
Michael Vines b04c8c1c1a Demote blocktree metrics log level (#6590)
automerge
2019-10-28 14:46:43 -07:00