Commit Graph

2046 Commits

Author SHA1 Message Date
Greg Fitzgerald aba9df8457 Remove get_stake placeholder 2019-01-23 17:03:20 -08:00
Michael Vines 27c10d4468
cargo fmt 2019-01-22 21:56:04 -08:00
Stephen Akridge a17467aefd Lower level of message from storage_stage 2019-01-22 21:23:10 -08:00
Rob Walker 965dbbe835
stop enumeration if next entry is disjoint, band-aid (#2518)
* stop enumeration if next entry is disjoint, band-aid, fies #2426
* clippy
2019-01-22 15:50:36 -08:00
Michael Vines 122a5b2f69
dedup the 2019-01-22 09:47:43 -08:00
Rob Walker c84b796e17
remove dead code (#2512) 2019-01-21 16:24:11 -08:00
Pankaj Garg 7204bb40bf
Don't fail process_entries with ProgramErrors (#2509) 2019-01-21 15:26:06 -08:00
Mark f37eb533f1
Replicator timeout (#2480)
* Add timeout to Replicator::new; used when polling for leader

* Add timeout functionality to replicator ledger download

Shares the same timeout as polling for leader

Defaults to 30 seconds

* Add docs for Replicator::new
2019-01-21 15:37:41 -06:00
Michael Vines 6e8b69fc88 Cleanup leader_addr, it's really entrypoint_addr 2019-01-21 13:06:30 -08:00
Tyera Eulberg 35764225ed Remove socket from rpc test and move integration test 2019-01-21 12:29:04 -07:00
Rob Walker e6030d66eb
split load+execute from commit in bank, insert record between them in TPU code (#2487)
* split load+execute from commit in bank, insert record between them in TPU code
* clippy
* remove clear_signatures() race with commit_transactions()
* add #[test] back
2019-01-21 10:17:04 -08:00
Pankaj Garg 6611188edf
Move subscriptions to rpc_pubsub (#2490)
* Move subscriptions to rpc_pubsub

- this helps avoid recreating pubsub_service on node's role change

* fixed tests and addressed review comments

* fix clippy errors

* address review comments
2019-01-21 09:59:09 -08:00
Stephen Akridge abbb037888 Implement storage contract logic 2019-01-21 08:36:49 -08:00
Michael Vines 132d59ca6a new_bank_from_db_ledger need not be public 2019-01-21 08:11:13 -08:00
Michael Vines 5b73a8eceb Rework fullnode boot sequence 2019-01-19 21:35:46 -08:00
Michael Vines 2073188345 Fullnode no longer fails to process a ledger with ProgramErrors in it 2019-01-18 21:06:50 -08:00
Stephen Akridge 2f1107ff4f Add randomness to broadcast 2019-01-18 13:05:35 -08:00
Stephen Akridge 1fd7bd7ede Storage fixes
* replicators generate their sample values
* fixes to replicator block height logic
2019-01-18 13:05:35 -08:00
Michael Vines c0c38463c7 Remove hard coded ports 2019-01-17 23:34:21 -08:00
Michael Vines c1e142d1dc Revert "test_rpc_new fails locally, ignore for now"
This reverts commit 0c46f15f94.
2019-01-17 23:34:21 -08:00
Rob Walker 1f87d9ba4a
add bloom benchmarking, perf improvement from Fnv ~= 8X (#2477)
* add bloom benchmarking, perf improvement from Fnv ~= 8X
* have a look at bits.set()
* ignore new benches to pacify CI (solana_upload_perf?)
2019-01-17 18:22:21 -08:00
Michael Vines e74574706e Record Transactions with program errors in the ledger, they paid the fee 2019-01-17 13:55:56 -08:00
Stephen Akridge b296a9a0c7 Rename slice to segment to match book terminology 2019-01-17 10:19:45 -08:00
Michael Vines a84b6bc7e4 Overhaul wallet rpc/drone command-line arguments 2019-01-17 08:36:05 -08:00
Stephen Akridge 8e67a18551 Add network timeouts and fix tests
test_rpc_send_tx could fail if it didn't succeed on the first try
* add some retries to consistently pass
2019-01-16 15:59:40 -08:00
Michael Vines 526344c9ac Log signature status uniformly 2019-01-16 12:17:46 -08:00
Michael Vines f8bd19f5db Log the time it look to process the ledger for easier log inspection 2019-01-16 10:45:47 -08:00
Pankaj Garg 03d4d1cb36
Store and resend votes if leader's TPU port is unknown (#2438)
* Store and resend votes if leader's TPU port is unknown

* fix build errors

* fix failing tests
2019-01-16 06:14:55 -08:00
Michael Vines 4369c1a113 RPC port is no longer reset on leader-to-validator transition 2019-01-15 16:06:56 -08:00
Michael Vines b1e57e2a30 Retry rpc requests on connection failures
Applied a blanket default retry count of 5, which seems like enough but
not excessive retries.
2019-01-15 15:30:10 -08:00
Rob Walker 45c247fa5b
bloom for forking (#2431)
* bloom for forking
* clippy fixes
* remove bloom_hash_index
2019-01-15 13:56:54 -08:00
Pankaj Garg fa4608a95d
Change leader rotation time to a multiple of ticks per block (#2414)
* Change leader rotation time to a multiple of ticks per block

* fix component dependencies

* review comments
2019-01-15 12:07:58 -08:00
Rob Walker 022a97da99
revert revert of kill window (#2427)
* remove window code from most places
* window used only for testing
* remove unecessary clippy directives
2019-01-15 10:51:53 -08:00
Michael Vines a33c76a456 Remove JsonRpcRequestProcessor dependency 2019-01-14 17:39:31 -08:00
Michael Vines 11b1bd278a Remove unused exit field 2019-01-14 17:39:12 -08:00
Michael Vines e3a96ed3fc Minor new cleanup 2019-01-14 16:04:29 -08:00
Rob Walker 447243f994
Revert "remove window code from most places" (#2417)
* Revert "Fix link to book in Local Testnet section (#2416)"

This reverts commit 710c0c9980.

* Revert "Add current leader information to dashboard (#2413)"

This reverts commit f0300c1711.

* Revert "remove window code from most places (#2389)"

This reverts commit e3c0bd5a3f.
2019-01-14 15:11:18 -08:00
Pankaj Garg f0300c1711
Add current leader information to dashboard (#2413) 2019-01-14 14:20:05 -08:00
Rob Walker e3c0bd5a3f
remove window code from most places (#2389)
* remove window code from most places
* window used only for testing
* remove unecessary clippy directives
2019-01-14 12:11:55 -08:00
Tyera Eulberg 8af61f561b
Improve Wallet coverage (#2385)
* Add trait for RpcRequestHandler trait for RpcClient and add MockRpcClient for unit tests

* Add request_airdrop integration test

* Add timestamp_tx, witness_tx, and cancel_tx to wallet integration tests; add wallet integration tests to test-stable

* Add test cases

* Ignore plentiful sleeps in unit tests
2019-01-14 00:10:03 -07:00
Michael Vines 74e503da92 Hold an accounts_db read lock as briefly as possible to avoid deadlocking 2019-01-13 21:49:09 -08:00
Greg Fitzgerald 9328ee4f63 Revert "Revert "Delete unused code and its tests""
This reverts commit d6b3991d49.
2019-01-11 14:54:17 -07:00
Pankaj Garg d7594b19fc
Implemented a trait for vote signer service (#2386)
* Implemented a trait for vote signer service

* removes need for RPC in unit tests for vote signing

* fix build errors

* address some review comments
2019-01-11 12:58:31 -08:00
Michael Vines d6b3991d49 Revert "Delete unused code and its tests"
This reverts commit e713ba06f1.
2019-01-11 07:30:28 -08:00
Greg Fitzgerald e713ba06f1 Delete unused code and its tests 2019-01-10 23:19:38 -07:00
Greg Fitzgerald 7341298a11
Cleanup tpu forwarder (#2377)
* Use unwrap() on locks

An error there generally indicates a programmer error, not a
runtime error, so a detailed runtime message is not generally useful.

* Only clone Arcs when passing them across thread boundaries

* Cleanup TPU forwarder

By separating the query from the update, all the branches get easier to
test. Also, the update operation gets so simple, that we see it
belongs over in packet.rs.

* Thanks clippy

cute
2019-01-10 13:34:48 -07:00
Greg Fitzgerald 885fe38c01 Move BloomHashIndex into its own module
This trait is for bloom, not crds.

Slightly better would be to put it in the SDK so that the trait
implementations could go into hash and pubkey, but if we don't
want compatibility constraints, this is the next best thing.
2019-01-10 10:22:16 -08:00
Pankaj Garg 2dbe8fc1a9
Refactor vote signer code (#2368)
* Refactor vote signer code

* fixed test compilation errors

* address clippy errors

* fix missing macro_use

* move macro use

* review comments
2019-01-10 09:21:38 -08:00
Sagar Dhawan 7122139e12
Rewrite TPU forwarder test (#2344) 2019-01-10 13:50:28 +05:30
Michael Vines 4e6c03c9da Avoid holding a read lock during IO 2019-01-10 00:34:50 -07:00
Stephen Akridge 0c90e1eff6 Make entry_sender optional on window_service
window_service in replicator has no need to consume the the produced entries.
2019-01-09 15:15:47 -08:00
Stephen Akridge 491bca5e4b Remove ledger.rs
Split into entry.rs for entry-constructing functions and EntrySlice
trait and db_ledger.rs for ledger helper test functions.
2019-01-09 15:15:47 -08:00
Stephen Akridge ebd676faaa Rename Block to EntrySlice 2019-01-09 15:15:47 -08:00
Stephen Akridge 045c5e8556 Remove most of the old ledger code
Removes LedgerWriter, read_ledger, LedgerWindow
2019-01-09 15:15:47 -08:00
Stephen Akridge 45b4cf2887 Remove store_ledger_stage which is no longer needed 2019-01-09 15:15:47 -08:00
Stephen Akridge 73eca72f14 Switch test to send a repair request to try and download from replicator
Removes need for read_ledger in the test and also tests replicator
download path.
2019-01-09 13:24:12 -08:00
Rob Walker 94494b64d7 whack commented out, obsolete, superceded test 2019-01-09 11:30:07 -08:00
Rob Walker b648f37b97
encapsulate erasure_cf (#2349) 2019-01-09 10:21:55 -08:00
Greg Fitzgerald f53810fcd2 Remove unused exit variable
The exit variable was only used by a test.
2019-01-08 20:22:31 -08:00
Stephen Akridge 3c6afe7707 Rename get_blob_bytes to read_blobs_bytes 2019-01-08 16:00:39 -08:00
Stephen Akridge 09296e0d71 Fix two storage tests
* test_encrypt_files_many_keys_multiple_keys passing
  - buffer chunk size unified between single key and multiple key path,
    which shouldn't be necessary but can fix later.
* test_encrypt_file_many_keys_bad_key_length passing
2019-01-08 16:00:39 -08:00
Stephen Akridge 4b3d64ec9f Convert chacha_encrypt_file to work with db_ledger blobs directly 2019-01-08 16:00:39 -08:00
Rob Walker a904e15ecc
enscapsulate data_cf (#2336)
* enscapsulate data_cf
2019-01-08 15:53:44 -08:00
Greg Fitzgerald a82a5ae184 Delete unused code
The ignored test is still broken, but at least no longer creates a
window for no reason.

Also removed all remaining references to "ncp".
2019-01-08 14:09:50 -08:00
Rob Walker bafd90807d
encapsulate meta_cf (#2335) 2019-01-08 11:41:55 -08:00
jackcmay 0f8ea6872e
Add missing error counters and load_account test cases (#2327) 2019-01-08 09:20:25 -08:00
Greg Fitzgerald d2431128c7 Remove WriteStage from TPU/TVU diagrams
Fixes #2312
2019-01-08 08:42:06 -08:00
Michael Vines a8b9899dee Add retry, restore ignored tests 2019-01-07 19:30:08 -08:00
Stephen Akridge d2cb4e003c Re-enable the --lib tests 2019-01-07 15:28:20 -08:00
Greg Fitzgerald 6000df9779 Optimize has_duplicates() for short slices 2019-01-07 13:20:04 -07:00
Greg Fitzgerald 24963e547c with_subset() -> get_subset_unchecked_mut()
A simpler, safer, and better documented use of unsafe code
2019-01-07 13:20:04 -07:00
Michael Vines 46d44ca99c Add make_rpc_request retry mechanism 2019-01-07 11:02:35 -08:00
jackcmay 0c52df7569
Consolidate locks and error handling when loading accounts(#2309) 2019-01-06 22:06:55 -08:00
Pankaj Garg 91bd38504e
Use vote signer service in fullnode (#2009)
* Use vote signer service in fullnode

* Use native types for signature and pubkey, and address other review comments

* Start local vote signer if a remote service address is not provided

* Rebased to master

* Fixes after rebase
2019-01-05 12:57:52 -08:00
Michael Vines b7dc9dbc76 RPC API now assumes a drone running on the bootstrap leader 2019-01-04 18:45:55 -08:00
Michael Vines 8b357dcb32
cargo fmt 2019-01-04 16:39:04 -08:00
Michael Vines 1f6346d880 De-dup ledgers - db_ledger is now the only ledger written to disk 2019-01-04 16:37:00 -08:00
Jack May b7bd38744c Spelling and formatting 2019-01-04 16:04:31 -08:00
Jack May f8a67e282a Ignore test_tpu_forwarder (#2307) 2019-01-04 16:02:50 -08:00
Greg Fitzgerald 0505d7bd32 Don't double-clone every account 2019-01-03 17:42:37 -07:00
Pankaj Garg 00d310f86d
Remove some metrics datapoint, as it was causing excessive logging (#2287)
- 100 nodes test was bringing down the influx DB server
2019-01-03 09:25:11 -08:00
Sagar Dhawan 0bea870b22
Dynamic N layer 'avalanche' broadcast and retransmit (#2058)
* Dynamic N layer avalanche broadcast and retransmit
2019-01-02 14:16:15 +05:30
Michael Vines 58f2598d5d Revert "Validators make a transaction to advertise their storage last_id"
This reverts commit a1759aed19.
2018-12-23 14:02:09 -08:00
carllin 58a4905916
Make reconstruct_entries_from_blobs() support Blobs and borrowed SharedBlobs, make distinction between to_blobs and to_shared_blobs (#2270) 2018-12-22 19:30:30 -08:00
Michael Vines 2c9607d5da Rename getConfirmation -> getConfirmationTime 2018-12-22 12:47:02 -08:00
Stephen Akridge a1759aed19 Validators make a transaction to advertise their storage last_id
* Also implement more storage contract logic
* Add transactions for proof validation,
* Move storage state members into system storage account userdata
2018-12-21 15:45:30 -08:00
Sathish 1a3387706d
Spawn threads based on cpu count (#2232) 2018-12-21 13:55:45 -08:00
Pankaj Garg 951d6398a0
Rename finality to confirmation (#2250)
* Rename finality to confirmation

* fix cargo fmt errors
2018-12-20 15:47:48 -08:00
Pankaj Garg 7c98545b33
Use newer votes to calculate confirmation time (#2247) 2018-12-20 15:27:47 -08:00
Pankaj Garg bb1060bdad
Reduce ticks per block to increase voting frequency (#2242) 2018-12-20 14:43:03 -08:00
Michael Vines 7ad45a91ec Fix compile error 2018-12-20 13:47:36 -08:00
Michael Vines 034c5d0422 db_ledger now fully encapsulates rocksdb 2018-12-20 12:32:25 -08:00
carllin 7148c14178
Debug broadcast (#2233)
* Account for duplicate blobs in process_blobs

* Increase max bytes for level base to match write buffer
2018-12-20 12:12:04 -08:00
Michael Vines 93fb61dc8f Re-export rocksdb::DBRawIterator until it can be encapsulated 2018-12-20 10:38:03 -08:00
Michael Vines b36ceb5be4 Remove rocksdb dependency from result.rs 2018-12-20 10:38:03 -08:00
Michael Vines 37d7ad819b Purge DB::destroy() usage 2018-12-20 10:38:03 -08:00
carllin 666af1e62d
Debug broadcast (#2208)
* Add per cf rocksdb options, increase compaction and flush threads

* Change broadcast stage to bulk write blobs

* add db_ledger function specifically for broadcast

* fix broken tests

* fix benches
2018-12-19 16:11:47 -08:00
Rob Walker b4f4347d6e
add some more tests (#2217) 2018-12-18 17:27:03 -08:00
Rob Walker 5c866dd000
test drive new coverage stuff (#2216) 2018-12-18 16:44:27 -08:00
Pankaj Garg 974249f2a5
Parallelize entry processing in replay stage in validators (#2212)
* Parallelize entry processing in replay stage in validators

- single threaded entry processing is not utlizing CPU cores to the fullest

* fix tests and address review comments
2018-12-18 16:06:05 -08:00