Commit Graph

1209 Commits

Author SHA1 Message Date
Rob Walker c3db2df7eb tweak random access ledger
* add recover_ledger() to deal with expected common ledger corruptions
  * add verify_ledger() for future use cases (ledger-tool)
  * increase ledger testing
  * allow replicate stage to run without a ledger
  * ledger-tool to output valid json
2018-08-06 08:51:41 -07:00
Rob Walker ee6c15d2db start on ledger recovery with a description of what that might mean 2018-08-06 08:51:41 -07:00
Rob Walker 715a3d50fe Revert "Revert "clippy fixup""
This reverts commit d173e6ef87.
2018-08-06 08:51:41 -07:00
Rob Walker 692b125391 Revert "Revert "fixups""
This reverts commit e2c68d8775.
2018-08-06 08:51:41 -07:00
Rob Walker 5193819d8e Revert "Revert "plug in new ledger""
This reverts commit 57e928d1d0.
2018-08-06 08:51:41 -07:00
Stephen Akridge 210b9d346f Add voting metrics and -h/--help to get usage for client.sh script 2018-08-05 14:21:49 -07:00
Rob Walker 4c4b0f551e clippy fixups 2018-08-05 13:30:45 -07:00
Rob Walker 6800ff1882 solana-ledger-tool initial commit
does nothing but convert from random-access ledger to json
2018-08-05 13:30:45 -07:00
Michael Vines 399a3852b1 Add sigverify_stage-total_verify_time datapoint 2018-08-04 21:45:58 -07:00
Rob Walker 906d18a709 move VOTE to trace, info too verbose 2018-08-03 23:04:54 -07:00
pgarg66 7fd7310b96
Prevent a node from overrunning it's receive window (#846)
- The node drops blobs that will cause it to overrun window
- The node does not ask to repair a blob that overruns the window
2018-08-03 20:15:14 -07:00
Michael Vines 1a9e6ffdd7 Try multiple times to confirm a non-zero balance 2018-08-03 19:57:38 -07:00
Rob Walker 4aab413154 recycle the skipped, outside-window blob, fixes #843 2018-08-03 15:02:55 -07:00
Rob Walker f2b1a04bca cargo fmt fixups 2018-08-03 11:59:25 -07:00
Rob Walker 57e928d1d0 Revert "plug in new ledger"
This reverts commit 46d9ba5ca0.
2018-08-03 10:24:51 -07:00
Rob Walker e2c68d8775 Revert "fixups"
This reverts commit b72e91f681.
2018-08-03 10:24:51 -07:00
Rob Walker d173e6ef87 Revert "clippy fixup"
This reverts commit 384b486b29.
2018-08-03 10:24:51 -07:00
Rob Walker 384b486b29 clippy fixup 2018-08-02 21:50:47 -07:00
Rob Walker b72e91f681 fixups 2018-08-02 21:50:47 -07:00
Rob Walker 46d9ba5ca0 plug in new ledger 2018-08-02 21:50:47 -07:00
pgarg66 f570ef1c66
Defer repair request for blobs that may still be in avalanche transit (#814) 2018-08-02 19:12:57 -07:00
Stephen Akridge ee0195d588 Try to measure finality from time seen to when 2/3 of validator..
..set has voted. Add a timestamp to last_ids and use that to
see how long from when 2/3s validator set has voted on them.
2018-08-02 13:21:29 -07:00
Tyera Eulberg 448b8b1c17 Add Hash wrapper and supporting traits 2018-08-01 17:00:51 -07:00
Tyera Eulberg 4d77fa900b Add Signature wrapper and supporting traits 2018-08-01 17:00:51 -07:00
Stephen Akridge 7ccd771ccc Only send sigverify to GPU if batch size is >64
Seems to be a decent crossover point for Xeon E5-2620 v4 8c,16t vs. nvidia 1080ti
2018-08-01 16:38:15 -07:00
Greg Fitzgerald aa9bc57b4d Implement GenKeys without SecureRandom 2018-08-01 16:24:47 -07:00
Greg Fitzgerald 11df477b20 Make GenKey functions mut
We hide the mutability to implement SecureRandom, but that's going
away.
2018-08-01 16:24:47 -07:00
Greg Fitzgerald 7141750668 new_key -> gen_keypair 2018-08-01 16:24:47 -07:00
Greg Fitzgerald 68675bd1ab Less pub 2018-08-01 16:24:47 -07:00
Greg Fitzgerald 19b3cacd60 Generate a fixed-size array instead of a vector 2018-08-01 16:24:47 -07:00
Tyera Eulberg bcfaf5d994 Rebase ledger change 2018-08-01 16:15:14 -07:00
Tyera Eulberg e9499ac5b8 Update PublicKey AsRef to slice 2018-08-01 16:15:14 -07:00
Tyera Eulberg 7ff721e563 Replace pub field with AsRef impl 2018-08-01 16:15:14 -07:00
Tyera Eulberg cf70e5ff2f Handle wrapped PublicKey struct 2018-08-01 16:15:14 -07:00
Tyera Eulberg a86618faf3 Add PublicKey wrapper
Add custom formatting for PublicKey display and debug
2018-08-01 16:15:14 -07:00
Stephen Akridge 6693386bc5 Lower errors to warnings so they don't print during tests
Negative tests should trigger the warnings, but errors look like
something is wrong.
2018-08-01 16:56:12 -06:00
Michael Vines 4a8a0d03a3 Correct localhost address 2018-08-01 15:49:48 -07:00
Michael Vines 5cda0ed964 Airdrop from the leader 2018-08-01 15:21:20 -07:00
Rob Walker 0aba74935b fixups 2018-08-01 14:42:58 -07:00
Rob Walker 4eb666d4f9 provide ledger::copy() 2018-08-01 14:42:58 -07:00
Rob Walker d5e0cf81ff fixups 2018-08-01 14:42:58 -07:00
Rob Walker 3ea784aff7 clippy fixups 2018-08-01 14:42:58 -07:00
Rob Walker fef93958c8 fixups, tests 2018-08-01 14:42:58 -07:00
Rob Walker cae88c90b1 add a persistent ledger of index and data files 2018-08-01 14:42:58 -07:00
Rob Walker 1a8da769b6 ... 2018-08-01 14:42:58 -07:00
Rob Walker ff254fbe5f re-instate traces 2018-08-01 09:08:38 -07:00
Rob Walker 05153e4884 de-trace this function, new blob is not a dup 2018-08-01 09:08:38 -07:00
Rob Walker 2ece27ee3a fix leak 2018-08-01 09:08:38 -07:00
Greg Fitzgerald a58df52205 Fix build
Last two PRs crossed in flight. A keypair is now required for all
types of FullNode, not just validators.
2018-08-01 08:53:21 -07:00
sakridge 2ea6f86199 Submit leader's vote after observing 2/3 validator votes (#780)
* fixup!

* fixups!

* send the vote and count it

* actually vote

* test

* Spelling fixes

* Process the voting transaction in the leader's bank

* Send tokens to the leader

* Give leader tokens in more cases

* Test for write_stage::leader_vote

* Request airdrop inside fullnode and not the script

* Change readme to indicate that drone should be up before leader

And start drone before leader in snap scripts

* Rename _kp => _keypair for keypairs and other review fixups

* Remove empty else
* tweak test_leader_vote numbers to be closer to testing 2/3 boundary
* combine creating blob and transaction for leader/validator
2018-07-31 22:07:53 -07:00
pgarg66 7c5172a65e
Converted sigverify disable flag to runtime check instead of "cfg" (#799) 2018-07-31 16:54:24 -07:00
Michael Vines 821e3bc3ca Avoid race between test_lograte and test_lograte_env 2018-07-31 16:08:01 -07:00
Rob Walker 5dd2f737a3 clear out old blobs in find_next_missing 2018-07-31 15:54:32 -07:00
anatoly yakovenko 308b6c3371
Follow Shared prefix convention for Window alias (#798)
Follow Shared prefix convention for Window alias.
2018-07-30 16:56:01 -07:00
Rob Walker ea7fa11b3e use size_of() instead of serialized_size() and magic number 8 2018-07-30 16:48:58 -07:00
Michael Vines 95b98b3845 Fix --addr option 2018-07-30 16:36:26 -07:00
Michael Vines f27613754a Report number of nodes found on failure too 2018-07-30 16:36:26 -07:00
Michael Vines 79ece53e3c Don't panic the tokio worker thread when deserialize() fails 2018-07-30 14:56:53 -07:00
Rob Walker f341b2ec10 fixups 2018-07-30 14:26:44 -07:00
Rob Walker 167b079e29 fixups 2018-07-30 14:26:44 -07:00
Rob Walker 7ded5a70be fixups 2018-07-30 14:26:44 -07:00
Rob Walker fc476ff979 implement iterator for parsing length + data ledger 2018-07-30 14:26:44 -07:00
Rob Walker c3279c8a00 chugga 2018-07-30 14:26:44 -07:00
Rob Walker e471ea41da fixups 2018-07-30 14:26:44 -07:00
Rob Walker 552d4adff5 use a binary ledger: newline-separated, newline-escaped entries instead of json 2018-07-30 14:26:44 -07:00
pgarg66 0c33c9e0d7
Dynamic network test changes (#795)
- No sigverify if feature sigverify_cpu_disable is used
- Purge validators in the test if lag count increases beyond
  SOLANA_DYNAMIC_NODES_PURGE_LAG environment variable
- Other useful log messages in the test
2018-07-30 13:57:10 -07:00
Michael Vines fae9fff24c Unify logging initialization 2018-07-29 19:08:27 -07:00
Michael Vines 79924e407c Include nanoseconds in log timestamp 2018-07-29 19:08:27 -07:00
Michael Vines af1a2e83bc Don't panic again when waiting for a panicked validator thread 2018-07-28 16:35:35 -07:00
Michael Vines 029e2db2cf Improve assert message 2018-07-28 10:40:50 -07:00
sakridge 0b47404ba6 Check for default leader and use cmp::max for a bit nicer code (#779) 2018-07-27 15:53:31 -07:00
Rob Walker 50e1e0ae47 use rust's rotate (in place, yay!) 2018-07-27 11:44:02 -07:00
Michael Vines 538c3b63e1 Log the last_id being voted on 2018-07-27 11:27:51 -07:00
Michael Vines 678b2870ff
i 2018-07-27 11:11:37 -07:00
Michael Vines 308d8c254d poll_get_balance no longer fails intermittently for zero balance accounts
While polling for a non-zero balance, it's not uncommon for one of the
get_balance requests to fail with EWOULDBLOCK.  Previously when a get_balance
request failure occurred on the last iteration of the polling loop,
poll_get_balance returned an error even though the N-1 iterations may have
successfully retrieved a balance of 0.
2018-07-26 21:41:07 -07:00
Michael Vines f11aa4a57b Ensure non-zero exit code if 'balance' command fails 2018-07-26 21:41:07 -07:00
Michael Vines 7672506b45 Validators now vote once a second regardless 2018-07-26 17:07:42 -07:00
Rob Walker dd819cec3d fix off by one in packet.rs 2018-07-26 09:24:44 -07:00
Rob Walker cbb8dee360 rework broadcast to understand a separate transmit index for coding blobs 2018-07-25 20:45:16 -07:00
Rob Walker e0cdcb0973 employ the simple choice for broadcast table of coding blobs: round-robin 2018-07-25 20:45:16 -07:00
Rob Walker a6a2a745ae fix broadcast of erasure coding blobs
erasure coding blobs were being counted as window slots, skewing transmit_index

erasure coding blobs were being skipped over for broadcast, because they're
  only generated when the last data blob in an erasure block is added to the
  window.... rewind the index to pick up and broadcast those coding blobs
2018-07-25 20:45:16 -07:00
Michael Vines f372840354 Collect some datapoints while bench-tps is running 2018-07-25 20:15:43 -07:00
Stephen Akridge 212874e155 Use BlobError for get_size return 2018-07-25 15:54:04 -07:00
Rob Walker 75212f40e7 fix off by one for send_to() of blob 2018-07-25 15:16:56 -07:00
Rob Walker 6fde65577e fixes #756 2018-07-25 11:07:03 -07:00
Stephen Akridge edf2ffaf4e Reduce complexity of main for clippy
...and readability
2018-07-25 10:16:46 -07:00
Stephen Akridge 6c275ea5ef More knobs. Arg for tx count per batch and also sustained mode
sustained mode overlaps tx generation with transfer. This mode seems
to have lower peak performance but higher average performance
2018-07-25 10:16:46 -07:00
Stephen Akridge 23ed65b339 Transfer and sign at the same time in bench-tps 2018-07-25 10:16:46 -07:00
Rob Walker 9c7913ac9e trying to raise an error 2018-07-25 08:12:20 -07:00
Rob Walker 8b01e6ac0b implement Blob::get_size(), the counterpart of Blob::set_size() 2018-07-25 08:12:20 -07:00
Rob Walker ff5854396a deserialize using get_data_size(), which refers to blob.data()'s length,
instead of using msg.meta.size, which refers to the entire blob's length

fixes #752
2018-07-25 08:12:20 -07:00
Michael Vines f0725b4900 Avoid panicking if poll_get_balance() fails while in the transaction loop 2018-07-24 23:31:28 -07:00
Michael Vines 327ba5301d Log token balance throughout the transfer loop 2018-07-24 22:40:12 -07:00
Michael Vines aa2104a21b Reclaim tokens before exiting to avoid leaking tokens 2018-07-24 21:40:02 -07:00
Michael Vines 0206020104 Make airdrops more robust 2018-07-24 21:40:02 -07:00
Rob Walker 33bd1229d9 make next_entries() smarter about fitting Transactions into a Blob 2018-07-24 21:38:06 -07:00
Michael Vines 195098ca2b Failure test case 2018-07-24 21:38:06 -07:00
Stephen Akridge 6bd18e18ea Add error messages to ledger verify 2018-07-24 17:35:41 -07:00
Rob Walker 2b528e2225 fixups 2018-07-24 13:04:34 -07:00
Rob Walker 75505bbd72 fixups 2018-07-24 13:04:34 -07:00