Replacement for: https://github.com/ledgerwatch/erigon/pull/7998 with windows fixes --------- Co-authored-by: SHIVAM SHARMA <shivam691999@gmail.com>