- Using Anchor, implement a contract that can sequentially generate and store fibonacci numbers.
- Make a client that can read those numbers.
- Quantify how many numbers your client can read + generate per second
- Node
- Yarn
- Solana
- Solana Wallet Generated
- Anchor
- run
yarn
to install dependencies - run
solana-test-validator
in a separate terminal - run
anchor deploy
and copy the address - paste the address in
./config.js
forprogramId
- finally, run
ANCHOR_WALLET=<YOUR_KEYPAIR_PATH> node client.js
The number of new fibonacci numbers you can make per second is limited only by the number of transactions you can send to solana (65000tps)
- Reads Per Second Since the whole account can be retrieved at once, the Reads Per Second is limited only to the account size.
- Generations Per Second When running the client 100x, the client averaged a speed of 500ms per sequence generation on the local network, meaning 2 per second.