Bitcoin Forum
May 09, 2024, 04:45:05 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 3 4 »
1  Bitcoin / Development & Technical Discussion / Re: How to find multisignature transactions ? on: October 22, 2020, 02:18:42 PM
Thanks for your replies Smiley

I use bitcoin-etl to download data from the blockchain. So which parameters can be useful to recognize and analyze addresses/transactions? How to recognize segwit addresses (pubkeyhash could be multisig or segwit) ?
I think about "inputs": "script_asm", "required_signatures", "type"; "outputs": "required_signatures", "type". What do you think ?

Code:
{
  "hash": "412910031c9677c24d08a27034c994564ca0801a7817b4fa0e6d38ab425508cc",
  "size": 223,
  "virtual_size": 223,
  "version": 1,
  "lock_time": 0,
  "block_number": 641225,
  "block_hash": "00000000000000000001c40a6317eec0cdd1b669a237bf1e049d7f70d56a8345",
  "block_timestamp": 1595969476,
  "is_coinbase": false,
  "index": 379,
  "inputs": [
    {
      "index": 0,
      "spent_transaction_hash": "1ad97eaf9013507e0f2ae8f42a4381adf2141b45ca874c5e0b1956c60854f4ec",
      "spent_output_index": 2,
      "script_asm": "30440220357d50e85dd29c52e54bc14dde809956abe1ac691a5fb6ffc46f79ace749b2bd02201447841e72078f0b2f9b512bea3d91e2b787ef6f3318c4c0192a4266f0d6d7ac[ALL] 0292423edb90a4b950ecf25bc0b76173ebea211bb56c5f7d05518bd02603b97ded",
      "script_hex": "4730440220357d50e85dd29c52e54bc14dde809956abe1ac691a5fb6ffc46f79ace749b2bd02201447841e72078f0b2f9b512bea3d91e2b787ef6f3318c4c0192a4266f0d6d7ac01210292423edb90a4b950ecf25bc0b76173ebea211bb56c5f7d05518bd02603b97ded",
      "sequence": 4294967295,
      "required_signatures": 1,
      "type": "pubkeyhash",
      "addresses": [
        "13yQitAQzggzTr6dw7Qe5PZnGhsoMxjrEM"
      ],
      "value": 59822256
    }
  ],
  "outputs": [
    {
      "index": 0,
      "script_asm": "OP_HASH160 8f7c778eb3d10e78f19e42c4e810c0c4748cd15c OP_EQUAL",
      "script_hex": "a9148f7c778eb3d10e78f19e42c4e810c0c4748cd15c87",
      "required_signatures": 1,
      "type": "scripthash",
      "addresses": [
        "3Emhf6WMZSgqZorB2SeymSE55XeL3JLcqa"
      ],
      "value": 3636800
    },
    {
      "index": 1,
      "script_asm": "OP_DUP OP_HASH160 3948bdcd3ae6de4ced68de778bbd88c27b18e75f OP_EQUALVERIFY OP_CHECKSIG",
      "script_hex": "76a9143948bdcd3ae6de4ced68de778bbd88c27b18e75f88ac",
      "required_signatures": 1,
      "type": "pubkeyhash",
      "addresses": [
        "16Dtf6axb6BYXXmMmdhTNuqHFSePDg1654"
      ],
      "value": 56153138
    }
  ],
  "input_count": 1,
  "output_count": 2,
  "input_value": 59822256,
  "output_value": 59789938,
  "fee": 32318
}
2  Bitcoin / Development & Technical Discussion / Re: Bitcoin-etl transactions.json parameters explanation on: October 08, 2020, 09:35:14 AM
Ok, thanks Smiley When it comes to outputs, can they be always "1" ? I haven't found any ouput > 1
The transaction you referenced in the OP has two outputs.

It is very common for an individual to have transactions that have exactly two outputs, one to the person/enttity they are sending coin to and one change output.

Many businesses who send many transactions per day will consolidate transactions such that they send coin to many individuals/entities in a single transaction.

Here is an example of a recent transaction that has more than two outputs.


I thought about required_signatures parameter for outputs. This parameter doesn't include P2SH Multisig. It shows "1" for multisigs addresses. I am right?
You cannot tell if an output needs to be signed by more than one private key.

The only exception to the above is if that address has previously signed a transaction that you can review.

Do you mean that is it possible only when I have input ?


I have one more question about bitcoin-etl. What is the best way to recognize witness transactions ? What parameters should be used ? Addresses , which starts with 3.. could be segwit or non-segwit (multisig)
3  Bitcoin / Development & Technical Discussion / Re: How to find multisignature transactions ? on: October 06, 2020, 04:45:58 PM
Thanks for this explanation Smiley Is it possible to decode also outputs in this way to check that it is multisig address ?

