Commit Graph

66 Commits

Author SHA1 Message Date
Jon C 5871a0e7ed CI: Add windows clippy job and fix clippy errors (#330)
* CI: Run clippy on windows

* Update cargo-clippy-before-script.sh for Windows

* Pacify clippy
2024-03-20 16:28:38 -05:00
steviez f944227dba Use tokio directly instead of jsonrpc_server_utils's re-export (#116) 2024-03-09 13:24:55 -06:00
Will Hickey df57657985 Revert "[anza migration] rename crates (#10)"
This reverts commit 3f9a7a52ea.
2024-03-05 10:18:50 -06:00
Yihau Chen 14cb9cff92 [anza migration] rename crates (#10)
* rename geyser-plugin-interface

* rename cargo registry

* rename watchtower

* rename ledger tool

* rename validator

* rename install

* rename geyser plugin interface when patch
2024-03-05 09:43:25 -06:00
omahs d87e7bc8e5
Fix typos (#35234)
* fix typos

* fix typo

* fix typos

* fix typo
2024-02-19 15:51:13 +00:00
Dmitri Makarov 2c0001b530
SVM: Move RewardInfo from accounts-db to Solana SDK (#35120) 2024-02-07 10:55:39 -08:00
Kirill Fomichev c82fc6c98e
geyser: allow custom name in config file (#33550)
Allow loading the plugin name from the json config file as opposed to use plugin.name which is called before config file is passed to it. Allowing different plugins using the same executable to use different names.
2023-12-05 12:07:02 -08:00
Lijun Wang f211c86e69
Support logging in geyser plugins (#34101)
The change creates a new interface in the GeyserPlugin interface to allow the runtime to pass the logging configuration to the plugin.
2023-11-29 11:31:11 -08:00
Lijun Wang 8445246b8f
Added a comment about order of dropping plugin and library (#34160)
Added a comment about order of dropping plugin and library
2023-11-27 13:07:26 -08:00
Lijun Wang b5659af546
Fix geyser plugin unload crash (#34026)
Explicit ordering of the drop of Library and Boxed<dyn GeyserPlugin>: drop the latter explicitly first to avoid crash.
2023-11-15 10:11:01 -08:00
Kirill Fomichev 5a0828330d
geyser: add `is_reload` argument to `on_load` (#33674)
geyser: add `is_reload` argument to `on_load`
2023-11-14 19:34:19 -08:00
Tyera 0e91e96967
Geyser: add starting entry to ReplicaEntryInfo(V2) (#33963)
* Add ReplicaEntryInfoV2

* Add starting_transaction_index field to EntryNotification

* Populate starting_transaction_index in replay stage

* Cache and populate starting_transaction_index in banking stage

* Build ReplicaEntryInfoV2
2023-11-14 09:49:26 -07:00
Lijun Wang 69cec7e7b7
Remove RwLock on BlockNotifier (#33981) 2023-11-08 10:27:50 -08:00
galactus 7cdfba9259
Display error message while laoding geyser plugins (#33990) 2023-11-08 18:16:42 +00:00
Lijun Wang eba1b2d3e3
Remove RwLock on TransactionNotifier (#33962)
* Remove RwLock on TransactionNotifier
2023-11-07 10:28:56 -08:00
Lijun Wang 8c69a0ec38
Remove RwLock on AccountsUpdateNotifier (#33960) 2023-11-06 14:03:25 -08:00
Liam Vovk e840b9759a
Remove RWLock from EntryNotifier because it causes perf degradation (#33797)
* Remove RWLock from EntryNotifier because it causes perf degradation when entry notifications are enabled on geyser

* remove unused RWLock

* Remove RWLock
2023-11-06 00:55:36 -08:00
Kirill Fomichev 808f67aead
check plugin name on plugin_reload rpc call (#33582)
* check plugin name on plugin_reload rpc call

* add name to error message
2023-11-01 12:21:53 -07:00
Illia Bobyr b5b48eeb72
Cargo.toml: Sort dependency and feature lists (#33670)
Keeping these sorted reduces merge conflicts.
2023-10-17 01:12:15 -07:00
Tyera ddd029774a
Add geyser block-metadata notification with entry count (#33359)
* Add new ReplicaBlockInfoVersions variant

* Use new variant to return entry count
2023-09-26 10:13:17 -06:00
Lijun Wang d54ee35103
Improve plugin load/reload unit tests (#33126)
* Improve plugin load/reload unit tests
* check expectations after reload
2023-09-07 11:31:23 -07:00
Trent Nelson 7e5cd11b34
fix memory corruption in geyser plugin manager tests with recent toolchains (#33097)
* geyser: genericize manager test dummy plugin generators

* geyser: dlopen self the safe way in test dummy plugin generator

fixes memory corruption
2023-08-31 17:45:46 -06:00
Pankaj Garg f4287d70bb
Move accounts-db code to its own crate (#32766) 2023-08-09 13:03:36 -07:00
Illia Bobyr 282e043177
`cargo fmt` using 1.6.0-nightly (#32390)
Seems like rustfmt 1.6.0 can now format `let/else` statements.
1.5.2 we use in our `solana-nightly` does not mind the reformatting.

```
$ cargo +nightly fmt --version
rustfmt 1.6.0-nightly (f20afcc 2023-07-04)

$ cargo +nightly fmt
$ git add -u
$ git commit

$ ./cargo nightly fmt --version
+ exec cargo +nightly-2023-04-19 fmt --version
rustfmt 1.5.2-nightly (c609da5 2023-04-18)

$ ./cargo nightly fmt
$ git diff
[empty output]
```
2023-07-06 20:45:29 -07:00
Illia Bobyr e0389ba90f
GeyserPluginService: Use common `exit` flag. (#31915)
Geyser plugin thread would never shutdown correctly, as it is using an
exit flag that is never set.
2023-06-01 11:20:59 -07:00
Tyera 3f70ddb2c5
Add entry notification service for geyser (#31290)
* Move entry_notifier_interface

* Add EntryNotifierService

* Use descriptive struct in sender/receiver

* Optionally initialize EntryNotifierService in validator

* Plumb EntryNotfierSender into Tvu, blockstore_processor

* Plumb EntryNotfierSender into Tpu

* Only return one option when constructing EntryNotifierService
2023-05-10 17:20:51 -06:00
Lijun Wang 7cf50e60fc
Fixed missing Root notifications via geyser plugin framework (#31180)
* Fixed missing Root notifications via geyser plugin framework

* Renamed a variable

* fmt issue

* Do not try the loop if no subscribers.

* Addressing some feedback -- passing parent roots from replay_stage to avoid race conditions

* clippy issue

* Address some reviewing findings

* Addressed some feedback from Carl

* fix a clippy issue

* Added comments on optimistically_confirmed_bank_tracker module to explain the workflow

* Addressed Trent's review
2023-05-03 18:50:00 +08:00
Tyera c98b7f0c46
Only pass num_transactions to EntryNotifier (#31053)
* Add EntrySummary struct

* Add new entry struct to send to notifier
2023-04-04 18:00:47 -06:00
Tyera 932301583c
Plumb Entry notification into plugin manager (#30910)
Plumb entry notification into plugin manager
2023-03-28 14:53:27 -06:00
cavemanloverboy 10f49d4e26
Geyser Runtime Reload (#30352)
Support dynamic geyser plugin load, unload, and listing through admin RPC.
2023-03-16 17:03:00 -07:00
Yueh-Hsuan Chiang 33e179905f
getter functions for StoredAccountMeta (#30447)
This PR makes all the StoredAccountMeta fields pub(crate)
and provides getter functions to access its member fields.

This PR is a preparation step for abstracting out StoredAccountMeta.
2023-02-27 10:03:22 -08:00
Yihau Chen df3ef111f7
chore: workspace inheritance (#29893)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-02-23 22:01:54 +08:00
Michael Vines 5136ed3448
Update homepage value for all crates (#30444) 2023-02-23 02:20:18 +00:00
Yueh-Hsuan Chiang ac7e7aa8f0
Move account-meta structs from append_vec.rs to account_meta.rs (#30443)
#### Problem
As we start supporting new storage formats, those account-meta
structs will be shared by different storage formats and thus need
a new home.

#### Summary of Changes
This PR creates meta.rs under account_storage and moves all the account-meta
structs out from append_vec.rs.
2023-02-22 16:10:34 -08:00
Nick Garfield fba990654b
Update geyser interface to not require write locks (#30380)
Update gesyer plugin interface to not require write locks
2023-02-17 13:55:02 -08:00
ivandzen 2f9146e8c8
Replace txn_signature in ReplicaAccountInfo with transaction (#30189)
#### Current implementation of ReplicaAccountInfo restricts
possibilities for inflight account filtration
Current implementation includes transaction signature in
ReplicaAccountInfo. This approach does not allow to filter accounts by
matching other accounts in transaction in-flight (e. g. accept only
those accounts included in transactions for specific programs). Current
implementation forces to collect ALL accounts and transactions for some
period of time and perform such complex filtration afterwards.

#### Pass reference to transaction object instead of transaction
signature into ReplicaAccountInfo
Advanced in-flight filtration can be implemented in plugins by passing
reference to transaction for every update_account event. This change
doesn't bring any overhead comparing to current implementation (only
data type of reference is changed) and brings only minor changes in
source code.
2023-02-09 12:00:33 -08:00
dependabot[bot] 2b4a6a4dd9
Bump libloading from 0.7.3 to 0.7.4 (#30216)
Bumps [libloading](https://github.com/nagisa/rust_libloading) from 0.7.3
to 0.7.4.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6e284984ae"><code>6e28498</code></a>
Fix CI</li>
<li><a
href="95a0f62e8f"><code>95a0f62</code></a>
Placate clippy</li>
<li><a
href="224a3def35"><code>224a3de</code></a>
Release 0.7.4</li>
<li><a
href="bd17713dcc"><code>bd17713</code></a>
Support AIX dyld constants</li>
<li><a
href="6e07929736"><code>6e07929</code></a>
fix typo</li>
<li><a
href="6b33651a90"><code>6b33651</code></a>
Construct a PathBuf</li>
<li><a
href="964dd8b4c0"><code>964dd8b</code></a>
Simplify lib_path</li>
<li><a
href="8009f51a9f"><code>8009f51</code></a>
Honor Cargo's target directory when building LIBPATH</li>
<li><a
href="842e377ae4"><code>842e377</code></a>
Fix a typo in the CI scripts</li>
<li>See full diff in <a
href="https://github.com/nagisa/rust_libloading/compare/0.7.3...0.7.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=libloading&package-manager=cargo&previous-version=0.7.3&new-version=0.7.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-02-09 10:53:18 -07:00
Will Hickey 04a6a631bc
Bump version to v1.16 (#30028) 2023-01-31 17:48:33 -06:00
joeaba a12bf8c003
Update maintainers references (#29997)
* update maintainers references

* chore: update maintainers reference
2023-01-31 08:07:13 -05:00
Kirill Fomichev b4d1769688
geyser: add parent slot/blockhash to block (#29855) 2023-01-25 14:20:24 -08:00
Yihau Chen 9193b4221d
Revert "chore: workspace inheritance (#29509)" (#29892)
This reverts commit a67d239dde.
2023-01-25 15:50:41 +08:00
Yihau Chen a67d239dde
chore: workspace inheritance (#29509)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-01-25 13:59:59 +08:00
Lijun Wang 1e8a8e07b6
Stream the executed transaction count in the block notification (#29272)
Problem

The plugins need to know when all transactions for a block have been all notified to serve getBlock request correctly. As block and transaction notifications are sent asynchronously to each other it will be difficult.

Summary of Changes

Include the executed transaction count in block notification which can be used to check if all transactions have been notified.
2023-01-05 09:36:19 -08:00
Jeff Washington (jwash) b77bef4ee3
write_version -> write_version_obsolete (#29176) 2022-12-14 07:43:40 -08:00
Jeff Washington (jwash) a57247a78e
handle write_version correctly in geyser api (#29224) 2022-12-13 06:42:28 -08:00
behzad nouri 9524c9dbff patches errors from clippy::uninlined_format_args
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
2022-12-06 19:32:15 +00:00
Jeff Washington (jwash) cb4c3668c7
.pubkey() instead of meta.pubkey for stored account (#28682) 2022-10-31 13:58:42 -07:00
Will Hickey c0e4379f43
Whickey/version v1.15 (#27739)
* Bump version to v1.13.0
* Bump version to v1.14.0
* Bump version to v1.15.0
2022-09-13 09:06:15 -05:00
Michael Vines 3f4731b37f Standardize thread names
Tenets:
1. Limit thread names to 15 characters
2. Prefix all Solana-controlled threads with "sol"
3. Use Camel case. It's more character dense than Snake or Kebab case
2022-08-20 07:49:39 -07:00
dependabot[bot] e3a8d2ecdd
chore: bump serde_json from 1.0.81 to 1.0.83 (#27036)
* chore: bump serde_json from 1.0.81 to 1.0.83

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.81 to 1.0.83.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.81...v1.0.83)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-08-10 09:45:42 -06:00