Today we store proofs in the DB, mainly for simplicity and to ensure we can atomically update proofs when we modify assets. IMO what we really want to do is only store them on disk, them use memory-mapping to access the proofs over contained memory regions. This means we minimize copying, and can pass around pointers in memory to the relevant mmap'd region. On top of this, we'll either want to maintain an external file w/ an index, or maintain the index within the database itself.
Today we store proofs in the DB, mainly for simplicity and to ensure we can atomically update proofs when we modify assets. IMO what we really want to do is only store them on disk, them use memory-mapping to access the proofs over contained memory regions. This means we minimize copying, and can pass around pointers in memory to the relevant mmap'd region. On top of this, we'll either want to maintain an external file w/ an index, or maintain the index within the database itself.