Open MicaiahReid opened 2 years ago
The persistent cache's get function doesn't currently allow passing the "earliest" tag to cache that request: https://github.com/trufflesuite/ganache/blob/2ec04fa2fe1dc3a5001da9f58a9629d64fdb2530/src/chains/ethereum/ethereum/src/forking/persistent-cache/persistent-cache.ts#L323-L351
get
This is kind of tricky to work around because of the way we lexicographically encode the requests to store/retrieve them efficiently in the database.
Because the persistent cache always needs to fetch the earliest block (to validate ancestry of the fork), we should cache this block in memory.
When the block manager is started, we are currently disabling the cache, so we should fix this once this issue is resolved. https://github.com/trufflesuite/ganache/pull/3755/files#r989390078
Related: #3755
The persistent cache's
get
function doesn't currently allow passing the "earliest" tag to cache that request: https://github.com/trufflesuite/ganache/blob/2ec04fa2fe1dc3a5001da9f58a9629d64fdb2530/src/chains/ethereum/ethereum/src/forking/persistent-cache/persistent-cache.ts#L323-L351This is kind of tricky to work around because of the way we lexicographically encode the requests to store/retrieve them efficiently in the database.
Because the persistent cache always needs to fetch the earliest block (to validate ancestry of the fork), we should cache this block in memory.
When the block manager is started, we are currently disabling the cache, so we should fix this once this issue is resolved. https://github.com/trufflesuite/ganache/pull/3755/files#r989390078