This is the top commit from #30572, where the new node service bit support commit is extracted on its own.
See the corresponding BIP draft for motivation: https://github.com/bitcoin/bips/pull/1663
Dissociating this change from halting the processing of unrequested transaction, allow the node service bit support to be used for further policies and mechanisms, beyond this mechanism only.