We changed our privacy policy. Read more.

Hot answers tagged

6

Arvind Narayanan and Jeremy Clark wrote an excellent paper about that: Bitcoin's Academic Pedigree. I recommend reading the paper in full, but the following briefly summarizes the paper's content. Linked timestamping/verifiable logs Bitcoin borrows the blockchain data structure from Bayer, Haber, and Stornetta which described a very similar data structure in ...


5

Security levels First of all, the relation between security level and the number of bits involved is non-trivial, and depends on the sort of attack we're talking about. For what follows, there are roughly 3 ones that matter: preimage resistance of a hash function: This is how hard it is for an attacker to find a piece of data that hashes to a given hash. So,...


4

What happens if, for instance, a block's nonce is so large that the block's size exceeds the limit? The nonce is of a fixed size, 4 bytes. It can not be any other size. Is there any systematic way of setting this limit without knowing how to break SHA256? SHA256 has little to do with the validity of a block, having broken SHA256 in any way would not ...


3

This is written in swift, it's open source and you can check out the source code to get an idea of what's happening: https://github.com/BlockchainCommons/GordianSeedTool-iOS But as I'm coming to understand it myself, I'll attempt to summarize. You need to have a seed (a random number as a starting point) of sufficient entropy, or randomness, that's 2^256 ...


3

Just for fun I made a program to list all record low hashes starting from block 1 ... Max block count: 677124 Block 1 : 00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048 Block 2 : 000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd Block 4 : 000000004ebadb55ee9096c9a2f8880e09da59c0d68b1c228da88e48844a1485 Block ...


3

Ah found my answer, bitcoin's implementation hashes twice the input instead of just once.


3

Assuming SHA256 isn't broken, this isn't possible in Bitcoin, as the only way to find data that hashes to the same thing is when the data is the same. Since every Bitcoin block contains a hash of its parent, and thus indirectly commits to its entire ancestry, blocks with distinct history will always have distinct contents. This is probably the case for many ...


2

Concatenation means the joining of the second sequence at the end of the first sequence. For example, with strings, the concatenation of "hello, " and "world" produces the string "hello, world". For TXIDs, they are taken as a 32-byte array. The concatenation of the two TXIDs produces an array of 64 bytes, which then becomes the ...


2

My question is: Say I know that the message b 'added' with the number a gets mapped to my desired output. Why is it not possible for me, given a different block (b2) to find a corresponding number (a2), such that the hash of the result will map to the same number c? It's not possible because there are 2^256 (approximately 1 followed by 77 zeroes) possible ...


2

If you have found a new valid block at the network's chaintip, then you should submit that block to your network peers as soon as possible, so that they will hopefully add it to their local blockchain record. If other miners build upon your block, then it should become a part of the valid chain, and you will eventually be able to spend the coinbase UTXO in ...


2

Short answer: you will "probably" find a collision after 2^128 attempts. The concept you are looking for is called the birthday problem, explained also very well in this video by Professor Christoph Parr. One of the approximations from The Birthday Problem is that given a random output space of size n, the probability of an input collision ...


2

Your padding is correct, but you don't need to pad. It appears that the SHA256 implementation you're using already performs the padding itself (demonstrated by the fact that it works correctly when presented with the unpadded block header as input). Thus, if you instead pad it manually, the effectively computed hash is the result of performing the padding ...


2

You’re falling afoul of endianness. To promote equality, Satoshi sought to use Big Endian representation for hashes in Bitcoin, which have the byte order the opposite of what you are producing.


2

If the number of leaves is exactly a power of two (i.e., n = 2k), then the number of hashes performed is exactly n-1. This is easy to see: every hash operation takes two inputs, and reduces them to a single one. After n-1 operations, that means n nodes are reduced to 1, and that one is the Merkle root. When the number of leaves is not a power of two, it's a ...


2

I’ll omit some details to keep the answer compact but the general idea is this: An elliptic curve point is a two dimensional point (x, y) where the x and y coordinates follow the curve equation y^2 = x^3 + 7 A private key is just an integer in the range 1.. 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 A public key is an EC point (two ...


1

In Bitcoin's consensus rules (block and transaction validity rules): Transactions hashes (txids and wtxids) are computed as double-SHA256 of their serialization (without and with witness data, respectively). Block Merkle roots are computed by repeatedly pairwise double-SHA256 hashing, starting from the list of txids in a block, until only a single element ...


1

def CalcKernelHash(stakeModifier, coinstakeTime, masternodeId): stakeModifier = binascii.unhexlify(stakeModifier) coinstakeTime = binascii.unhexlify(hex(coinstakeTime)[2:]) collateral = binascii.unhexlify("0000000000204AA9D1010000") masternodeId = binascii.unhexlify(masternodeId) bin_s = stakeModifier[::-1] + coinstakeTime[:...


1

As of October 2020, the block with the lowest hash is 000000000000000000000003681c2df35533c9578fb6aace040b0dfe0d446413.


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