No, you can't even know the script itself before the address is used as input.

On a side note, when Taproot is activated on Bitcoin network, you only can see part of the script used to redeem input.


Okay Smiley So I am not able to check that transactions outputs are P2SH-Multisig ?


Quote
3. Decode the script from vin -> scriptsig -> asm. Only take hex script after last "[ALL]"

Command :

Code:
decodescript 532102002a57268073cbc5472d35d8f8fae2c52825241592f53e53ae516913d8c82bd121026c1061b95ccfc52594c9b376382e2f0240a523b3b1dc5db6a9cdd9730a4a0c2121029e8c3ae6c0516df4075089ab9475c9335985569ac0f3b9f1a4b0d946785937cd2102c6a7c72de9221cba7029f1b920a86bb84997d9c91a2e4428b1397cba669dd3162103ba7c7d7b8d2379de450441445c30a638c555305cbe044abb88f10643d9621bf055ae

The output :

Code:
{
  "asm": "3 02002a57268073cbc5472d35d8f8fae2c52825241592f53e53ae516913d8c82bd1 026c1061b95ccfc52594c9b376382e2f0240a523b3b1dc5db6a9cdd9730a4a0c21 029e8c3ae6c0516df4075089ab9475c9335985569ac0f3b9f1a4b0d946785937cd 02c6a7c72de9221cba7029f1b920a86bb84997d9c91a2e4428b1397cba669dd316 03ba7c7d7b8d2379de450441445c30a638c555305cbe044abb88f10643d9621bf0 5 OP_CHECKMULTISIG",
  "reqSigs": 3,
  "type": "multisig",
  "addresses": [
    "1LqxDSWQLcg3nKvmWNAGoADMPzswHpLcKj",
    "1NTkRiGiZP1FoSb6JkraMH4TyoKG3WMXzT",
    "1D7Wmurjy264dpZK8LdJ1xc3f6ALAcNJAx",
    "1HapYFsTiZBdXe1L1hegv11yM3apJWxZui",
    "1Fdhk674u3WejXsJmpxsyQss5VMvYd8j87"
  ],
  "p2sh": "3FuqMT3VeyRhB917aiJUeWSn2jRt4M3hw8",
  "segwit": {
    "asm": "0 259ea6036131f75feb83db7882dfd5a91fb9bcebb270e3c2f68991c54a64b2dc",
    "hex": "0020259ea6036131f75feb83db7882dfd5a91fb9bcebb270e3c2f68991c54a64b2dc",
    "reqSigs": 1,
    "type": "witness_v0_scripthash",
    "addresses": [
      "bc1qyk02vqmpx8m4l6urmdug9h744y0mn08tkfcw8shk3xgu2jnyktwqnxdsjq"
    ],
    "p2sh-segwit": "389rC5x48fCbcmsWirjyGorUsS4mf7Ldwx"
  }
}

Could you explain what params "ps2h" and "p2sh-segwit mean ? What are these two addresses: "bc1qyk02vqmpx8m4l6urmdug9h744y0mn08tkfcw8shk3xgu2jnyktwqnxdsjq" and "389rC5x48fCbcmsWirjyGorUsS4mf7Ldwx" ?
4  Bitcoin / Development & Technical Discussion / Re: Bitcoin-etl transactions.json what index mean ? on: October 06, 2020, 04:17:34 PM
Ok, thanks Smiley When it comes to outputs, can they be always "1" ? I haven't found any ouput > 1
The transaction you referenced in the OP has two outputs.

It is very common for an individual to have transactions that have exactly two outputs, one to the person/enttity they are sending coin to and one change output.

Many businesses who send many transactions per day will consolidate transactions such that they send coin to many individuals/entities in a single transaction.

Here is an example of a recent transaction that has more than two outputs.


I thought about required_signatures parameter for outputs. This parameter doesn't include P2SH Multisig. It shows "1" for multisigs addresses. I am right?
5  Bitcoin / Development & Technical Discussion / Re: How to find multisignature transactions ? on: October 04, 2020, 03:45:11 PM
Thanks for this explanation Smiley Is it possible to decode also outputs in this way to check that it is multisig address ?
6  Bitcoin / Development & Technical Discussion / Re: Bitcoin-etl transactions.json what index mean ? on: October 04, 2020, 03:41:37 PM
Is "required_signatures" parameter always be "1" ?


Not always:

Code:
            {
                "name": "required_signatures",
                "type": "INT64",
                "description": "The number of signatures required to authorize spending of this output"
            },


