Skip to content

Commit

Permalink
geyser: fix config example (#168)
Browse files Browse the repository at this point in the history
* add full block notification with no account defined.

Signed-off-by: Kirill Fomichev <[email protected]>

* rename ConfigGrpcFiltersBlocks any field to account_include_any

Signed-off-by: Kirill Fomichev <[email protected]>

* bump 1.6.1

Signed-off-by: Kirill Fomichev <[email protected]>

---------

Signed-off-by: Kirill Fomichev <[email protected]>
Co-authored-by: musitdev <[email protected]>
  • Loading branch information
fanatid and musitdev committed Jul 27, 2023
1 parent 3e3efa0 commit b5dd75a
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 10 deletions.
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,24 @@ The minor version will be incremented upon a breaking change and the patch versi

### Breaking

## 2023-07-26

- yellowstone-grpc-geyser-1.6.1+solana.1.16.1
- yellowstone-grpc-geyser-1.6.1+solana.1.14.18

### Fix

geyser: fix config example ([#168](https://github.com/rpcpool/yellowstone-grpc/pull/168)).

## 2023-07-22

- yellowstone-grpc-geyser-1.6.0+solana.1.16.1
- yellowstone-grpc-geyser-1.6.0+solana.1.14.18

### Features

geyser: add panic config option on failed block reconstruction ([#165](https://github.com/rpcpool/yellowstone-grpc/pull/165)).
geyser: allow to disable unary methods ([#166](https://github.com/rpcpool/yellowstone-grpc/pull/166)).
- geyser: add panic config option on failed block reconstruction ([#165](https://github.com/rpcpool/yellowstone-grpc/pull/165)).
- geyser: allow to disable unary methods ([#166](https://github.com/rpcpool/yellowstone-grpc/pull/166)).

## 2023-07-18

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 @@ -2,7 +2,7 @@
members = [
"examples/rust", # 1.7.0+solana.1.14.8
"yellowstone-grpc-client", # 1.7.0+solana.1.14.8
"yellowstone-grpc-geyser", # 1.6.0+solana.1.14.8
"yellowstone-grpc-geyser", # 1.6.1+solana.1.14.8
"yellowstone-grpc-proto", # 1.7.0+solana.1.14.8
]

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.6.0+solana.1.14.18"
version = "1.6.1+solana.1.14.18"
authors = ["Triton One"]
edition = "2021"
description = "Yellowstone gRPC Geyser Plugin"
Expand Down
6 changes: 4 additions & 2 deletions yellowstone-grpc-geyser/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
},
"blocks": {
"max": 1,
"any": false,
"account_include_max": 10,
"account_include_reject": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"]
"account_include_any": false,
"account_include_reject": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
"include_transactions": true,
"include_accounts" : false
},
"blocks_meta": {
"max": 1
Expand Down
5 changes: 3 additions & 2 deletions yellowstone-grpc-geyser/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,10 @@ impl Default for ConfigGrpcFiltersTransactions {
pub struct ConfigGrpcFiltersBlocks {
#[serde(deserialize_with = "deserialize_usize_str")]
pub max: usize,
pub any: bool,
#[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>,
pub include_transactions: bool,
Expand All @@ -225,8 +226,8 @@ impl Default for ConfigGrpcFiltersBlocks {
fn default() -> Self {
Self {
max: usize::MAX,
any: true,
account_include_max: usize::MAX,
account_include_any: true,
account_include_reject: HashSet::new(),
include_transactions: true,
include_accounts: true,
Expand Down
5 changes: 4 additions & 1 deletion yellowstone-grpc-geyser/src/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,10 @@ impl FilterBlocks {

let mut this = Self::default();
for (name, filter) in configs {
ConfigGrpcFilters::check_any(filter.account_include.is_empty(), limit.any)?;
ConfigGrpcFilters::check_any(
filter.account_include.is_empty(),
limit.account_include_any,
)?;
ConfigGrpcFilters::check_pubkey_max(
filter.account_include.len(),
limit.account_include_max,
Expand Down

0 comments on commit b5dd75a

Please sign in to comment.