Title: Cross-client test data Post by: Gavin Andresen on July 05, 2011, 09:06:13 PM I'm thinking about how to do higher-level testing of bitcoin, and I think we could get a lot of mileage out of a testing harness that works at the network protocol level.
I'm thinking of testing things like proper handling of block chain re-orgs and valid and invalid transactions. Examples: Block chain re-org test:
Valid/invalid transaction tests
A set of good data files with "tx" and "block" (and "inv" and all the rest) messages in them, combined with something like pexpect (http://pexpect.sourceforge.net/pexpect.html) could make a good test system. I'm thinking they should be human-readable (with a proxy listening tool or wireshark plugin or something that dumps bitcoin protocol into the human-readable form) but pretty low-level; maybe a version message (https://en.bitcoin.it/wiki/Protocol_specification#version) looks like: Code: { "version" : [ "u32:31900", "i64:1", "i64:1309899496", "addr:127.0.0.1:8333", "addr:127.0.0.1:5432", "u64:1235876", "s:", "i32:98645" ] } So, before I start working on something like this: Anybody already doing something similar? Title: Re: Cross-client test data Post by: Martin P. Hellwig on July 06, 2011, 04:31:24 PM At the moment I am just parsing wireshark dumps for my protocol decoder, so I would be very interested in this too!
I can get a bit of a wiggle on with my python stuff so you can at the protocol level decode it (well assuming I did it right), for decoding I more or imitated the look of a raw representation of blockexplorer. I am about 2 weeks away before I can release anything decent but I should be able to put something halfway working on within a couple of days, if anybody is interested. |