Commit Graph

4127 Commits

Author SHA1 Message Date
Anatoly Yakovenko 58eebd7f6c Remove tick counting from broadast service 2019-02-25 18:17:36 -08:00
Jack May ba5077701d
Avoid possible simplified lowering of passed struct (#2938) 2019-02-25 17:05:59 -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
Jack May a2bf59cbba Ignore rust toolchain and sysroot 2019-02-25 16:40:35 -08:00
Jack May 329382f016
Pull BPF enabled rustc and sysroot into SDK (#2936) 2019-02-25 15:35:45 -08:00
Rob Walker 67c9bbc6b2
* drop parents once merged (#2930)
* add bank.id() which can be used by BankForks, blocktree_processor
* add bank.hash(), make hash_internal_state() private
* add bank.freeze()/is_frozen(), also useful for blocktree_processor, eventual freeze()ing in replay
2019-02-25 14:05:02 -08:00
Michael Vines 6088b3bfc8 Replace DEFAULT_SLOT_HEIGHT with 0 2019-02-25 13:09:13 -08:00
Jack May 2be7896157
Pull in latest rBPF that includes Rust dependent changes (#2929) 2019-02-25 12:42:48 -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
Michael Vines ed684c5ec6
Build docker image with rust 1.32 2019-02-25 09:16:11 -08:00
Greg Fitzgerald 2fbdec59cb Generalize access to staked nodes 2019-02-25 08:49:43 -08:00
Greg Fitzgerald 710f88edda Handle edge cases earlier
We have lots of tests that work off genesis block.  Also, one
might want to generate a future leader schedule under the assumption
the stakers stay the same.
2019-02-25 08:49:43 -08:00
Greg Fitzgerald db899a2813 Inline LeaderSchedule::new_from_bank()
Breaks circular dependency and offers more flexibility in bank's
usage.
2019-02-25 08:49:43 -08:00
Greg Fitzgerald aad0d90fdd Use epoch_height to generate schedule instead of last_id
I had suggested the last_id, but that puts an unnecessary dependency
on LastIdsQueue. Using epoch height is pretty interesting in that
given the same set of stakers, you simply increment the seed once
per epoch.

Also, tighten up the LeaderSchedule code.
2019-02-25 08:49:43 -08:00
Greg Fitzgerald 72b4834446 Add Bank::prev_slot_leader() and Bank::next_slot_leader() 2019-02-25 08:49:43 -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
Greg Fitzgerald d67211305c Ignore slow benchmarks 2019-02-24 23:15:05 -07: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
Jack May 35aefdf1db
Reduce test noise (#2907) 2019-02-22 16:27:19 -08:00
Stephen Akridge 66891d9d4e Don't use global storage account
Other accounts would not be able to modify the system accounts userdata.
2019-02-22 15:59:55 -08:00
dependabot[bot] 6bca577d6d Bump libc from 0.2.48 to 0.2.49
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.48 to 0.2.49.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-22 16:45:14 -07:00
Greg Fitzgerald f5400ccefc Ignore storage test
@sakridge is working on a fix.
2019-02-22 16:18:10 -07:00
Greg Fitzgerald a56d717ea8 Add a check that shows why the storage program is failing 2019-02-22 16:18:10 -07:00
Greg Fitzgerald 11c7aab023 Add some unit-tests 2019-02-22 16:18:10 -07:00
Greg Fitzgerald 5541eedcc4 Reject modifications to userdata if not owned by the program 2019-02-22 16:18:10 -07:00
Jack May 77ea4cd285 Reapply dependency Band-aid to make CI happy 2019-02-22 15:56:07 -07:00
Greg Fitzgerald 8353b420d1 Move blocktree-oriented diagram out of proposals 2019-02-22 15:24:36 -07:00
Jack May 71602fe04b
Fix root package dependencies (#2899) 2019-02-22 14:08:25 -08:00
dependabot[bot] 054c12ea0f Bump hex-literal from 0.1.2 to 0.1.3
Bumps [hex-literal](https://github.com/RustCrypto/utils) from 0.1.2 to 0.1.3.
- [Release notes](https://github.com/RustCrypto/utils/releases)
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.1.2...hex-literal-v0.1.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-22 13:47:55 -07: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
Stephen Akridge bad48ce83c Split replicator doc into what is implemented and what is not 2019-02-22 13:12:49 -07:00
Greg Fitzgerald 2d03ae2fae Migrate fullnode to create_tmp_sample_blocktree 2019-02-22 11:18:01 -07:00
Jack May 3a7008949f
Build all deps (#2896) 2019-02-22 09:49:25 -08:00