philcoin tools for Phil
Solana devnet

Phil at both ends

Phil's compiler backend emits two programs for its upload protocol: a client and a server. On this page the client runs in your browser and the server runs on Solana, and they complete the protocol with each other. Nobody wrote either side's protocol logic by hand.

Phil's clientUploadClient, compiled to WebAssembly. Runs in this page.
⇄
Phil's serverUploadServer, inside a Solana program. Runs on devnet.

Run a session

Type anything. Phil's client will hash it, declare it, and send it; Phil's server on Solana will check every step and answer.

What is Phil's, and what is ours

Phil's

  • What each side does, and in what order: the two functions Phil's backend emits.
  • The frame format: Phil's control codec v1.
  • The interface each function expects from the machine it runs on.

Ours

  • That interface, written twice: for a browser (about 100 lines) and for Solana.
  • Getting the bytes from one to the other.
  • The Solana runtime's checks that the server uses every owner exactly once.

Plainly

The client's runtime is phil-client.ts; the server's is runtime.c; the session tests are test/session.ts. This is a community project and is not affiliated with Phil or Solana.