Open letmaik opened 1 year ago
Related to https://github.com/microsoft/CCF/issues/3234
Current oe_sign.conf
file https://github.com/microsoft/scitt-ccf-ledger/blob/main/app/oe_sign.conf
CCF doc on memory setting in the file https://microsoft.github.io/CCF/main/operations/resource_usage.html#memory
Openenclave docs on the use of the configuration in this file https://github.com/openenclave/openenclave/blob/master/docs/GettingStartedDocs/buildandsign.md#signing-an-sgx-enclave
A set_soft_cache_limit()
API was added to CCF in https://github.com/microsoft/CCF/pull/6282, to allow applications to easily set a limit.
We currently use a simple LRU cache in the historical query adapter to keep track of when to drop cached transactions to avoid going out of memory. This is based on the transaction count and is hard-coded to 100. Given that transactions have different sizes it would be more economical to use the transaction size to determine the cache size and then set a limit like 100 MiB, based on the available enclave memory set in
oe_sign.conf
. With small claim sizes this would effectively raise the cache limit by one or more magnitudes of transactions.