Commit Graph

29 Commits

Author SHA1 Message Date
Pankaj Garg 78c31aa6b8
Use program cache fork graph in extract() (#33806)
* Use program cache fork graph instead of WorkingSlot trait

* Fix deadlocked tests

* keep WorkingSlot trait for now
2023-10-25 06:04:38 -07:00
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
steviez 56ccffdaa5
Replace get_tmp_ledger_path!() with self cleaning version (#33702)
This macro is used a lot for tests to create a ledger path in order to
open a Blockstore. Files will be left on disk unless the test remembers
to call Blockstore::destroy() on the directory. So, instead of requiring
this, use the get_tmp_ledger_path_auto_delete!() macro that creates a
TempDir (which automatically deletes itself when it goes out of scope).
2023-10-21 11:38:31 +02:00
Yihau Chen 99ef411600
ci: move solana-client-test to nextest (#33185) 2023-09-13 12:12:20 +08:00
steviez a4c8cc3ce0
Remove improper uses of &Arc<Bank> (#32802)
In most cases, either a &Bank or an Arc<Bank> is more proper.
- &Bank is used if the function only needs a momentary reference
- Arc<Bank> is used if the function needs its' own copy

This PR leaves several instances of &Arc<Bank> around; these instances
are situations where a clone may only happen conditionally.
2023-08-18 16:46:34 -05:00
Jon Cinque 0f8a871fc0
client: Rename confrim -> confirm (#32861)
* client: Rename confrim -> confirm

* Rebase fix
2023-08-17 19:05:30 +02:00
galactus dbac50dcc8
New method to send large number of transactions to the cluster (#32388)
* Adding a method which sends and confirm a large number of transactions in parallel and using it to deploy programs

* Using the new method to deploy programs

* Minor changes, break when transaction map is empty

* Updating cargo for all lock files

* Sorting dependencies

* Changes after tnelson's comment

* confirm recently expired transactions and improve tracking of transaction sending

* Minor changes

* more changes after tnelson's comments

* Adding serialized transaction in TransactionData

* Update client/src/send_and_confirm_transactions_in_parallel.rs

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* Update client/src/send_and_confirm_transactions_in_parallel.rs

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* nit changes from trent

* Fixing kirills comments, adding some unit tests

* fixing ci, and minor change

* addressing Kirills nit comments

---------

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2023-07-25 12:08:01 -06:00
Illia Bobyr 4353ac6797
Pass Arc<AtomicBool> by value, not by reference. (#31916)
`Arc` is already a reference internally, so it does not seem to be
beneficial to pass a reference to it.  Just adds an extra layer of
indirection.

Functions that need to be able to increment `Arc` reference count need
to take `Arc<AtomicBool>`, but those that just want to read the
`AtomicBool` value can accept `&AtomicBool`, making them a bit more
generic.

This change focuses specifically on `Arc<AtomicBool>`.  There are other
uses of `&Arc<T>` in the code base that could be converted in a similar
manner.  But it would make the change even larger.
2023-06-01 17:25:48 -07:00
Ashwin Sekar 3e8f5bad81
refactor: highest_cluster_confirmed_root -> highest_super_majority_root (#31619) 2023-05-14 00:42:03 -07:00
Tyera b389d509a8
Track max_complete_rewards_slot for use in rpc, bigtable (#30698)
* Add RewardsMessage enum

* Cache and update max_complete_rewards_slot

* Plumb max_complete_rewards_slot into JsonRpcRequestProcesseor

* Use max_complete_rewards_slot to check get_block requests

* Use max_complete_rewards_slot to limit Bigtable uploads

* Plumb max_complete_rewards_slot into RpcSubscriptions

* Use max_complete_rewards_slot to limit block subscriptions

* Nit: fix test
2023-03-14 12:08:48 -06:00
Kevin Ji dd92f225bb
Use Ipv4Addr::{LOCALHOST, UNSPECIFIED} constants (#29813) 2023-01-23 16:49:51 -06:00
Jeff Washington (jwash) 2f0d849c84
set rent epoch to max on new account creation (#29528)
* set rent epoch to max on new account creation

* add comment
2023-01-06 14:21:10 -08:00
Yihau Chen bf18613a2e
fix: client-test timeout (#29364)
* fix: retry counter doesn't count

* set timeout for wait_for
2022-12-22 16:50:19 +08:00
Brooks Prumo 19692263fb
Fixes format string (#29298) 2022-12-16 19:53:04 +00:00
Yihau Chen 90f74302cf
chore: improve solana-client-test (#29255)
* separate test port

* make server check more deterministic

* remove serial_test

* use atomic auto incremental port

* make NEXT_RPC_PUBSUB_PORT as an global static variable

* make check_server_is_ready become check_server_is_ready_or_panic

* use processed commitment in test_rpc_client

* lint
2022-12-15 16:27:31 +08:00
Justin Starry 438d96e499
RPC: Return the data length for get account requests (#28421) 2022-10-18 01:56:04 +08:00
Tyera Eulberg b8b3d723da
Use new client crates (#27360)
* Update ancillary cli crates

* Update cli

* Update command-line tools

* Update rpc, etc

* Update client-test

* Update core, validator

* Update local-cluster
2022-08-24 10:47:02 -06:00
Justin Starry 4690956849
RPC: Add minContextSlot param to ensure consistent responses (#25161)
* RPC: Add minContextSlot param to ensure consistent responses

* revert changes to deprecated endpoints

* update docs
2022-05-17 14:46:02 +08:00
Justin Starry 4e58b3870c
Update all BankForks methods to return owned values (#24801) 2022-04-28 18:51:00 +00:00
Justin Starry 3114c199bd
Add RPC support for versioned transactions (#22530)
* Add RPC support for versioned transactions

* fix doc tests

* Add rpc test for versioned txs

* Switch to preflight bank
2022-03-08 15:20:34 +08:00
Justin Starry d5dec989b9
Enforce tx metadata upload with static types (#23028) 2022-02-10 13:28:18 +08:00
Michael Vines 8c376f58cb Drop feature, move to nonblocking mod 2022-01-27 08:19:03 -08:00
Kirill Fomichev a6a8a712e5 Add async WebSocket PubsubClient 2022-01-27 08:19:03 -08:00
Justin Starry f804ccdece
Store address table lookups in blockstore and bigtable (#22402) 2022-01-14 15:24:41 +08:00
segfaultdoctor 76098dd42a
RPC Block Subscription (#21787)
* add stuff

* compiling

* add notify block

* wip

* feat: add blockSubscribe pubsub method

* address PR comments

Co-authored-by: Lucas B <buffalu@jito.network>
Co-authored-by: Zano <segfaultdoctor@protonmail.com>
2021-12-17 16:03:09 -07: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
Tyera Eulberg 32a242e777
Make test result not depend on TestValidator setup (#21078) 2021-10-29 16:19:10 -06:00
Manuel Gil a0f9e0e8ee
Add missing websocket methods to rust RPC PubSub client (#21065)
- Added accountSubscribe,  programSubscribe, slotSubscribe and rootSubscribe to rust RpcClient
 - Removed duplication on cleanup threads
 - Moved RPCVote from rpc/ to client/rpc_response
2021-10-29 17:11:20 +00:00
sakridge a8d78e89d3
Move test-validator to own module to reduce core dependencies (#20658)
* Move test-validator to own module to reduce core dependencies

* Fix a few TestValidator paths

* Use solana_test_validator crate for solana_test_validator bin

* Move client int tests to separate crate

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-10-29 01:27:07 +00:00