There's multisig transactions that require n-of-m signatures so according to the above the value of "required_signatures" will depend on whether it's a multisig transaction or a regular one with only a single required signature.

Ok, thanks Smiley When it comes to outputs, can they be always "1" ? I haven't found any ouput > 1
7  Bitcoin / Development & Technical Discussion / Re: Bitcoin-etl transactions.json what index mean ? on: October 01, 2020, 12:00:18 PM
Is "required_signatures" parameter always be "1" ?
8  Bitcoin / Development & Technical Discussion / How to find multisignature transactions ? on: October 01, 2020, 11:35:13 AM
Hi,

How can I find multisignature transactions e.g. 2of3, 2of2 ?
I dowloaded many raw transactions but I haven't seen any parameter with more than 1 required signature.

For instance, here it is possible to see few multisig addresses https://bitinfocharts.com/pl/top-100-richest-bitcoin-addresses.html

How this statistics are made ? I would like to divide multisig into e.g multisig 2of2, 2of3
https://btc.bitaps.com/statistic/outputs
9  Bitcoin / Development & Technical Discussion / Liquid Network - peg in peg out on: September 01, 2020, 04:46:43 PM
Hello,

I wonder how it really works. E.g. I want to redeem 1 btc for 1 l-btc. 1 btc has been locked. I made many transactions and I have 2 l-btc, which I want to exchange for 2 btc. What happens to 1 btc which I locked earlier ? I know peg out isn't available for normal users.
10  Bitcoin / Development & Technical Discussion / Re: The fastest way to download blockchain data in csv format on: August 13, 2020, 07:39:21 AM
It sounds like XY problem, why do you specifically need those datas in csv format? If you're willing to share what you're trying to solve, some member might able to give better solution.

I want to collect all inputs and outputs of transactions with needed parameters. My idea is to create something like walletexplorer but with different heuristics. I have aws server with btc node. This data could be inother formats like json, xls. I could always convert it.
11  Bitcoin / Development & Technical Discussion / Re: The fastest way to download blockchain data in csv format on: August 12, 2020, 08:49:38 AM
I wonder how to download bitcoin data to csv files. I would like to get all blocks, transactions in csv files. What is the fastest way to achieve this?

Been there, done that. Trust me unless your searching skill is way better mine then LoyceV's blockdata will be your best source, alternatively, you can download the "Blockchair Database Dumps" from blockchair, but if you don't have a script/bot to do that for you, then you will need to manually download 10 years worth of DAILY data, assuming we never had a whole day without finding a block then you are going to download about 3650 files, so I suggest you stick to the former option.

Keep in mind that LoyceV has that data in a .txt file, so for you to convert it to CSV you going to need a workaround, and the easiest one would be using MS Excel.


It is really great work by LoyceV but it hasn't resolved my problem. I want to download all transactions with input and output addresses. I only tried bitcoin-etl (https://github.com/blockchain-etl/bitcoin-etl) but I calculated that it takes more than one month to download it and save to small csv files (e.g. 50-150 blocks in one).  Do you know something else ?
12  Bitcoin / Development & Technical Discussion / Re: The fastest way to download blockchain data in csv format on: August 11, 2020, 02:47:25 PM
Yes, I plan to split it into many smaller files. I am looking for the best solution to quickly download this.

I know blocksci but I am not sure that it could help me to do this in my way
13  Bitcoin / Development & Technical Discussion / The fastest way to download blockchain data in csv format on: August 11, 2020, 12:27:25 PM
Hi,

I wonder how to download bitcoin data to csv files. I would like to get all blocks, transactions in csv files. What is the fastest way to achieve this?
I heard about bitcoin-etl and blocksci. Is it possible with both of them ?
14  Bitcoin / Development & Technical Discussion / Re: Bitcoin-etl transactions.json what index mean ? on: August 03, 2020, 11:30:12 AM
Thank you for explanation Smiley
15  Bitcoin / Development & Technical Discussion / Bitcoin-etl transactions.json parameters explanation on: July 31, 2020, 12:40:23 PM
Hi,

