Bitcoin Forum
May 09, 2024, 06:39:46 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / What is the blockchain like ? on: June 06, 2016, 06:23:29 AM
please excuse me for the noob like question. But I am asking since I use Electrum and do not run bitcoin-core.

In what form does the blockchain exist on full nodes, is it as a single file or a collection of files ? If more than 1 file are they numbered in any way ?  I am almost certain it is not a single 60+ GB file, since all OSes may not support that.

Does the actual blockchain contain extra data besides the actual blocks (meta data for indexing etc.)?
2  Bitcoin / Development & Technical Discussion / generating public key from private key on the command line on: May 25, 2016, 02:54:49 PM
is there any command line utility that can be used to do the secp256k1 calculation on a given hexadecimal number (private key) and print the result (public key) to stdout in compressed and/or uncompressed form. can this be done using openssl ?
3  Bitcoin / Electrum / Using Electrum for spending from a paper wallet on: May 18, 2016, 11:30:44 PM
It is generally recommended to use a paper wallet like a piggy bank. i.e. you may put funds as many times as you want, but when you spend, withdraw all the funds in the paper wallet and transfer them to another bitcoin address you own. As I understand, this is because importing the private key of the paper wallet introduces a security hole, where the key may be retained on the device used for withdrawing funds and anybody who gains access to it will be in a position to steal any funds at the corresponding address.

If the following procedure is adopted, will it be safe to spend from the paper wallet address multiple times, just like spending from any ordinary address stored in a regular desktop wallet ? I would like to know the views of others.

Procedure
(1) Prepare a paper wallet in a secure way and receive BTC to the address given on it
(2) Have a dedicated PC to use for spending. This can be any old PC with at least 2GB of RAM and capable of booting from a CD or DVD. Ensure that all internal storage media are disconnected from the motherboard except a single CD/DVD drive. Do not connect any external peripherals except the mouse, keyboard, monitor and router/modem
(3) Download and burn to a CD/DVD the latest version of TAILS
(4) Boot the machine with the TAILS live CD and connect to the internet. Use a direct connection to the internet and do not connect via a LAN.
(5) Start Electrum (it comes with TAILS) and use the recovery option with the private key of the paper wallet to create a new wallet, enter a password and confirm when prompted and allow synchronization. This will only have the paper wallet address. (The wallet data will be saved only in the RAM since this is a live session. For added security we use a password so that even this is in encrypted form)
(6) Do any transactions you want and shutdown the computer. Do not save any data for future sessions using another media such as a USB drive. (Electrum will take care that change is returned to your own address, but always check before signing and broadcating)
(7) Repeat the above procedure whenever you need to spend from your paper wallet

The only inconvenience that I notice is that the private key will have to be typed every time the computing is started up. Are there any security risks in the above procedure ?
4  Bitcoin / Development & Technical Discussion / Private keys, Public Keys and Bitcoin Addresses on: May 16, 2016, 12:35:20 PM
from what I have read,

a private key is a 256 bit binary number.

private key ----------elliptic curve multiplication-----> public key

public key -----------sha256 + ripemd160 -----------> public key hash

public key hash -------base58 check encoding------> bitcoin address

now according to the above,

2256 private keys are possible
since elliptic curve multiplication produces a unique public key from each private key, an equal number of corresponding public keys are also possible. But, since the public key goes through RIPEMD160, the public key hash has only 20 bytes or 160 bits. Hence only 2160 bitcoin addresses are possible. Does this mean that each bitcoin address may be associated with more than one private key? Since, if each of 2256 public keys produce only 2160 hashes this means more than one public key produces the same public key hash.

I would appreciate if an expert could clarify this matter ?

5  Bitcoin / Bitcoin Discussion / Bitcoin Halving - here's the math on: May 15, 2016, 03:07:36 PM
The Bitcoin system has been designed so that the reward for mining a block is halved after every 210000 blocks. When block 0 (also known as the genesis block) was mined in early 2009 it was 50 BTC (five billion satoshi) https://blockchain.info/block-index/14849/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

The first halving took place on reaching block 210000 towards the end of 2012, after which the reward for mining a block became 25BTC (2.5 billion satoshi) https://blockchain.info/block-index/270670/000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e It remains at this value today and will continue untill reaching block 419999. From block 420000 the reward will be 12.5 BTC.

It is generally mentioned that the total bitcoins that will ever be mined is approximately 21 million BTC. The math involved here uses geometric progressions (GP) . This is an ordered sequence of numbers where each number (or term) is obtained by multiplying the previous number by a fixed amount. e.g. consider the sequence 1,2,4,8,... here the fixed amount is 2. This is known as the common ratio of the geometric progression and is referred to by the letter 'r'. The letter 'a' is used to refer to the first term of a GP. So for the above GP a = 1 and r = 2.

