Skip to content

Commit

Permalink
geyser: allow to skip fields in config for grpc.filters (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid authored Apr 4, 2024
1 parent d2c4659 commit 3e6aea0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ The minor version will be incremented upon a breaking change and the patch versi

## 2024-04-04

- yellowstone-grpc-geyser-1.14.1+solana.1.18.9

### Features

- geyser: allow to skip fields in config for `grpc.filters` ([#319](https://github.com/rpcpool/yellowstone-grpc/pull/319))

## 2024-04-04

- yellowstone-grpc-client-1.15.0+solana.1.18.9
- yellowstone-grpc-geyser-1.14.0+solana.1.18.9
- yellowstone-grpc-proto-1.14.0+solana.1.18.9
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolver = "2"
members = [
"examples/rust", # 1.13.0+solana.1.18.9
"yellowstone-grpc-client", # 1.15.0+solana.1.18.9
"yellowstone-grpc-geyser", # 1.14.0+solana.1.18.9
"yellowstone-grpc-geyser", # 1.14.1+solana.1.18.9
"yellowstone-grpc-proto", # 1.14.0+solana.1.18.9
"yellowstone-grpc-tools", # 1.0.0-rc.11+solana.1.18.9
]
Expand Down
2 changes: 1 addition & 1 deletion yellowstone-grpc-geyser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yellowstone-grpc-geyser"
version = "1.14.0+solana.1.18.9"
version = "1.14.1+solana.1.18.9"
authors = { workspace = true }
edition = { workspace = true }
description = "Yellowstone gRPC Geyser Plugin"
Expand Down
15 changes: 7 additions & 8 deletions yellowstone-grpc-geyser/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ pub struct ConfigGrpcServerTls {
}

#[derive(Debug, Default, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
#[serde(default, deny_unknown_fields)]
pub struct ConfigGrpcFilters {
pub accounts: ConfigGrpcFiltersAccounts,
pub slots: ConfigGrpcFiltersSlots,
Expand Down Expand Up @@ -185,7 +185,7 @@ impl ConfigGrpcFilters {
}

#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
#[serde(default, deny_unknown_fields)]
pub struct ConfigGrpcFiltersAccounts {
pub max: usize,
pub any: bool,
Expand All @@ -211,7 +211,7 @@ impl Default for ConfigGrpcFiltersAccounts {
}

#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
#[serde(default, deny_unknown_fields)]
pub struct ConfigGrpcFiltersSlots {
#[serde(deserialize_with = "deserialize_usize_str")]
pub max: usize,
Expand All @@ -224,7 +224,7 @@ impl Default for ConfigGrpcFiltersSlots {
}

#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
#[serde(default, deny_unknown_fields)]
pub struct ConfigGrpcFiltersTransactions {
#[serde(deserialize_with = "deserialize_usize_str")]
pub max: usize,
Expand Down Expand Up @@ -253,13 +253,12 @@ impl Default for ConfigGrpcFiltersTransactions {
}

#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
#[serde(default, deny_unknown_fields)]
pub struct ConfigGrpcFiltersBlocks {
#[serde(deserialize_with = "deserialize_usize_str")]
pub max: usize,
#[serde(deserialize_with = "deserialize_usize_str")]
pub account_include_max: usize,
#[serde(alias = "any")]
pub account_include_any: bool,
#[serde(deserialize_with = "deserialize_pubkey_set")]
pub account_include_reject: HashSet<Pubkey>,
Expand All @@ -283,7 +282,7 @@ impl Default for ConfigGrpcFiltersBlocks {
}

#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
#[serde(default, deny_unknown_fields)]
pub struct ConfigGrpcFiltersBlocksMeta {
#[serde(deserialize_with = "deserialize_usize_str")]
pub max: usize,
Expand All @@ -296,7 +295,7 @@ impl Default for ConfigGrpcFiltersBlocksMeta {
}

#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
#[serde(default, deny_unknown_fields)]
pub struct ConfigGrpcFiltersEntry {
#[serde(deserialize_with = "deserialize_usize_str")]
pub max: usize,
Expand Down

0 comments on commit 3e6aea0

Please sign in to comment.