Commit Graph

75 Commits

Author SHA1 Message Date
Justin Starry 792bbf75ab
Support sending versioned txs in AsyncClient (#23982) 2022-04-02 11:12:02 +08:00
ryleung-solana 17b00ad3a4
Add quic-client module (#23166)
* Add quic-client module to send transactions via quic, abstracted behind the TpuConnection trait (along with a legacy UDP implementation of TpuConnection) and change thin-client to use TpuConnection
2022-03-09 21:33:05 -05:00
Michael Vines 6d5bbca630 Pacify clippy 2022-01-21 19:12:57 -08:00
Jeff Biseda 8b66625c95
convert std::sync::mpsc to crossbeam_channel (#22264) 2022-01-11 02:44:46 -08:00
Michael Vines b8837c04ec Reformat imports to a consistent style for imports
rustfmt.toml configuration:
  imports_granularity = "One"
  group_imports = "One"
2021-12-03 09:19:13 -08:00
Jack May bced07a099
Update fee api to use blockhash (#21054) 2021-10-29 13:52:59 -07:00
Jack May bfbbc53dac
Divorce the runtime from FeeCalculator (#20737) 2021-10-22 14:32:40 -07:00
Jack May da45be366a
Remove blockhash from fee calculation (#20641) 2021-10-13 13:10:58 -07:00
Justin Starry c50b01cb60
Store versioned transactions in the ledger, disabled by default (#19139)
* Add support for versioned transactions, but disable by default

* merge conflicts

* trent's feedback

* bump Cargo.lock

* Fix transaction error encoding

* Rename legacy_transaction method

* cargo clippy

* Clean up casts, int arithmetic, and unused methods

* Check for duplicates in sanitized message conversion

* fix clippy

* fix new test

* Fix bpf conditional compilation for message module
2021-08-17 15:17:56 -07:00
Jack May 0b50bb2b20
Deprecate FeeCalculator returning APIs (#19120) 2021-08-13 09:08:20 -07:00
Tyera Eulberg 5970083b4d
Use last_valid_block_height in services and client apps (#19163)
* Add deprecated tag to Bank::get_blockhash_last_valid_slot

* Update SendTransactionService to use last_valid_block_height

* Update solana-tokens to use last_valid_block_height

* Remove dangling file

* Update solana program to use last_valid_block_height

* Update Banks crates to use last_valid_block_height
2021-08-11 01:04:00 -06:00
Jeff Washington (jwash) 14361906ca
for all tests, bank::new -> bank::new_for_tests (#19064) 2021-08-05 08:42:38 -05:00
Justin Starry d166b9856a
Move transaction sanitization earlier in the pipeline (#18655)
* Move transaction sanitization earlier in the pipeline

* Renamed HashedTransaction to SanitizedTransaction

* Implement deref for sanitized transaction

* bring back process_transactions test method

* Use sanitized transactions for cost model calculation
2021-07-15 22:51:27 -05:00
Jeff Washington (jwash) e35d738906
rework BankClient.get_account_data (#15853) 2021-03-15 19:27:53 -05:00
Jeff Washington (jwash) 8a3135d17b
Account->AccountSharedData (#15691) 2021-03-09 15:06:07 -06:00
Jack May 7abd8084b6
Add get_minimum_balance_for_rent_excemption to Client (#14048) 2020-12-10 16:39:28 -08:00
Michael Vines 7bc073defe Run `codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand` 2020-10-21 19:08:13 -07:00
Greg Fitzgerald 7ade330b23
Rename Client methods to match proposed BanksClient (#10793) 2020-06-25 03:35:38 +00:00
Greg Fitzgerald 1c498369b5
Remove fee-payer guesswork from Message and Transaction (#10776)
* Make Message::new_with_payer the default constructor

* Remove Transaction::new_[un]signed_instructions

These guess the fee-payer instead of stating it explicitly
2020-06-24 14:52:38 -06:00
Greg Fitzgerald 4131eee94d
Expose last-valid-slot to BankClient and ThinClient users (#10478)
automerge
2020-06-09 17:07:32 -07:00
sakridge ce17de7d25
Add option to wait for a specific epoch length to bench-tps (#10083) 2020-05-20 16:42:46 -07:00
Tyera Eulberg 50fa577af8
Use cluster confirmations in rpc and pubsub (#9138)
* Add runtime methods to simply get status and slot

* Add helper function to get slot confirmation_count from BlockCommitmentCache

* Return cluster confirmations in getSignatureStatus

* Remove use of invalid get_signature_confirmation_status

* Remove unused methods

* Update pubsub to use cluster confirmations

* Fix test_check_signature_subscribe failure

* Refactor confirmations to read commitment cache only once

* Review comments

* Use bank, root from BlockCommitmentCache

* Update docs

* Add metric for block-commitment aggregations

Co-authored-by: Justin Starry <justin@solana.com>
2020-03-30 17:53:25 -06:00
Justin Starry a0ffcc61ae
Add slot info to Bank::get_signature_confirmation_status (#9018) 2020-03-23 21:55:15 +08:00
Trent Nelson fbf2dd1672
CLI: Error message cleanup (#8804)
automerge
2020-03-12 23:20:49 -07:00
Jack May 6eb4973780
Don't use move semantics if not needed (#8793) 2020-03-11 14:37:23 -07:00
Trent Nelson 4db074a5aa
RPC: Add `getFeeCalculatorForBlockhash` method call (#8687)
Returns the `FeeCalculator` associated with the given blockhash, or
`null` if said blockhash has expired
2020-03-06 17:01:31 -07:00
Trent Nelson 90bedd7e06
Split signature throughput tracking out of `FeeCalculator` (#8447)
* SDK: Split new `FeeRateGovernor` out of `FeeCalculator`

Leaving `FeeCalculator` to *only* calculate transaction fees

* Replace `FeeCalculator` with `FeeRateGovernor` as appropriate

* Expose recent `FeeRateGovernor` to clients

* Move `burn()` back into `FeeCalculator`

Appease BPF tests

* Revert "Move `burn()` back into `FeeCalculator`"

This reverts commit f3035624307196722b62ff8b74c12cfcc13b1941.

* Adjust BPF `Fee` sysvar test to reflect removal of `burn()` from `FeeCalculator`

* Make `FeeRateGovernor`'s `lamports_per_signature` private

* rebase artifacts

* fmt

* Drop 'Recent'

* Drop _with_commitment variant

* Use a more portable integer for `target_signatures_per_slot`

* Add docs for `getReeRateCalculator` JSON RPC method

* Don't return `lamports_per_signature` in `getFeeRateGovernor` JSONRPC reply
2020-02-28 13:27:01 -07:00
Tyera Eulberg ab361a8073
Rename KeypairUtil to Signer (#8360)
automerge
2020-02-20 13:28:55 -08:00
Greg Fitzgerald e8124324ff
Support transaction signing by heterogenous lists of keypairs (#8342)
automerge
2020-02-20 12:13:23 -08:00
Jack May 83718a3b3e
Cleanup runtime use syntax (#8002) 2020-01-28 17:03:20 -08:00
Michael Vines fcc2874591
Remove/address some TODOs (#6923) 2019-11-13 09:43:15 -07:00
Greg Fitzgerald 986e9e268e
Revive the parallel bank client from v0.16 (#6903) 2019-11-12 15:26:21 -07:00
Justin Starry 9807f47d4e
Rename genesis block to genesis config (#6816) 2019-11-08 23:56:57 -05:00
Tyera Eulberg b3a75a60a4
Use rooted bank by default in rpc bank selection (#6759)
* Name anonymous parameters for clarity

* Add CommitmentConfig to select bank for rpc

* Add commitment information to jsonrpc docs

* Update send_and_confirm retries as per commitment defaults

* Pass CommitmentConfig into client requests; also various 'use' cleanup

* Use _with_commitment methods to speed local_cluster tests

* Pass CommitmentConfig into Archiver in order to enable quick confirmations in local_cluster tests

* Restore solana ping speed

* Increase wallet-sanity timeout to account for longer confirmation time
2019-11-06 14:15:00 -07:00
Greg Fitzgerald fb39bd45d7
Revert "Rename solana-runtime to sealevel (#6239)" (#6247)
This reverts commit 2e921437cd.
2019-10-04 19:33:29 -06:00
Greg Fitzgerald 2e921437cd Rename solana-runtime to sealevel (#6239)
automerge
2019-10-04 15:02:44 -07:00
Michael Vines 1f9fde5f7b
ThinClient internal name grooming (#5800) 2019-09-06 09:07:40 -07:00
Rob Walker eb4edd75e6
make bank commit_credits non public (#4944)
* make bank commit_credits non pub

* track down create() failure

* move bank_client to process_transaction(), which commits credits
2019-07-08 15:37:54 -07:00
Pankaj Garg f551b34725
Fix issue in polling for transaction signatures (#4923)
- Specifically if multiple confirmation for the signature is requested
2019-07-02 20:56:10 -07:00
Tyera Eulberg 66552d7047
Credit-Only Accounts: Cache account balance for thread-safe load/store (#4691)
* Implement CreditOnlyLocks

* Update credit-only atomic on account load

* Update credit-only atomic after bank.freeze_lock; store credits if all credit-only lock references are dropped

* Commit credit-only credits on bank freeze

* Update core to CreditAccountLocks

* Impl credit-only in System Transfer

* Rework CreditAccountLocks, test, and fix bugs

* Review comments: Pass CreditAccountLocks by reference; Tighten up insert block

* Only store credits on completed slot

* Check balance in bench_exchange funding to ensure commit_credits has completed

* Add is_debitable info to KeyedAccount meta to pass into programs

* Reinstate CreditOnlyLocks check on lock_account

* Rework CreditAccountLocks to remove strong_count usage

* Add multi-threaded credit-only locks test

* Improve RwLocks usage

* Review comments: panic if bad things happen; tighter code

* Assert lock_accounts race does not happen

* Revert panic if bad things happen; not a bad thing
2019-06-27 17:25:10 -04:00
Sagar Dhawan 119467df59
Add storage mining pool to genesis and implement automatic reward redeeming (#4683)
* Add storage mining pool to genesis and implement automatic reward collection

* Address review comments
2019-06-13 22:30:51 -07:00
carllin 8c1b9a0b67
Data plane verification (#4639)
* Add signature to blob

* Change Signable trait to support returning references to signable data

* Add signing to broadcast

* Verify signatures in window_service

* Add testing for signatures to erasure

* Add RPC for getting current slot, consume RPC call in test_repairman_catchup for more deterministic results
2019-06-12 16:43:05 -07:00
Michael Vines e4d8ea11ac
Make lamports_per_signature dynamic based on cluster load (#4562)
* Make lamports_per_signature dynamic based on cluster load

* Move transaction-fees.md to implemented
2019-06-10 22:18:32 -07:00
Michael Vines a2e3a92b01
Extend GetBlockHash RPC API to include the fee scehdule for using the returned blockhash (#4222) 2019-05-13 12:49:37 -07:00
Rob Walker 8e400fc4bd
rework genesis (passive staking groundwork) (#4187)
* rework genesis

* fixup
2019-05-07 11:16:22 -07:00
Jack May c545e812d0
Expand bank benches to include async/sync and native_loader (#4026) 2019-04-29 13:09:11 -07:00
Sagar Dhawan 18e398131d
Fix issues with bench-tps (#4005) 2019-04-27 08:39:29 -07:00
Sagar Dhawan a3c302c36a Add signature polling to SyncClient (#3996)
automerge
2019-04-25 12:46:40 -07:00
Greg Fitzgerald 29698fcd38
Cleanup stragglers from move-to-transfer rename (#3947) 2019-04-23 13:30:42 -06:00
Tyera Eulberg e0acd48944
Write bench-tps in terms of client (#3904)
* Write bench-tps in terms of client

* Add transactions_addr method for logging

* Move cluster config outside do_bench_tps

* Add BankClient test
2019-04-19 15:04:36 -06:00