Extra data passed with blocks should be ignored #75
Labels
Enhancement
New feature or request
Good First Issue
Good for newcomers
Help Wanted
Extra attention is needed
Milestone
Currently, a block with literally any arbitrary data is accepted as valid. We expect blocks to look something like:
This block is considered a valid block, and when a miner or node (or wallet) receives this block, they'll take the received data verbatim and store it. This approach is naive. A miner can include any data they want onto this block, and it will still be deemed valid, and still be stored verbatim, wasting resources on a machine storing data that may be irrelevant. An example of this is the following:
In this case, miners would store the extra fields
my_favorite_food
andmy_favorite_binary
on their disk, even though this benefits the chain in no way.I propose we prune fields that we expect from received blocks and only store those. In this case, the above block would still be deemed valid, as it is, but we wouldn't store the extra data.
The text was updated successfully, but these errors were encountered: