Does getreceivedbyaddress or listreceivedbyaddress or listunspent shows pay to pubkey and bare mutlisig transactions? Couldn’t find the answer inside the source code.
If I receive a pay to pubkey transaction to the pubkey of a 1r address, will it shows up using getreceivedbyaddress or listreceivedbyaddress or listunspent? Or will it ignore the coins received that way.
The same question apply when 1-of-n bare multisig.
In the Bitcoin Core wallet, it depends:

For P2PK outputs to a public key that's in your wallet, yes for current wallet versions, but this won't be the case for the new &quot;descriptor&quot; wallets (unless explicitly imported).
For bare multisig, only when explicitly imported. Before PR 13002, bare N-of-N multisig was automatically treated as incoming payment (in case you had all N private keys). Since that PR you need to explicitly import these scripts to watch them.

For other wallet software, things may be different.
In general, you cannot assume that anyone will ever treat an incoming transaction as a valid payment, unless it was sent to an exact address they gave you (or you have some other explicit arrangement). Which scripts/addresses a user considers &quot;theirs&quot; is up to them, depends heavily on the software they use, and not something you can infer.