Joe C 92687e91ed BPF Loader: Hoist syscalls into their own crate (#5559) hace 3 meses
..
client 103fb21d00 ci: use cargo sort v2 (#6406) hace 5 meses
program 75c3f67ccf bump solana-program-entrypoint from 2.2.1 to 2.3.0 (#6643) hace 5 meses
server 92687e91ed BPF Loader: Hoist syscalls into their own crate (#5559) hace 3 meses
README.md 7f2f358936 Docs: fix typos (#4592) hace 9 meses
config.yml e5a67dfa96 SVM: add a sample stand-alone application based on SVM (#2217) hace 1 año
test.json e5a67dfa96 SVM: add a sample stand-alone application based on SVM (#2217) hace 1 año

README.md

This is an example application using SVM to implement a tiny subset of Solana RPC protocol for the purpose of simulating transaction execution without having to use the entire Solana Runtime.

The example consists of two host applications

  • json-rpc-server -- the RPC server that accepts incoming RPC requests and performs transaction simulation sending back the results,
  • json-rpc-client -- the RPC client program that sends transactions to json-rpc-server for simulation,

and

  • json-rpc-program is the source code of on-chain program that is executed in a transaction sent by json-rpc-client.

To run the example, compile the json-rpc-program with cargo build-sbf command. Using solana-test-validator create a ledger, or use an existing one, and deploy the compiled program to store it in the ledger. Using agave-ledger-tool dump ledger accounts to a file, e.g. accounts.out. Now start the json-rpc-server, e.g.

cargo run --manifest-path json-rpc-server/Cargo.toml -- -l test-ledger -a accounts.json

Finally, run the client program.

cargo run --manifest-path json-rpc-client/Cargo.toml -- -C config.yml -k json-rpc-program/target/deploy/helloworld-keypair.json -u localhost

The client will communicate with the server and print the responses it recieves from the server.