Why block height is required in coinbase?

1

In his comment @amaclin pointed to BIP-30 which provides motivation for BIP-34.

I still don't understand what is "to better reason about plausible difficulty for not-yet-connected blocks" but it seems that the sole point of BIP-34 is to prevent intentional creation of duplicate coinbase transactions.

According BIP-30 they can be used in several attacks:

Recently, an attack that exploits the reference implementation's dealing with duplicate transactions was described and demonstrated. It allows reverting fully-confirmed transactions to a single confirmation, making them vulnerable to become unspendable entirely. Another attack is possible that allows forking the block chain for a subset of the network.

This answer by Pieter Wuille explains blockchain forking in more detail.

Contrary to the explanation in BIP-34 pull request, adding block height to coinbase does not guarantee that every subsequent transaction hash is unique. It only makes harder...

0 0
2

So this is to fix duplicate coinbase transactions potentially causing two coinbase transactions becoming invalid?

It makes the duplication ~impossible (save getting a hash collision). There was not previously a behavior where two coinbase transactions became invalid, rather one could replace another— though that is prevented by BIP30.

Why doesn't the client just identify transactions by a mixture of the transaction hash and the parent block

Because transaction exist externally to and independently of blocks. Even if you were willing to create software which only worked with confirmed transactions (e.g. not a full node) you'd still have crazy issues with transaction IDs changing when the chain reorginizes which could itself create some awesome exploits against merchant software.

(Hence removing the bug with no need for a hack)

Including the height as part of the hash for the coinbase transaction is something Bitcoin should have always...

0 0
3

Since Bitcoin block version 2, the coinbase transaction must contain the block height. When we updated the consensus rules to only allow a minimum block version of 4, we regenerated the genesis block to update its nVersion, but forgot to also update its coinbase transaction to include a height. For some reason, the standard launch path does not enforce this for the genesis block, which is why it was missed (I am still identifying the issue). However, -reindex does enforce it for all blocks, which is why several users have reported that -reindex hangs on Activating best chain....

The fix is to relax the consensus rule to only apply if nHeight > 0. This will not cause any forks because any fork would require a new genesis block, which would therefore be a completely separate...

0 0
4

Actually, yes.
Transactions sent on the networks are broadcast across the network instantly. This is why when someone sends you a Bitcoin payment to your Coinbase account, you can see it show up as "pending" right away. Other wallets and some Bitcoin clients can accept these 0 confirmation transactions.

The Coinbase wallet will wait until a transaction has 3 confirmations before marking it as "complete." Other wallets and services will wait for more or less confirmations. There is no arbitrary amount that Bitcoin says you have to follow. But the general rule is: the more confirmations a transaction has, the "safer" it is to accept it. I'm going to go way off on a tangent and get a bit technical, but here's one reason why:

Orphans

Miners (and probably more specifically, mining pools) are the entities in Bitcoin that submit blocks and confirm the transactions. But what happens if two miners submit a block at the same time? This happens more than you...

0 0
5

This is a perceptual image hash calculation tool based on algorithm descibed in Block Mean Value Based Image Perceptual Hashing by Bian Yang, Fan Gu and Xiamu Niu.

Installation

This module is installed via npm:

$ npm install blockhash-js

Use in the browser

To use this library in the browser, you can build it with Browserify with something like browserify index.js --standalone blockhashjs > blockhash.js

Include it and zlib.js on your page:

Blockhash var blockhash = blockhashjs.blockhash;

Call blockhash(src, bits, method, callback), where src is an image URL, bits is the number of bits in a row, method is a number 1-2 (see below), and callback is a function with (error, result) signature. On success, result will be array of binary values.

The available methods are:

Quick and crude, non-overlapping blocks Precise but slower, non-overlapping blocks

Method 2 is recommended as a good tradeoff...

0 0
6

New technology will be deployed when it is ready and has been tested. However, we believe the following is a reasonable schedule for the specific improvements described in the roadmap.

Segregated witness testnet: a separate testnet (not part of the regular testnet) that provides an opportunity for Bitcoin Core contributors to test segregated witness and for wallet authors to begin working with it.

Libsecp256k1 verification: 500% to 700% speed boost on x86_64 hardware during verification to help new full nodes join the network and to lighten the burden on existing nodes.

OP_CHECKSEQUENCEVERIFY: 25,000% improvement in bi-directional payment channel efficiency by allowing users to keep channels open as long as they want.

VersionBits: increase the maximum number of soft forks able to be deployed simultaneously from 1 to 29, allowing for faster and more decentralized future upgrades of the network.

Segregated witness: 175% to...

0 0
7

Bitcoin is divided. Some are calling it the currency’s "constitutional crisis", a debate that has split its community right down the middle.

The crux of the issue comes down to a single technical detail: the size of bitcoin’s blocks.

The question of scale in bitcoin is not a new one. But as transaction volumes are expected to increase in the years ahead, questions about the cryptocurrency’s future composition must, in the eyes of those who favor change, be answered sooner rather than later: who does it serve? How should it look? What makes it unique?

As the block size debate rages on, here's a primer on its broad strokes and why it matters.

What are blocks?

Blocks are batches of transactions which are confirmed and subsequently shared on bitcoin’s public ledger, the blockchain.

In the early days of the currency, these blocks could carry up to 36MB of transaction data apiece. However, in 2010, this was reduced to 1MB to reduce the...

0 0
8

