cobookman / blockchaintoavro Goto Github PK
View Code? Open in Web Editor NEWBitcoin blockchain to avro file
Bitcoin blockchain to avro file
add exceptions as part of bq rows
When use a p2sh address as input utxo, blockchaintoavro throw exception "Script not of right size, expecting 2 but got 4" instead of extracting the address .
Example:
tx id : e29d08cece5a8dfde3e15b7dc6caa84940f18e2c344afae1e30fe360487ba7ac
input address is 37Tm3Qz8Zw2VJrheUUhArDAoq58S6YrS3g
big query result :
[
{
"timestamp": "1535954990000",
"transaction_id": "e29d08cece5a8dfde3e15b7dc6caa84940f18e2c344afae1e30fe360487ba7ac",
"inputs": [
{
"input_script_bytes": "AEgwRQIhAJYEXMiAtOLoP8oDCbYVGzcWMXBqbWeZsgQBVQ1nJ0SXAiAUyzMPlFqUZC1qYUeJEuPUf1e9knOO7oZomMsiFHYSKAFIMEUCIQDDGFl6AP6QieUNLSSw5Lk6gdIKNqOxaOVVLc6hszZ/HwIgGqJZaHSXZOv/Xu1BBinxrsXb0NNZxwd/H63re4XP0gcBTGlSIQJGzPTeDFTMfzNUzdmTwsUM+WX9giOLiWWfvXOhtL8FoSECT8WfcicqiX/kOAM3SWnzlgWBUv5HZajRUhb5RiQlexshAiWTvGnsvzu8w8WAgiZ8tJ2tr0yo2/GyKXM4qdYoxCl2U64=",
"input_script_string": "0[] PUSHDATA(72)[304502210096045cc880b4e2e83fca0309b6151b371631706a6d6799b20401550d67274497022014cb330f945a94642d6a61478912e3d47f57bd92738eee866898cb221476122801] PUSHDATA(72)[3045022100c318597a00fe9089e50d2d24b0e4b93a81d20a36a3b168e5552dcea1b3367f1f02201aa25968749764ebff5eed410629f1aec5dbd0d359c7077f1fadeb7b85cfd20701] PUSHDATA1[52210246ccf4de0c54cc7f3354cdd993c2c50cf965fd82238b89659fbd73a1b4bf05a121024fc59f72272a897fe43803374969f396058152fe4765a8d15216f94624257b1b21022593bc69ecbf3bbcc3c58082267cb49dadaf4ca8dbf1b2297338a9d628c4297653ae]",
"input_script_string_error": null,
"input_sequence_number": "4294967295",
"input_pubkey_base58": null,
"input_pubkey_base58_error": "Script not of right size, expecting 2 but got 4"
}
],
"outputs": [
{
"output_satoshis": "546",
"output_script_bytes": "dqkU9af24rBbTF6zOr26PYP90DKTNOqIrA==",
"output_script_string": "DUP HASH160 PUSHDATA(20)[f5a7f6e2b05b4c5eb33abdba3d83fdd0329334ea] EQUALVERIFY CHECKSIG",
"output_script_string_error": null,
"output_pubkey_base58": "1PPumNRP9WHprgxYH6gBV1h7F1pGSbCoKj",
"output_pubkey_base58_error": null
},
{
"output_satoshis": "354595",
"output_script_bytes": "qRQ/Tuy6EirXMDnUgcjTf5nLT4h82Ic=",
"output_script_string": "HASH160 PUSHDATA(20)[3f4eecba122ad73039d481c8d37f99cb4f887cd8] EQUAL",
"output_script_string_error": null,
"output_pubkey_base58": "37Tm3Qz8Zw2VJrheUUhArDAoq58S6YrS3g",
"output_pubkey_base58_error": null
},
{
"output_satoshis": "0",
"output_script_bytes": "ahRvbW5pAAAAAAAAAB8AAAByFkakAA==",
"output_script_string": "RETURN PUSHDATA(20)[6f6d6e69000000000000001f000000721646a400]",
"output_script_string_error": null,
"output_pubkey_base58": null,
"output_pubkey_base58_error": "Cannot cast this script to a pay-to-address type"
}
],
"block_id": "00000000000000000003972fb3059fb64850692757c35b39ee13eb0b1b982c75",
"previous_block": "0000000000000000001419b21671f2295c12bb4241d8930ae4f020f2975cf339",
"merkle_root": "a47d02db2b585f0b8d038c14e238a0f096ed2acb293ff5e0fcf6ef6de7a09bec",
"nonce": "1944996898",
"version": "536870912",
"work_terahash": "288936542674",
"work_error": null
}
]
show block height
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.