Commit Graph

35 Commits

Author SHA1 Message Date
Michael Vines 558f10c862 Rename PohEntry.id to PohEntry.hash 2019-03-01 09:50:51 -08:00
Michael Vines 7c4473e0aa Rename Entry.id to Entry.hash 2019-03-01 09:31:49 -08:00
Michael Vines 7e7b79ef34 Rename prev_id to prev_hash 2019-03-01 09:31:49 -08:00
Michael Vines e993d511e3 Rename last_entry_id variables to last_entry_hash 2019-03-01 09:01:59 -08:00
anatoly yakovenko 6dcb97af9e
Move PohService and PohRecorder out of banking_stage and into fullnode (#2852)
* Move PohService out of banking_stage and into fullnode.

* 10 second slots
2019-02-26 10:48:18 -08:00
Anatoly Yakovenko 58eebd7f6c Remove tick counting from broadast service 2019-02-25 18:17:36 -08:00
anatoly yakovenko c65046e1a2
Use PohRecorder as the Poh synchronization point. (#2926)
Cleanup poh_recorder and poh_service.

* ticks are sent only if poh.tick_height > WorkingBank::min_tick_height and <= WorkingBank::max_tick_height
* entries are recorded only if poh.tick_height >= WorkingBank::min_tick_height and < WorkingBank::max_tick_height
2019-02-24 08:59:49 -08:00
Anatoly Yakovenko 5492aad61e Cache ticks until a working bank can pick them up 2019-02-20 14:14:38 -08:00
Michael Vines 8d38c2f800 Remove Entry::tick_height field 2019-02-20 07:47:04 -08:00
anatoly yakovenko 0ef670a865
Move sender out of poh_recorder (#2837) 2019-02-19 16:22:33 -08:00
Greg Fitzgerald dde886f058 Move Bank to its own crate
Also:
* counters.rs to solana_metrics
* genesis_block.rs to solana_sdk
2019-02-19 07:17:04 -07:00
anatoly yakovenko fc2760e761
Remove bank dependency from poh_recorder (#2810)
* Remove bank dependency from poh_recorder

* clippy
2019-02-18 06:33:07 -08:00
Michael Vines c5a74ada05 leader_scheduler: remove bootstrap_height 2019-02-06 14:23:10 -08:00
carllin 37003da854
Fix potential of checking tvu bank for truth when its behind (#2614)
* Fix race between tpu and tvu, where tvu bank is not caught up to tpu bank

* Add test

* Cleanup Fullnode tests
2019-01-31 19:21:02 -08:00
Rob Walker 8ba1d5f426
treat genesis special (#2615)
* treat genesis special

* fix poh_recorder to understand new world order
2019-01-31 13:53:08 -08:00
Michael Vines bfaf5634a1 .unwrap() in tests instead of assert!()ing .is_ok() for a better failure message 2019-01-28 16:10:32 -08:00
Michael Vines 4bb6549895 Genesis block is now a json file 2019-01-25 09:05:15 -08:00
carllin 6fcccedb70
align tick entries' tick_height with actual number of ticks in bank (#2147) 2018-12-14 02:25:50 -08:00
Rob Walker 9880a86f80
remove prev_id, unused (#2150) 2018-12-13 09:24:38 -08:00
Rob Walker 3408ce89a7
add check_tick_height (#2144) 2018-12-12 18:52:11 -08:00
Rob Walker aeee25e703
add tick_height to Entry to be able to repair by period, chain forks of Entries, etc. (#2096) 2018-12-10 20:03:04 -08:00
Greg Fitzgerald ec5a8141eb cargo fix --edition 2018-12-08 23:19:55 -07:00
Michael Vines 214ed3667c Move system_transaction out of src/ 2018-12-05 10:49:06 -08:00
Michael Vines 0878bd53d9 Delete stub src/transaction.rs 2018-11-29 23:07:57 -08:00
Michael Vines d96a6b42a5 Move drone into its own crate 2018-11-16 20:42:21 -08:00
Rob Walker fa72160c95
add last_id to Entry, PohEntry (#1783)
add prev_id to Entry, PohEntry
2018-11-12 17:03:23 -08:00
Rob Walker d831c5dcc9
remove dead poh code (#1747) 2018-11-08 12:55:23 -08:00
Rob Walker 1fbf1d2cf2
Add checkpoint, rollback to to bank (#1662)
add linked-list capability to accounts

change accounts from a linked list to a VecDeque

add checkpoint and rollback for lastids

add subscriber notifications for rollbacks

checkpoint transaction count, too
2018-11-05 09:47:41 -08:00
carllin 0636399b7a
Compute finality computation in new ComputeLeaderFinalityService (#1652)
* Move finality computation into a service run from the banking stage, ComputeLeaderFinalityService

* Change last ids nth to tick height, remove separate tick height from bank
2018-11-02 15:49:14 -07:00
Rob Walker 13bfdde228
remove ledger tail code, WINDOW_SIZE begone (#1617)
* remove WINDOW_SIZE, use window.window_size()
* move ledger tail, redundant with ledger-based repair
2018-10-30 10:05:18 -07:00
carllin 55833e20b1
Create Poh Service (#1604)
* Create new Poh Service, replace tick generation in BankingStage
2018-10-25 14:56:21 -07:00
carllin 0bd1412562
Switch leader scheduler to use PoH ticks instead of Entry height (#1519)
* Add PoH height to process_ledger()

* Moved broadcast_stage Leader Scheduling logic to use Poh height instead of entry_height

* Moved LeaderScheduler logic to PoH in ReplicateStage

* Fix Leader scheduling tests to use PoH instead of entry height

* Change is_leader detection in repair() to use PoH instead of entry height

* Add tests to LeaderScheduler for new functionality

* fix Entry::new and genesis block PoH counts

* Moved LeaderScheduler to PoH ticks

* Cleanup to resolve PR comments
2018-10-18 22:57:48 -07:00
carllin 47f69f2d24
1) Switch broken tests to generate an empty tick in their ledgers to use as last_id, 2) Fix bug where PoH generator in BankingStage did not referenced the last tick instead of the last entry on startup, causing ledger verification to fail on the new tick added by the PoH generator (#1479) 2018-10-12 00:39:10 -07:00
anatoly yakovenko 5c85e037f8
Tick entry ids as only valid last_ids (#1441)
Generate tick entry ids and only register ticks as the last_id expected by the bank.  Since the bank is MT, the in-flight pipeline of transactions cannot be close to the end of the queue or there is a high possibility that a starved thread will encode an expired last_id into the ledger.  The banking_stage therefore uses a shorter age limit for encoded last_ids then the validators.

Bench client doesn't send transactions that are older then 30 seconds.
2018-10-10 17:23:06 -07:00
Anatoly Yakovenko 93c4f6c9b8 Synchronize PoH, bank last_id queue and ledger entry channel.
PoH, bank's last_id queue and the Entry channel need to have a synchronized order of ids.
2018-09-26 16:19:03 -07:00