Commit Graph

466 Commits

Author SHA1 Message Date
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
Michael Vines fb11d8a909 Install panic hook 2018-07-17 12:13:22 -07:00
pgarg66 103584ef27
Use public IP for client gossip, if UPnP fails (#665) 2018-07-17 11:23:32 -07:00
anatoly yakovenko d8c9655128
Dynamic test assert (#643)
* log responder error to warn

* log responder error to warn

* fixup!

* fixed assert

* fixed bad ports issue

* comments

* test for dummy address in Crdt::new instaad of NodeInfo::new

* return error if ContactInfo supplied to Crdt::new cannot be used to connect to network

* comments
2018-07-16 19:31:52 -07:00
pgarg66 0d85b43901
Fix input parameter processing for client num nodes (#653) 2018-07-16 17:23:35 -07:00
Michael Vines 2b77f62233 Poll longer while waiting for an airdrop 2018-07-14 17:10:44 -07:00
Michael Vines 1f9152dc72 Detect and report airdrop failures 2018-07-13 18:08:28 -07:00
Michael Vines 084dbd7f58 Fail gracefully when leader.json is missing 2018-07-13 17:24:25 -07:00
Michael Vines 18e6ff4167 Fail gracefully when keypair file is unreadable 2018-07-13 10:00:55 -07:00
Rob Walker 710fa822a0 fixups 2018-07-12 22:51:55 -07:00
Rob Walker 34ea483736 step two: supply a ledger file argument to fullnode in the demo
(also whack unused "myip.sh", even though it was pretty)
2018-07-12 22:51:55 -07:00
Rob Walker a3ff40476e Banish stdin/stdout for ledger
step one: accept a "ledger file" argument instead of "outfile"
2018-07-12 22:51:55 -07:00
Greg Fitzgerald 3d9acdd970 Fix nightly 2018-07-12 21:50:28 -06:00
Greg Fitzgerald f06a8dceda Fix keygen docs
Thanks @rob-solana
2018-07-12 21:50:28 -06:00
Greg Fitzgerald 545f4f1c87 Pass the owner's keypair to fullnode-config 2018-07-12 21:50:28 -06:00
Greg Fitzgerald 77543d83ff Fix default keypair paths 2018-07-12 21:50:28 -06:00
Greg Fitzgerald eb6a30cb7c In Wallet, make --tokens required and --to optional 2018-07-12 21:50:28 -06:00
Greg Fitzgerald 97372b8e63 Add --outfile option to solana-keygen 2018-07-12 21:50:28 -06:00
Greg Fitzgerald cea29ed772 More keygen 2018-07-12 21:50:28 -06:00
Greg Fitzgerald b5006b8f2b Migrate to solana-keygen
Most of #593
2018-07-12 21:50:28 -06:00
Greg Fitzgerald 81c44c605b Add solana-keygen
Same as solana-mint, but without a tokens field.
2018-07-12 14:06:43 -06:00
Greg Fitzgerald 30f0c25b65 Fix all remaining clippy warnings
Fixes #586
2018-07-12 09:40:40 -06:00
Greg Fitzgerald 73ae3c3301 Apply most of clippy's feedback 2018-07-12 09:40:40 -06:00
Greg Fitzgerald f98e9aba48 Apply clippy feedback to CLI apps 2018-07-12 09:40:40 -06:00
Tyera Eulberg 350cf62b90 Sequence client outgoing and incoming txs 2018-07-12 07:24:15 -06:00
Tyera Eulberg aa4f30c491 Repay transactions from test accounts to client 2018-07-12 07:24:15 -06:00
Tyera Eulberg 3de979aa7c Check client balance and only airdrop if less than TPS quota 2018-07-12 07:24:15 -06:00
OEM Configuration (temporary user) 468ac9facd Refactor the "ReplicatedData" struct
Rename the "ReplicatedData" struct to the "NodeInfo" struct.
Also refactors and renames the members in this struct.
2018-07-11 11:38:41 -06:00
Anatoly Yakovenko 6f991b3c11 Send keypair args for validators instead of leaders 2018-07-11 07:54:38 -06:00
Anatoly Yakovenko d531b9645d review comments 2018-07-10 13:32:31 -06:00
Anatoly Yakovenko be2bf69c93 initial vote stage
wip

voting

wip

move voting into the replicate stage

update

fixup!

fixup!

fixup!

fixup!

fixup!

fixup!

fixup!

fixup!

fixup!

fixup!

update

fixup!

fixup!

fixup!

tpu processing votes in entries before write stage

fixup!

fixup!

txs

make sure validators have an account

fixup!

fixup!

fixup!

exit fullnode correctly

exit on exit not err

try 50

add delay for voting

300

300

startup logs

par start

100

no rayon

retry longer

log leader drop

fix distance

50 nodes

100

handle deserialize error

update

fix broadcast

new table every time

tweaks

table

update

try shuffle table

skip kill

skip add

purge test

fixed tests

rebase 2

fixed tests

fixed rebase

cleanup

ok for blobs to be longer then window

fix init window

60 nodes
2018-07-10 13:32:31 -06:00
Greg Fitzgerald c65c0d9b23 Expose fewer exit variables 2018-07-10 11:11:36 -06:00
Anatoly Yakovenko 63985d4595 renamed to contact_info 2018-07-09 20:40:14 -06:00
Anatoly Yakovenko 2ea030be48 stick all the addrs into one struct 2018-07-09 20:40:14 -06:00
Tyera Eulberg 606cfbfe1e Migrate fullnode and fullnode-config to clap for CLI arguments 2018-07-09 20:38:32 -06:00
Tyera Eulberg d698b3da3a Revert tps_demo marker 2018-07-05 15:15:23 -06:00
Tyera Eulberg 6d275d571c Clean up commented code 2018-07-05 15:15:23 -06:00
Tyera Eulberg 4d05b74314 Port solana-client-demo to clap crate for CLI arguments 2018-07-05 15:15:23 -06:00
Tyera Eulberg 96c321da76 Update drone to allow TPS-sized airdrops 2018-07-05 15:15:23 -06:00
Tyera Eulberg 4701540cc9 Migrate solana-client-demo to use drone 2018-07-05 15:15:23 -06:00
Pankaj Garg f54615b4e3 UDP port for client demo in range
* This change will allow clients to run behind a firewall
  with only certain port range opened for access
2018-07-05 10:17:35 -06:00
Greg Fitzgerald 77bf17064a Add Service trait
Added a consistent interface to all the microservices.
2018-07-04 16:40:34 -06:00
Tyera Eulberg 44150b2e85 Remove unused crate from wallet CLI 2018-07-04 16:39:26 -06:00
Tyera Eulberg 8ec2fe15f3 Port solana-drone to clap crate for CLI arguments 2018-07-04 16:39:26 -06:00
Anatoly Yakovenko fa70b3bf70 split out files, fixed a bug @garious! 2018-07-03 14:00:39 -06:00
Anatoly Yakovenko 3a90f138b2 dynamit network test
* cleaned up fullnode api
* added debug_id to ReplicatedData and crdt for debugging
2018-07-03 14:00:39 -06:00
Greg Fitzgerald 5d8b2f899a Fix wallet doc 2018-07-02 19:21:03 -07:00
Michael Vines 2cbfe41422 Abort nicer on drone connection failure 2018-07-02 15:57:30 -07:00
Michael Vines c72dced8fa Report error when an invalid confirmation signature or public key is provided 2018-07-02 15:57:30 -07:00
Anatoly Yakovenko b8fe5ae076 rename server to fullnode 2018-07-02 16:34:49 -06:00
Anatoly Yakovenko a166bb816e wtfr 2018-07-02 16:34:49 -06:00
Anatoly Yakovenko 2952027d04 wtfr 2018-07-02 16:34:49 -06:00
Anatoly Yakovenko 430d9d9314 fixup! 2018-07-02 16:34:49 -06:00
Anatoly Yakovenko fa247196c0 fullnode lib 2018-07-02 16:34:49 -06:00
Michael Vines 3e0e09555a Undo UPnP UDP port binding 2018-07-02 14:38:01 -07:00
Michael Vines 67e0100866 Bind to 0.0.0.0 2018-07-02 14:38:01 -07:00
Michael Vines f2ab08c65e Reuse request UDP port for responses 2018-07-02 14:38:01 -07:00
Michael Vines 03401041db Correct signature argument name 2018-07-02 11:24:13 -07:00
Michael Vines ae29e2085f Init env_logger 2018-07-02 10:59:09 -07:00
Greg Fitzgerald 4e3526394e Use IntoInterator to simplify write_entries() usage 2018-07-02 09:51:39 -06:00
Greg Fitzgerald ec7e50b37d Consolidate ledger serialization code
The new read_entries() works, but is overly-contrained. Not
using that function yet, but adding it here in the hopes some
Rust guru will tell us how to get that lifetime constraint out
of there.

Fixes #517
2018-07-02 09:51:39 -06:00
Greg Fitzgerald 669164bada Boot EntryWriter's Mutex
Finally!
2018-07-01 17:29:24 -06:00
Greg Fitzgerald b60802ddff Refactor such that genesis can use entry_writer 2018-07-01 11:35:32 -07:00
Greg Fitzgerald b05e6ce3db Cleanup solana-genesis 2018-07-01 11:35:32 -07:00
Michael Vines 450f271cf7 Move public IP address detection out of bash 2018-06-29 21:12:05 -07:00
Tyera Eulberg ba6a6f5227 Use clap crate for wallet CLI subcommands and arguments 2018-06-29 21:30:20 -06:00
Michael Vines 0b56d603c2 Client NAT traversal 0.1
UPnP is now used to request a port on the NAT be forwarded to the local machine.
This obviously only works for NATs that support UPnP, and thus is not a panacea
for all NAT-related connectivity issues.

Notable hacks in this patch include a transmit/receive UDP socket pair to work
around current protocol limitations whereby the full node assumes its peer can
receive on the same UDP port it transmitted from.
2018-06-29 17:36:26 -07:00
Greg Fitzgerald 816246ebee Add doc 2018-06-29 17:28:12 -06:00
Greg Fitzgerald a9881aee05 Add base58-encoded addresses 2018-06-29 17:28:12 -06:00
Greg Fitzgerald 7b5b989cfe Print usage is a command is not provided 2018-06-29 17:28:12 -06:00
Greg Fitzgerald c4b62e19f2 Do Proof of History verification before appending entries to the bank
Note: replicate_stage is still using `process_entries()` because
changing it to `process_blocks()` causes the `test_replicate` test to
fail.
2018-06-29 15:35:39 -06:00
Greg Fitzgerald 9a4733bde7 Remove interactive behavior from wallet 2018-06-29 13:22:20 -06:00
Greg Fitzgerald 517d08c637 Cleanup 2018-06-29 09:51:13 -07:00
Greg Fitzgerald 90dd794ae5 cargo fmt
rustfmt 0.6.1-stable (49279d71 2018-05-08)
2018-06-29 09:51:13 -07:00
Tyera Eulberg d354e85a9a Return bool on signature check 2018-06-29 09:51:13 -07:00
Tyera Eulberg e4e1f8ec1e Missing -m parameter handling 2018-06-29 09:51:13 -07:00
Tyera Eulberg 0112a24179 Add confirm command to wallet, and update RPU to check bank for a signature 2018-06-29 09:51:13 -07:00
Michael Vines 47917d00d1 Always bind to 0.0.0.0 regardless of what's being advertised to other nodes 2018-06-28 19:13:36 -07:00
Greg Fitzgerald 7878a011eb Use a Mint to configure the wallet
* Send transactions from the mint's private key
* By default, send full balance to oneself
* By default, request the mint's number of tokens for airdrops
2018-06-27 17:35:50 -06:00
Greg Fitzgerald c05416e27d Turn simple-client-demo into a simpler wallet 2018-06-27 17:35:50 -06:00
Rob Walker 2f42658cd4 ... 2018-06-27 14:51:18 -07:00
Greg Fitzgerald bb89d6f54d Get back to 500k transactions 2018-06-27 13:50:27 -07:00
Greg Fitzgerald ed10841e3d No longer spin up accounts for client-demo
Now that the Bank is single-threaded again, we can spin up new
accounts on the fly without concern of thread contention. Likewise,
we can send all transactions from a single account, which was also
problematic in the multi-threaded bank. Sending from one account will
also make client-demo straightforward to port to solana-drone.
2018-06-27 13:50:27 -07:00
Tyera Eulberg a167d0d331 CI cleanup 2018-06-27 13:01:29 -06:00
Tyera Eulberg eed37820b5 Comments 2018-06-27 13:01:29 -06:00
Tyera Eulberg ac40434cdf Initial simple client demo commit 2018-06-27 13:01:29 -06:00
Rob Walker 1919ec247b add a clock to validator windows (part 3 of #309) (#448)
* count entries processed by Bank
 * initialize windows with initial height of Entries
2018-06-25 15:07:48 -07:00
Stephen Akridge c22ef50cae Client fixes, poll for unique last id and cache clients
So we don't keep running up the port range
2018-06-25 10:02:29 -06:00
Anatoly Yakovenko e929404676 comments 2018-06-24 11:17:55 -06:00
Anatoly Yakovenko 215fdbb7ed nits 2018-06-24 11:17:55 -06:00
Anatoly Yakovenko ee998f6882 fix docs 2018-06-24 11:17:55 -06:00
Anatoly Yakovenko 88503c2a09 generic array fail case 2018-06-24 11:17:55 -06:00
Tyera Eulberg 80c01dc085 Use leader.json or ReplicatedData to get ports for drone 2018-06-24 10:44:17 -06:00
Greg Fitzgerald c7ce454188 Use pnet_datalink instead of all of pnet
pnet_transport takes a long time to build. It's been especially
painful from within a docker container for reasons I don't care
to understand. pnet_datalink is the only part of pnet we're using
so booting the rest.
2018-06-24 10:39:59 -06:00
Rob Walker eec19c6d2c move genesis to new Entry generation 2018-06-22 17:46:45 -07:00
Tyera Eulberg 96f044d2bf Clean up; add new_from_server_addr routine 2018-06-22 14:52:36 -07:00
Tyera Eulberg f31868b913 Rename drone bin; fix usage statement 2018-06-22 14:52:36 -07:00
Tyera Eulberg 64cf69045a Add request-count check; Clean up solana-drone and fmt 2018-06-22 14:52:36 -07:00
Tyera Eulberg 6386e7d5cf Leave some tokens in the mint for solana-drone 2018-06-22 14:52:36 -07:00
Tyera Eulberg 4bad103da9 Add solana-drone CLI 2018-06-22 14:52:36 -07:00
Rob Walker 6aced927ad improve ledger initialization for fullnode
* use a line iterator on stdin instead of a line iterator on a buffer
 * move some unwrap() to expect(), documenting failures
 * bind entry type earlier (for kicks)
2018-06-19 09:28:35 -07:00