I use a cluster of P51s for homelab stuff which includes running Bitcoin stuff.
An old laptop with a new SSD would be what I’d recommend buying overall, as it can work and be the least to purchase. There are old business PCs that are pretty cheap used as well. The rasp will be rather slow to build the chain overall. I think for some folks takes 2 weeks :/
Next upgrade for me would be Framework with the Cooler Master case in order to standardize on a form factor, hoping for an eventual rack mount case.
Old, cheap PCs (like a refurbished Optiplex 7040 for example) are quite nice for this. Depending on where you're living you'll usually be able to find one for $200 of eBay, Amazon or any other marketplace.
Regarding the spec, I'd say
8GB is a minimum, and even better if you can go with 16GB (from my own experience DDR3 is still ok)
Intel i5 is absolutely fine, i7 even better
for storage, you'll usually have to get it yourself, since most machines go on sale with cheap 256 GBs. I'd for a good 2To SSD here, to have some piece of mind. It'll usually cost around $200 as well, so you'll end up at around $400 total. If you're really on a budget a 1To SSD will do for now, but I really think the extra 1To is worth the price.
Avoid RasperryPis, they're not suitable for this task in the medium/long run.