963 Commits

Author SHA1 Message Date
Pankaj Garg
3615445a12
Broadcast run for injecting fake blobs in turbine (#4889)
* Broadcast run for injecting fake blobs in turbine

* address review comments

* new local cluster test that uses fake blob broadcast

* added a test to make sure tvu_peers ordering is guaranteed
2019-07-01 17:54:03 -07:00
Sagar Dhawan
65adce65fa
Always send pull responses to the origin addr (#4894) 2019-07-01 16:49:05 -07:00
carllin
c1953dca8f
Cleanup some of banking stage (#4878)
* Add committable transactions that cause errors like InstructionErrors back to retryable list on MaxHeightReached

* Remove unnecessary logic

* Add comments/renaming for clarity
2019-07-01 12:14:40 -07:00
Tyera Eulberg
d7ed3b8024 Add RPC api to return program accounts (#4876)
automerge
2019-06-29 09:59:07 -07:00
sakridge
a89589a1d5
Add Measure abstraction over measuring time intervals (#4851)
Allows one to swap in different implementations. This provides
the normal Insant::now() -> .elapsed() path.
2019-06-29 15:34:49 +02:00
carllin
75b494d4a3 Lower warn to info, fetch from validator root instead of root + 1 (#4870)
* Lower warn to info, fetch from validator root instead of root + 1

* b/c -> because
2019-06-28 16:17:20 -07:00
sakridge
0fa1af5d47
Cleanup num_threads() and batch_limit numbers (#4852) 2019-06-28 10:55:24 +02:00
Tyera Eulberg
66552d7047
Credit-Only Accounts: Cache account balance for thread-safe load/store (#4691)
* Implement CreditOnlyLocks

* Update credit-only atomic on account load

* Update credit-only atomic after bank.freeze_lock; store credits if all credit-only lock references are dropped

* Commit credit-only credits on bank freeze

* Update core to CreditAccountLocks

* Impl credit-only in System Transfer

* Rework CreditAccountLocks, test, and fix bugs

* Review comments: Pass CreditAccountLocks by reference; Tighten up insert block

* Only store credits on completed slot

* Check balance in bench_exchange funding to ensure commit_credits has completed

* Add is_debitable info to KeyedAccount meta to pass into programs

* Reinstate CreditOnlyLocks check on lock_account

* Rework CreditAccountLocks to remove strong_count usage

* Add multi-threaded credit-only locks test

* Improve RwLocks usage

* Review comments: panic if bad things happen; tighter code

* Assert lock_accounts race does not happen

* Revert panic if bad things happen; not a bad thing
2019-06-27 17:25:10 -04:00
sakridge
fbea9d8621
Page-pin packet memory for cuda (#4250)
* Page-pin packet memory for cuda

Bring back recyclers and pin offset buffers

* Add packet recycler to streamer

* Add set_pinnable to sigverify vecs to pin them

* Add packets reset test

* Add test for recycler and reduce the gc lock critical section
* Add comments/tests to cuda_runtime

* Add recycler to recv_blobs path.

* Add trace/names for debug and PacketsRecycler to bench-streamer

* Predict realloc and unpin beforehand.

* Add helper to reserve and pin

* Cap buffered packets length

* Call cuda wrapper functions
2019-06-27 09:32:32 +02:00
carllin
97c97db97e
Fix early exit clearing all buffered packets (#4810) 2019-06-26 22:39:50 -07:00
carllin
9a52b01171
Change to crossbeam channel in banking_threads VerifiedReceiver (#4822)
* Add crossbeam channel instead of channel in banking_stage
2019-06-26 18:42:27 -07:00
Sagar Dhawan
df1c473341
Add storage point tracking and tie in storage rewards to economics (#4824)
* Add storage point tracking and tie in storage rewards to epochs and economics

* Prevent validators from updating their validations for a segment

* Fix test

* Retain syscall scoping for readability

* Update Credits to own epoch tracking
2019-06-26 10:40:03 -07:00
Rob Walker
8a64e1ddc3
add fee burning (#4818) 2019-06-26 10:13:21 -07:00
Justin Starry
861d6468ca Stake weighted pruning for the gossip network (#4769)
* Stake weighted pruning

* Fix compile error

* Fix clippy errors

* Add helper for creating a connected staked network

* Bug fixes and test groundwork

* Small refactor

* Anatoly's feedback and tests

* Doc updates

* @rob-solana's feedback

* Fix test bug and add log trace

* @rob-solana's feedback
2019-06-26 00:30:16 -07:00
carllin
d6737b8cc9
Set epoch schedule in set_root in leader schedule cache (#4821) 2019-06-26 00:19:48 -07:00
Trent Nelson
f20ba423ca
Merklize PoH TX mixin hash (#4644) 2019-06-25 14:44:27 -06:00
Sathish
9e7f618cff Set proper count value for account stores (#4797)
* set count values for store accounts

* Use AppendVecId type
2019-06-25 07:21:45 -07:00
Sagar Dhawan
74a06e4230
Update thinclient to resend the same tx until its blockhash expires (#4807) 2019-06-24 16:46:34 -07:00
Pankaj Garg
3f8ff23125
Forward transactions to the leader for next Nth slot (#4806)
* review comments
2019-06-24 15:56:50 -07:00
anatoly yakovenko
29611fb61d
tower consensus naming (#4598)
s/locktower/tower/g
2019-06-24 13:41:23 -07:00
Sagar Dhawan
11992946a4
Add storage reward pools (#4779) 2019-06-22 17:18:35 -07:00
Trent Nelson
8acbb4ab2f Bank cap rpc (#4774)
* core/rpc: Name magic number for minted lamports in tests genesis block

* core/rpc: Expose bank::capitalization() via getSolTotalSupply RPC method

* book: Add entry for getTotalSupply RPC method
2019-06-21 21:00:26 -07:00
Rob Walker
a49f5378e2
rewrite vote credits redemption to eat from rewards_pools on an epoch-sensitive basis (#4775)
* move redemption to rewards pools

* rewrite redemption, touch a few other things

* re-establish test coverage
2019-06-21 20:43:24 -07:00
Michael Vines
f39e74f0d7 serde the full FeeCalculator (#4778)
automerge
2019-06-21 17:23:26 -07:00
Sagar Dhawan
22b767308a
Add insturctions to run a replicator on testnet (#4733) 2019-06-21 16:32:23 -07:00
carllin
06ba0b7279
Remove holding cluster_info lock while forwarding packets (#4773) 2019-06-21 15:21:49 -07:00
Sagar Dhawan
da925142d1 Update replicator ports and silence socket timeout on windows (#4770)
automerge
2019-06-21 11:28:52 -07:00
Michael Vines
36c9e22e3d Revert "Dynamic erasure (#4653)"
This reverts commit ada4d16c4cf1c8cf22f12b5a8e294cc8a35c8992.
2019-06-20 20:53:03 -07:00
Mark E. Sinclair
ada4d16c4c
Dynamic erasure (#4653)
Remove erasure-related constants

Remove unneeded `Iterator::collect` call

Document erasure module

Randomize coding blobs used for repair
2019-06-20 20:27:41 -05:00
carllin
aacb38864c
Mark dead forks in replay stage (#4715)
* Add DeadSlots column family

* Filter dead forks from get_slots_since

* Mark erroring slots as dead in replay stage, add test

* Mark dead forks in progress instead of removing them

* Fix logging process_entries failures in replay_stage

* Unignore test_fail_entry_verification_leader
2019-06-20 15:50:41 -07:00
Pankaj Garg
9800e09431
Thread pool for par_iter in EntrySlice::verify (#4732)
* Use thread pool for entry verify par iter

* some performance metrics

* check batch size and use CPU for smaller batches
2019-06-19 16:31:32 -07:00
carllin
61483c18ca
Change seed for retransmit to use blob signature (#4727)
* Switch seed for retransmit to use blob signature

* Use seed_len

* Use last bytes of signature as seed instead of first bytes
2019-06-19 15:36:06 -07:00
Rob Walker
41fbdc6e08
use stake (#4721) 2019-06-19 11:54:52 -07:00
carllin
46bb79df29
Support for custom BroadcastStage in local cluster tests (#4716)
* Refactor BroadcastStage to support custom implementations, add FailEntryVerificationBroadcastRun implementation

* Plumb switch on broadcast type through validator

* Add test for validator generating non-verifiable entries to local_cluster

* Fix bad initializers

* Refactor broadcast run code into utils
2019-06-19 00:13:19 -07:00
Sathish Ambley
8b41a5d725 periodically save config in separate folders 2019-06-17 22:48:27 -07:00
Sathish Ambley
7fd879b417 Restart validator nodes from snapshots 2019-06-17 22:48:27 -07:00
Sathish Ambley
dc5c6e7cf8 validator restart 2019-06-17 22:48:27 -07:00
Michael Vines
feeaad619a Avoid panic if no rpc peers exist 2019-06-17 19:47:45 -07:00
Sagar Dhawan
cc48773b03 Add "download from replicator" utility (#4709)
automerge
2019-06-17 18:12:13 -07:00
Sagar Dhawan
8fbf0e2d9f
Update replicators to use the storage blockhash to generate offsets (#4712) 2019-06-17 16:39:26 -07:00
Michael Vines
5bf87de136 Add obvious log message indicating CUDA feature state 2019-06-17 11:01:55 -07:00
Rob Walker
4c6a6d63bf
add MiningPools, fund validator MiningPools from inflation (#4676)
* add MiningPool fund validator MinigPools from inflation

* fixup

* finish rename of MINIMUM_SLOT_LENGTH to MINIMUM_SLOTS_PER_EPOCH

* deterministic miningpool location

* point_value, not credit_value... use f64
2019-06-14 11:38:37 -07:00
Sagar Dhawan
119467df59
Add storage mining pool to genesis and implement automatic reward redeeming (#4683)
* Add storage mining pool to genesis and implement automatic reward collection

* Address review comments
2019-06-13 22:30:51 -07:00
Sagar Dhawan
b1ac8f933b
Fix storage program space issues and limit storage transaction data (#4677) 2019-06-13 17:53:54 -07:00
Michael Vines
8628f33d0b Fix HostId field in the testnet dashboard 2019-06-13 16:09:09 -07:00
carllin
8c1b9a0b67
Data plane verification (#4639)
* Add signature to blob

* Change Signable trait to support returning references to signable data

* Add signing to broadcast

* Verify signatures in window_service

* Add testing for signatures to erasure

* Add RPC for getting current slot, consume RPC call in test_repairman_catchup for more deterministic results
2019-06-12 16:43:05 -07:00
Michael Vines
d807217be7
Simplify and camelCase getEpochVoteAccounts RPC API (#4658)
* Simplify and camelCase getEpochVoteAccounts RPC API

* Set a commission for testing
2019-06-12 14:12:08 -07:00
Sagar Dhawan
8019bff391 Fixes for storage program and rework storage stage (#4654)
automerge
2019-06-11 18:27:47 -07:00
Rob Walker
697228a484
rpc vote_accounts by ecurrent pocch, not stakers epoch (#4651) 2019-06-11 16:57:47 -07:00
Rob Walker
3217a1d70c
use highest staked node as bootstrap leader, remove bootstrap_leader from genesis_block (#4635)
* use highest staked node as bootstrap leader, remove bootstrap_leader from genesis_block

* clippy

* fixup

* fixup
2019-06-11 11:44:58 -07:00