Commit Graph

466 Commits

Author SHA1 Message Date
Anatoly Yakovenko 8d0d429acd update 2018-08-26 23:34:25 -07:00
Anatoly Yakovenko e5408368f7 fmt 2018-08-26 22:35:26 -07:00
Anatoly Yakovenko 61492fd27e exit if no leader 2018-08-26 22:35:26 -07:00
Anatoly Yakovenko bbce08a67b bench needs to discover leader as well 2018-08-26 22:35:26 -07:00
anatoly yakovenko 738247ad44
advertise valid gossip address in drone and wallet (#1066)
* advertize valid gossip address in drone and wallet

get rid of asserts

check for valid ip address

check for valid address

ip address

* tests

* cleanup

* cleanup

* print error

* bump

* disable tests

* disable nightly
2018-08-26 11:36:27 -07:00
Pankaj Garg 50661e7b8d Added poll_balance_with_timeout method (#1062)
* Added poll_balance_with_timeout method

- updated bench-tps, fullnode and wallet to use this method instead
  of repeatedly calling poll_get_balance()

* Address review comments

- Revert some changes to use wrapper poll_get_balance()

* Reverting bench-tps to use poll_get_balance

- The original code is checking if the balance has been updated,
  instead of just retrieving the balance. The logic is different
  than poll_balance_with_timeout()

* Reverting wallet to use poll_get_balance

- The break condition in the loop is different than poll_balance_with_timeout().
  It's checking if the balance has been updated.
2018-08-25 18:24:25 -07:00
Pankaj Garg ad159e0906 Fix crash in fullnode when poll_get_balance() returns error (#1058) 2018-08-25 15:25:13 -07:00
Pankaj Garg d3fac8a06f
Dynamically bind to available UDP ports in Fullnode (#920)
* Dynamically bind to available UDP ports in Fullnode

* Added tests for dynamic port binding

- Also removed hard coding of port range from CRDT
2018-08-25 10:24:16 -07:00
Greg Fitzgerald 0c8eec2563 Cleanup Fullnode construction
leader_id was already set by Fullnode constructor. And cleanup the
rest of that code while in the neighborhood.

Thanks @CriesofCarrots!
2018-08-23 13:42:54 -07:00
Greg Fitzgerald be58fdf1bb Less constructors 2018-08-23 13:42:54 -07:00
Greg Fitzgerald 9c5e69bf3d Don't offer two ways to specify a leader 2018-08-23 13:42:54 -07:00
Tyera Eulberg d4c41219f9 Improve gossip use for drone and wallet
- Add utility function
  - Add thread sleep
  - Enable configurable timeout for gossip poll
2018-08-23 13:08:59 -06:00
Tyera Eulberg 4fdd9fbfca Wallet: use gossip to identify leader's port config 2018-08-23 13:08:59 -06:00
Tyera Eulberg bdf5ac9c1a Drone: use gossip to identify leader's port config 2018-08-23 13:08:59 -06:00
Stephen Akridge c3ed4d28de Change average TPS to max average tps seen for any node and...
add script to collect perf stats
2018-08-22 14:55:04 -07:00
Greg Fitzgerald 2d35345c50 Boot unused creates 2018-08-20 16:48:37 -06:00
Michael Vines 8de317113c clippy: remove identity conversion 2018-08-20 10:55:55 -07:00
Tyera Eulberg f73f3941cd Revert ill-advised jsonrpc marker, and handle jsonrpc server close 2018-08-18 12:29:49 -06:00
Tyera Eulberg 1eb8724a89 Disable Rpc module for other tests to prevent port conflicts 2018-08-18 12:29:49 -06:00
Tyera Eulberg c6662a4512 Implement Rpc in Fullnode 2018-08-18 12:29:49 -06:00
Tyera Eulberg d3c09b4e96 Update jsonrpc dependency syntax 2018-08-18 12:29:49 -06:00
Tyera Eulberg 569ff73b39 Rpc tests 2018-08-18 12:29:49 -06:00
Tyera Eulberg fc1dbddd93 Implement json-rpc functionality 2018-08-18 12:29:49 -06:00
Tyera Eulberg 208a7f16cb Fix bench-tps nokey error 2018-08-16 19:38:26 -06:00
Anatoly Yakovenko a284030ecc Account type with state
comments

fixups!

fixups!

fixups for a real Result<> from get_balance()

on 2nd thought, be more rigorous

Merge branch 'rob-solana-accounts_with_state' into accounts_with_state

update

review comments

comments

get rid of option
2018-08-16 14:44:51 -07:00
anatoly yakovenko 88d6fea999 Revert "Accounts with state (#954)"
This reverts commit c23fa289c3.
2018-08-15 19:44:39 -07:00
anatoly yakovenko c23fa289c3
Accounts with state (#954)
* Account type with state

* fixed test according to @rob-solana
2018-08-15 14:32:11 -07:00
Rob Walker 708add0e64 fixups 2018-08-14 10:16:34 -07:00
Rob Walker d8991ae2ca fix UPnP backout, fixes #969 2018-08-14 10:16:34 -07:00
Greg Fitzgerald b801ca477d Declare fullnode a word 2018-08-13 20:17:16 -06:00
Greg Fitzgerald 2727067b94 Move winow into its own module 2018-08-13 20:17:16 -06:00
Tyera Eulberg 46d50f5bde Remove p2p crate (and uPnP support) 2018-08-13 18:22:58 -07:00
Rob Walker 835f29a178 off by 2 2018-08-13 15:12:12 -07:00
Rob Walker 5dbcb43abd more enhancements 2018-08-10 19:53:58 -07:00
Rob Walker dd1eefaf62 change verify-internal to precheck
update to new ledger API
2018-08-10 19:53:58 -07:00
Rob Walker 546a1e90d5 clippy fixups 2018-08-10 19:53:58 -07:00
Rob Walker b033e1d904 enhance ledger-tool
* add json, which does the thing with json, move print to Rust's {:?}
  * add --head NUM, to limit how much work gets done for print, json, verify
  * add verify-internal, which very carefully checks ledger format without
      trying first to "recover" it
  * exit with errors on mis-usage
2018-08-10 19:53:58 -07:00
Rob Walker 96d6985895 rework read_ledger, LedgerWriter, and LedgerWindow for recover()
fixes #910
2018-08-10 18:07:23 -07:00
Stephen Akridge a206f2570d Add hostname to metrics on panic 2018-08-10 17:08:40 -07:00
Greg Fitzgerald 4a980568ac Rename sig variables to signature
We'll avoid introducing three-letter terms to free up the namespace
for three-letter acronyms.

But recognize the term "sigverify", a verb, to verify a digital
signature.
2018-08-09 13:41:37 -06:00
Greg Fitzgerald ad331e6d56 Rename PublicKey type to Pubkey
Recognize pubkey as a noun meaning the public key of a keypair.
2018-08-09 13:41:37 -06:00
Greg Fitzgerald c2bbe4344e Rename KeyPair to Keypair 2018-08-09 13:41:37 -06:00
Rob Walker fbc754ea25 plug in LedgerWindow
fixes #872
2018-08-07 17:27:53 -07:00
Kazuyoshi Kato efc72b9572 Support -V/--version on all CLI apps
All CLI apps that use clap (in other words, except for bench-streamer)
can use crate_version! to take the version from Cargo.toml.

This change addresses #700.
2018-08-06 22:03:58 -07:00
Michael Vines 5dc7177540 Remove manually created help text, use clap's text instead. 2018-08-06 19:15:52 -07:00
Michael Vines 78a4b1287d Initialize logger 2018-08-06 19:04:04 -07:00
Michael Vines c5001869f1 Add verify subcommand 2018-08-06 19:04:04 -07:00
Michael Vines e02da9a15a Clean up tx_count usage 2018-08-06 11:00:25 -07:00
Michael Vines ae111a131c Condense stdout 2018-08-06 11:00:25 -07:00
Michael Vines 4402e1128f Cleanup 2018-08-06 11:00:25 -07:00
Michael Vines f55bb6d95c Send/confirm a loopback payment after each batch of transactions 2018-08-06 11:00:25 -07:00
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 5193819d8e Revert "Revert "plug in new ledger""
This reverts commit 57e928d1d0.
2018-08-06 08:51:41 -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 1a9e6ffdd7 Try multiple times to confirm a non-zero balance 2018-08-03 19:57:38 -07:00
Rob Walker 57e928d1d0 Revert "plug in new ledger"
This reverts commit 46d9ba5ca0.
2018-08-03 10:24:51 -07:00
Rob Walker 46d9ba5ca0 plug in new ledger 2018-08-02 21:50:47 -07:00
Tyera Eulberg 4d77fa900b Add Signature wrapper and supporting traits 2018-08-01 17:00:51 -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
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
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
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
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
Michael Vines fae9fff24c Unify logging initialization 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
Michael Vines f11aa4a57b Ensure non-zero exit code if 'balance' command fails 2018-07-26 21:41:07 -07:00
Michael Vines f372840354 Collect some datapoints while bench-tps is running 2018-07-25 20:15:43 -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
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
Michael Vines 48b5344586 Check for 0 TPS explicitly 2018-07-23 16:51:39 -07:00
Michael Vines 686b7d3737 Report panics if metrics are setup 2018-07-23 16:51:39 -07:00
Michael Vines 7c65e2fbfc Rename variable to improve readability 2018-07-23 16:51:39 -07:00
Stephen Akridge b3f823d544 Alternate between token reclaim and distribution 2018-07-23 13:17:52 -07:00
Stephen Akridge ea21c7a43e Limit bench-tps last_id poll to prevent infinite loop 2018-07-23 13:17:52 -07:00
Stephen Akridge 437fb1a8d7 Add -a argument to client in case you want to override the address
advertised by the client
2018-07-23 13:17:52 -07:00
Michael Vines c707b3d2e7 Display the total number of transactions for each node once complete 2018-07-22 23:19:33 -07:00
Michael Vines 4ecd0a0e45 Improve bench-tps logging 2018-07-22 16:26:49 -07:00
Michael Vines cdcf59ede0 Display a list of all discovered nodes 2018-07-22 11:32:44 -07:00
Greg Fitzgerald 69688a18c7 Fix clippy warnings
Seems clippy is not linting any of the benches.
2018-07-21 11:36:20 -04:00
Greg Fitzgerald 7193bf28b6 Move streamer bench into standalone executable
It doesn't make use of criterion (or libtest)
2018-07-21 11:36:20 -04:00
Greg Fitzgerald 637f890b91 Rename client-demo to bench-tps 2018-07-21 11:36:20 -04:00
Greg Fitzgerald 0e305bd7dd Add poll_for_signature 2018-07-20 20:33:55 -04:00
Martius Lim 84225beeef replace 'daddr' checks with 'is_valid_address()' 2018-07-20 13:09:01 -04:00
pgarg66 686e61d50c
Display max TPS from all nodes at end of client demo (#716)
- Also lists node with 0 TPS and overall average TPS
2018-07-19 20:09:57 -07:00
Michael Vines a67f58e9a5 Add -c option to easily interrogate the number of nodes 2018-07-19 09:41:09 -07:00
Stephen Akridge 2348733d6c remove drone port magic number 2018-07-19 02:01:23 +02:00
Michael Vines 39df087902 Permit more than the requested amount of nodes 2018-07-18 12:07:50 -07:00
Greg Fitzgerald 28af9a39b4 Don't clone before borrowing
Clippy told us to change function parameters to references, but
wasn't able to then tell us that the clone() before borrowing
was superfluous. This patch removes those by hand.

No expectation of a performance improvement here, since we were
just cloning reference counts. Just removes a bunch of noise.
2018-07-18 08:04:31 -04:00
Michael Vines 47a22c66b4 Include program name in panic metric 2018-07-17 12:13:22 -07:00