137 Commits

Author SHA1 Message Date
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
Anatoly Yakovenko
a002148098 retry transfer and poll 2018-08-26 16:10:46 -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
sakridge
6fc21a4223
Don't hang in transaction_count (#1052)
Situation is there can be that there can be bad entries in
the bench-tps CRDT table until they get purged later. Threads however
are created for those bad entries and then will hang on trying
to get the transaction_count from those bad addresses and never end.
2018-08-23 20:57:13 -07:00
Greg Fitzgerald
57daeb35d2 Drop all references to new_leader and new_validator 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
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
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 c23fa289c3ac9b1cf80e206d8ae53403ca9c8a36.
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
f784500fbb fixups
fixes #907
2018-08-13 21:07:26 -07:00
Greg Fitzgerald
c75d4abb0b Tuck away PoH duration 2018-08-13 20:17:16 -06:00
Greg Fitzgerald
b801ca477d Declare fullnode a word 2018-08-13 20:17:16 -06:00
Greg Fitzgerald
3e9c463ff1 Offer only 1 way to create a fullnode with an empty window 2018-08-13 20:17:16 -06:00
Rob Walker
e8da903c6c move tmp_ledger back to target dir 2018-08-13 16:52:53 -07:00
Pankaj Garg
bf15cad36b
Add get_finality request and use it from multinode test (#941) 2018-08-13 08:55:13 -07:00
Rob Walker
96d6985895 rework read_ledger, LedgerWriter, and LedgerWindow for recover()
fixes #910
2018-08-10 18:07:23 -07:00
Greg Fitzgerald
bca2294655 cargo fmt 2018-08-09 13:41:37 -06: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
Rob Walker
3beb38ac8a /tmp/farf no good on multi-user machine 2018-08-06 14:53:40 -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
692b125391 Revert "Revert "fixups""
This reverts commit e2c68d877530a994848458124f58dd5bdf0eb190.
2018-08-06 08:51:41 -07:00
Rob Walker
5193819d8e Revert "Revert "plug in new ledger""
This reverts commit 57e928d1d02a1c841d9bfd2c7717312084a6a24e.
2018-08-06 08:51:41 -07:00
Rob Walker
57e928d1d0 Revert "plug in new ledger"
This reverts commit 46d9ba5ca0ff1429dfd1aab1c824af33f454325c.
2018-08-03 10:24:51 -07:00
Rob Walker
e2c68d8775 Revert "fixups"
This reverts commit b72e91f6811b51522f8686035a4e87070b5a05b6.
2018-08-03 10:24:51 -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
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
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
4ecd0a0e45 Improve bench-tps logging 2018-07-22 16:26:49 -07:00
Greg Fitzgerald
0e305bd7dd Add poll_for_signature 2018-07-20 20:33:55 -04:00
Greg Fitzgerald
c068ca4cb7 Return Signature from transfer_signed and send_airdrop 2018-07-20 20:33:55 -04:00
Greg Fitzgerald
6a8379109d Sleep between retries
Don't congest a congested network.
2018-07-20 20:33:55 -04: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
Greg Fitzgerald
73ae3c3301 Apply most of clippy's feedback 2018-07-12 09:40:40 -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
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
Rob Walker
ed0a590549 support an initial window filled with last up-to-WINDOW_SIZE blobs 2018-07-09 14:50:14 -07:00
Michael Vines
22c0e3cd54 Metrics v0.1 2018-07-07 19:40:09 -07:00
Greg Fitzgerald
77bf17064a Add Service trait
Added a consistent interface to all the microservices.
2018-07-04 16:40:34 -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
0dabdfd48e Use zero to represent a nonexistent account
This also fixes a bug in the thin client where a nonexistent account
would have triggered a panic because we were using `balances[k]` instead
of `balances.get(key)`.

Fixes #534
2018-07-02 18:48:40 -06:00
Anatoly Yakovenko
b8fe5ae076 rename server to fullnode 2018-07-02 16:34:49 -06:00