helium/blockchain-core

vars checking needs to improve before big binary blobs go in

evanmcc opened this issue · 2 comments

The above function gets called once per receipt, and once we have bigger binary blob vars, will quickly become a performance problem. It needs to be rewritten to take a specific list of vars to fetch individually so we don't spend a lot of time fetching megs of data we never use. Ideally this will happen before poc v11 gets activated.

I propose we always pull from the ledger (remove the vars extraction done here and in the rewards txn and possibly elsewhere) and introduce a e2qc cache of configurable size over the vars (keyed by {chain_var_nonce, var_name}). This way if the chain var nonce changes the cache seamlessly transitions to the new vars.

fixed by #1030