This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
Expand description
Messages passed between agave and an external pack process.
Messages are passed via shaq::Consumer/Producer.
Memory freeing is responsibility of the external pack process,
and is done via rts-alloc crate. It is also possible the external
pack process allocates memory to pass to agave, BUT it will still be
the responsibility of the external pack process to free that memory.
Setting up the shared memory allocator and queues is done outside of
agave - it can be done by the external pack process or another
process. agave will just join shared memory regions, but not
create them.
Similarly, agave will not delete files used for shared memory regions.
See shaq and rts-alloc crates for details.
The basic architecture is as follows: βββββββββββββββββ βββββββββββββββββββ β tpu_to_pack β β progress_trackerβ βββββββββ¬ββββββββ βββββββββ¬ββββββββββ β β β β β β ββββΌββββββββββββββββββββββββΌββββ β external scheduler β βββ²βββββββ β²βββββββββββββββββ²βββ β β β β β β βββββΌββββ ββββΌββββββ β¦ βββββΌββββ βworker1β βworker2 β βworkerNβ βββββββββ ββββββββββ βββββββββ
TpuToPackMessageare sent fromtpu_to_packqueue to the external scheduler process. This passes in tpu transactions to be scheduled, and optionally vote transactions.ProgressMessageare sent fromprogress_trackerqueue to the external scheduler process. This passes information about leader status and slot progress to the external scheduler process.PackToWorkerMessageare sent from the external scheduler process to worker threads within agave. This passes a batch of transactions to be processed by the worker threads. This processing can also involve resolving the transactionsβ addresses, or similar operations beyond execution.WorkerToPackMessageare sent from worker threads within agave back to the external scheduler process. This passes back the results of processing the transactions.
ModulesΒ§
- pack_
message_ flags Deprecated - Flags for
crate::PackToWorkerMessage::flags. These flags can be ORed together so must be unique bits, with the exception ofNONE. The default behavior,NONE, is to attempt execution and inclusion in the specifiedmax_execution_slot. - tpu_
message_ flags Deprecated - worker_
message_ types Deprecated
StructsΒ§
- Pack
ToWorker Message Deprecated - Message: [Pack -> Worker] External pack processe passes transactions to worker threads within agave.
- Progress
Message Deprecated - Message: [Agave -> Pack] Agave passes leader status to the external pack process.
- Sharable
Pubkeys Deprecated - Reference to an array of Pubkeys that can be shared safely across processes.
- Sharable
Transaction Batch Region Deprecated - Reference to an array of
SharableTransactionRegionthat can be shared safely across processes. General flow: - Sharable
Transaction Region Deprecated - Reference to a transaction that can shared safely across processes.
- TpuTo
Pack Message Deprecated - Message: [TPU -> Pack] TPU passes transactions to the external pack process. This is also a transfer of ownership of the transaction: the external pack process is responsible for freeing the memory.
- Transaction
Response Region Deprecated - Reference to an array of response messages. General flow:
- Worker
ToPack Message Deprecated - Message: [Worker -> Pack]
Message from worker threads in response to a
PackToWorkerMessage.
ConstantsΒ§
- IS_
LEADER Deprecated - Indicates the node is leader.
- IS_
NOT_ LEADER Deprecated - Indicates the node is not leader.
- MAX_
TRANSACTIONS_ PER_ MESSAGE Deprecated - Maximum number of transactions allowed in a
PackToWorkerMessage. If the number of transactions exceeds this value, agave will not process the message. - NOT_
PROCESSED Deprecated - The message was not processed.
- PROCESSED
Deprecated - The message was processed.