-
Notifications
You must be signed in to change notification settings - Fork 139
/
IBlockHeader.cs
32 lines (30 loc) · 1.39 KB
/
IBlockHeader.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Collections.Immutable;
using System.Security.Cryptography;
using Libplanet.Crypto;
using Libplanet.Store.Trie;
namespace Libplanet.Blocks
{
/// <summary>
/// A common interface for blocks that have their proof-of-work <see cref="Nonce"/>s and
/// <see cref="StateRootHash"/>es, but no transactions.
/// </summary>
public interface IBlockHeader : IPreEvaluationBlockHeader, IBlockExcerpt
{
/// <summary>
/// The <see cref="ITrie.Hash"/> of the resulting states after evaluating transactions and
/// a <see cref="Blockchain.Policies.IBlockPolicy{T}.BlockAction"/> (if exists).
/// </summary>
/// <seealso cref="ITrie.Hash"/>
HashDigest<SHA256> StateRootHash { get; }
/// <summary>
/// The digital signature of the whole block content (except for
/// <see cref="IBlockExcerpt.Hash"/>, which is derived from the signature and other
/// contents). This is made by the <see cref="IBlockMetadata.Miner"/>'s
/// <see cref="PrivateKey"/>.
/// <para>As the block signature is introduced since the protocol version 2, it is
/// <c>null</c> for blocks with earlier protocol versions than 2. Although the property
/// is type-wise, the block signature is mandatory since the protocol version 2.</para>
/// </summary>
ImmutableArray<byte>? Signature { get; }
}
}