26

Note that the accepted answer is outdated. Currently, sequence numbers are mainly used for signaling RBF - replace-by-fee - that allows you to resend a transaction with a higher fee. See https://bitcoincore.org/en/faq/optin_rbf/ , https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki


8

They're exactly the same number; one is written in little endian notation and the other is big endian. Notice that the bytes (two-hex-digit pairs) are exactly reversed from one to the other. Block explorers like blockchain.info usually expect big-endian for block hashes. The proof-of-work requirement means that the most significant bits have to be zero, ...


6

How would you change it to allow it to be spent? In order to make the coinbase spendable, the following changes have to be made to validation.cpp (v0.16.2). Note: as mentioned this would be considered a hard fork. Step 1 - Disable skipping the genesis block (which is intended to keep the bug as part of consensus), Line 1818: // Special case for the ...


6

The design of the blockchain is such that such a scenario is not possible. By definition, the genesis block does not have an ancestor block. While it has a field for the previous block hash, this field is set to all 0's to indicate it is null and has no value set. This means that there are no blocks that come before the genesis block. Additionally the ...


5

There is no technical constraint causing the genesis block's reward to be unspendable forever. It is a bug that has now become the accepted standard. In the future the genesis block reward could be spent but clients must be updated to fix this bug or they will reject blocks containing a valid input referring to this transaction (...


4

Second one is the latest usage before it being totally removed from the source code. It wasn't removed. It just got moved: static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward) { const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for ...


4

You're supposed to run a 2nd daemon and let that one connect to the first one


4

The transaction, like the block, is in a serialized format. A description of the format is available on bitcoin.org


4

The genesis block still must meet the proof of work requirements that other blocks must also meet. So you must actually mine the genesis block. To do this, you need to put CreateGenesisBlock in a while loop and just keep incrementing the nonce, and if necessary, increment an extranonce in the coinbase transaction. To check that it has a valid proof of work, ...


4

I think your misunderstanding is in the assumption that the genesis block must be a block. There is no need for that. For all we care the genesis block is just a specific hash that is used as hashPrevBlock to identify block number 1. It doesn't actually need to correspond to an actual block. Modern Bitcoin software doesn't actually treat the genesis as a ...


4

Looks like amount is a part of block information influencing hashes. Try to debug or log resulting hashes before assert: logging.info("Genesis Block Hash " + consensus.hashGenesisBlock); logging.info("Compared to Hash " + uint256S("0x326bcc5731fba75254090bcd460d2e514c0ba86f91f7ef30ba48ff8a32e99c5e")); And then check debug.log in your coin folder.


4

04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73 The above is actually Bitcoin Script, not just byte data. This breaks down to: 04 # PUSH the next 4 bytes ffff001d # This is the same as the nbits for the block, which was the target for the ...


4

The scriptSig field of a coinbase transaction is special. It doesn't need any signatures at all, as no coins are being spent. The ability to produce new coins, which that input represents, is inherent to the protocol - every block is allowed some fixed amount of produced coins. Requiring a signature on it would be wasteful and pointless. Which key should we ...


3

If you do this, you'll be very disappointed even if you succeed. The genesis block is ignored in terms of effects on the state of coins. The actual Bitcoin genesis block's outputs are effectively unspendable, even if Satoshi showed up with the key.


3

You don't need to have transactions in order to mine. A block always contains at least one transaction, the "coinbase" transaction that says where the block reward should go, but it need not contain any others.


3

The genesis block is hardcoded in the software, as you need a common starting point to start a chain.


3

Problem Solved! The new genesis generator locates at "chainparams.cpp"


3

At least with current versions of the Bitcoin Core client, the Genesis block is actually hard coded into the client. The part of the code that builds this block is located here and I have included a JSON dump of the coinbase transaction below for reference. { "txid" : "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b", "version" : 1,...


3

Create genesis block. Some people get stuck there, it's really easy: find LoadBlockIndex() function, inside, change: paraphrase (pszTimestamp) to any recent news phase. get the latest unix time (do a google), and put in block.nTime. set any nNonce (doesn't really matter), you can change the time/nonce for testnet too, if you want to use it. After you are ...


3

I assume this is referring to the duckduckcoin launch fiasco. For pre-mined coins based on the Bitcoin software, the pre-mined coins typically just go to whoever mines the first few blocks. The idea is that you don't open the software up until those blocks are mined. But if you do, and someone else mines those blocks, they get the pre-mine. To protect ...


3

It is important, because it is used to seed the block and chain databases before syncing can occur (you need a block to build on). It's the root of the tree of blocks, forks, and ultimately the chain tips that represent the chains your software is tracking. It is imported differently to others, as it's coinbase transaction is not included in the UTXO set (...


3

uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); //what this do ? end what put to here The first line describes a minimum difficulty. consensus.nRuleChangeActivationThreshold = 6048; // 75% of 8064 //what this do end what put ? consensus.nMinerConfirmationWindow = 8064; // nPowTargetTimespan / nPowTargetSpacing * 4 //what this ...


3

This is a pay-to-pubkey (P2PK) script, where the transaction contains the destination public key itself. These were common in the early days of Bitcoin, and were originally the type of script that would be created by default by miners (see Why does the default miner implementation use pay-to-pubkey?), though nobody seems to know why this was chosen. ...


3

Does freshly installed bitcoin-core node have genesis block included in the installation? Yes. This fresh node contacts some peer for downloading blockchain. Can malicious peer give node wrong chain? Is this attack possible and how is it mitigated in bitcoin? There is no way for the chain to be "wrong" that would not be detectable to the node. If it's ...


3

On Unix systems the debug.log file, as well as all other files created by the client (blockchain data, databases, etc) are placed by default in ~/.bitcoin; that is, a subdirectory of your home directory named .bitcoin. If you have used -datadir to set a different data directory, debug.log will be placed there instead. Note that the ls command normally will ...


3

Of course, because Bitcoin is (mostly) anonymous, we can't know for sure who has been sending these, let alone their reasons. But some guesses: People donating money to Satoshi, since it's known to be his address. Mistakes. Satoshi's address is commonly used as an example in guides for creating transactions, etc, and it could be that some people copied ...


3

Are the transactions added to the genesis block spendable, just like any other transactions from other blocks, or is that an unspendable coinbase transaction. Transactions aren't spendable; transaction outputs are. Is the transaction within the Genesis block spendable, provided the corresponding private key of the bitcoin recipient is found? The single ...


3

How likely is it that some block from 1 year ago later turns out to be invalid? Very unlikely, but I think that isn't the problem. The problem is, how does a new user find out the current state (UTXO set or equivalent) without having to trust other parties? Any community has dishonest people preying on it. You cannot ignore, expire or invalidate unspent ...


2

2014 methods no longer work. 2017 Bitcoin / Litecoin codebase update http://practicecoin.com/index.php/2017/04/19/genesis-block/ Every cryptocurrency derived from Bitcoin has a Genesis Block, the very first block in the blockchain, whose creation is hard-coded into the full node code. In order to prove that it’s authentic, the usual rules about hashing the ...


2

As a great answer to a related question points out: "merkle root of the genesis block is equal to the hash of the transaction in it" How do I compute merkle root for genesis block?


Only top voted, non community-wiki answers of a minimum length are eligible