-
Notifications
You must be signed in to change notification settings - Fork 85
Block Header
General format of a Block Header in a MimbleWimble/Grin:
Field | Description | Size |
---|---|---|
version | Version of the block | 2 bytes |
height | Height of this block since the genesis block (height 0) | 8 bytes |
prev_hash | Hash of the block previous to this in the chain | 32 bytes |
prev_root | Root hash of the header MMR at the previous header | 32 bytes |
timestamp | Timestamp at which the block was built | 8 bytes |
output_root | Merkle root of all the commitments in the TxHashSet | 32 bytes |
range_proof_root | Merkle root of all range proofs in the TxHashSet | 32 bytes |
kernel_root | Merkle root of all transaction kernels in the TxHashSet | 32 bytes |
total_difficulty | Total accumulated difficulty since genesis block | 8 bytes |
scaling_difficulty | Difficulty scaling factor between the different proofs of work. | 8 bytes |
total_kernel_offset | Total accumulated sum of kernel offsets since genesis block. | 32 bytes |
output_mmr_size | Total size of the output MMR after applying this block. | 8 bytes |
kernel_mmr_size | Total size of the kernel MMR after applying this block. | 8 bytes |
Sub-Total: 242 bytes | ||
- | - | - |
pow | Proof of work data | For cuck(AR)oo 29: 174 bytes. For cuck(AT)oo 31: 184 bytes. |
Total: 416 bytes for C29 or 426 bytes for C31 |
General format of a Proof Of Work in a MimbleWimble/Grin:
Field | Description | Size |
---|---|---|
total_difficulty | Total accumulated difficulty since genesis block | 8 bytes |
secondary_scaling | Variable difficulty scaling factor fo secondary proof of work | 4 bytes |
nonce | Nonce increment used to mine this block. | 8 bytes |
proof | Proof of work data | cuckoo_size: 1byte cuckoo_solution of C29: 4229bits=153bytes cuckoo_solution of C31: 4231bits=163bytes |
Sub-Total: 174 bytes for C29 and 184 bytes for C31 |
Here is a principle example of a MimbleWimle/Grin block header. The related block is included in Mainnet chain block: 1869.
{ "hash": "00001962e09a383b1ff232aecbce0d0d7250ca7d52d5fcc066ce73ebf9bca5c0", "version": 1, "height": 1869, "previous": "00001915c97bfad5bf9bb30a1035771446770502a937bd16a8c8a8f1fc6db730", "prev_root": "2eb356e36c03f16796dd4a6eef8cbcbeabaade84eecf013516367b376d646db7", "timestamp": "2019-01-17T03:05:43+00:00", "output_root": "b56ccc990181d04d57585d3f0163b4f636fe3208a024596d14221bfa7739e693", "range_proof_root": "a341b87862f430f9dda5fd0b88be175b6cc81b5e84bf6882d98cc31750b5001a", "kernel_root": "b3e9708378ef256d479c6b166ba0a56c26d1b2e985c5e48065dbaa8a1fa6e606", "nonce": 8152803443445577859, "edge_bits": 29, "cuckoo_solution": [ 13813827, 21353671, 43859197, 51837783, 56310446, 57879705, 85656403, 98797541, 99069842, 103570486, 116481984, 120910172, 132568955, 171507199, 182260165, 211614977, 212671378, 218172868, 220951729, 227132075, 238759440, 249206477, 280581616, 293266345, 300555998, 300689284, 318532841, 328845581, 341250875, 367014677, 391164070, 402097316, 417542019, 425563418, 436559283, 439151219, 443766810, 463278212, 466743505, 514433563, 528767320, 533868566 ], "total_difficulty": 1137667929019, "secondary_scaling": 1139, "total_kernel_offset": "0755f37fa67bc3d3f0a7eddec7117013be42afff3602e7480d7271fff92763f1" }
TODO
Basics
- Getting Started
- User Documentation
- MimbleWimble
- FAQ
- Planned releases (Roadmap)
- Code of Conduct
Contributing
- Contributing Guide
- Code Structure
- Code coverage and metrics
- Code Reviews and Audits
- Adding repos to /mimblewimble
Development
Mining
Infrastructure
Exchange integrations
R&D
Grin Community
Grin Governance
Risk Management
Grin Internals
- Block Header Data Structure
- Detailed validation logic
- P2P Protocol
Misc