zkopru-network / zkopru

Ethereum L2 scaling solution for private transactions using zk-SNARK and optimistic rollup.
https://zkopru.network
GNU General Public License v3.0
217 stars 28 forks source link

Booleans index acceleration #348

Open chancehudson opened 2 years ago

chancehudson commented 2 years ago

IndexedDB doesn't allow boolean values to be included in indexes. This means that any query involving a boolean will require some level of scanning.

There are two possible approaches to solving this problem:

  1. Silently convert boolean values to and from integers (0 and 1) inside the database connector
  2. Adopt integers instead of booleans throughout the codebase (possibly using typescript enumeration)
wanseob commented 2 years ago

Option 2 sounds good to me