Author

Topic: very basic questions about bitcoin (about paper wallet and node IPs) (Read 616 times)

legendary
Activity: 3542
Merit: 1965
Leading Crypto Sports Betting & Casino Platform
The Bitcoin address you created, are created in such a way that it would be a valid address to transfer bitcoins too, if you wanted to do it. So all transaction, where you transfer coins to that Bitcoin address, will be reflected on the Blockchain, even if it is offline. { a piece of paper in your desk }

https://www.bitaddress.org just makes sure that your Bitcoin address and private key is valid. It's just a automated script to generate valid Bitcoin addresses and private keys. So when you want to use those coins, you simply need to sweep it online and your private key will validate that you own those coins. ^smile^

staff
Activity: 3458
Merit: 6793
Just writing some code
- snip -
these IPs must be there somewhere in the code
- snip -

https://github.com/bitcoin/bitcoin/blob/05e1c85fb687c82ae477c72d4a7e2d6b0c692167/src/chainparams.cpp#L116
Code:
vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be", true)); // Pieter Wuille
vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me")); // Matt Corallo
vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr
vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); // Christian Decker
vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); // Jeff Garzik
vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch", true)); // Jonas Schnelli

If your node hasn't saved any previously connected nodes yet, then it can connect to these initially.

Once you are connected to the network, your peer will collect connection information about other nodes.  The next time it starts up, it will use its own list of known peers.
If for some reason the node is unable to connect to one of the above DNS seeders, it will fall back to the list of IP addresses encoded in https://github.com/bitcoin/bitcoin/blob/master/src/chainparamsseeds.h. These are the hex representation of the IP's listed in https://github.com/bitcoin/bitcoin/blob/master/contrib/seeds/nodes_main.txt and https://github.com/bitcoin/bitcoin/blob/master/contrib/seeds/nodes_test.txt.


The short answer is that they don't know before you attempt to use them. The private keys are a standard format, a base 63 number if I remember that right, and so all that is required of your private key (i.e. the generated secret from bitaddress.org) is that it's created in conformance with that pretty simple specification.
Private keys are always 256 bit numbers. The base doesn't matter. It only matters for encoding the private key to be easily transported. The standard Wallet Import Format uses Bitcoin's Base58Check encoding which encodes private keys, public key hashes, and script hashes in base58 along with an additional checksum and version number.
legendary
Activity: 1358
Merit: 1000
The addresses arn't on the blockchain until they are used, if u enter the public address into a blockchain search and it shows up

its just showing u the address is empty and has zero transactions therefore it hasn't been used and is not on the blockchain

it should also tell you whether this was a genuine Bitcoin public address that you typed in the search bar.
legendary
Activity: 3472
Merit: 4801
- snip -
these IPs must be there somewhere in the code
- snip -

https://github.com/bitcoin/bitcoin/blob/05e1c85fb687c82ae477c72d4a7e2d6b0c692167/src/chainparams.cpp#L116
Code:
vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be", true)); // Pieter Wuille
vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me")); // Matt Corallo
vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr
vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); // Christian Decker
vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); // Jeff Garzik
vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch", true)); // Jonas Schnelli

If your node hasn't saved any previously connected nodes yet, then it can connect to these initially.

Once you are connected to the network, your peer will collect connection information about other nodes.  The next time it starts up, it will use its own list of known peers.

1. Lets say, if I create an offline wallet and a secret using https://www.bitaddress.org and never ever connect to internet while creating this address, how does all the blockchains stored in the world know that such address exists and that such address has that secret?

The blockchain doesn't know. It doesn't need to know.

How does a wallet address which is generated offline, works in online world.

Addresses don't actually exist at the blockchain or transaction level of the protocol.  Addresses are just a shorthand that we humans use to make it easier to talk about transferring control over value.  When we type an address into a wallet, the wallet understands what that means and converts the address into a transaction output script (essentially a small computer program) that is stored with the transaction in the blockchain.  The script controls what a recipient must do to spend the bitcoins later.