If you’re like me, you’re pretty sick of the bitcoin scaling debate. On the one side, you have the big blockers who want 2MB blocks, entertaining the notion of a network fork to do so. On the other, you have the small blockers, who want to keep the 1MB block limit, but add more scaling through segwit, lightning network and so on. This debate has been going on for literally, years, and there really isn’t an end in sight. Segwit signalling began back in December, and hasn’t even reached 30% of mined blocks signaling (95% is required). Similarly, the current favorite among big blockers is Bitcoin Unlimited, which similarly has consistently less than 30% of mined blocks signaling (it needs 75%).

The reality of the situation is that neither side are going to reach their goals and given that this split in the community has lasted a few years already, I don’t see this being resolved anytime soon. What’s curious to me is that neither side really is planning...

0 0
9

Bitcoin is the currency of the Internet: a distributed, worldwide, decentralized digital money. Unlike traditional currencies such as dollars, bitcoins are issued and managed without any central authority whatsoever: there is no government, company, or bank in charge of Bitcoin. As such, it is more resistant to wild inflation and corrupt banks. With Bitcoin, you can be your own bank.

If you are new to Bitcoin, check out We Use Coins and Bitcoin.org. You can also explore the Bitcoin Wiki:

How to buy bitcoins worldwide
Buying Reddit Gold with bitcoin

Will I earn money by mining bitcoin?

Security guide for beginners - (WIP)

Community guidelines

Do not use URL shortening services: always submit the real link. Begging/asking for bitcoins is absolutely not allowed, no matter how badly you need the bitcoins. Only requests for donations to large, recognized charities are allowed, and only if there is good reason to believe that the person...
0 0
10
CREATE TABLE address ( address_id BIGINT NOT NULL PRIMARY KEY, hash CHAR(36) NOT NULL, balance BIGINT NOT NULL ); CREATE TABLE block ( block_id BIGINT NOT NULL PRIMARY KEY, hash CHAR(64) NOT NULL, time BIGINT NOT NULL, price BIGINT NOT NULL, coinbase CHAR(200) NOT NULL, size BIGINT NOT NULL, difficulty REAL NOT NULL, tx_count INT NOT NULL, tx_output_value BIGINT NOT NULL, fees BIGINT NOT NULL ); CREATE TABLE tx ( tx_id BIGINT NOT NULL PRIMARY KEY, hash CHAR(64) NOT NULL, block_id BIGINT NOT NULL, size BIGINT NOT NULL, fee BIGINT NOT NULL, FOREIGN KEY (block_id) REFERENCES block (block_id) ); CREATE TABLE txin ( txin_id BIGINT NOT NULL PRIMARY KEY, txout_id BIGINT NOT NULL, tx_id BIGINT NOT NULL, position INT NOT NULL, FOREIGN KEY (tx_id) REFERENCES tx (tx_id) ); CREATE TABLE txout ( txout_id BIGINT NOT NULL PRIMARY KEY, address_id BIGINT NOT NULL, value BIGINT NOT NULL, tx_id BIGINT NOT NULL, position INT NOT NULL, FOREIGN...
0 0
11
...
0 0
12
...
0 0
13
keyboard_arrow_leftBack BIP: 22 Title: getblocktemplate - Fundamentals Author: Luke Dashjr Status: Final Type: Standards Track Created: 2012-02-28

Abstract

This BIP describes a new JSON-RPC method for "smart" Bitcoin miners and proxies. Instead of sending a simple block header for hashing, the entire block structure is sent, and left to the miner to (optionally) customize and assemble.

Specification

Block Template Request

A JSON-RPC method is defined, called "getblocktemplate". It accepts exactly one argument, which MUST be an Object of request parameters. If the request parameters include a "mode" key, that is used to explicitly select between the default "template" request or a "proposal".

Block template creation can be influenced by various parameters:

getblocktemplate MUST return a JSON Object containing the following keys:

Transactions Object Format

The Objects listed in the response's...

0 0
14

I have a CSS solution for you, check out this Working Fiddle

DownSide: it requires to Double the ul li elements, (one of them is for taking the real space in the document flow, (he don't render as we want but so will be hidden), and one of them is showed, on top of the other, with the display you want.

HTML:

This stays on one line And this Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed auctor libero neque, nec tristique metus rutrum et. Integer semper libero quis magna placerat, a posuere sem congue.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed auctor libero neque, nec tristique metus rutrum et. Integer semper libero quis magna placerat, a posuere sem congue. This stays on one line And this Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed auctor libero neque, nec tristique metus rutrum et. Integer semper libero quis magna placerat, a posuere sem congue.Lorem ipsum dolor sit amet, consectetur...
0 0
15
Galt

:

You and some of your teammates, especially Andreas Antonopoulos, are outspoken when it comes to the illegitimacy of government regulators. Do you feel bitcoin can be regulated?

Ver: At the end of the day, no, Bitcoin the protocol can’t be regulated. Obviously, men with guns wearing costumes are scary, but a gun can’t change the mathematics behind Bitcoin.

Our goal with Blockchain is to provide the software tools that everyone on the planet can use to send and receive bitcoins to anyone else on the planet without needing permission.

Galt: But without regulations and integration with the financial system, do you think bitcoin can grow to mass scale?

Ver: I do, but it would certainly be a slower process. To be fair, Coinbase and others like them [that offer these regulated services] are incredibly valuable, and offer an easy user interface to buy and sell bitcoins. There’s definitely a need for things like Coinbase in the ecosystem, but at the end of...

0 0
16
...
0 0