Commit Graph

1649 Commits

Author SHA1 Message Date
Greg Fitzgerald
a5c7575207 Rewrite find_next_missing, call it clear_slots 2018-09-07 13:18:19 -06:00
Greg Fitzgerald
50f040530b Remove redundant cast 2018-09-07 13:18:19 -06:00
Greg Fitzgerald
7f99c90539 Simplify using early return and Result::ok() 2018-09-07 13:18:19 -06:00
Greg Fitzgerald
d8564b725c Don't reference window to get each slot 2018-09-07 13:18:19 -06:00
Greg Fitzgerald
e4de25442a Hoist write lock
It needed to be passed the lock before, because it contained a
branch where one side didn't require locking. Now that that
defensive programming was hoisted, we can hoist the write lock
as well, leaving a simpler function for unit testing.
2018-09-07 13:18:19 -06:00
Greg Fitzgerald
3b2ea8fd40 Hoist untested branch in window
If there were unit tests for this function, the author would have
written it this way to make their own life easier.
2018-09-07 13:18:19 -06:00
Greg Fitzgerald
0fa27f65bb Use the default Pubkey formatter instead of debug_id() 2018-09-06 16:31:47 -06:00
sakridge
8f94e3f7ae Buffer tokens when switching directions to prevent errors (#1126)
Even if transactions are dropped, accounts will have buffer
of tokens. Should reduce or eliminate AccountNotFound errors seen in the
leader while bench-tps is running.
2018-09-06 14:20:01 -07:00
Pankaj Garg
05460eec0d Open multiple sockets for transaction UDP port (#1128)
* Reuse UDP port and open multiple sockets for transaction address

* Fixed failing crdt tests

* Add tests for reusing UDP ports

* Address review comments

* Updated bench-streamer to use multiple receive sockets

* Fix minimum number of recv sockets for bench-streamer

* Address review comments

Fixes #1132

* Moved bind_to function to nat.rs
2018-09-06 14:13:40 -07:00
sakridge
d9e4bce6ad Add drop stats to bench-tps (#1127)
See how many transactions made it through
2018-09-05 11:58:41 -07:00
sakridge
ffb72136c8 Remove account from balances table after error seen (#1120)
If balance goes to 0, then bank removes the account
from it's account table and returns no account error. Thin client
should also update the account to this state or it will
still have the cached balance from the last successful get_balance().
2018-09-04 21:33:19 -07:00
Greg Fitzgerald
68c72d6f34 Fix nightly build 2018-09-04 20:56:40 -06:00
sakridge
d82ec2634c Fix is_leader boolean (#1115)
A node is the leader if the address is none
2018-09-04 13:38:24 -07:00
Rob Walker
c44c5f0b09 take into account size of an Entry (#1116) 2018-09-05 05:07:58 +09:00
Rob Walker
226d3b9471 Trace recycle() calls (#968)
* trace recycle() calls fixes #810
2018-09-05 05:07:02 +09:00
Stephen Akridge
2752bde683 Print to indicate what drone is doing while waiting for gossip 2018-09-04 13:45:08 -06:00
Greg Fitzgerald
2aa72cc72e Return a Vec from to_blobs() instead of using a mut parameter 2018-09-04 07:50:23 -10:00
Greg Fitzgerald
8cc030ef84 Use Vec instead of VecDeque for SharedBlobs 2018-09-04 07:50:23 -10:00
Stephen Akridge
9a9f89293a Better error handling messages for airdrops 2018-09-04 06:46:43 -10:00
anatoly yakovenko
501deeef56 accounts should never be negative (#1083) 2018-09-04 06:43:18 -10:00
Greg Fitzgerald
05f921d544 Don't call println in the test suite 2018-09-04 06:01:32 -10:00
Greg Fitzgerald
ab7a2960b1 Don't use product name in solana library 2018-09-04 06:01:32 -10:00
Greg Fitzgerald
4e2deaa33b Less mut 2018-09-04 06:01:32 -10:00
Greg Fitzgerald
d5ef18337c Remove redundant return value
And don't log the same error twice.
2018-09-04 06:01:32 -10:00
Greg Fitzgerald
d18ea501b7 Minimize unsafe code 2018-09-04 06:01:32 -10:00
Greg Fitzgerald
c9a1ac9b8c Don't propogate errors we'll never handle 2018-09-04 06:01:32 -10:00
Greg Fitzgerald
c2a4cb544e Borrow, don't clone entries 2018-09-04 06:01:32 -10:00
Greg Fitzgerald
3ab12076e8 Convert voting functions to methods
More idiomatic Rust.
2018-09-04 05:53:58 -10:00
anatoly yakovenko
fb4b33b81b make the repair_backoff test more robust (#1095)
* more the repair_backoff test more robust

* fix names and magic numbers
2018-08-31 12:40:56 -10:00
Rob Walker
5c8cb96f88 rebase fixup 2018-08-31 23:21:07 +09:00
Rob Walker
176e806d94 rework of netwrk rendezvous
* rename NodeInfo field of Node from "data" to "info"
      (touches a lot of files)

  * update client to use gossip to find leader, a la drone

  * rework multinode scripts
      * move more stuff into rust
      * added usage to all
      * no more rsync unless you're a validator (TODO: whack that, too)
  * fullnode doesn't bail if drone isn't up yet, just keeps trying
  * drone doesn't bail if network isn't up yet, just keeps trying
2018-08-31 23:21:07 +09:00
Rob Walker
eb4e5a7bd0 fixups 2018-08-31 23:21:07 +09:00
Rob Walker
ba27596076 fixups 2018-08-31 23:21:07 +09:00
Rob Walker
63e44dcc35 continue rendezvous refactor for gossip and repair
* remove trailing whitespace in ci/audit.sh

  * code review fixups
     * rename GOSSIP_PORT_RANGE => SOLANA_PORT_RANGE
     * remove out-of-date TODO in localnet-sanity.sh

  * remove features=test and code that was using it (localhost prohibitions in
      crdt) added TODO in crdt.rs, maybe we should boot localhost in production
      networks?

  * boot tvu_window from NodeInfo: instead, send repair requests from the repair
      socket (to gossip on peer) and answer repair requests via the sockaddr
      from the repair request

  * remove various unused pub functions

  * banish SocketAddr parse().unwrap() to a macro that can also accept simpler stuff
2018-08-31 23:21:07 +09:00
Rob Walker
c0ba676658 fixup 2018-08-31 23:21:07 +09:00
Rob Walker
1af4cee63b fix #1079
* move gossip/NCP off assuming anything about its address
  * use a single socket to send and receive gossip
  * remove --addr/-a from CLIs
  * rearrange networking utility code
  * use Arc<UdpSocket> to share the Sync-safe UdpSocket among threads
  * rename TestNode to Node

TODO:

  * re-enable 127.0.0.1 as a valid address in crdt
  * change repair request/response to a similar, single socket
  * pick cloned sockets or Arc<UdpSocket> for all these (rpu uses tryclone())
  * update contact_info with network truthiness instead of what the node
      says?
2018-08-31 23:21:07 +09:00
Tyera Eulberg
e308a4279e Update RPC requestAirdrop endpoint to return airdrop tx signature 2018-08-28 18:27:41 -06:00
Tyera Eulberg
513a934ff6 Update request_airdrop utility function to pass along airdrop tx signature 2018-08-28 18:27:41 -06:00
Tyera Eulberg
77d820c842 Update drone module to return airdrop tx signature 2018-08-28 18:27:41 -06:00
anatoly yakovenko
48762834d9 Randomize repair requests (#1059)
* randomize packet repair requests

* exponential random repair requests

* use gen_range to get a uniform distribution
2018-08-27 07:05:48 -07:00
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
a002148098 retry transfer and poll 2018-08-26 16:10:46 -07:00
Greg Fitzgerald
90ae662e4d Fix packet header offset
And update transaction offsets to use the same approach as packet.rs.
Maybe this should be serialized_size(), but thanks to this
GenericArray update, those values are the same.
2018-08-26 14:27:19 -06:00
Greg Fitzgerald
60d8f5489f Update transaction layout offsets
24 less bytes in minimal transactions. 10% TPS boost?
2018-08-26 14:27:19 -06: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
anatoly yakovenko
5b0bb7e607 Skip invalid nodes for finality (#1068)
* skip invalid nodes for finality

* check valid last_ids only

* fixup!

* fixup!
2018-08-25 23:12:41 -07:00
anatoly yakovenko
f7c0d30167 Disallow localhost in deployment (#1064)
* disallow localhost in deployment

* tests

* fmt

* integration tests do not have a flag to check

* fmt
2018-08-25 21:09:18 -07:00