I use bitcoinetl to download data from bitcoin blockchain.
For example:
Code:
{
  "hash": "412910031c9677c24d08a27034c994564ca0801a7817b4fa0e6d38ab425508cc",
  "size": 223,
  "virtual_size": 223,
  "version": 1,
  "lock_time": 0,
  "block_number": 641225,
  "block_hash": "00000000000000000001c40a6317eec0cdd1b669a237bf1e049d7f70d56a8345",
  "block_timestamp": 1595969476,
  "is_coinbase": false,
  "index": 379,
  "inputs": [
    {
      "index": 0,
      "spent_transaction_hash": "1ad97eaf9013507e0f2ae8f42a4381adf2141b45ca874c5e0b1956c60854f4ec",
      "spent_output_index": 2,
      "script_asm": "30440220357d50e85dd29c52e54bc14dde809956abe1ac691a5fb6ffc46f79ace749b2bd02201447841e72078f0b2f9b512bea3d91e2b787ef6f3318c4c0192a4266f0d6d7ac[ALL] 0292423edb90a4b950ecf25bc0b76173ebea211bb56c5f7d05518bd02603b97ded",
      "script_hex": "4730440220357d50e85dd29c52e54bc14dde809956abe1ac691a5fb6ffc46f79ace749b2bd02201447841e72078f0b2f9b512bea3d91e2b787ef6f3318c4c0192a4266f0d6d7ac01210292423edb90a4b950ecf25bc0b76173ebea211bb56c5f7d05518bd02603b97ded",
      "sequence": 4294967295,
      "required_signatures": 1,
      "type": "pubkeyhash",
      "addresses": [
        "13yQitAQzggzTr6dw7Qe5PZnGhsoMxjrEM"
      ],
      "value": 59822256
    }
  ],
  "outputs": [
    {
      "index": 0,
      "script_asm": "OP_HASH160 8f7c778eb3d10e78f19e42c4e810c0c4748cd15c OP_EQUAL",
      "script_hex": "a9148f7c778eb3d10e78f19e42c4e810c0c4748cd15c87",
      "required_signatures": 1,
      "type": "scripthash",
      "addresses": [
        "3Emhf6WMZSgqZorB2SeymSE55XeL3JLcqa"
      ],
      "value": 3636800
    },
    {
      "index": 1,
      "script_asm": "OP_DUP OP_HASH160 3948bdcd3ae6de4ced68de778bbd88c27b18e75f OP_EQUALVERIFY OP_CHECKSIG",
      "script_hex": "76a9143948bdcd3ae6de4ced68de778bbd88c27b18e75f88ac",
      "required_signatures": 1,
      "type": "pubkeyhash",
      "addresses": [
        "16Dtf6axb6BYXXmMmdhTNuqHFSePDg1654"
      ],
      "value": 56153138
    }
  ],
  "input_count": 1,
  "output_count": 2,
  "input_value": 59822256,
  "output_value": 59789938,
  "fee": 32318
}

I don't know what this parameter mean "index: 379". Could anyone explain me ?
16  Bitcoin / Development & Technical Discussion / Re: Group blocks / addresses by mining pool on: April 10, 2020, 07:56:03 AM
Yes. I want to find all addresses of mining pools and group them. Explorers have some errors. For instance, according to btc.com this address 147SwRQdpCfj5p8PnfsXV2SsVVpVcz3aPq is tagged as CanoePool and still mines new coins, but last block of this pool was mined in 2018. I think, this address belongs to another pool.
17  Bitcoin / Development & Technical Discussion / Group blocks / addresses by mining pool on: April 09, 2020, 01:33:02 PM
Hello everone Smiley

I would like to implement a script, which takes all blocks and group them by mining pool name, which is written in a coinbase data. Next, I want to take all coinbase transactions (1st tx from every block) and write outputs of them to proper mining pools. A mining pool could has more than 1 address. Moreover, some of them could send funds directly to users or some of them have more than 1 output. What  e.g. 2. What is the best way to obtain these results? What parameters should I take? Any help will be appreciated Smiley
18  Bitcoin / Development & Technical Discussion / Re: Trace transactions on: February 17, 2020, 01:37:17 AM
Thank you for responses  Wink How do different services look for exchange wallets? What do you think about other blockchains, is it possible to trace them?
19  Bitcoin / Development & Technical Discussion / Trace transactions on: January 23, 2020, 11:05:46 PM
Hello,

I am researching ways how to trace transactions and hot and cold wallets of exchanges, gambling sites, cantors, mixer.s What sources of data could I use? What algorithms and scripts would be useful to do this? Maybe, do you have some interesting articles about this issue? Any help would be great Smiley
20  Economy / Gambling / Re: New btc roulette - Sport, Dice, Casino - BetKing.io on: June 29, 2018, 10:41:15 AM
How much is 1 MBT ? I made a deposit in BTC. I would like to make a bet with a maximum I have and I can't. I am able to make a bet for 1 MBT. Can anyone explain it for me ?

1 MBT is 1 mBTC = 0.001 BTC

the reason for this is the sports provider software had 2 limitations. Amounts can only have 2 decimal places so we had to sue mBTC and their currency can only show 3 letters so we went with MBT.



Thanks. Now, I understand
Pages: [1] 2 3 4 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!