Checks are applied to: getwork RPC submission, internal miner submission, and submitblock RPC submission.
Arguably pointless for the first two, as 'getwork' miners cannot change that field, but it is a sanity check even in those cases.
Checks are applied to: getwork RPC submission, internal miner submission, and submitblock RPC submission.
Arguably pointless for the first two, as 'getwork' miners cannot change that field, but it is a sanity check even in those cases.
IMO, this should be optional, as no reasonable miner would want to have it on mainnet.
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/19b1145968a83ab379985eac540e8ee52a09f322 for binaries and test log.
If miners want a knob to disable, that's easy to add... or, it is similarly easy to patch the source at the callsite.
I'll wait and see what the other devs prefer... can add a command line argument to disable, if that's what people prefer.
Maybe it would make sense to hard-fail on testnet, and set "errors" (getinfo etc) on mainnet (while still posting the block)?
Funny, I was just about to suggest "errors" too. In addition, it could submit the block like normal, but then refuse all further getblocktemplate calls until the process is restarted. dunno, perhaps over complexifying it. The current behavior is a bit dangerous, a widely used miner program could be getting this wrong and go along unnoticed right to the cutoff point, causing the majority of the hash power to be lost all at once.
I like that idea about accepting the block internally yet giving the submitter a rejection anyway. Seems the ideal of both worlds and gets the message across clearly.
Closing, not worth the effort of revision to suit the crowd