0

I have used the ideas from the link [1]How to make miner to mine only when there are Pending Transactions? in my private chain. I have a couple of questions, - How can I add custom code on the miners to do some extra verification before picking transactions? - How can I enforce all miners on my network to follow this logic?

1 Answer 1

0

The proper way to achieve this is to add your requirements to the consensus algorithm.

In a PoW blockchain any participant is able to mine. If your requirements are not part of the consensus then anyone can mine transactions skipping your extra verifications, as long as they are valid transactions otherwise.

In a PoA blockchain you have more control and only need for the validators to run your extra verification.

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.