Bitcoin Forum
September 23, 2024, 02:24:04 PM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Trying to create a raw transaction - noob troubles on: November 24, 2019, 01:44:36 PM
Hi, I've been working on improving my computer skills and thought bitcoin would be a good avenue to learn.

After a long battle, I finally managed to achieve synchronization of my node and have been trying some commands. I tried sending the simplest transaction I could, and much to my amazement, it worked:

bitcoin-cli createrawtransaction "[{\"txid\":\"5894211487d94fs5484a0f64cb56edf8a4fea5a82s1848782e7d55b45cd12472\",\"vout\":0}]" "[{\"1KNt61bXLPTvs5PhL3m4fp71ndqJWBSQ14\":0.0002}]"

The transaction above was easy because it was a single input and required no change. However, I am trying to spice things up first by including a transaction with change, and then one involving multiple inputs. However, I've run into some minor issues when I tried to make things more interesting.

However when I tried to add a change address and value into a similar transaction.

bitcoin-cli createrawtransaction "[{\"txid\":\"37d53f65g0568e3fd1e4auu7f30b4i0758e69o257f649de62b352931e402g7654\",\"vout\":0}]" "[{\"1EmGo9SAoYpoXmYH3Hm4LX8mMsyDxyDCkH \":0.0003, \"3L4kHNBgRPf5u875UhTd6N57sw4gc7vLa \":0.00005}]"

This returned an error:

error code: -8
error message:
Invalid parameter, key-value pair must contain exactly one key


Not sure where I am going wrong because it doesn't seem like a substantial leap from the first transaction to the second...? If anyone can see where I might be going wrong here I would appreciate the input! Also can anyone recommend where I might find some examples of some raw transactions? Doesn't seem to be too many around that I can find :-/

Thanks in advance everyone. I appreciate the community's help as always!
2  Bitcoin / Bitcoin Technical Support / Re: Trouble syncing my bitcoin core on: November 18, 2019, 11:53:31 AM
Quote
Clearly the blockchain isn't yet fully downloaded, and you seem to realize that now as well. I'm just wondering what made you think it was fully downloaded before?

To be honest I am a bit confused by this too. I had bitcoin-qt open for several days while it downloaded the blockchain. Whenever I load it up bitcoin-qt it always takes a few mins to resync.

However when I run bitcoind, it appears to suggest that I still have a significant way to go to finish downloading the blockchain...? At this point I don't even care, I just want it to sync so I can see my $5 worth of bitcoin transactions. I can only think that perhaps I wasn't downloading the blockchain to the same directory everytime. Although I thought I have been downloading to D:\blocks the whole time, so I'm not sure how that might have happened?
3  Bitcoin / Bitcoin Technical Support / Re: Trouble syncing my bitcoin core on: November 17, 2019, 05:06:21 PM
Thanks for the reply.

One thing I just noticed, which may or may not mean anything. I noticed my bitcoind running, and each line seems to show a hex with a large number of preceding zeros. I am wondering if these are blocks in the blockchain? I also notice that the 'Height' is increasing sequentially and is up to 457642. When I look here: https://live.blockcypher.com/btc/ I notice the 'Height' of the recent block is 604222. Does that mean I only actually have about 2/3 of the blockchain? So I won't see my transactions until I reach the block in the chain in which those transactions were entered?

Sorry for my noobness, I am just guessing here :-/
4  Bitcoin / Bitcoin Technical Support / Trouble syncing my bitcoin core on: November 17, 2019, 12:45:28 PM
Apologies for spamming the board again with my noob problems, I appreciate all the comments from everyone in the community.

I still am having major issues syncing my blockchain with the rest of the network :-/ Not sure what else to try...?

I have my bitcoin-qt running with the blockchain fully downloaded. I have my bitcoind running also. I feel I should be good at this point, but when I use bitcoin-cli and run "bitcoin-cli listreceivedbyaddress 1 true" or getbalance, listunspent. They all display a balance of 0.000. However, when I put my address into Blockchain Explorer, I can see the transactions I sent to this address and correct balance.

For some reason, I just cannot seem to sync my bitcoin core so that my bitcoin-cli reflects this and I can see the transactions? It's very frustrating because I know I must be close, I just cannot seem to make it work. I can only think it must be something wrong with my bitcoin.conf file. I'm not sure if I should have added in some of these "server" or "daemon" flags or included rpc user and password somewhere?

Here is a copy of my file if anyone can make any suggestions?

Thanks again.


# Generated by https://jlopp.github.io/bitcoin-core-config-generator/

# This config should be placed in following path:
# %UserProfile%\AppData\Roaming\Bitcoin\bitcoin.conf

# [core]
# Specify a non-default location to store blockchain data.
blocksdir=D:\\blocks
# Specify a non-default location to store blockchain and other data.
datadir=D:\\blocks

# [wallet]
# Specify wallet database path. Can be specified multiple times to load multiple wallets. Path is interpreted relative to <walletdir> if it is not absolute and will be created if it does not exist.
wallet=D:\\blocks


# [Sections]
# Most options automatically apply to mainnet, testnet, and regtest networks.
# If you want to confine an option to just one network, you should add it in the relevant section.
# EXCEPTIONS: The options addnode, connect, port, bind, rpcport, rpcbind and wallet
# only apply to mainnet unless they appear in the appropriate section below.

# Options only for mainnet
[main]

# Options only for testnet
[test]

# Options only for regtest
[regtest]
5  Bitcoin / Development & Technical Discussion / Re: Just starting out - in need of some assistance on: November 16, 2019, 03:41:06 PM
Quote
EDIT: btw, how did it go one day later ? Are you in sync ?

Need to take a step back and sort out my bitcoin.conf file first.

Thanks for all your help, I will probably post again soon.
6  Bitcoin / Development & Technical Discussion / Re: Just starting out - in need of some assistance on: November 15, 2019, 11:52:11 AM
Quote
Hmm are you in sync ? You can check that you have an up-to-date block chain using the `getblockchaininfo` RPC command.
I'm not sure how you did both main and test network transactions with only one daemon though.
Did you get a transaction ID ?

Thanks for the reply. I have used getblockchaininfo, but I am not sure how to interpret the output? Does it show the hash of the first block in my copy of the blockchain, then I compare it to the hash of the first block everyone else has and if they match then I am in sync? (Sorry just guessing).

Also, apologies if I wasn't clear, I was using both bitcoind and bitcoind -testnet daemons one at a time whenever I was trying to use each wallet.

One thing I don't understand. I was wondering if I should be have used the createwallet command instead of the getnewaddress in order to create the wallet. I'm not sure on the difference between these two commands? The getnewaddress command presumably must require a public key in order to work, but not sure how it does that when I hadn't run createwallet. I think I might be way off base with this one.
7  Bitcoin / Development & Technical Discussion / First wallet and transaction question. on: November 15, 2019, 01:21:09 AM
Hi, I’m in the process of trying to find a way to improve my computer science skills and therefore employability. Ive got to improve my earning potential a lot. I’m interested in bitcoin, so I thought this would be a good way to go.

It’s been tough going so far. I have my bitcoin-qt running with the blockchain downloaded. I have the daemon finally running despite many early problems. I have a question about where to go from here. I’m not in any hurry to start accidentally spamming the bitcoin network with broken transactions, but I’m just wondering what is the shortest route in bitcoin-cli commands to create a wallet and send a transaction. Would it be:

Createwallet
Createrawtransaction
Signrawtransaction
Sendrawtransaction

I’m sure I’m missing several steps on the above list, just wondering if someone can tell me what they are?

Also, I keep seeing an error when I try to experiment with commands related to “RPC” username and password credentials? Not sure what that is, or what I need to do about it?

I would greatly appreciate any comments or observations!

Thanks in advance.
8  Bitcoin / Development & Technical Discussion / Just starting out - in need of some assistance on: November 14, 2019, 11:06:20 PM
Hi, I'm in the process of trying to improve my computer science skills (and employability). I find bitcoin really interesting and thought that this would be a good way to help keep me motivated.

It's been a tough start so far, but I've reached the point of having my bitcoin-cli and daemon up and running. I guess in the grand scheme of learning bitcoin, that means I'm almost at the level of the chimpanzee on the Darwin chart.

I created a couple of wallets in both the MainNet and TestNet environments using the getnewaddress command, and all seems well with them when I run the validateaddress command. I sent some test coins from a few different faucets to my TestNet wallet and sent about $5 to my MainNet one.

However its been a day and I cannot see any sign of the coins in either of my wallets? When I run: getbalance, listunspent or listreceivedbyaddress there is no sign of any coins or transactions. Does TestNet have it's own blockchain? If it does, I have not downloaded it. So that could explain that. I really want to avoid the risk of accidently spamming the MainNet with my broken transactions, so I really hope I can find a way to get the testnet to work.

But not sure why the MainNet coins are not showing? I sent from my own wallet and transaction shows as complete, I also have my bitcoind running along with my bitcoin-qt and an up to date blockchain. Not sure what I am missing here?

I would really appreciate any comments or observations.

Thanks in advance.
9  Bitcoin / Development & Technical Discussion / Re: Total noob question on: November 10, 2019, 06:12:24 PM
Thanks for the replies, but I think I am in over my head a bit. Not sure how to configure this file and with what username and password to use?

Also I don't have an executable for 'bitcoind', only one for bitcoin-ci, bitcoin-wallet and bitcoin-tx.

Can anyone recommend any good books or guides on how I can get set up. Seem to be struggling a bit.

10  Bitcoin / Development & Technical Discussion / Total noob question on: November 10, 2019, 06:06:35 AM
I'm looking to improve my computer skills to hopefully get myself out of the dead end job I'm trapped in. I thought learning about Bitcoin and programming would be a good way to do that. However I have noob issues already.

I am using Windows 10 and downloaded Bitcoin core. I was using bitcoin-qt to download the blockchain which is now complete. So in order to download the blockchain, bitcoind must have been running in the background.

However, I'm not sure what to do from here to use bitcoin-cli? For example when I try to run the command 'getblockchaininfo' I get the error below.

D:\Bitcoin\daemon>bitcoin-cli getblockchaininfo
error: Could not connect to the server 127.0.0.1:8332 (error code 1 - "EOF reached")

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.


If I run 'bitcoind', I get the below:

D:\Bitcoin\daemon>bitcoind
'bitcoind' is not recognized as an internal or external command,
operable program or batch file.


Is there something really simple and obvious I am missing here? Thanks in advance for your help.

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!