Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVM: add a sample stand-alone application based on SVM #2217

Merged
merged 17 commits into from
Oct 4, 2024

Conversation

dmakarov
Copy link

@dmakarov dmakarov commented Jul 19, 2024

Problem

SVM API enables development of advanced applications based on Solana execution engine. Writing such applications from scratch is a non-trivial task currently requiring knowledge of Solana run-time internals. A real-life SVM based example application is helpful for developers to jump-start working with SVM. An example presented in this PR is a client-server pair of applications that demonstrate using SVM to develop a Json-RPC server that responds to transaction simulation requests from a client program.

Summary of Changes

Add an extended example to the SVM crate

  • json-rpc-server is a server application that implements several Solana Json RPC commands, in particular simulateTransaction command to run a transaction in minimal Solana run-time environment required to use SVM.
  • json-rpc-client is a sample client application that submits simulateTransaction requests to json-rpc server.
  • json-rpc-program is source code of an on-chain program executed in the context of the simultateTransaction command submitted by the client program.

@dmakarov
Copy link
Author

@joncinque, @pgarg66 This is still a very early draft, as I'm working on cleaning up the code and integrating this example in CI.

@dmakarov dmakarov force-pushed the json-rpc branch 29 times, most recently from 1cf4208 to aba23e5 Compare July 25, 2024 00:12
@buffalojoec
Copy link

@dmakarov the refactoring is looking great! Let me know when this is ready for another look.

@dmakarov
Copy link
Author

dmakarov commented Oct 4, 2024

I'm going to merge this now with the intention to continue improving this in follow-up PRs, which seems to be more manageable.

@dmakarov dmakarov merged commit e5a67df into anza-xyz:master Oct 4, 2024
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants