Bitcoin Forum
May 28, 2024, 03:50:18 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 »
1  Bitcoin / Development & Technical Discussion / Re: How did Charlie Lee do the LTC/BTC atomic swap? on: November 07, 2020, 08:59:26 PM

Charlie used Decred for his 2017 LTC/BTC atomic swap?  Is this 100% true?  Surprised if true.

I asked because he did 2 atomic swap posts in 2017, one mentioned decred, the other did not. 

This one mentioned decred: https://twitter.com/satoshilite/status/910534107058233344?lang=en (5:00 PM · Sep 20, 2017)

This one does not: https://twitter.com/satoshilite/status/911328252928643072?lang=en (9:36 PM · Sep 22, 2017)

Do we know if the Sep 22, 2017 was done with or without decred?
2  Bitcoin / Development & Technical Discussion / How did Charlie Lee do the LTC/BTC atomic swap? on: November 07, 2020, 12:10:39 PM
Apparently Charlie Lee did a LTC/BTC atomic swap back in 2017, but I can't seem to find how he did it:

Found 2 twitter posts, one mentioned decred and another does not mention decred for atomic swap he performed:

This one mentioned decred: https://twitter.com/satoshilite/status/910534107058233344?lang=en (5:00 PM · Sep 20, 2017)

This one does not: https://twitter.com/satoshilite/status/911328252928643072?lang=en (9:36 PM · Sep 22, 2017)

Regarding the Sep 22, 2017 twitter post, do we know if he used decred for that too, or was that a more direct atomic swap between LTC and BTC?  If it was more direct, did he record the steps he took to perform the transaction, so I can try reproducing them for "learning-by-example" purposes?
3  Bitcoin / Bitcoin Technical Support / Re: Getting number of bitcoins associated to bitcoin address/public key on: June 04, 2020, 08:58:49 AM
There is no direct RPC call built into Bitcoin Core that you can use to say "give me the balance of any given address". You would need to build your own bespoke database, derived from blockchain data that you could then query using your block explorer. Something similar to this open-source block explorer: https://github.com/iquidus/explorer

You'll see it has a "sync" module which parses transaction data and updates local database files.

It also requires that your node is running with the txindex=1 option enabled (either on commandline or in bitcoin.conf) so that all transactions are indexed and not just ones that are related to your own wallet addresses.

I think this is the kind of thing I am looking for, but even more low level.  As in, is it possible to extract the data stored in each block and save the addresses and balances in a custom database, in order to perform fast searches later based on address to output the balance?  Wondering if blockchain.info does something similar?
4  Bitcoin / Bitcoin Technical Support / Re: Getting number of bitcoins associated to bitcoin address/public key on: June 04, 2020, 08:54:37 AM
You mean the balance? If so, you can't check that for an address that is not yours. See this[1][2].

I have tried using some of the existing 3rd party API's but those are either too close or expensive or both, so was thinking about creating something myself locally.

I'm not sure what do you mean by "too close" but there are a lot of APIs that provide that functionality for free (Blockchair, Blockonomics, BTC.com, etc.). Which APIs have you tried so far?

[1] https://bitcoin.stackexchange.com/questions/59237/determine-address-balance-using-bitcoin-core
[2] https://bitcoin.stackexchange.com/questions/58242/how-to-get-balance-by-any-address-using-rpc-bitcoind

Sorry, I've now clarified my question above.
5  Bitcoin / Bitcoin Technical Support / Getting number of bitcoins associated to bitcoin address/public key on: June 03, 2020, 03:17:59 PM
Is it possible to use bitcoin-core's RPC api (assuming the full blockchain is downloaded locally) to type in any public bitcoin address and get back the balance?  I am wanting to learn more by trying to create a website similar to blockchain.info where people can simply type in a bitcoin address and see how much bitcoin is associated with that address/key.

I have tried using some of the existing 3rd party API's but those are either too slow or expensive or both, so was thinking about creating something myself locally.

So I guess my question is, how do websites like blockchain.info index the blockchain and get the balance of any given bitcoin address, so it can be stored in a custom database for fast searching?
6  Bitcoin / Development & Technical Discussion / Is it possible to create a simple smart contract using bitcoin-cli? on: May 06, 2018, 07:12:31 PM
I have an interest in smart contracts.  For example, something simple like "bitcoin in a specific address cannot be spent until 2019-01-01".

How do I go about creating this using bitcoin-cli?

I already know how to create simple raw transactions and simple multisig raw transactions, but I can't seem to figure out how to create simple smart contracts, specifically timelocks.
7  Bitcoin / Bitcoin Technical Support / I'm doing something wrong with change address, but don't know what. on: December 22, 2016, 08:38:30 PM
Can someone please explain what is happening here?

Note: Everything done on testnet so the only value lost was time.

In this first screenshot:

https://i.imgur.com/8WXKdgb.png

it shows that:

1 I am making a payment to mwCwTceJvYV27KXBc3NJZys6CjsgsoeHmf

2 I am sending change to mogwtVo5bDzJRWsVNLEpfDDt5dXHcC2tf5 <- cold wallet address.

The second screenshot shows extra translation fees being calculated:

https://i.imgur.com/yRzxf8v.png

The third screenshot shows the change going to a completely different address, change went to n18wMXVBXoE134AQsd7GcQKnjBah2MsPdD

https://i.imgur.com/564PKIi.png

I have tested this twice, and twice the change went to an address other than the address I specified.

What's going on?
8  Bitcoin / Electrum / Is electrum centralised or decentralised? on: February 14, 2016, 07:14:48 PM
How does electrum work to find other electrum sellers/buyers?  Is that part of the system decentralised, or is that part of the system centralised?
9  Bitcoin / Development & Technical Discussion / Re: Cold signing a transaction using bitcoin-qt on: June 15, 2014, 12:54:39 PM
Thank you very much.  It worked!
10  Bitcoin / Development & Technical Discussion / Re: Cold signing a transaction using bitcoin-qt on: June 14, 2014, 07:53:05 PM
Code:
getrawtransaction 3d01e3b94195808a866bd75cd5a9a3d1d6ee0385fdd20025aacb4215bb9117e2

I get:

Code:
getrawtransaction 3d01e3b94195808a866bd75cd5a9a3d1d6ee0385fdd20025aacb4215bb9117e2 1
{
"hex" : "0100000001d4e599ee2d5977e34c46bfbb63fa943f7443dc181a9db8e5826edf42a9460b86010000006b48304502210081e422796a3c36a2cdf66f97627858f727312357b266349d420d69ae9c8e579402202239de042d594f40dab157dffa0696698e6c10fbc6ee757f695f5735f4187a00012103ca4eab4b394090c9f4c10b6a9c2674dfc14c7dee55b6d3eb72c4263fc325c37effffffff0240c06503000000001976a914a2e022d91aaceb732f138117d8ea142510d89eb388ac21a07403000000001976a914546e2062ba7c72e2e2589e5ad89a4cbc35b595eb88ac00000000",
"txid" : "[b]3d01e3b94195808a866bd75cd5a9a3d1d6ee0385fdd20025aacb4215bb9117e2[/b]",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"txid" : "[b]860b46a942df6e82e5b89d1a18dc43743f94fa63bbbf464ce377592dee99e5d4[/b]",
"vout" : 1,
"scriptSig" : {
"asm" : "304502210081e422796a3c36a2cdf66f97627858f727312357b266349d420d69ae9c8e579402202239de042d594f40dab157dffa0696698e6c10fbc6ee757f695f5735f4187a0001 03ca4eab4b394090c9f4c10b6a9c2674dfc14c7dee55b6d3eb72c4263fc325c37e",
"hex" : "48304502210081e422796a3c36a2cdf66f97627858f727312357b266349d420d69ae9c8e579402202239de042d594f40dab157dffa0696698e6c10fbc6ee757f695f5735f4187a00012103ca4eab4b394090c9f4c10b6a9c2674dfc14c7dee55b6d3eb72c4263fc325c37e"
},
"sequence" : 4294967295
}
],
"vout" : [
{
"value" : 0.57000000,
"n" : [b]0[/b],
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 a2e022d91aaceb732f138117d8ea142510d89eb3 OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "[b]76a914a2e022d91aaceb732f138117d8ea142510d89eb388ac[/b]",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"mvNAGP5nNef6MHfB6Tcu426MJboBqrwJZV"
]
}
},
{
"value" : 0.57974817,
"n" : [b]1[/b],
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 546e2062ba7c72e2e2589e5ad89a4cbc35b595eb OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "[b]76a914546e2062ba7c72e2e2589e5ad89a4cbc35b595eb88ac[/b]",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"moDNytfZa69vc2Hz1ELjPaSJ2DheWiCjT6"
]
}
}
],
"blockhash" : "000000007c6196cdb6969f3f0630da9da5df8c2e687510ce6e25f21ccbc99e0f",
"confirmations" : 275,
"time" : 1402603913,
"blocktime" : 1402603913
}

So if I want to send money from mvNAGP5nNef6MHfB6Tcu426MJboBqrwJZV to mvDLEEymmEijZXyrrNRL3aPMhH8q2m8vE1, I am not sure which txid to use from the output of getrawtransaction?

Should I use txid 3d01e3b94195808a866bd75cd5a9a3d1d6ee0385fdd20025aacb4215bb9117e2 or txid 860b46a942df6e82e5b89d1a18dc43743f94fa63bbbf464ce377592dee99e5d4.  Also, do I use vout 0 or vout 1?
11  Bitcoin / Development & Technical Discussion / Re: Cold signing a transaction using bitcoin-qt on: June 14, 2014, 07:08:26 PM
Say I want to spend some testnet coins associated with n4EmA9R4VmxLnxu9G8yZMDxvBBha8bUtEQ. I need to know which outputs can be spent and to get a list of unspent outputs with at least 1 and at most 9999999 confirmations:

Code:
./bitcoind listunspent 1 9999999 '["n4EmA9R4VmxLnxu9G8yZMDxvBBha8bUtEQ"']

[{
  "txid": "77d35b87d1ad549011b66dbb06ec7b6d84b06325ee9c18cf6f3467e9b7a7bda2",
  "vout": 0,
  "address": "n4EmA9R4VmxLnxu9G8yZMDxvBBha8bUtEQ",
  "account": "",
  "scriptPubKey": "76a914f93af105187d21ed6adfa5d71bfada7d7324e53c88ac",
  "amount": 1.90978096,
  "confirmations": 233
}]

I want to send testnet bitcoin from mvNAGP5nNef6MHfB6Tcu426MJboBqrwJZV which has 0.57 TBTC http://tbtc.blockr.io/address/info/mvNAGP5nNef6MHfB6Tcu426MJboBqrwJZV.  This is a public key for cold storage wallet.

So if I run listunspent, all I get is:

Code:
listunspent 1 9999999 '["mvNAGP5nNef6MHfB6Tcu426MJboBqrwJZV"']
[
]

Why is that?

I get the same result from both hot and cold wallets via bitcoin core.
12  Bitcoin / Development & Technical Discussion / Re: Cold signing a transaction using bitcoin-qt on: June 14, 2014, 04:21:57 PM
You are playing with this on testnet, right?

Attempting to learn how to use raw transactions on the real bitcoin network is a great way to lose money.

Yes, I'm using testnet. Smiley

I think testnet pubkeys start with m and they start with 1 (or 3 if using multisig) on the real network?
13  Bitcoin / Development & Technical Discussion / Re: Cold signing a transaction using bitcoin-qt on: June 14, 2014, 04:15:39 PM

You are mistaken.  That unspent output was received at moDNytfZa69vc2Hz1ELjPaSJ2DheWiCjT6 (not at mvNAGP5nNef6MHfB6Tcu426MJboBqrwJZV).  See where it says "address" in the output?

Wrong private key.  You needed to run:

Code:
dumpprivkey moDNytfZa69vc2Hz1ELjPaSJ2DheWiCjT6


THanks, going to try again.
14  Bitcoin / Development & Technical Discussion / Re: Cold signing a transaction using bitcoin-qt on: June 14, 2014, 04:02:18 PM
Bitcoin-qt / raw transactions are my only choice because I have tried both armory and electrum and I can't get them to work on my computer.  Plus, having read all the theory about raw transactions, I am trying to put theory into practice for educational purposes, so using armory won't help in this case.
If you can't get Armory working, why would you expect raw transactions to be easier/safer?

You're just exponentially increasing the odds that you'll permanently lose Bitcoins.

I'm testing on testnet.  Plus, I have filed a report with the armory devs, and as soon as they reply back, I'll give it another go.  However, that will not solve the problem of "learning" how to do raw transactions.
15  Bitcoin / Development & Technical Discussion / Re: Cold signing a transaction using bitcoin-qt on: June 14, 2014, 03:49:52 PM
What am I doing wrong?
You're trying to do raw transactions yourself instead of just using Armory.

Bitcoin-qt / raw transactions are my only choice because I have tried both armory and electrum and I can't get them to work on my computer.  Plus, having read all the theory about raw transactions, I am trying to put theory into practice for educational purposes, so using armory won't help in this case.
16  Bitcoin / Development & Technical Discussion / Re: Cold signing a transaction using bitcoin-qt on: June 14, 2014, 01:02:50 PM
What have I done wrong?

From a hot wallet, I start off by executing listunspent
listunspent
[
{
"txid" : "3d01e3b94195808a866bd75cd5a9a3d1d6ee0385fdd20025aacb4215bb9117e2",
"vout" : 1,
"address" : "moDNytfZa69vc2Hz1ELjPaSJ2DheWiCjT6",
"scriptPubKey" : "76a914546e2062ba7c72e2e2589e5ad89a4cbc35b595eb88ac",
"amount" : 0.57974817,
"confirmations" : 223
}
]

So basically I want to send to a hot wallet public key (mvDLEEymmEijZXyrrNRL3aPMhH8q2m8vE1) from cold wallet public key (mvNAGP5nNef6MHfB6Tcu426MJboBqrwJZV). The cold wallet only has 0.57 - 0.0001 fee = send 0.5699, which means the cold wallet will be empty if the transaction is successful, so no change address needed I guess?  Therefore, I run the following from the hot wallet:
createrawtransaction '[{"txid":"3d01e3b94195808a866bd75cd5a9a3d1d6ee0385fdd20025aacb4215bb9117e2","vout":1}]' '{"mvDLEEymmEijZXyrrNRL3aPMhH8q2m8vE1":0.5699
}'

Which in-turn returned the following value. 0100000001e21791bb1542cbaa2500d2fd8503eed6d1a3a9d55cd76b868a809541b9e3013d01000 00000ffffffff0130996503000000001976a914a134b5919d09350f6232260ed1313f73ac6b7bae 88ac00000000

Then from the cold wallet, I get the private key:
dumpprivkey mvNAGP5nNef6MHfB6Tcu426MJboBqrwJZV

And I try to sign the transaction from the cold wallet
signrawtransaction '0100000001e21791bb1542cbaa2500d2fd8503eed6d1a3a9d55cd76b868a809541b9e3013d01000 00000ffffffff0130996503000000001976a914a134b5919d09350f6232260ed1313f73ac6b7bae 88ac00000000'  '[{"txid" : "3d01e3b94195808a866bd75cd5a9a3d1d6ee0385fdd20025aacb4215bb9117e2","vout" : 1,"scriptPubKey" : "76a914546e2062ba7c72e2e2589e5ad89a4cbc35b595eb88ac"}]' '["mvNAGP5nNef6MHfB6Tcu426MJboBqrwJZV's private key here"]'

but it returns:
{
"hex" : "0100000001e21791bb1542cbaa2500d2fd8503eed6d1a3a9d55cd76b868a809541b9e3013d01000 00000ffffffff0130996503000000001976a914a134b5919d09350f6232260ed1313f73ac6b7bae 88ac00000000",
"complete" : false
}

What am I doing wrong?
17  Bitcoin / Development & Technical Discussion / Cold signing a transaction using bitcoin-qt on: June 13, 2014, 08:39:06 PM
I'm trying to learn how to sign an offline transaction using bitcoin-qt. I understand armory and electum make such actions easy, so using those wouldn't really help me "learn" how to do such a cold transaction using bitcoin-qt. Just in-case anyone asks. Smiley

If my cold wallet (bitcoin-qt) does not have the full block chain, how do I figure out the scriptPubKey?
18  Bitcoin / Development & Technical Discussion / Re: bitcoin-qt/bitcoind - Calculating raw transaction fees! on: June 12, 2014, 11:59:47 AM
New 'estimatefee' and 'estimatepriority' RPC commands were just pulled into Bitcoin Core.

And I threw up a web page that updates estimates with every new block found:  http://bitcoincore.org/smartfee/

Assuming I got the crontab correct, daily fee/priority estimates will be archived there starting tomorrow.


If I download and install bitcoin-qt 0.9.2, will I get these options?
19  Bitcoin / Development & Technical Discussion / Re: bitcoin-qt/bitcoind - Calculating raw transaction fees! on: June 09, 2014, 08:44:20 AM
Even if you use the settxfee command to set the fee to 0, it does not respect that setting.

AFAIK the transaction fee in Bitcoin-qt/Bitcoin Core is the additional optional fee, but there's already a hard-coded set of rules in the program that determine fees, which can't be turned off.

I'm not trying to turn it off, I am trying to figure out where to get the transaction fee from, so I can use it when running createrawtransaction from bitcoin-qt/bitcoind.
20  Bitcoin / Development & Technical Discussion / Re: bitcoin-qt/bitcoind - Calculating raw transaction fees! on: June 09, 2014, 08:34:34 AM
There isn't one. You have to calculate the size of the transaction, and work out the required fee from that.

This is what I am finding confusing.  I have created a hash value using createrawtransaction and signrawtransaction, and I guess I could work out the byte size of that hash value.  What I find confusing is that I don't get the hash value until createrawtransaction has been executed, and I am supposed to type in the fee value into createrawtransaction.

I am clearling not doing this right, as I seem to be running into a chicken and egg situation.
Pages: [1] 2 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!