Skip to content

Commit

Permalink
Merge branch 'master' into waclaw-disable-broken-on-mac
Browse files Browse the repository at this point in the history
  • Loading branch information
wacban authored Jan 20, 2023
2 parents a647d85 + d937d27 commit b059135
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions core/store/src/columns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ pub enum DBCol {
/// - *Rows*: block hash (CryptoHash)
/// - *Content type*: [near_primitives::block_header::BlockHeader]
BlockHeader,
/// Column that stores mapping from block height to block hash.
/// Column that stores mapping from block height to block hash on the current canonical chain.
/// (if you want to see all the blocks that we got for a given height, for example due to double signing etc,
/// look at BlockPerHeight column).
/// - *Rows*: height (u64)
/// - *Content type*: block hash (CryptoHash)
BlockHeight,
Expand Down Expand Up @@ -105,6 +107,8 @@ pub enum DBCol {
/// - *Content type*: BlockExtra
BlockExtra,
/// Store hash of all block per each height, to detect double signs.
/// In most cases, it is better to get the value from BlockHeight column instead (which
/// keeps the hash of the block from canonical chain)
/// - *Rows*: int (height of the block)
/// - *Content type*: Map: EpochId -> Set of BlockHash(CryptoHash)
BlockPerHeight,
Expand Down Expand Up @@ -180,7 +184,12 @@ pub enum DBCol {
/// - *Rows*: BlockHash || TrieKey (TrieKey is written via custom to_vec)
/// - *Column type*: TrieKey, new value and reason for change (RawStateChangesWithTrieKey)
StateChanges,
/// Mapping from Block to its refcount. (Refcounts are used in handling chain forks)
/// Mapping from Block to its refcount (number of blocks that use this block as a parent). (Refcounts are used in handling chain forks).
/// In following example:
/// 1 -> 2 -> 3 -> 5
/// \ --> 4
/// The block '2' will have a refcount equal to 2.
///
/// - *Rows*: BlockHash (CryptoHash)
/// - *Column type*: refcount (u64)
BlockRefCount,
Expand All @@ -197,6 +206,8 @@ pub enum DBCol {
/// - *Column type*: Vec<ChunkHash (CryptoHash)>
ChunkHashesByHeight,
/// Mapping from block ordinal number (number of the block in the chain) to the BlockHash.
/// Note: that it can be different than BlockHeight - if we have skipped some heights when creating the blocks.
/// for example in chain 1->3, the second block has height 3, but ordinal 2.
/// - *Rows*: ordinal (u64)
/// - *Column type*: BlockHash (CryptoHash)
BlockOrdinal,
Expand Down

0 comments on commit b059135

Please sign in to comment.