Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NamespaceSize is the namespace size in bytes. NamespaceSize = 8 // byte contains the share version and a sequence start idicator. ShareInfoBytes = 1 // SequenceLenBytes is the number of bytes reserved for the sequence length // that is present in the first share of a sequence. SequenceLenBytes = 4 ShareVersionZero = uint8(0) // unsure of which version to use. DefaultShareVersion = ShareVersionZero // the first unit (transaction, ISR) in a compact share. CompactShareReservedBytes = 4 // the first compact share of a sequence. FirstCompactShareContentSize = ShareSize - NamespaceSize - ShareInfoBytes - SequenceLenBytes - CompactShareReservedBytes // data in a continuation compact share of a sequence. ContinuationCompactShareContentSize = ShareSize - NamespaceSize - ShareInfoBytes - CompactShareReservedBytes // first sparse share of a sequence. FirstSparseShareContentSize = ShareSize - NamespaceSize - ShareInfoBytes - SequenceLenBytes // in a continuation sparse share of a sequence. ContinuationSparseShareContentSize = ShareSize - NamespaceSize - ShareInfoBytes // DefaultMaxSquareSize is the maximum original square width. // // Note: 128 shares in a row * 128 shares in a column * 512 bytes in a share // = 8 MiB DefaultMaxSquareSize = 128 // data square. MaxShareCount = DefaultMaxSquareSize * DefaultMaxSquareSize // DefaultMinSquareSize is the smallest original square width. DefaultMinSquareSize = 1 // data square. MinShareCount = DefaultMinSquareSize * DefaultMinSquareSize MaxShareVersion = 127 // DefaultGasPerBlobByte is the default gas cost deducted per byte of blob // included in a PayForBlobs txn DefaultGasPerBlobByte = 8 // TransactionsPerBlockLimit is the maximum number of transactions a block // producer will include in a block. // // NOTE: Currently this value is set at roughly the number of PFBs that // would fill one quarter of the max square size. TransactionsPerBlockLimit = 5090 )ShareSize = 512
These constants were originally sourced from: https://github.com/celestiaorg/celestia-specs/blob/master/src/specs/consensus.md#constants
View Source
const ( TimeoutPropose = time.Second * 10 TimeoutCommit = time.Second * 10 )
Variables ¶
View Source
var ( // TxNamespaceID is the namespace reserved for transaction data. TxNamespaceID = consts.TxNamespaceID // EvidenceNamespaceID is the namespace reserved for evidence. EvidenceNamespaceID = namespace.ID{0, 0, 0, 0, 0, 0, 0, 3} // PayForBlobNamespaceID is the namespace reserved for PayForBlobs transactions. PayForBlobNamespaceID = namespace.ID{0, 0, 0, 0, 0, 0, 0, 4} // ReservedPaddingNamespaceID is the namespace used for padding after all // reserved namespaces. In practice this padding is after transactions // (ordinary and PFBs) but before blobs. ReservedPaddingNamespaceID = namespace.ID{0, 0, 0, 0, 0, 0, 0, 255} // MaxReservedNamespace is lexicographically the largest namespace that is // reserved for protocol use. MaxReservedNamespace = namespace.ID{0, 0, 0, 0, 0, 0, 0, 255} // TailPaddingNamespaceID is the namespace reserved for tail padding. All data // with this namespace will be ignored. TailPaddingNamespaceID = namespace.ID{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE} ParitySharesNamespaceID = namespace.ID{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} // NewBaseHashFunc is the base hash function used by NMT. Change accordingly // if another hash.Hash should be used as a base hasher in the NMT. NewBaseHashFunc = consts.NewBaseHashFunc // DefaultCodec is the default codec creator used for data erasure. DefaultCodec = rsmt2d.NewLeoRSCodec // DataCommitmentBlocksLimit is the limit to the number of blocks we can // generate a data commitment for. DataCommitmentBlocksLimit = consts.DataCommitmentBlocksLimit SupportedShareVersions = []uint8{ShareVersionZero} )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.