Post
Topic
Board Development & Technical Discussion
Re: Empty blocks
by
barrysty1e
on 16/05/2022, 16:35:30 UTC
as long as you can produce correct nbits for the next block (15 lines of c++), validate the previous header hash (using openssl lib, 5 lines of c++), you can test to see whether the blockheader you received is indeed accurate.
I didn't mean this. Sure, you can write a program that checks the validity of the block header, but if you haven't verified the entire chain until that point, you can't know for sure what's the previous block hash or if a transaction double-spends etc.

not including transactions (since you wouldnt know or be listening for txes) would actually improve your chances of nailing a block.
Yes, but it's little matter when it comes to earning millions of sats in fees.

understood, sure.
however given bitcoin's difficulty, it would be highly unlikely for some party to solve a blockheader where the contents were invalid (and you could easily test this).
additionally, if you let a spv program run for a little while before starting your stratum up... it would be trivial to test if the 'blocks heard' did in fact form a legitimate chain.

prevhash being the sha256d of the previous block.. easy to check

james