Jul 31 - Jul 31, 2012
He welcomed any ideas for a simple data-driven format for testing. Ultraprune, which changes the block validation mechanism to only use a set of coins and the latest block pointer as state, was introduced. This state is represented by an abstract class with multiple implementations. A memory-backed coin set as state can be utilized for a testset run, with the list of coins and blocks loaded from a file.Gavin Andresen expressed interest in porting more tests into a data-driven format, including P2SH, checksig, checkmultisig, block verification, and DoS rules. However, he noted that checksig tests are challenging because they require specific unspent transactions and private keys for testing. He welcomes brilliant ideas on a simple data-driven format. Block verification tests would be beneficial, with a collection of good and bad block chains starting from a common chain being very useful for regression testing. Andresen is willing to contribute pull requests in that direction.Stefan Thomas expressed his gratitude towards Gavin for adding data-driven test cases, emphasizing their usefulness. Jeff Garzik responded with agreement, stating that these test cases are a useful cross-platform tool. The conversation also touched upon the validity of a script involving OP_WITHIN and the addition of more data-driven test cases to bitcoin scripts.The post discusses the evaluation of a script containing three values, "1 0 1" and "WITHIN NOT". The first value (1) is tested to ensure it falls between the lower (0) and upper (1) values. This evaluates to true, resulting in a single byte of [01] being placed on the stack. The NOT operator then inverses this, resulting in a 0 byte false value of []. However, the context does not provide enough information to determine whether or not the script is valid.Overall, the discussion revolves around Gavin Andresen's interest in porting more tests to a data-driven format and his request for ideas on simplifying checksig tests. The usefulness of data-driven test cases is acknowledged, and there is a query regarding the validity of a specific script.
Thread Summary (0 replies)
Jul 31 - Jul 31, 2012
1 messages
TLDR
We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project.
Give Feedback