0

i'm a beginner in using blockchain. Based on my knowledge, there are two ways blocks are created, mining and sending transactions. As there is an explanation to input additional data while sending a new transaction to other user in here: How do I send an arbitary message to an Ethereum address?. I wonder, is there a way to input the additional data while mining? I just want to store the data inside the blocks and not sending any transactions. Thank you

1
  • only the miner can do that. In the block there is an extra place called 'Extra Data' miners used it usually to set their ID or pool name, IDK how big is that and how they do that :)
    – Majd TL
    Commented Jan 27, 2020 at 10:16

2 Answers 2

0

There is only one way blocks are created: they are mined. Mining is the process of collecting a bunch of pending transactions, forming a block of them and trying to solve the Proof of Work puzzle for that block. If the miner manages to solve the puzzle then the block becomes valid and is added to the blockchain and the miner is rewarded.

So even if there was a way to add extra data into blocks when mining you couldn't use it the way you think. You'd have to: 1) be a miner and 2) mine successfully (have enough hardware to find a solution to the puzzle).

In any case blocks are not meant for such data propagation. All meaningful data should be in transactions.

0

Only mining creates blocks of transactions.

Transactions may include contract deployment instructions (CREATE), and/or messages to contracts, with data, as well as simple value transfers.

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.