- install rust tool chain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- install solana cli
sh -c "$(curl -sSfL https://release.solana.com/v1.13.3/install)"`
See Install the Solana Tool Suite for additional instructions.
- create local keypair
solana-keygen new -o "~/.config/solana/id.json"`
- copy environment variable file to
bpl-program-library/
cp .env bpl-program-library/
- copy program keypair to
target/deploy
cp bpl_token_metadata-keypair.json target/deploy/
- build token-metadata program
git clone git@github.com:bokoup/bokoup-program-library.git
cd ~/bokup-program-library
anchor build
- build geyser-plugin-nats program
cd ~
git clone git@github.com:bokoup/geyser-plugin-nats.git
cd ~/geyser-plugin-nats
cargo build
- start the nats messaging server and local test validator
bash start_local_validator.sh
- in a second terminal, build the indexer and start it
cd ~/bokoup-program-library/indexer
cargo build
cargo run
- in a third terminal, build the transaction api and start it
cd ~/bokoup-program-library/api-tx
cargo build
cargo run
- reset the localnet database
cd ~/bokoup-program-library/api-data
cargo run -- reset-schema
- 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
- endpoints in merchant and customer apps can be updated to:
- data api: https://shining-sailfish-15.hasura.app/v1/graphql/
- transaction api: http://127.0.0.1:8080
- validator rpc: http://127.0.0.1:8899
- https://github.com/shiraz-edgevana/solana
- https://docs.solana.com/running-validator/validator-start
- https://github.com/agjell/sol-tutorials/blob/master/setting-up-a-solana-devnet-validator.md
- https://medium.com/coinmonks/running-a-solana-validator-on-aws-bb86162eaf29
- https://laine-sa.medium.com/running-a-solana-validator-lessons-tips-6e6d08c0c589
- https://chainstack.com/how-to-run-a-solana-node/
- 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