instructions
- keys: array of accounts that are going to be read / written
- partly why solana is very fast- transactions that affect different accounts are processed simultaneously
- public key of program to invoke
- data passed as byte array
keys parameter in an instruction
- every account read / written in the txn needs to be present in the keys array
isSigner- whether it’s a signer on the txnisWritable- whether the account is written to during the txn’s execution
keys in instruction is different from the keypair[] in sending transaction
- data buffer in an instruction needs to be serialized properly
- most common serializer used in solana is
borsh- binary object representation serializer for hashing ( borsh full form )
- most common serializer used in solana is