4

In ethereum we have opcodes which provide access to things like state at execution time. Is there documentation on what is available for solana programs?

I'm specifically interested in hooks that provide information on transaction fees.

1 Answer 1

3

Here is the list of available opcodes:

https://github.com/solana-labs/rbpf/blob/main/src/ebpf.rs

Most opcodes have a cost of 1 CU. Using the call instruction to invoke syscalls is a special case. The cost of syscalls is defined by the compute budget table.

https://github.com/solana-labs/solana/blob/master/program-runtime/src/compute_budget.rs

3
  • Okay great and is there some documentation on what these op codes do?
    – Nat
    Commented Jan 2 at 18:07
  • 1
    I used to host a website with documentation, but I took it down because it was outdated. So no, not at the moment. Solana derives from eBPF, so most documentation on eBPF opcodes is applicable Commented Jan 2 at 20:11
  • 1
    I was hoping there would be op codes that I could reference for things like the current cost per signature for transaction fees. Perhaps this is something that can be found by referencing a core program.
    – Nat
    Commented Jan 3 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.