Go to file
Linus Kendall adc60a9c99
Updated golang client (#58)
* Updated golang client

Golang client now works with the bidi stream and provide similar command line arugments to the Rust client.

* Added keepalive params

* Make the golang args standardized with the rust lcient

See #44.

* Make endpoint parsing follow our standard format

Parses endpoint as URL instead of host:port combo.
2023-02-22 17:27:48 +05:30
.github/workflows Change release name in CI (#50) 2023-02-09 23:29:05 -03:00
ci Updating ci script 2023-02-09 14:19:33 -03:00
golang Updated golang client (#58) 2023-02-22 17:27:48 +05:30
nodejs Fix JS and TS clients compatibility with older Nodejs versions (#60) 2023-02-22 15:06:34 +05:30
proto Added golang client 2023-02-03 10:49:17 +00:00
src Tonic retry client (#53) 2023-02-17 12:06:50 +05:30
typescript Fix JS and TS clients compatibility with older Nodejs versions (#60) 2023-02-22 15:06:34 +05:30
.gitignore Fix JS and TS clients compatibility with older Nodejs versions (#60) 2023-02-22 15:06:34 +05:30
Cargo.lock Tonic retry client (#53) 2023-02-17 12:06:50 +05:30
Cargo.toml Tonic retry client (#53) 2023-02-17 12:06:50 +05:30
README.md Add transactions to block message, new block meta message (#27) 2023-01-12 11:37:58 -03:00
build.rs Use compiled protoc (#5) 2022-10-26 16:54:06 -03:00
config.json Add filter limits to config (#4) 2022-10-25 14:52:29 -03:00
rust-toolchain.toml Update solana =1.14.10 (#19) 2022-12-16 10:37:32 -03:00

README.md

Public GRPC interface to Geyser

Validator

$ solana-validator --geyser-plugin-config ./config.json

Plugin config check

cargo-fmt && cargo run --bin config-check -- --config config.json

Client

  • Always broadcast new slots
  • Accounts can be filtered by pubkey and owner fields, also all accounts can be broadcasted with *
$ cargo run --bin client -- --accounts --account SysvarC1ock11111111111111111111111111111111
    Finished dev [unoptimized + debuginfo] target(s) in 0.69s
     Running `target/debug/client --accounts --account SysvarC1ock11111111111111111111111111111111`
stream opened
new message: SubscribeUpdate { filters: ["client"], update_oneof: Some(Account(SubscribeUpdateAccount { account: Some(SubscribeUpdateAccountInfo { pubkey: [6, 167, 213, 23, 24, 199, 116, 201, 40, 86, 99, 152, 105, 29, 94, 182, 139, 94, 184, 163, 155, 75, 109, 92, 115, 85, 91, 33, 0, 0, 0, 0], lamports: 1169280, owner: [6, 167, 213, 23, 24, 117, 247, 41, 199, 61, 147, 64, 143, 33, 97, 32, 6, 126, 216, 140, 118, 224, 140, 40, 127, 193, 148, 96, 0, 0, 0, 0], executable: false, rent_epoch: 0, data: [57, 29, 0, 0, 0, 0, 0, 0, 165, 160, 80, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 221, 189, 80, 99, 0, 0, 0, 0], write_version: 53718 }), slot: 7481, is_startup: false })) }
new message: SubscribeUpdate { filters: ["client"], update_oneof: Some(Account(SubscribeUpdateAccount { account: Some(SubscribeUpdateAccountInfo { pubkey: [6, 167, 213, 23, 24, 199, 116, 201, 40, 86, 99, 152, 105, 29, 94, 182, 139, 94, 184, 163, 155, 75, 109, 92, 115, 85, 91, 33, 0, 0, 0, 0], lamports: 1169280, owner: [6, 167, 213, 23, 24, 117, 247, 41, 199, 61, 147, 64, 143, 33, 97, 32, 6, 126, 216, 140, 118, 224, 140, 40, 127, 193, 148, 96, 0, 0, 0, 0], executable: false, rent_epoch: 0, data: [58, 29, 0, 0, 0, 0, 0, 0, 165, 160, 80, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 222, 189, 80, 99, 0, 0, 0, 0], write_version: 53725 }), slot: 7482, is_startup: false })) }
^C

Filters

See proto/geyser.proto.

Slots

Currently all slots are broadcasted.

Account

Accounts can be filtered by:

  • account — acount Pubkey, match to any Pubkey from the array
  • owner — account owner Pubkey, match to any Pubkey from the array

If all fields are empty then all accounts are broadcasted. Otherwise fields works as logical AND and values in arrays as logical OR.

Transactions

  • vote — enable/disable broadcast vote transactions
  • failed — enable/disable broadcast failed transactions
  • account_include — filter transactions which use any account
  • account_exclude — filter transactions which do not use any account

If all fields are empty then all transactions are broadcasted. Otherwise fields works as logical AND and values in arrays as logical OR.

Blocks

Currently all blocks are broadcasted.

Blocks meta

Same as Blocks but without transactions.

Limit filters

It's possible to add limits for filters in config. If filters field is omitted then filters doesn't have any limits.

"grpc": {
   "filters": {
      "accounts": {
         "max": 1,
         "any": false,
         "account_max": 10,
         "account_reject": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
         "owner_max": 10,
         "owner_reject": ["11111111111111111111111111111111"]
      },
      "slots": {
         "max": 1
      },
      "transactions": {
         "max": 1,
         "any": false,
         "account_include_max": 10,
         "account_include_reject": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
         "account_exclude_max": 10
      },
      "blocks": {
         "max": 1
      }
   }
}