When a node broadcasts a transaction/bundle, is the node IP or hostname only revealed to the node's immediate neighbors, or does this information accompany the broadcast in some way?
Does a transaction on the tangle store anything related to the node that created it?
Broadcast of transactions just contains the transaction trytes, no other metadata (e.g. originator information). Therefore, IP addresses are only visible to immediate neighbors (and they can tell neither whether the transaction was injected at that node or just relayed)
The local transaction database stores some metadata about transactions that are not part of the transaction trytes (like whether the transaction is solid or confirmed); this includes the timestamp when the transaction first appeared at that node and the sender's (neighbor that first sent the transaction) IP address (or
localif the transaction was injected via API). So if you have access to all node databases, you could eventually find the node that has stored "local" here... There is no programmatic way (via API or other calls) to retrieve this sender information, yet (except looking directly into the backend database).