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
Sagar Dhawan
13d018e3e1
Fix stake selection for the Data Plane ( #2863 )
...
* Update data-plane to use stakes instead of a bank directly
* Rename get_stakes to staked_nodes
2019-02-20 21:38:16 -08:00
Michael Vines
59ee2b8892
Fullnode now holds a BankForks instead of a Bank
2019-02-20 21:13:04 -08:00
Michael Vines
0dde79f42b
Push BankForks into Fullnode::new()
2019-02-20 21:13:04 -08:00
Greg Fitzgerald
a4411ef6a1
Generate a schedule from a bank
2019-02-20 20:33:33 -08:00
Sagar Dhawan
3c62e2332e
Cleanup stakes for gossip ( #2860 )
2019-02-20 20:02:47 -08:00
Michael Vines
1cd88968cf
Remove get_leader_for_next_tick()
2019-02-20 19:33:03 -08:00
Michael Vines
28a53959e0
Remove dead types
2019-02-20 18:39:32 -08:00
carllin
7c26a4d0a0
Add weighted sampling based on stakes ( #2854 )
...
* Add weighted sampling based on stakes
2019-02-20 18:21:08 -08:00
Michael Vines
6ed2e4c187
process_blocktree now loads forks
2019-02-20 17:27:02 -08:00
Sagar Dhawan
a484c87354
Make gossip selection stake based ( #2848 )
2019-02-20 17:08:56 -08:00
Greg Fitzgerald
b8f6280fe5
Move hash_internal_state tests into runtime
...
This was intended as a Bank test, but only in blocktree_processor
because of its dependency on Entry, which solana_runtime doesn't
know about.
2019-02-20 16:13:26 -08:00
Anatoly Yakovenko
5492aad61e
Cache ticks until a working bank can pick them up
2019-02-20 14:14:38 -08:00
Greg Fitzgerald
e9daf57d7f
Absorb LeaderScheduler's rank_active_set()
...
Delete overly-complicated tests
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
1c2169aec7
Use rank_stakes() in LeaderScheduler
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
cf163a9dab
Remove unutilized cuteness
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
dfcf3f94dc
Absorb LeaderScheduler::get_active_set()
...
No functional changes
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
b13fb6097f
Get rid of the HashSet special case
...
ActiveSet ranks on construction. get_active_set() is on its way out.
This is a stepping stone.
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
6e24a4aa50
Less copy pasta
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
fb1c6cf4da
Drop a bunch of dependencies on VotingKeypair
...
And de-Arc
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
af1b8f8a26
Absorb vote utilities
...
But drop dependency on VotingKeypair. Only pass in VotingKeypair
in VotingKeypair tests or integration tests.
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
88d6db8537
And ranking and simplify
2019-02-20 13:13:31 -07:00
Greg Fitzgerald
6ce2c06fd6
Add primitive ActiveStakers and LeaderSchedule objects
2019-02-20 13:13:31 -07:00
Tyera Eulberg
136f7e4b3b
Update test to validate entry height
2019-02-20 11:42:06 -07:00
Tyera Eulberg
0a73bb7efd
Add tick-height field to entry event payload
2019-02-20 11:42:06 -07:00
Michael Vines
2cf00021d9
Update golden hash to account for tick_height removal
2019-02-20 07:47:04 -08:00
Michael Vines
8d38c2f800
Remove Entry::tick_height field
2019-02-20 07:47:04 -08:00
Pankaj Garg
19a3606315
Fix broken test, added some tests to calculate tx fee
...
Some code cleanup
2019-02-20 08:12:37 -07:00
Pankaj Garg
cc2227d943
rename slot_num
2019-02-20 08:12:37 -07:00
Pankaj Garg
a33921ed34
address review comments
2019-02-20 08:12:37 -07:00
Pankaj Garg
a27cdf55e7
Credit transaction fees to the slot leader
2019-02-20 08:12:37 -07:00
Michael Vines
3d00992c95
Remove dependency on Entry::tick_height
2019-02-20 06:57:38 -08:00
Michael Vines
77cb70dd80
Remove dependency on Entry::tick_height
2019-02-19 22:40:10 -08:00
Michael Vines
8daba3e563
Add test demonstrating that process_blocktree()'s implementation is lacking
2019-02-19 20:37:06 -08:00
Michael Vines
a17903a89f
Tweak process_blocktree() signature to return a BankForks
2019-02-19 20:01:22 -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
Carl
781f7ef570
fix test_repair_empty_slot
2019-02-18 23:38:28 -08:00
Carl
3e8bb32ffd
Add test for write_entries()
2019-02-18 23:38:28 -08:00
Carl
df310641fb
Re-enable and add tests
2019-02-18 23:38:28 -08:00
Carl
21ef55f205
re-enable repair service tests
2019-02-18 23:38:28 -08:00
Greg Fitzgerald
d357640fbf
Centralize decentralized timing constants
2019-02-18 19:46:58 -08:00
Greg Fitzgerald
ad9cd23202
Notify subscribers from ReplayStage
2019-02-18 20:04:30 -07:00
Greg Fitzgerald
5916177dc8
Drop RpcPubSubService's dependency on the Bank
...
Pass in RpcSubscriptions instead, which let's you choose a
bank fork when it's time to send notifications.
2019-02-18 20:04:30 -07:00
Greg Fitzgerald
905b1e2775
Add notify_subscribers()
2019-02-18 20:04:30 -07:00
Greg Fitzgerald
377d45c9dd
Pull RpcSubscriptions out of the Bank
2019-02-18 20:04:30 -07:00
Greg Fitzgerald
e0b8f4202d
Use slot height for BankForks ids
2019-02-18 17:27:20 -07:00
Greg Fitzgerald
90684483e2
Make Bank::hash_internal_state() work with checkpoints
2019-02-18 12:47:10 -07:00
Greg Fitzgerald
0317583489
Move avalanche logic to ClusterInfo
...
The simulator doesn't depend on RetransmitStage. It depends on
just one function, which is similar in spirit to many of the
methods in ClusterInfo.
2019-02-18 09:08:18 -08:00
Greg Fitzgerald
1c3f2bba6d
Move avalanche simulator to integration tests
2019-02-18 09:08:18 -08:00
Greg Fitzgerald
7d62bf9a3d
Move crds_gossip simulator to integration tests
2019-02-18 09:55:52 -07:00
Greg Fitzgerald
7c248cd2ef
Move expensive test to integration tests
...
This test passes consistently when the test suite is run with a
single thread. It fails consistently on MacOS when run as part
of the unit-test suite.
No idea why it passes in CI.
2019-02-18 09:27:23 -07:00
Greg Fitzgerald
e4119268ca
Delete expensive integration test in unit-test suite
2019-02-18 09:27:09 -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
Greg Fitzgerald
907aff3b43
Cleanup Poh code
2019-02-17 21:12:55 -07:00
Greg Fitzgerald
d850f67979
Remove 'Compute' from name ComputeLeaderConfirmationService
...
struct names should be a noun
2019-02-17 19:44:09 -08:00
Carl
8080063024
nit
2019-02-17 19:30:45 -07:00
Carl
f33c6eb95f
delete leader rotation signal from banking stage
2019-02-17 19:30:45 -07:00
Carl
4e3d71c2c9
Batch joins on entire tpumode struct instead of individual services
2019-02-17 19:30:23 -07:00
Carl
a074cb78cd
Ensure leader services are closed before starting new ones
2019-02-17 19:30:23 -07:00
Michael Vines
0dbc33f781
Finish removing getConfirmationTime
2019-02-17 16:27:50 -08:00
Anatoly Yakovenko
25bbc3bc2a
wrong error
2019-02-17 15:43:13 -08:00
Anatoly Yakovenko
5f55a9be84
fmt
2019-02-17 15:43:13 -08:00
Anatoly Yakovenko
300e3d151d
remove the signal sender since its superfelous to a recv error
2019-02-17 15:43:13 -08:00
Greg Fitzgerald
2f7911b62a
Boot BankError::MaxHeightReached
2019-02-17 16:30:01 -07:00
Anatoly Yakovenko
54dfe708c1
use ref for new_from_parent; test that transactions don't leak to parent
2019-02-17 15:02:08 -07:00
Anatoly Yakovenko
8166925f04
copy a new bank
2019-02-17 15:02:08 -07:00
Anatoly Yakovenko
64f1d93cc3
Use the accounts list from parents up to finalized bank for Account::load apis.
...
Borrow checker
query the previous parents accounts
cleanup!
s/tree/parents
Tests! Last_ids need to be inherited as well otherwise nothing works.
new_from_parent
2019-02-17 15:02:08 -07:00
Greg Fitzgerald
6d67568037
Delete useless wrappers
2019-02-17 14:10:34 -07:00
Greg Fitzgerald
5003e97479
Inline private functions
...
Better code coverage in exchange for calling `create_session()`
2019-02-17 14:10:34 -07:00
Greg Fitzgerald
e9b0e3cb9d
Move RpcSignatureStatus into its own module
...
And fixup some imports from previous commits.
2019-02-17 12:20:05 -07:00
Greg Fitzgerald
34fceca7ff
Fix compiler warnings
2019-02-17 12:20:05 -07:00
Greg Fitzgerald
c646845cd3
Move RpcService into its own module
2019-02-17 12:20:05 -07:00
Greg Fitzgerald
eb483bc053
Move RpcPubSubService into its own module
2019-02-17 12:20:05 -07:00
Greg Fitzgerald
50d3fa7437
Move RpcSubscriptions into its own module
2019-02-17 12:20:05 -07:00
Greg Fitzgerald
9f7fc5f054
Boot unused trait
...
Some ambitious unit-testing plans unimplemented?
2019-02-17 12:20:05 -07:00
anatoly yakovenko
c8c794e340
Use the accounts and status cache from parents up to finalized bank for calls. ( #2798 )
...
* Use the accounts list from parents up to finalized bank for Account::load apis.
* Borrow checker
* query the previous parents accounts
* cleanup!
* s/tree/parents
* Tests! Last_ids need to be inherited as well otherwise nothing works.
2019-02-17 08:01:31 -08:00
carllin
97a1e950ef
write entries in blocktree now sets parent slot properly ( #2800 )
2019-02-17 04:36:49 -08:00
Greg Fitzgerald
9fa8105ae8
Add a way to make a DAG of checkpointed Banks
2019-02-16 21:49:06 -07:00
Michael Vines
58f4709362
Reduce log severity of entry stream errors
2019-02-16 19:10:00 -08:00
anatoly yakovenko
f71cd2c6f3
Status cache runs out of space in the bloom filter ( #2796 )
...
The cache is designed for 1m statuses, about 1 second worth of transactions at full capacity. Refresh the cache every 1 second worth of ticks.
2019-02-16 16:41:03 -08:00
Greg Fitzgerald
e39094ac37
Hoist Slot Leader dependencies up to BankingStage
2019-02-16 15:36:31 -07:00
Greg Fitzgerald
b539389741
Move all Validator dependencies from Bank to blocktree_processor
2019-02-16 15:01:26 -07:00
Greg Fitzgerald
ac35fe9ed1
Flip the dependency; Create bank before scheduler
2019-02-16 14:16:48 -07:00
Greg Fitzgerald
3d70afc578
Boot leader scheduler from the bank
...
Functional change: the leader scheduler is no longer implicitly
updated by PohRecorder via register_tick(). That's intended to
be a "feature" (crossing fingers).
2019-02-16 14:16:48 -07:00
Greg Fitzgerald
b919b3e3b2
Bank no longer updates a leader scheduler by default
2019-02-16 14:16:48 -07:00
Greg Fitzgerald
7a7349f2ff
Don't update the leader scheduler in bank's default constructor
2019-02-16 14:16:48 -07:00
Greg Fitzgerald
07b57735b1
Move leader scheduler test out of bank
2019-02-16 14:16:48 -07:00
Greg Fitzgerald
3bfe2e75b5
Boot new_with_leader_scheduler_config
...
Only used in one place. Easy enough to use the one with the shared
leader scheduler.
2019-02-16 10:55:58 -07:00
Greg Fitzgerald
97c93629a5
Don't use the Bank's LeaderScheduler
2019-02-16 10:55:58 -07:00
Greg Fitzgerald
643384e1ec
Add LeaderScheduler constructor to Bank
...
By passing a config and not a Arc'ed LeaderScheduler, callers
need to use `Bank::leader_scheduler` to access the scheduler.
By using the new constructor, there should be no incentive to
reach into the bank for that object.
2019-02-16 10:55:58 -07:00
Greg Fitzgerald
1809277e05
Encapsulate Bank accounts
...
That way we don't need to TODOs saying "don't forget to iterate
over checkpoints too". It should be assumed that when the bank
references its previous checkpoint all its methods would
acknowledge it.
2019-02-16 08:41:35 -07:00
Greg Fitzgerald
7981865fd2
Boot unused confirmation-time from Bank
...
This broken metric is already submitted to influx. Why make it
available via RPC too? If so, why store it in the bank and not
in the RPC service?
2019-02-16 08:11:43 -07:00
Greg Fitzgerald
4467d5eb4c
Extract process_ledger from Bank
...
Fullnode was the only real consumer of process_ledger and it was
only there to process a Blocktree. Blocktree is a tree, and a
ledger is a sequence, so something's clearly not right here.
Drop all other dependencies on process_ledger (only one test) so
that it can be fixed up in isolation.
2019-02-16 08:07:26 -07:00
Stephen Akridge
573116e259
Remove count_last_ids API
2019-02-15 11:05:41 -08:00
Michael Vines
71ab030ea4
Fiddle with timeouts to make CI happy
2019-02-14 18:40:31 -08:00
Michael Vines
626a381ddc
Collect and re-forward packets received while TpuForwarder is shutting down
2019-02-14 18:40:31 -08:00
Michael Vines
cceeb8e52d
On leader rotation forward any unprocessed transaction packets to the new leader
2019-02-14 14:49:48 -08:00
Michael Vines
3f6aba23dd
Add custom BlocktreeConfig for bad tests that break with the default
2019-02-14 14:49:48 -08:00
Michael Vines
cd9dac4c7e
Use a reasonable max_tick_height
2019-02-14 14:49:48 -08:00
Michael Vines
f478894729
Revert "Set DEFAULT_TICKS_PER_SLOT = 32 to stabilize integration tests"
...
This reverts commit 2d2572d2cb
.
2019-02-14 14:49:48 -08:00
Michael Vines
97790480c9
Increase poll_for_signature retry timeout
2019-02-14 14:49:48 -08:00
Tyera Eulberg
9643c39bf6
Fix slot in block event
2019-02-14 14:25:54 -08:00
Carl
0a08d40237
fix repair service to support multinode tests that depend on repairs
2019-02-14 13:37:55 -08:00
Carl
d029997aef
add parent slot to broadcast
2019-02-14 13:37:55 -08:00
Carl
ceb27b431e
Add tree test to test multiple chaining children
2019-02-14 13:37:55 -08:00
Carl
b25d8ce764
Comment out repair service tests, to be fixed in another PR
2019-02-14 13:37:55 -08:00
Carl
34da362ee6
fix blocktree tests
2019-02-14 13:37:55 -08:00
Carl
de6109c599
replace num_blocks with parent block
2019-02-14 13:37:55 -08:00
carllin
736f08815e
Add protocol request for requesting the highest blob in a slot ( #2759 )
2019-02-14 12:47:21 -08:00
Sunny Gleason
106645d9bd
add message terminator (newline) to socket writer output to ease client integration
2019-02-14 12:27:53 -08:00
Greg Fitzgerald
4a0009365e
Use Account::owner as loader for executable accounts
2019-02-14 13:26:46 -07:00
Greg Fitzgerald
48671a1728
Let native_loader own native executable accounts
2019-02-13 20:55:36 -08:00
Greg Fitzgerald
72b6ec4aa8
Add native program account constructor
2019-02-13 20:55:36 -08:00
Michael Vines
8790a92f07
Adjust create_counter to avoid imposing an AtomicUsize import on users
2019-02-13 20:24:04 -08:00
Michael Vines
0f8ff07b51
tpu now hangs on to its cluster_info
2019-02-13 16:16:18 -08:00
Tyera Eulberg
be73db13e0
Improve EntryStream trait and struct names
2019-02-13 13:07:30 -08:00
Tyera Eulberg
cbaba5cbf3
Review comments
2019-02-13 13:07:30 -08:00
Tyera Eulberg
c1447b2695
Add block event logic to EntryStreamStage
2019-02-13 13:07:30 -08:00
Sunny Gleason
e58f08b60f
Refactor EntryStream
...
Co-authored-by: Sunny Gleason <sunny.gleason@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2019-02-13 13:07:30 -08:00
Stephen Akridge
ddc8bfed29
Fix bad window_send_test channel logic
...
Test could hang if the blobs are not sent in the right order.
2019-02-13 11:23:54 -08:00
Stephen Akridge
f1221d724d
Consolidate logic with entry helper function
...
Creates an entry and updates the hash.
Also cleanup blobs creation in test_replay
2019-02-13 11:23:54 -08:00
Michael Vines
863956d09c
Add multinode test for two nodes rotating at 1 tick per slot
2019-02-12 21:17:06 -08:00
Michael Vines
7118178e2c
Correctly compute max_tick_height when starting up a node
2019-02-12 21:17:06 -08:00
Michael Vines
1eabe66c85
setup_leader_validator: remove unnecessary ticks_per_slot parameter
2019-02-12 21:17:06 -08:00
Michael Vines
2de0a9e453
Log on bogus blobs
2019-02-12 21:17:06 -08:00
Stephen Akridge
0bb6940c1a
Faster exit for storage_stage client
...
Shorten the timeout and check for exit on every iteration
of fetching a last id.
2019-02-12 20:45:22 -08:00
Michael Vines
e341b33f21
Remove ticks_per_slot from Blocktree::write_entries(), it already knows
2019-02-12 15:52:27 -08:00
Michael Vines
6abdd6401d
clippy: passing BlocktreeConfig by ref is ok
2019-02-12 15:52:27 -08:00
Michael Vines
6632c7026d
Pass a BlocktreeConfig into all ledger helper functions
2019-02-12 15:52:27 -08:00
Michael Vines
c474cf1eef
Pass BlocktreeConfig around as a reference
2019-02-12 15:52:27 -08:00
Sagar Dhawan
e26cd2eb26
Make Genesis block handle extra tokens for the leader ( #2743 )
2019-02-12 15:49:23 -08:00
Carl
b33becabca
rename flag
2019-02-12 15:06:52 -08:00
Carl
bc162637a6
Add is_last_blob flag to blob to signal the end of a slot
2019-02-12 15:06:52 -08:00
Sagar Dhawan
8f1b7c3fff
Enable test_replay ( #2741 )
...
* Enable test_replay
* Refactor get_last_id
* Fix test ledger path
2019-02-12 15:03:11 -08:00
carllin
be71f49d80
Change write_entries() and create_tmp_ledger() to take ticks_per_slot ( #2736 )
...
* Change write_entries() and create_tmp_ledger() to take ticks_per_slot
* PR nits
2019-02-12 13:14:33 -08:00
Sagar Dhawan
8b39eb5e4e
Replace Blob Ids with Forward property ( #2734 )
...
* Replace Blob Id with Blob forwarding
* Update simulation to properly propagate blobs
2019-02-12 10:56:48 -08:00
Pankaj Garg
1173cf7ed4
review comments
2019-02-12 08:41:02 -08:00
Pankaj Garg
b4fd141105
fix broken test
2019-02-12 08:41:02 -08:00
Pankaj Garg
0002b5dd02
Write to ledger in BroadcastService
...
- Also disconnect the channel between TPU and TVU
2019-02-12 08:41:02 -08:00
Michael Vines
709598541f
Remove stale TODO comment
2019-02-11 22:13:07 -08:00
Michael Vines
b595bf8f44
Set blob_index correctly when tick_height is at the last tick of a slot
2019-02-11 19:50:33 -08:00
Michael Vines
f6979a090e
leader_scheduler: reduce the amount of special case handling for tick_height 0
2019-02-11 19:05:14 -08:00
Sagar Dhawan
2e1dcd84f9
Add Avalanche Simulation ( #2727 )
...
- No packet drops yet
- Optimistic retransmits without leader-id
2019-02-11 16:20:31 -08:00
Pankaj Garg
144d321193
Remove Box for RPC pubsub subscriptions
2019-02-11 15:47:29 -08:00
Tyera Eulberg
d41dec9395
Make EntryStreamStage optional
2019-02-11 14:07:24 -08:00
Tyera Eulberg
f977327c7b
Move EntryStream into its own Tvu stage
2019-02-11 14:07:24 -08:00
Michael Vines
aac1a58651
Try harder to keep LeaderSchedulerConfig and BlocktreeConfig in sync
2019-02-11 13:10:12 -08:00
Michael Vines
095afdfe47
Merge leader_to_validator/validator_to_leader
2019-02-11 08:57:44 -08:00