What I'm looking for is the ability to have binary dump of a block or a single transaction to make some offline test and batch processing.
Can you suggest something for this goal?
I'm not sure really. Maybe give libbitcoin (
http://bitcoinmedia.com/libbitcoin-first-steps/) a shot or try patching Bitcoind directly.
Payment notifications on their own do not. Once you get the transaction hash you can make an additional api call to
This will provide a number of things which are useful determining whether or not to accept a 0-confirmation payment.
{
"hash" : "96a2f64403e7075cd394c1d654a1ea96d7d7a08719219d63ab2d910443993947",
"type" : "Transaction",
"initial_time" : "1328574240923",
"last_time" : "1328574253751",
"initial_ip" : "88.198.13.16", "double_spend" : false,
"probable_owners" : [
{"ip" : "195.24.78.75", "confidence" : 42 },{"ip" : "88.198.13.16", "confidence" : 29 },{"ip" : "91.121.89.182", "confidence" : 26 }
],
"nconnected" : "3678",
"relayed_count" : "3716",
"relayed_percent" : "101",
"mining_nodes" : [
{"link" : "
https://deepbit.net", "name" : "Deepbit"}, {"link" : "
http://pool.phiral.com", "name" : "Phiral Research"}, {"link" : "
http://188.165.22.62", "name" : "P2Pool"}, {"link" : "
http://mining.bitcoin.cz/", "name" : "Slush"}, {"link" : "
http://www.Bitlc.net", "name" : "Bitlc.net"}, {"link" : "
https://deepbit.net", "name" : "Deepbit"}, {"link" : "
https://deepbit.net", "name" : "Deepbit"}, {"link" : "
https://50btc.com/", "name" : "50BTC"}, {"link" : "
http://bitclockers.com", "name" : "Bitclockers"}
]
}
nconnectedCheck this is at least over 100 as blockchain.info could be having network trouble.
relayed_percent90% or better is normal of transactions with correct fees and no conflicting transactions. Anything under 50% could indicate a problem e.g. none standard scripts, incorrect fees, double spend or just too soon.
mining_nodesCheck this list for at least a few big pools e.g. Deepbit, Slush and BTC Guild
double_spendIf the input has already been spent in blockchain.info's database this will be true. It is still possible it could be accepted into the blockchain if the double spend is also unconfirmed, but not recommended to accept.
Also If you want faster notifications your better off subscribing to blockchain.info's web socket server rather than using HTTP POST.
ws://api.blockchain.info:8335/invYou can subscribe to several different channels.
{"op":"unconfirmed_sub"} To subscribe to all unconfirmed transactions
{"op":"blocks_sub"} To subscribe to new blocks
{"op":"addr_sub", "addr" : "1KztPg1cq5xHx7cHCocxxN2HTtLKiy2PCo"} Subscribe to notifications for a particular address.
Test:
http://websocket.org/echo.html