import json


def get_blocks_from_s3_ref(blocks_s3_ref: str, s3_client) -> list:
    """Return a list of blocks from an S3 reference file."""
    blocks = json.loads(s3_client.get_object_from_s3(blocks_s3_ref))
    for b in blocks:
        if 'parentBlockIndex' in b:
            del b['parentBlockIndex']
        if 'blockIndex' in b:
            del b['blockIndex']
    return blocks