Subcomponent: Relayer
The relayer's main responsibility is to fetch blocks from the Sequencer using gRPC and submit them to Celestia.
The submitter task is sent blocks asynchronously as they are fetched from the Sequencer. It converts SequencerBlock
objects to Blob
s that can be submitted to Celestia. This Blob
structure is as follows:
pub struct Blob {
/// A [`Namespace`] the [`Blob`] belongs to.
pub namespace: Namespace,
/// Data stored within the [`Blob`].
#[serde(with = "celestia_tendermint_proto::serializers::bytes::base64string")]
pub data: Vec<u8>,
/// Version indicating the format in which [`Share`]s should be created from this [`Blob`].
///
/// [`Share`]: crate::share::Share
pub share_version: u8,
/// A [`Commitment`] computed from the [`Blob`]s data.
pub commitment: Commitment,
}
The converted Blob
s are then submitted to Celestia via gRPC. It automatically retries submission for a while in case of unexpected failures, but ultimately it will quit after u32::MAX
tries. It polls Celestia to ensure that the transaction it submitted was included.