Tags: mayong82/ckb
Tags
Merge nervosnetwork#2611 2611: improvement: smaller block status map during IBD r=driftluo,keroro520,quake a=yangby-cryptape Not conflict with nervosnetwork#2609: - This PR to make block status map to be smaller. After this PR, the max size of block status map during IBD: `4*10^6 -> 5*10^4` (current mainnet has about `4*10^6` blocks, and **I only test once**). - nervosnetwork#2609 to cache block status map into disk if the size of block status map is bigger than a threshold (default: `10^6`, `1/4` of current mainchain). If this PR merged, nervosnetwork#2609 will not work in almost all scenarios at present. But I don't close it because: - The max size of block status map will be increased if network is poor or too many forked blocks. - We can set it to a smaller value, nervosnetwork#2609 provide an option. - That PR refactor the `HeaderMap` to `CachedHashMap`, so we can reuse the temporary storage for other `HashMap`s later. Both of these two PRs could be merged. Co-authored-by: Boyu Yang <[email protected]>
PreviousNext