As you can see, the nSequence of all the inputs are hashed together and are used right from the first message block.
Yes, because you use SIGHASH_ALL. But I used SIGHASH_NONE, which should clear some fields. And in general, you can grind the solution with SIGHASH_SINGLE, combined with SIGHASH_ANYONECANPAY, and put a higher output value than input value (to prevent it from being stolen).
And in that case, I think you should be able to pick a different nSequence. But it can be confirmed on testnets or regtest first with easier puzzles, before grinding the reward.
SIGHASH_NONE only clears the outputs.
Also:
https://developer.bitcoin.org/devguide/transactions.htmlOne thing all signature hash types sign is the transaction’s locktime.
“SIGHASH_NONE” signs all of the inputs but none of the outputs,
What I get from this is:
- the sponsor signed the nLockTime
- the sponsor signed the inputs (inc; nSequence)
- the sponsor also signed the output value (since it is part of the message, separate from the outputs hash). So a solver cannot even modify the fees.
Maybe I'm wrong. Or not. You can try playing with different output amounts when you sign your data with SIGHASH_NONE and see if they change.