You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a fair idea of most of the pitfalls that need to be handled wrt indexing the chain.
Things like handling of malformed output scripts (which can legitimately happen where they do not comply with bitcoin script syntax rules). Or coinbase scripts do not get checked so can just find total junk in there... or weird stuff happens like the coinbase can make the txid be non-unique! (but only for coinbases as a special case)
But also the "happy path" of correctly parsing all pushdatas / opcodes.
So I think a set of hand-crafted raw blocks and raw transactions with expected output would be nice (but might be a bit tedious to make...)
I've often found myself wishing that something like this existed for a number of bitcoin-related projects.
For the wallet you really want a set of transactions that systematically map out all of the most common script types to stress all the edge cases too.
The text was updated successfully, but these errors were encountered:
Yeah that's probably the easiest way. Just generate a block on RegTest densely packed with all of the trouble-maker transactions perhaps and then gather up all the utxos... the full state of the chain and capture it for testing?
I don't think you can make custom coin bases when mining blocks but for everything else would be ideal.
Or maybe they just get generated anew each test run and can extend the generator over time to be more comprehensive
I have a fair idea of most of the pitfalls that need to be handled wrt indexing the chain.
Things like handling of malformed output scripts (which can legitimately happen where they do not comply with bitcoin script syntax rules). Or coinbase scripts do not get checked so can just find total junk in there... or weird stuff happens like the coinbase can make the txid be non-unique! (but only for coinbases as a special case)
But also the "happy path" of correctly parsing all pushdatas / opcodes.
So I think a set of hand-crafted raw blocks and raw transactions with expected output would be nice (but might be a bit tedious to make...)
I've often found myself wishing that something like this existed for a number of bitcoin-related projects.
For the wallet you really want a set of transactions that systematically map out all of the most common script types to stress all the edge cases too.
The text was updated successfully, but these errors were encountered: