Search content
Sort by

Showing 20 of 27 results by oshirowanen
Post
Topic
Board Development & Technical Discussion
Re: How did Charlie Lee do the LTC/BTC atomic swap?
by
oshirowanen
on 08/11/2020, 14:33:54 UTC
Here ya go.  https://github.com/decred/atomicswap

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?

I asked, he said that’s what he believes he used. ¯\_(ツ)_/¯

That's good enough for me.  Thanks for the help!
Post
Topic
Board Development & Technical Discussion
Re: How did Charlie Lee do the LTC/BTC atomic swap?
by
oshirowanen
on 07/11/2020, 20:59:26 UTC

Charlie used Decred for his 2017 LTC/BTC atomic swap?  Is this 100% true?  Surprised if true.
Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Topic OP
How did Charlie Lee do the LTC/BTC atomic swap?
by
oshirowanen
on 07/11/2020, 12:10:39 UTC
⭐ Merited by ETFbitcoin (1)
Apparently Charlie Lee did a LTC/BTC atomic swap back in 2017, but I can't seem to find how he did it:

https://twitter.com/satoshilite/status/911328252928643072?lang=en

Are the steps he took saved anywhere, so I can try reproducing them for "learning-by-example" purposes?
Post
Topic
Board Bitcoin Technical Support
Re: Getting number of bitcoins associated to bitcoin address/public key
by
oshirowanen
on 04/06/2020, 08:58:49 UTC
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?
Post
Topic
(Unknown Title)
by
oshirowanen
on 04/06/2020, 08:57:01 UTC
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.

I think I am looking for something similar to this, but possible even more low level, so I can create my own website.  As in, is it possible to extract all public keys and balances from each block and then save that data in a custom database?  And is that how websites like blockchain.info do it?
Post
Topic
Board Bitcoin Technical Support
Re: Getting number of bitcoins associated to bitcoin address/public key
by
oshirowanen
on 04/06/2020, 08:54:37 UTC
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.
Post
Topic
Board Bitcoin Technical Support
Merits 9 from 4 users
Topic OP
Getting number of bitcoins associated to bitcoin address/public key
by
oshirowanen
on 03/06/2020, 15:17:59 UTC
⭐ Merited by LoyceV (6) ,bitmover (1) ,OmegaStarScream (1) ,o_e_l_e_o (1)
Is it possible to use bitcoin-core's RPC api (assuming the full blockchain is downloaded locally) to type in any public bitcoin address/key and get back the amount of bitcoin associated with that address/key?  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/key 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 close or expensive or both, so was thinking about creating something myself locally.
Post
Topic
Board Development & Technical Discussion
Is it possible to create a simple smart contract using bitcoin-cli?
by
oshirowanen
on 06/05/2018, 19:12:31 UTC
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.
Post
Topic
Board Bitcoin Technical Support
I'm doing something wrong with change address, but don't know what.
by
oshirowanen
on 22/12/2016, 20:38:30 UTC
Can someone please explain what is happening here?

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

In this first screenshot:

http://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:

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

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

http://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?
Post
Topic
Board Electrum
Topic OP
Is electrum centralised or decentralised?
by
oshirowanen
on 14/02/2016, 19:14:48 UTC
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?
Post
Topic
Board Development & Technical Discussion
Re: Cold signing a transaction using bitcoin-qt
by
oshirowanen
on 15/06/2014, 12:54:39 UTC
Thank you very much.  It worked!
Post
Topic
Board Development & Technical Discussion
Re: Cold signing a transaction using bitcoin-qt
by
oshirowanen
on 14/06/2014, 19:53:05 UTC
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?
Post
Topic
Board Development & Technical Discussion
Re: Cold signing a transaction using bitcoin-qt
by
oshirowanen
on 14/06/2014, 19:08:26 UTC
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.
Post
Topic
Board Development & Technical Discussion
Re: Cold signing a transaction using bitcoin-qt
by
oshirowanen
on 14/06/2014, 16:21:57 UTC
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?
Post
Topic
Board Development & Technical Discussion
Re: Cold signing a transaction using bitcoin-qt
by
oshirowanen
on 14/06/2014, 16:15:39 UTC

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.
Post
Topic
Board Development & Technical Discussion
Re: Cold signing a transaction using bitcoin-qt
by
oshirowanen
on 14/06/2014, 16:02:18 UTC
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.
Post
Topic
Board Development & Technical Discussion
Re: Cold signing a transaction using bitcoin-qt
by
oshirowanen
on 14/06/2014, 15:49:52 UTC
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.
Post
Topic
Board Development & Technical Discussion
Re: Cold signing a transaction using bitcoin-qt
by
oshirowanen
on 14/06/2014, 13:02:50 UTC
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?
Post
Topic
Board Development & Technical Discussion
Topic OP
Cold signing a transaction using bitcoin-qt
by
oshirowanen
on 13/06/2014, 20:39:06 UTC
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?
Post
Topic
Board Development & Technical Discussion
Re: bitcoin-qt/bitcoind - Calculating raw transaction fees!
by
oshirowanen
on 12/06/2014, 11:59:47 UTC
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?