I have an issue where after I run
anchor test --detach (which starts a local validator) the transactions are only available for a short time (a few minutes) via rpc. Possibly a local validator setting concerning making only recent blocks available over rpc?
I'm not sure about
anchor test specfically, but
solana-test-validator (which it probably wraps?) has a very low default
--limit-ledger-size value to prevent consuming excess disk space. Assuming
anchor test can pass this argument through or supports an analog, increasing the value will keep a deeper ledger history around