If the common ratio (r) is a fractional value less than 1, this results in a GP where the terms decrease. e.g. 100000,50000,25000,12500,6250,... is a GP where a = 100000 and r = 1/2. GPs that have such common ratios are said to be convergent. It is a property of all convergent GPs, that the total obtained by adding any number of terms in such a GP (no matter how many terms) will always be less than a fixed value reffered to as the 'sum to infinity' of the GP. We shall refer to this as 'S'. It is obtained according to the simple formula given below

S = a/(1-r)

In other words, to obtain the 'sum to infinity' of a given convergent GP, subtract the common ratio from one, and then divide the first term by the answer obtained. Accordingly, for the GP 100000,50000,25000,12500,6250,... where a = 100000 and r = 1/2, S = 100000/(1-1/2) which gives 200000. What this means in practice is, that no matter how far we continue the above GP, the total obtained by adding together all the terms will always remain below 200000.

Now, let us see how this applies to Bitcoin. Here we will form a GP where the terms will be the total mining reward for a group of 210000 blocks.

for block 000000 to block 209999 total reward = 50 x 210000 = 10500000 BTC
for block 210000 to block 419999 total reward = 25 x 210000 = 5250000 BTC
for block 420000 to block 629999 total reward = 12.5 x 210000 = 2625000 BTC
for block 630000 to block 839999 total reward = 6.25 x 210000 = 1312500 BTC

and so on

It can be seen that we get a GP where a = 10500000 and r = 0.5 (or 1/2)
from this we can see that S = 10500000/(1-0.5) = 21000000

this means that the total reward obtained by mining all blocks that exist at any point in time (whether in the past or the future) will be less than 21000000 BTC. Since it is the bitcoins produced through mining that enter and circulate in the bitcoin economy, this means the total BTC in circulation will always be less than 21 million BTC. It should be noted that this also means that exactly 21 million BTC will never come into existence.

The table given below shows the mining reward in satoshis per block as the block chain grows
( 1 BTC = 100000000 satoshi )

Code:

 start        finish   reward per block
 block        block      (satoshi)

 000000       209999      5000000000
 210000       419999      2500000000
 420000       629999      1250000000
 630000       839999      625000000
 840000      1049999      312500000
1050000      1259999      156250000
1260000      1469999      78125000
1470000      1679999      39062500
1680000      1889999      19531250
1890000      2099999      9765625
2100000      2309999      4882812
2310000      2519999      2441406
2520000      2729999      1220703
2730000      2939999      610351
2940000      3149999      305175
3150000      3359999      152587
3360000      3569999      76293
3570000      3779999      38146
3780000      3989999      19073
3990000      4199999      9536
4200000      4409999      4768
4410000      4619999      2384
4620000      4829999      1192
4830000      5039999      596
5040000      5249999      298
5250000      5459999      149
5460000      5669999      74
5670000      5879999      37
5880000      6089999      18
6090000      6299999      9
6300000      6509999      4
6510000      6719999      2
6720000      6929999      1


Since 1 satoshi is the smallest unit of transaction in the Bitcoin system, when halving results in fractions of a satoshi, the fractional part is discarded. This will first happen on reaching block 2100000 and many times thereafter until ultimately the block reward comes down to 1 satoshi on reaching block 6720000. This means that from block 6930000 there will be no mining reward, and hence no new bitcoins produced through mining. At such a time miners will only get the tranaction fees, but it is expected that by such time the value of 1 BTC will be high enough for transaction fees alone to be sufficient compensation for miners.
If we use the above figures and calculate the total quantity of BTC produced, the figure obtained is 20999999.97480000 BTC, which is 2520000 satoshi less than 21 million BTC, and confirms the fact that the total BTC mined will be less than 21 million BTC as mentioned above.

The Bitcoin system has been designed so that new blocks are produced through mining at an approximate rate of 1 block per 10 minutes, which comes to around 144 blocks per day. So the time taken to reach block 6930000 should be 6930000/144 = 48125 days, which is a little less than 132 years. We know that the genesis block was mined, most probably by Satoshi Nakamoto himself, on 03-01-2009 as indicated on the blockchain at https://blockchain.info/block-index/14849/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f. This means that by the end of 2140, block 6930000 would be reached. This is why it is said that the last satoshi would be mined in 2140, and that no new bitcoins would ever be produced thereafter.
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!