Bitcoin Forum
May 02, 2024, 03:37:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: very basic questions about bitcoin (about paper wallet and node IPs)  (Read 591 times)
raj1234567890 (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
September 20, 2016, 10:12:55 PM
 #1

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.
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714664226
Hero Member
*
Offline Offline

Posts: 1714664226

View Profile Personal Message (Offline)

Ignore
1714664226
Reply with quote  #2

1714664226
Report to moderator
Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3071



View Profile
September 20, 2016, 10:26:32 PM
 #2

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.

Vires in numeris
raj1234567890 (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
September 20, 2016, 10:29:04 PM
 #3

there is a list of hard coded whitelisted seeding nodes in the client.

Can you please tell me where is that list? which file?
Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3071



View Profile
September 20, 2016, 10:32:16 PM
 #4

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).

Vires in numeris
raj1234567890 (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
September 20, 2016, 10:45:51 PM
 #5

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.
DannyHamilton
Legendary
*
Online Online

Activity: 3388
Merit: 4613



View Profile
September 21, 2016, 01:46:15 AM
Last edit: September 21, 2016, 01:56:58 AM by DannyHamilton
 #6

- 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.
Bitcoinpro
Legendary
*
Offline Offline

Activity: 1344
Merit: 1000



View Profile
September 21, 2016, 02:24:42 AM
 #7

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.

WWW.FACEBOOK.COM

CRYPTOCURRENCY CENTRAL BANK

LTC: LP7bcFENVL9vdmUVea1M6FMyjSmUfsMVYf
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6577


Just writing some code


View Profile WWW
September 21, 2016, 02:30:26 AM
 #8

- 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.

Kakmakr
Legendary
*
Offline Offline

Activity: 3430
Merit: 1957

Leading Crypto Sports Betting & Casino Platform


View Profile
September 21, 2016, 05:54:56 AM
 #9

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^


..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!