Is it possible to log the IP address and various system details (meta data etc.) about a msg.sender who is sending a transaction to your smart contract?


I do not think it is possible. At least, it cannot be found in the documentation: https://solidity.readthedocs.io/en/v0.6.1/miscellaneous.html#index-4

Moreover, it would be a major paradox into a blockchain (at least a public one). One nice element is that it is very hard to know who is who in a network unless you want people to know it. If you have access to IP address in the smart contract, it could be very helpful knowing who is the owner of a eth address.

  • Yeah but often, people interact with a smart contract through some sort of application running a node, i.e. they're not running a node themselves but perhaps use a wallet service. If the wallet service is running the node or let's say someone is using infura, then these 3rd parties could be logging everything no? – NowsyMe Jan 3 '20 at 16:43
  • 1
    @NowsyMe Correct. But the fact that someone is doing it is not a reason to do it too ^^ – Florian Castelain Jan 6 '20 at 8:27
  • Ok, I'm asking because I read it was a research topic to create a network which anonymise meta data from transactions like this on public chains like ethereum – NowsyMe Jan 6 '20 at 12:27

No, you can't. Only the node that receive the transaction could know it, but once the transaction is spread to the others nodes, this is hopefully lost.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.