5

Since there are strict storage and computational limits forced by a VM some operations for enterprise-level contracts are impossible. Is there some Bloom filter implementation available in existing library for use in Solidity? It could be used to optimise some algorithms. I do not feel ready for porting some algorithm myself :(

4
  • Please provide an example of what you claim is impossible.
    – T9b
    Apr 16 '16 at 14:01
  • Agreed. Need a better example. Ethereum events actually function from bloom filters.
    – VoR0220
    Apr 16 '16 at 18:56
  • Looks like the Aldekein is simply looking for a library which implements a bloom filter. There are op-codes for various hashes and Bitwise logic operations so should be possible to implement a simple she256 based BF Apr 16 '16 at 20:20
  • @JackWinters is correct, I'm searching for a library.
    – Aldekein
    Apr 19 '16 at 0:38
0

I don't think bloom filter would be useful in contracts as it is prone to bloating attacks.

Malicious user can add to a bloom filter a number of entries specifically prepared to increase number of false positives (by increasing number of 1-bits in filter).

1
  • 1
    Though in a private Ethereum-based blockchain, where you could all but guarantee the safety of the network, such attacks wouldn't be a concern :-) Mar 3 '17 at 22:03

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