from typing import Dict


def decode_block(raw_block: bytes) -> Dict:
    """
    Decodes bytes representation of a block into block dictionary.

    Args:
        raw_block: Bytes representing a block.

    Returns:
        Block in dictionary form.
    """
    block_items = raw_block.decode().split('\0')
    block = {}

    block['hash'] = block_items[0]
    block['parentHash'] = block_items[1]
    block['nonce'] = block_items[2]
    block['logsBloom'] = block_items[3]
    block['miner'] = block_items[4]
    block['difficulty'] = block_items[5]
    block['totalDifficulty'] = block_items[6]
    block['extraData'] = block_items[7]
    block['size'] = block_items[8]
    block['gasLimit'] = block_items[9]
    block['gasUsed'] = block_items[10]
    block['timestamp'] = block_items[11]
    # block['transactionIndexRange'] = block_items[12]
    block['sha3Uncles'] = block_items[12]
    block['transactions'] = block_items[13]
    # REWARD????
    # block['hasREWARD???h'] + '\0'

    return block