So, when you tell someone to send you bitcoins at a particular address, you're actually asking them to create a script that will encumber a transaction output with a requirement that you will have to meet later when you want to spend those bitcoins.

(I know that to use those BTC, I will need to download entire blockchain or use some online wallet)

All you really need is to know for certain that the output is a valid output in the blockchain, and know what the script requirements are.  Typically this is handled with a wallet, and many wallets handle this by downloading the entire blockchain, but technically it isn't necessary to download the entire blockchain or to use wallet software.

Edit - 1. I think, when any transaction is broadcasted, a secret key is also broadcasted.

No.  Secrets are never broadcast.  If they were, they would no longer be a secret. The secret key is always to be kept secure and not to be shared.

If the wallet address is being broadcasted for the 1st time to the blockchain network, the secret key is matched to that address. and so in future that secret keys gives me access to those bitcoins.

No.  See my comments above about how transactions are built.  Wallet addresses and secret keys are not broadcast or matched.
newbie
Activity: 11
Merit: 0
I downloaded bitcoin from https://github.com/bitcoin/bitcoin and compiled and now I have bitcoind running. So, these IPs must be there somewhere in the code of https://github.com/bitcoin/bitcoin

can someone please help me understand this.
legendary
Activity: 3430
Merit: 3080
there is a list of hard coded whitelisted seeding nodes in the client.

Can you please tell me where is that list? which file?

Don't know. It will be compiled into the binary file, hence why I say "hardcoded". If you wish to ignore that list and specify an IP of your preference, I believe there are command line arguments for that (certainly in the case of the latter).
newbie
Activity: 11
Merit: 0
there is a list of hard coded whitelisted seeding nodes in the client.

Can you please tell me where is that list? which file?
legendary
Activity: 3430
Merit: 3080
I have 2 very basic question.

1. Lets say, if I create an offline wallet and a secret using https://www.bitaddress.org and never ever connect to internet while creating this address, how does all the blockchains stored in the world know that such address exists and that such address has that secret? How does a wallet address which is generated offline, works in online world.
(I know that to use those BTC, I will need to download entire blockchain or use some online wallet)

The short answer is that they don't know before you attempt to use them. The private keys are a standard format, a base 63 number if I remember that right, and so all that is required of your private key (i.e. the generated secret from bitaddress.org) is that it's created in conformance with that pretty simple specification.

2. When I run bitcoind on my linux machine, how does it come to know about the IP addresses of nodes? I mean, it downloads entire blockchain on my PC but from which nodes does it download? It must be making some 1st connection to come central bitcoin core IP and from there it must be getting diverted to other node IPs.

Edit - 1. I think, when any transaction is broadcasted, a secret key is also broadcasted. If the wallet address is being broadcasted for the 1st time to the blockchain network, the secret key is matched to that address. and so in future that secret keys gives me access to those bitcoins.

Yes, there is a list of hard coded whitelisted seeding nodes in the client. They only provide a list of peers to yours, they rarely upload much blockdata. I'm not sure if there is some other discovery mechanism also, but that's certainly one way it happens.
newbie
Activity: 11
Merit: 0
I have 2 very basic question.

1. Lets say, if I create an offline wallet and a secret using https://www.bitaddress.org and never ever connect to internet while creating this address, how does all the blockchains stored in the world know that such address exists and that such address has that secret? How does a wallet address which is generated offline, works in online world.
(I know that to use those BTC, I will need to download entire blockchain or use some online wallet)


2. When I run bitcoind on my linux machine, how does it come to know about the IP addresses of nodes? I mean, it downloads entire blockchain on my PC but from which nodes does it download? It must be making some 1st connection to come central bitcoin core IP and from there it must be getting diverted to other node IPs.

Edit - 1. I think, when any transaction is broadcasted, a secret key is also broadcasted. If the wallet address is being broadcasted for the 1st time to the blockchain network, the secret key is matched to that address. and so in future that secret keys gives me access to those bitcoins.
Jump to: