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
Michael Vines
973ad7554e
Remove superfluous GenesisBlock::load()
2019-02-22 08:41:59 -08:00
Greg Fitzgerald
3be154490d
Deprecate create_tmp_sample_ledger
2019-02-22 00:24:46 -07:00
Greg Fitzgerald
4602d3bf46
Unit-tests can use ordinary keypairs
2019-02-21 22:01:20 -08:00
Greg Fitzgerald
778583ad08
Inline BlockConfig::ticks_per_slot
2019-02-21 20:37:21 -08:00
Michael Vines
b501090443
Route BankForks into the ReplayStage
2019-02-21 19:25:17 -08:00
Greg Fitzgerald
f0f55af35b
Add scheduler config to genesis
...
Anything that affects how the ledger is interpreted needs to be
in the genesis block or someplace on the ledger before later
parts of the ledger are interpreted. We currently don't have an
on-chain program for cluster parameters, so that leaves only
the genesis block option.
2019-02-21 17:29:55 -08:00
Pankaj Garg
5c9777970d
moved fee collection code to runtime
2019-02-21 16:35:23 -08:00
Pankaj Garg
c142a82ae0
Charge transaction fee even in case of ProgramError
2019-02-21 16:35:23 -08:00
Tyera Eulberg
d8f6865338
Rename EntryStream to Blockstream
2019-02-21 17:24:29 -07:00
Carl
fc48062867
Rename active_window_length to active_window_num_slots
2019-02-21 15:48:13 -08:00
Michael Vines
d25fc7a649
Stop passing blob_index unnecessarily into ReplayStage
2019-02-21 15:33:01 -07:00
Carl
60a6ff80ee
Change votes and associated test/helper functions to vote based on slot height
2019-02-21 15:31:53 -07:00
Carl
9e1c5e1ab0
switch vote program to use slot height instead of tick height, change confirmation computation to use slots
2019-02-21 15:31:53 -07:00
Greg Fitzgerald
20fffd8abf
Delete BankForks::finalized_bank()
2019-02-21 13:21:08 -08:00
Michael Vines
7cb695df12
RetransmitStage now gets a BankForks
2019-02-21 12:56:56 -08:00
Michael Vines
c94bc2a0b6
Remove dead code
2019-02-21 12:38:43 -08:00
Greg Fitzgerald
511085b747
Make trait pub
2019-02-21 13:32:25 -07:00
Greg Fitzgerald
32caa55d67
Offer a way to get the leader_schedule from any Bank instance
2019-02-21 12:28:11 -08:00
Michael Vines
dcf1200d2a
Make Fullnode do less work on rotation, ReplayStage can just pass along more details
2019-02-21 11:13:06 -08:00
Michael Vines
080db1c62d
Plumb BankForks into GossipService
2019-02-20 22:19:51 -08:00
Michael Vines
4d5e2c8a4d
Plumb BankForks into RPC subsystem
2019-02-20 21:46:48 -08:00