2

Each instruction in a transaction can include:

  • The address of a program to invoke
  • A list of accounts the program can access during its execution
  • A byte buffer of instruction data

Can you give an example of a practical application – in use today – of an instruction that invokes a program by address, but has neither a list of accounts, nor instruction data?

2 Answers 2

3

Your program could log 10Kb of data every time it's invoked, preventing public explorers from showing execution logs about the remaining CPIs.

Example: Program DpqbTera2sSAjwjJewqrXof5hzUzMdKUd4hsUvgxEMm8 does this, but has ix data, but theoretically not necessary. Example explorer link

1
  • Fascinating ‘practical’ application! Commented Jun 6, 2023 at 19:37
1

The get_minimum_delegation instruction in the stake program is another example, but it isn't currently active on mainnet. It does take instruction data, however.

https://github.com/solana-labs/solana/blob/f2f1dab5ea7ac66757b85e88ddd5cc9846e5640c/sdk/program/src/stake/instruction.rs#L256

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.