Skip to content

bokoup/geyser-plugin-nats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geyser-plugin-nats

localnet validator setup

  1. install rust tool chain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. install solana cli
sh -c "$(curl -sSfL https://release.solana.com/v1.13.3/install)"`

See Install the Solana Tool Suite for additional instructions.

  1. create local keypair
solana-keygen new -o "~/.config/solana/id.json"`
  1. copy environment variable file to bpl-program-library/
cp .env bpl-program-library/
  1. copy program keypair to target/deploy
cp bpl_token_metadata-keypair.json target/deploy/
  1. build token-metadata program
git clone [email protected]:bokoup/bokoup-program-library.git
cd ~/bokup-program-library
anchor build
  1. build geyser-plugin-nats program
cd ~
git clone [email protected]:bokoup/geyser-plugin-nats.git
cd ~/geyser-plugin-nats
cargo build
  1. start the nats messaging server and local test validator
bash start_local_validator.sh
  1. in a second terminal, build the indexer and start it
cd ~/bokoup-program-library/indexer
cargo build
cargo run
  1. in a third terminal, build the transaction api and start it
cd ~/bokoup-program-library/api-tx
cargo build
cargo run
  1. reset the localnet database
cd ~/bokoup-program-library/api-data
cargo run -- reset-schema
  1. run program tests to populate database with test data
cd ~/bokoup-program-library
anchor test --skip-deploy --skip-local-validator

checks

  • All program tests pass
  • Logs in indexer worker terminal window show logs of accounts and transactions being inserted into the database
  • Data can be queried at the public graphql endpoint
  1. endpoints in merchant and customer apps can be updated to:

additional resources

notes

  • seg fault when built with rustc 1.67 - rustc 1.60 works
  • check to make sure ip address of validator is added to postgres instance on gcp

About

Geyser plugin to forward selected accounts and transactions to nats messaging server.

Resources

Stars

Watchers

Forks