Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NamespaveVersionSize is the size of a namespace version in bytes. NamespaceVersionSize = 1 // NamespaceIDSize is the size of a namespace ID in bytes. NamespaceIDSize = 32 // NamespaceSize is the size of a namespace (version + ID) in bytes. NamespaceSize = NamespaceVersionSize + NamespaceIDSize ShareSize = 512 // 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 )
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 ( // 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.