CounterpartyXCP / counterparty-core

Counterparty Protocol Reference Implementation
http://counterparty.io
MIT License
284 stars 206 forks source link

Migrate to `python-bitcoinlib` for transaction identification #217

Closed adamkrellenstein closed 10 years ago

adamkrellenstein commented 10 years ago

In bitcoin.get_tx_info(), after a particular block, use library to do tx parsing.

petertodd commented 10 years ago

FWIW I just pushed a relatively major change to python-bitcoinlib to switch to making the datastructures immutable by default, so if you start using it make sure you're using the latest version. I'll be releasing v0.2 with those changes soon.

adamkrellenstein commented 10 years ago

Going to use python-bitcoinlib just for iterating through the inputs and outputs, and for returning the scriptSig scriptPubKey (I was tired last night); will do the parsing from scratch.

petertodd commented 10 years ago

What do you mean by "will do the parsing from scratch"?

adamkrellenstein commented 10 years ago

I mean checking that the script is of a certain form and extracting the pubkey/pubkeyhash, for strictness, stability and transparency.

petertodd commented 10 years ago

Right, at the binary bytes level?

I'd stick with using python-bitcoinlib for that too - it's all 100% consensus critical anyway.

adamkrellenstein commented 10 years ago

At the OP code level... So I want to leave, e.g. get_checksig() and get_checkmultisig().

petertodd commented 10 years ago

Ok, that sounds fine to me.

adamkrellenstein commented 10 years ago

This is done in the multisig branch.

petertodd commented 10 years ago

Took a quick look through the code, looks reasonable.

In your 'requirements' doc you probably want to change '0.2' to the full '0.2.1'

adamkrellenstein commented 10 years ago

Great---thanks!

adamkrellenstein commented 10 years ago

Now in PR #298.