Commit Graph

2380 Commits

Author SHA1 Message Date
Michael Vines
9e2a7921c8 Recover from rebase 2019-02-26 22:08:17 -08:00
Michael Vines
9539154a4a Remove test_name arg 2019-02-26 22:08:17 -08:00
Michael Vines
84bd9296cd Centralize unwrap() within create_new_tmp_ledger! 2019-02-26 22:08:17 -08:00
Michael Vines
88ecce12a2 No longer need to give new_fullnode() a random string 2019-02-26 22:08:17 -08:00
Michael Vines
5a7b99ecc2 Add/employ create_new_tmp_ledger!() 2019-02-26 22:08:17 -08:00
Michael Vines
55a76ed4b0 Populate test ledgers with a full slots to reduce test boilerplate 2019-02-26 22:08:17 -08:00
Pankaj Garg
789fff2ae2 Replace LeaderScheduler with LeaderScheduler1 (#2962)
* Migrate to LeaderScheduler1 (and added some missing methods)
* Delete LeaderScheduler
* Rename LeaderScheduler1 to LeaderScheduler
2019-02-26 22:16:18 -07:00
Carl
ee16cc77a3 Move last_ids to a simple Hash, unwrap from Arc<RwLock>> 2019-02-26 18:19:26 -08:00
Michael Vines
a669241cb1 Add/use get_tmp_ledger_path!() and tmp_copy_blocktree!() 2019-02-26 17:50:43 -08:00
Rob Walker
ea0837973e blocktree_processor to use slots as bank ids, and squash 2019-02-26 17:35:22 -07:00
Sagar Dhawan
ee83a2ac29 Make stake sorting more deterministic for data plane 2019-02-26 14:11:08 -08:00
Michael Vines
82c759b6cb Add whitespace, comment cleanup 2019-02-26 14:07:39 -08:00
Michael Vines
6de5354b8e Update the RPC bank on fullnode rotation 2019-02-26 14:07:39 -08:00
Michael Vines
d1e1258f97 Revert "Ignore flaky test_active_set_refresh_with_bank"
This reverts commit 10ad536e09.
2019-02-26 12:04:58 -08:00
Sagar Dhawan
4d73bbe48f Fix flaky gossip weighted tests 2019-02-26 11:58:03 -08:00
Michael Vines
10ad536e09 Ignore flaky test_active_set_refresh_with_bank 2019-02-26 11:56:47 -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
Michael Vines
9420ba52e9 Squash the new working bank to ensure zero-balance accounts get purged 2019-02-26 10:09:31 -08:00
Greg Fitzgerald
ec35c1fc79 Fix leader scheduling in replay stage 2019-02-26 09:51:12 -07:00
Greg Fitzgerald
af206111e2 Hoist new leader scheduler up to protocol level
Attempt to feel similar to LeaderScheduler to easy migration.
2019-02-26 08:23:01 -08:00
Greg Fitzgerald
f9f493ee7a Tighten up storage_stage changes 2019-02-26 09:05:00 -07:00
Tyera Eulberg
137233b4a1 Add EntryMeta wrapper 2019-02-26 09:05:00 -07:00
Michael Vines
897279eddb Encapsulate log::Level so counter macro users don't need to use it 2019-02-25 20:01:30 -08:00
Carl
5f5725a4ea Re-add leader scheduler 2019-02-25 19:28:24 -08:00
Carl
3e893ffddc Remove max_tick_height, leader_scheduler from broadcast_service 2019-02-25 18:17:36 -08:00
Anatoly Yakovenko
58eebd7f6c Remove tick counting from broadast service 2019-02-25 18:17:36 -08:00
Pankaj Garg
2f44555437 Fix fullnode test 2019-02-25 16:55:22 -08:00
Pankaj Garg
299b642803 Cleanup fullnode rotate integration test, and unignore two tests 2019-02-25 16:55:22 -08:00
Michael Vines
6088b3bfc8 Replace DEFAULT_SLOT_HEIGHT with 0 2019-02-25 13:09:13 -08:00
Carl
0b37f530ae Start replay stage from the slot-relative blob index, not the global entry height 2019-02-25 11:38:46 -08:00
Carl
c13ae10d31 Fix replay_stage to 1) skip leader slots, 2) create/set working banks properly 2019-02-25 11:38:46 -08:00
Carl
1e15e6375a Check for entry height in the unchanging bank_forks_info instead of a racy check to blocktree 2019-02-25 11:38:46 -08:00
Greg Fitzgerald
ec48c58df1 Award tx fees to validators in new leader schedule
Also, generalize the leader_schedule functions a bit to allow for
prev_slot_leader and next_slot_leader, should they be needed.
2019-02-25 08:49:43 -08:00
Greg Fitzgerald
0947ec59c9 Expose the new leader schedule functionality from the bank. 2019-02-25 08:49:43 -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
Greg Fitzgerald
ba7d121724 Switch to Bank::staked_nodes(); want node_id, not staker_id
Also, update LeaderScheduler's code to use node_id as well.
Unfortuntely, no unit tests for this, because there's currently
only one way to set staker_id/node_id, and they are both set
to the same value.
2019-02-24 07:52:44 -07:00
Greg Fitzgerald
a1070e9572 Split ActiveStakers over Bank and LeaderScheduler 2019-02-24 07:52:44 -07:00
Greg Fitzgerald
f89e83ae49 Delete redundant code 2019-02-23 16:09:00 -08:00
Greg Fitzgerald
264f502ed7 Query the bank for the current slot leader 2019-02-23 15:51:37 -07:00
Greg Fitzgerald
c5876ddca9 Make LeaderScheduler::new_with_window_len private
It's useful for unit-testing, but generally isn't a variable
validators should be modifying. Blockstream and BlockstreamService
were the only ones using it. Switching them from a hard-coded 10
to the default didn't cause any test failures, so running with it.
2019-02-23 14:48:27 -07:00
Greg Fitzgerald
fdf6cae6fb Use bank for leader scheduler's config
This ensures GenesisBlock is always configured with the same
ticks_per_slot as LeaderScheduler. This will make it easier
to migrate to bank-generated schedules.
2019-02-23 14:48:27 -07:00
Greg Fitzgerald
d26f836212 tmp_copy_ledger -> tmp_copy_blocktree 2019-02-23 08:32:05 -07:00
Greg Fitzgerald
da98982732 Deprecate tmp_copy_ledger
This should allow us to get rid of all the manual routing of
ticks_per_slot in the test suite.
2019-02-23 07:57:45 -07:00
Greg Fitzgerald
cc10e84ab7 sample_ledger -> sample_blocktree 2019-02-23 07:08:11 -07:00
Greg Fitzgerald
6cd91cd7ec Hold slots_per_epoch, not ticks_per_epoch
Same as bank and less invariants to check
2019-02-22 22:02:23 -07:00
Greg Fitzgerald
e19dbdc527 Use Bank for ticks_per_slot 2019-02-22 22:02:23 -07:00
Stephen Akridge
0b8809da6e Fix duplicated path to fullnode
Fixes flaky tests.
2019-02-22 16:35:40 -08:00
Pankaj Garg
0003dbf3ba remove unnecessary imports 2019-02-22 12:13:05 -08:00
Pankaj Garg
c07b6c30a1 Remove special casing of ProgramError in blocktree processor
- Also refactor bank.rs and add unit tests
2019-02-22 12:13:05 -08:00
Greg Fitzgerald
2d03ae2fae Migrate fullnode to create_tmp_sample_blocktree 2019-02-22 11:18:01 -07:00