Commit Graph

37 Commits

Author SHA1 Message Date
Pankaj Garg 9d42cd7efe
Initialize fork graph in program cache during bank_forks creation (#33810)
* Initialize fork graph in program cache during bank_forks creation

* rename BankForks::new to BankForks::new_rw_arc

* fix compilation

* no need to set fork_graph on insert()

* fix partition tests
2023-10-23 09:32:41 -07:00
Jon Cinque 936d2cf3c2
banks-client: Add `get_fee_for_message` (#31703) 2023-05-18 23:31:02 +02:00
Kevin Heavey 7c6572d5ec
Add missing versioned tx support to BanksClient (#30958)
* replace Transaction params with impl Into<VersionedTransaction>

* replace Vec<Transaction> with Vec<T>

* fmt
2023-03-29 20:47:25 +00:00
Kevin Heavey 6f73aafa09
Make BanksClient timeout after 10 seconds instead of 60 (#30904)
* don't increase the deadline by 50 seconds

* add test demonstrating a timeout panic

* add back missing Duration import for tests

* cargo fmt

* clarify test comments

* clarify comment

* make timeout test finish in 1 second

* sort dependencies
2023-03-28 17:55:44 -06:00
Justin Starry 7371608722
Support versioned transactions in program test framework (#28739)
* Support versioned transactions in program test framework

* use working bank

* Update to process_transaction_with_metadata

* Migrate client apis from Transaction to Into<VersionedTransaction>

* feedback
2022-11-18 23:43:52 +08:00
Brooks Prumo 12df0f234d
Upgrade to Rust 1.64.0 (#28034) 2022-09-29 09:32:24 -04:00
Jon Cinque 3be11061ed
banks-client: Add `simulate_transaction` implementation (#25830) 2022-06-08 13:56:54 +02:00
Jon Cinque 7af48465fa
transaction-status: Add return data to meta (#23688)
* transaction-status: Add return data to meta

* Add return data to simulation results

* Use pretty-hex for printing return data

* Update arg name, make TransactionRecord struct

* Rename TransactionRecord -> ExecutionRecord
2022-03-22 23:17:05 +01:00
buffalu 70ebab2c82
Add rustfmt.toml and `cargo fmt` (#23238)
* fmt

* formatted

Co-authored-by: Lucas B <buffalu@jito.network>
2022-02-19 13:32:29 +08:00
Tyera Eulberg f366e0f890
Export BanksClientError (#22715) 2022-01-25 09:33:46 -07:00
Tyera Eulberg 422a095647
Add (preflight) simulation to BanksClient (#22084)
* Add more-legitimate conversion from legacy Transaction to SanitizedTransaction

* Add Banks method with preflight checks

* Expose BanksClient method with preflight checks

* Unwrap simulation err

* Add Bank simulation method that works on unfrozen Banks

* Add simpler api

* Better name: BanksTransactionResultWithSimulation
2021-12-28 19:25:46 +00:00
Jon Cinque 214b561a28
banks-client: Update return type to `BanksClientError` (#22058) 2021-12-24 09:44:19 -05:00
dependabot[bot] ddde356b33
bump tarpc from 0.26.2 to 0.27.2 and add BanksClientError (#21739)
* chore: bump tarpc from 0.26.2 to 0.27.2

Bumps [tarpc](https://github.com/google/tarpc) from 0.26.2 to 0.27.2.
- [Release notes](https://github.com/google/tarpc/releases)
- [Changelog](https://github.com/google/tarpc/blob/master/RELEASES.md)
- [Commits](https://github.com/google/tarpc/commits)

---
updated-dependencies:
- dependency-name: tarpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Accommodate breaking changes

* Reword incorrect error message

* Add error module

* Revert client Error type to io::Error; easy transition to BanksClientError

* Bump tracing crates in programs

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-12-22 02:31:02 +00: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 1adf255e3a
Deprecate more Fee/Blockhash APIs (#21140) 2021-11-02 16:38:23 -07:00
Jack May 3140d7741c
deprecate FeeCalculator in BanksClients (#21056) 2021-10-28 16:00:09 -07:00
Christian Kamm bea181eba9
Improve program-test process_transaction() speed by reducing sleep duration in banks-server (#20508)
* banks_server: Reduce sleep duration for local server

This speeds up process_transaction_with_commitment_and_context()
and thus most program tests by a lot.

* Plumb tick duration through poh config and signature polling

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-10-15 18:55:41 +02:00
Tyera Eulberg 0b3fad19f4
Dedupe SendTransactionService(s) (#19354)
* Add new conjoined SendTransactionService

* Remove TODO

* nit A-Z

* Single use statement for banks crates

* Rename new crate
2021-08-23 22:32:15 +00: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
Kirill Fomichev 5d21f63e8a Replace get_clock by get_sysvar in BanksClient 2021-07-14 10:15:06 -07:00
Kirill Fomichev d30a36641e Add get_clock to BanksClient 2021-07-11 07:56:08 -07:00
Alexander Meißner 6514096a67 chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
dependabot[bot] 0323ea9f7e
chore: bump tarpc from 0.24.1 to 0.26.2 (#17966)
* chore: bump tarpc from 0.24.1 to 0.26.2

Bumps [tarpc](https://github.com/google/tarpc) from 0.24.1 to 0.26.2.
- [Release notes](https://github.com/google/tarpc/releases)
- [Changelog](https://github.com/google/tarpc/blob/master/RELEASES.md)
- [Commits](https://github.com/google/tarpc/commits)

---
updated-dependencies:
- dependency-name: tarpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Accommodate breaking changes & update tracing

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-15 20:31:34 +00:00
Jeff Washington (jwash) 8a3135d17b
Account->AccountSharedData (#15691) 2021-03-09 15:06:07 -06:00
Jon Cinque 0f6f6080f3
sdk: Add Borsh support for types and utilities (#15290)
* sdk: Add Borsh to Pubkey

* Add serialization error for easier borsh integration

* Add Borsh usage to banks-client and sdk

* Rename SerializationError -> IOError

* Add new errors to proto

* Update Cargo lock

* Update Cargo.lock based on CI

* Clippy

* Update ABI on bank

* Address review feedback

* Update sanity program instruction count test
2021-02-18 11:14:56 +01:00
Jon Cinque 8e93a784f3
program-test: Add ability to warp to the future (#14998)
* program-test: Add ability to warp to the future

* Make `start_local_server` take by value

* Remove clear_invoke_context
2021-02-03 23:31:36 +01:00
Tyera Eulberg ffa5c7dcc8
Deprecate commitment variants (#14797)
* Deprecate commitment variants

* Add new CommitmentConfig builders

* Add helpers to avoid allowing deprecated variants

* Remove deprecated transaction-status code

* Include new commitment variants in runtime commitment; allow deprecated as long as old variants persist

* Remove deprecated banks code

* Remove deprecated variants in core; allow deprecated in rpc/rpc-subscriptions for now

* Heavier hand with rpc/rpc-subscription commitment

* Remove deprecated variants from local-cluster

* Remove deprecated variants from various tools

* Remove deprecated variants from validator

* Update docs

* Remove deprecated client code

* Add new variants to cli; remove deprecated variants as possible

* Don't send new commitment variants to old clusters

* Retain deprecated method in test_validator_saves_tower

* Fix clippy matches! suggestion for BPF solana-sdk legacy compile test

* Refactor node version check to handle commitment variants and transaction encoding

* Hide deprecated variants from cli help

* Add cli App comments
2021-01-26 19:23:07 +00:00
Greg Fitzgerald dadea873a9
Send BanksClient RPC requests before returning futures (#13539)
* Send RPC requests before returning futures

* Add process_transactions()
2020-11-11 18:56:26 -07:00
Greg Fitzgerald 2660b44d91
Remove need for BanksClientExt trait (#13519) 2020-11-10 19:30:25 -07:00
Michael Vines 9a1c1fbab8 Add get_rent() 2020-11-05 20:14:34 -08:00
Greg Fitzgerald ca00197009
Upgrade tarpc and tokio (#13293) 2020-10-29 19:21:18 -06:00
Michael Vines 959880db60 Remove unused pubkey::Pubkey imports 2020-10-21 19:08:13 -07: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 d158d45051
Fix banks RPC port (#12570)
* Fix Banks RPC ports

* Add get_account_with_commitment
2020-09-30 00:11:49 +00:00
dependabot[bot] 502e93f55b
chore: bump tarpc from 0.21.0 to 0.22.0 (#11923)
* chore: bump tarpc from 0.21.0 to 0.22.0

Bumps [tarpc](https://github.com/google/tarpc) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/google/tarpc/releases)
- [Changelog](https://github.com/google/tarpc/blob/master/RELEASES.md)
- [Commits](https://github.com/google/tarpc/commits)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix build

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Greg Fitzgerald <greg@solana.com>
2020-09-08 21:22:22 -06:00
Greg Fitzgerald bad486823c
Add a client for BankForks (#10728)
Also:
* Use BanksClient in solana-tokens
2020-08-07 08:45:17 -06:00