A bloom filter is a data structure that is used in computer science and cryptography to test whether an element is a member of a set. It was invented by Burton Howard Bloom in 1970. A bloom filter is a probabilistic data structure, meaning that it can return false positives but not false negatives.
In the context of cryptocurrencies, bloom filters are used in Bitcoin's networking protocol to improve the efficiency of the way that nodes communicate with each other. When a Bitcoin node wants to know whether it has received a transaction, it can use a bloom filter to query other nodes on the network for information about that transaction. By using a bloom filter, the node can significantly reduce the amount of data that it needs to request from other nodes on the network, which helps to reduce network traffic and improve the speed of the network.
Bloom filters are also used in privacy-enhancing technologies such as the Lightning Network, which is a layer-two scaling solution for Bitcoin that enables instant payments with low fees. The Lightning Network uses a technique called onion routing, which allows users to send payments without revealing their identities or the amount of the payment. Bloom filters are used in the onion routing process to enable efficient routing of payments without revealing sensitive information.