Expand description
Sequences of Instruction
s executed within a single transaction.
In Solana, programs execute instructions, and clients submit sequences
of instructions to the network to be atomically executed as Transaction
s.
A Message
is the compact internal encoding of a transaction, as
transmitted across the network and stored in, and operated on, by the
runtime. It contains a flat array of all accounts accessed by all
instructions in the message, a MessageHeader
that describes the layout
of that account array, a recent blockhash, and a compact encoding of the
message’s instructions.
Clients most often deal with Instruction
s and Transaction
s, with
Message
s being created by Transaction
constructors.
To ensure reliable network delivery, serialized messages must fit into the IPv6 MTU size, conservatively assumed to be 1280 bytes. Thus constrained, care must be taken in the amount of data consumed by instructions, and the number of accounts they require to function.
This module defines two versions of Message
in their own modules:
legacy
and v0
. legacy
is reexported here and is the current
version as of Solana 1.10.0. v0
is a future message format that encodes
more account keys into a transaction than the legacy format. The
VersionedMessage
type is a thin wrapper around either message version.
Despite living in the solana-program
crate, there is no way to access the
runtime’s messages from within a Solana program, and only the legacy message
types continue to be exposed to Solana programs, for backwards compatibility
reasons.
Modules§
- The original and current Solana message format.
- A future Solana message format.
Structs§
- Collection of static and dynamically loaded keys used to load accounts during transaction processing.
- A Solana transaction message (legacy).
- Describes the organization of a
Message
’s account keys. - Wraps a sanitized
VersionedMessage
to provide a safe API - Transaction signature details including the number of transaction signatures and precompile signatures.
Enums§
- Sanitized message of a transaction.
- Either a legacy message or a v0 message.
Constants§
- The length of a message header in bytes.
- Bit mask that indicates whether a serialized message is versioned.