93 Commits

Author SHA1 Message Date
Pankaj Garg
91bd38504e
Use vote signer service in fullnode (#2009)
* Use vote signer service in fullnode

* Use native types for signature and pubkey, and address other review comments

* Start local vote signer if a remote service address is not provided

* Rebased to master

* Fixes after rebase
2019-01-05 12:57:52 -08:00
Michael Vines
b7dc9dbc76 RPC API now assumes a drone running on the bootstrap leader 2019-01-04 18:45:55 -08:00
Michael Vines
1f6346d880 De-dup ledgers - db_ledger is now the only ledger written to disk 2019-01-04 16:37:00 -08:00
Michael Vines
58f2598d5d Revert "Validators make a transaction to advertise their storage last_id"
This reverts commit a1759aed1964eee328c6d7ae126e2adb4d501ee2.
2018-12-23 14:02:09 -08:00
Michael Vines
2c9607d5da Rename getConfirmation -> getConfirmationTime 2018-12-22 12:47:02 -08:00
Stephen Akridge
a1759aed19 Validators make a transaction to advertise their storage last_id
* Also implement more storage contract logic
* Add transactions for proof validation,
* Move storage state members into system storage account userdata
2018-12-21 15:45:30 -08:00
Pankaj Garg
951d6398a0
Rename finality to confirmation (#2250)
* Rename finality to confirmation

* fix cargo fmt errors
2018-12-20 15:47:48 -08:00
anatoly yakovenko
4be6d01dfb
Move last ids (#2187)
* Break out last_ids into its own module
* Boot SignatureNotFound from BankError
* No longer return BankError from LastIds methods
* No longer piggypack on BankError for a LastIds signature status
* Drop all dependencies on the bank
* SignatureStatus -> Status and LastIds -> StatusDeque
* Unstable tests, issue 2193
2018-12-17 07:55:56 -08:00
Stephen Akridge
7cdbbfa88e Storage stage updates
* Remove logging init from storage program: saw a crash in a test
  indicating the logger being init'ed twice.
* Add entry_height mining proof to indicate which segment the result is
  for
* Add an interface to get storage miner pubkeys for a given entry_height
* Add an interface to get the current storage mining entry_height
* Set the tvu socket to 0.0.0.0:0 in replicator to stop getting entries
  after the desired ledger segment is downloaded.
* Use signature of PoH height to determine which block to download for
  replicator.
2018-12-13 11:30:12 -08:00
Greg Fitzgerald
ec5a8141eb cargo fix --edition 2018-12-08 23:19:55 -07:00
Greg Fitzgerald
0a83b17cdd
Upgrade to Rust 1.31.0 (#2052)
* Upgrade to Rust 1.31.0
* Upgrade nightly
* Fix all clippy warnings
* Revert relaxed version check and update
2018-12-07 20:01:28 -07:00
Stephen Akridge
3441d3399b Replicator rework
* Move more of the replicator logic into the replicator class
* Add support for the RPC interface to query the storage last_id value
  that the replicator would sign and use to pick a block.
* Fix replicator connecting to gossip and change test to exercise that
  scenario.
2018-12-07 15:20:36 -08:00
Michael Vines
42689d4842 cargo fmt 2018-12-05 10:49:06 -08:00
Michael Vines
214ed3667c Move system_transaction out of src/ 2018-12-05 10:49:06 -08:00
Stephen Akridge
c1c2f1f0a9 Cleanup ad-hoc rpc address formation
Lots of places where we are forming rpc addresses.
2018-12-03 18:13:55 -08:00
Michael Vines
c99f93e40a Remove signature.rs indirection 2018-12-03 13:50:00 -08:00
Michael Vines
0878bd53d9 Delete stub src/transaction.rs 2018-11-29 23:07:57 -08:00
Stephen Akridge
8cc751d1cc Improve RPC service startup error messages with actual error
Error always fixed to message about ports but that's not the only
error that can occur.
2018-11-29 11:39:42 -08:00
Greg Fitzgerald
37f8dd57e2 Extract ProgramError from BankError 2018-11-24 11:56:51 -07:00
Rob Walker
3d113611cc
remove Result<> return from ClusterInfo::new() (#1869)
strip Result<> for ClusterInfo::new()
2018-11-19 11:25:14 -08:00
Michael Vines
719e14b30a Add an explicit state of a reserved signature
An RPC client that fetches the signature status before the bank finishes
executing the corresponding Transaction should receive SignatureNotFound
instead of Confirmed
2018-11-17 16:40:23 -08:00
Michael Vines
d96a6b42a5 Move drone into its own crate 2018-11-16 20:42:21 -08:00
Michael Vines
e791d0f74d Drone now returns signed airdrop transactions 2018-11-15 17:13:13 -08:00
Stephen Akridge
cda9ad8565 Multiple signatures for transactions
With multiple instructions in a TX may need
multiple signatures.

Fixes #1531
2018-11-15 16:23:13 -08:00
anatoly yakovenko
a41254e18c
Add scalable gossip library (#1546)
* Cluster Replicated Data Store

Separate the data storage and merge strategy from the network IO boundary.
Implement an eager push overlay for transporting recent messages.

Simulation shows fast convergence with 20k nodes.
2018-11-15 13:23:26 -08:00
Jack May
0c46f15f94 test_rpc_new fails locally, ignore for now 2018-11-13 17:12:25 -08:00
Michael Vines
522876c808 Rename Account.program_id to Account.owner 2018-11-12 10:59:01 -08:00
Michael Vines
49f4be6a2b codemod --extensions rs loader_program_id loader 2018-11-12 10:59:01 -08:00
Tyera Eulberg
f683817b48 Remove RPU; replace with RPC 2018-11-05 20:30:47 -07:00
Greg Fitzgerald
c9138f964b Change token type from i64 to u64
Fixes #1526
2018-11-05 15:25:26 -07:00
Tyera Eulberg
879431ebcd Add timeout to TcpStream connect, and rename test 2018-11-01 14:13:19 -06:00
Tyera Eulberg
6ddd494826 Improve rpc logging 2018-10-31 15:21:55 -06:00
Rob Walker
13bfdde228
remove ledger tail code, WINDOW_SIZE begone (#1617)
* remove WINDOW_SIZE, use window.window_size()
* move ledger tail, redundant with ledger-based repair
2018-10-30 10:05:18 -07:00
carllin
f6c8e1a4bf
Vote contract (#1552)
* Add Vote Contract

* Move ownership of LeaderScheduler from Fullnode to the bank

* Modified ReplicateStage to consume leader information from bank

* Restart RPC Services in Leader To Validator Transition

* Make VoteContract Context Free

* Remove voting from ClusterInfo and Tpu

* Remove dependency on ActiveValidators in LeaderScheduler

* Switch VoteContract to have two steps 1) Register 2) Vote. Change thin client to create + register a voting account on fullnode startup

* Remove check in leader_to_validator transition for unique references to bank, b/c jsonrpc service and rpcpubsub hold references through jsonhttpserver
2018-10-25 16:58:40 -07:00
Michael Vines
e47fcb196b s/solana_program_interface/solana[_-]sdk/g 2018-10-25 12:31:45 -07:00
Michael Vines
208e7d7943 Explicitly reject transactions larger than PACKET_SIZE 2018-10-24 15:34:27 -07:00
Tyera Eulberg
2f2531d921 Add retries to Wallet deploy 2018-10-24 11:13:32 -06:00
Michael Vines
7977b97227 Surface AccountInUse to JSON RPC users so they know to retry the transaction 2018-10-23 13:55:30 -07:00
Michael Vines
4f34822900 Improve logging on various error conditions 2018-10-23 13:40:59 -07:00
carllin
0bd1412562
Switch leader scheduler to use PoH ticks instead of Entry height (#1519)
* Add PoH height to process_ledger()

* Moved broadcast_stage Leader Scheduling logic to use Poh height instead of entry_height

* Moved LeaderScheduler logic to PoH in ReplicateStage

* Fix Leader scheduling tests to use PoH instead of entry height

* Change is_leader detection in repair() to use PoH instead of entry height

* Add tests to LeaderScheduler for new functionality

* fix Entry::new and genesis block PoH counts

* Moved LeaderScheduler to PoH ticks

* Cleanup to resolve PR comments
2018-10-18 22:57:48 -07:00
Rob Walker
d0f43e9934 consolidate tmp ledgers 2018-10-18 08:45:31 -06:00
jackcmay
d09889b1dd
Program bank integration (#1462)
Native, BPF and Lua loaders integrated into the bank
2018-10-16 09:43:49 -07:00
Tyera Eulberg
7424388924 Fix session drop 2018-10-16 00:11:26 -06:00
Michael Vines
537436bd5e RPC PubSub now uses a well-known socket 2018-10-16 00:11:26 -06:00
Tyera Eulberg
fb99494858
Improve rpc code coverage (#1487) 2018-10-15 11:01:40 -06:00
Tyera Eulberg
1515bba9c6
Use cluster_info in rpc to get current leader addresses (#1480) 2018-10-12 14:25:56 -06:00
Michael Vines
041040c659 pubsub.rs -> rpc_pubsub.rs 2018-10-12 08:39:06 -07:00
Tyera Eulberg
785c619198
Add pubsub module for rpc info subscriptions (#1439) 2018-10-10 14:51:43 -06:00
Tyera Eulberg
52d50e6bc4 Update for new solana-jsonrpc 2018-09-28 17:53:41 -06:00
anatoly yakovenko
e7de7c32db
Transactions with multiple programs. (#1381)
Transactions contain a vector of instructions that are executed atomically.
Bench shows a 2.3x speed up when using 5 instructions per tx.
2018-09-28 16:16:35 -07:00