user8866: I have forked bitcoin, and I want to only allow mining submissions from specific public keys (I can verify the signature). Where would the best place to look in the bitcoin source? Would it be best to do it right at the rpc level, or somewhere else (i.e in a script, or in the consensus ~ validation.cpp)?
Alternativly, maybe I could check the coinbase tx and base validations on that?

user51948: This is similar to how Bitcoin Signet operates. Signet was introduced in BIP-325, and the code is found in Pull Request #18267 which was merged into release v0.21 in late 2020.
You can look at that pull request for guidance on how it was done, or simply use the existing Signet code itself.

8866: <p>I have forked bitcoin, and I want to only allow mining submissions from specific public keys (I can verify the signature). Where would the best place to look in the bitcoin source? Would it be best to do it right at the rpc level, or somewhere else (i.e in a script, or in the consensus ~ validation.cpp)?</p>
<p>Alternativly, maybe I could check the coinbase tx and base validations on that?</p>
 51948: <p>This is similar to how Bitcoin <a href="https://en.bitcoin.it/wiki/Signet" rel="nofollow noreferrer">Signet</a> operates. Signet was introduced in <a href="https://github.com/bitcoin/bips/blob/master/bip-0325.mediawiki" rel="nofollow noreferrer">BIP-325</a>, and the code is found in <a href="https://github.com/bitcoin/bitcoin/pull/18267" rel="nofollow noreferrer">Pull Request #18267</a> which was merged into release v0.21 in late 2020.</p>
<p>You can look at that pull request for guidance on how it was done, or simply use the existing Signet code itself.</p>
