Author

Topic: Would it be possible to develop the negative blockchain? block -1...block -2... (Read 230 times)

hero member
Activity: 2212
Merit: 805
🌀 Cosmic Casino
As long as there is an algorithm that supports it, then it should be fine. But I want to note a couple of things:

  • First, it's a reckless endeavor. There is 0 reasons to build such blockchain unless you plan to do it as a side project and building it for fun.
  • Computers start counting from 0 and 0 itself is the lowest bound for block height. If you start using negative numbers, it only makes it cumbersome and leaves plenty of room for error.

TLDR — it's possible but it's a useless endeavor and current cryptographic algorithmss may not support the development of such.
hero member
Activity: 2268
Merit: 669
Bitcoin Casino Est. 2013
You cannot possibly develop a negative block to bitcoin blockchain because that would be the same as editing an information in a block. What you want to know is about creating your own blockchain right?, and instead of positive numbers is that you want it in negative numbers. I think it's possible in my opinion that you can develop your own blockchain that starts from block 0 to block -1 and so on. If I understand what you mean then is it all about each block having negative numbers instead of positive?. I may be wrong about this so feel free to point it out or correct me.

You're mining normally, just in negative numbers. -999, then -998 etc. You define a new negative genesis block for you, and you mine normally up until -1.
This is what I am thinking about, if there's a negative block so the next block will be a negative too. If I imagine It, I think it will look the same as the blockchain although it's in negative.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
1. You have the current block height, in each and every coinbase transaction, enforced since BIP-34.
You have gone into the technical explanation as to why it is impossible to mine backwards from genesis, but I was responding entirely theoretically, if extending backwards was valid. Obviously, you can't mine block -1, even if you found a hash collision for hash=0.

Quote
2. Even if you wouldn't have it, then still, a single block hash still commits to a single merkle root, so you would have a single coinbase transaction. If you change anything, then you have a different hash.
Correct. Blocks -inf to -1 would have just one coinbase transaction.

Quote
4. The Genesis Block is treated differently, than all other blocks. It is an exception in the code. But: every block needs a previous block hash, and you have to put something here. So, if you have block (-1), then which previous block it references?
You're mining normally, just in negative numbers. -999, then -998 etc. You define a new negative genesis block for you, and you mine normally up until -1.

When I say "infinite", I mean theoretically infinite, or nearly theoretically infinite.
copper member
Activity: 909
Merit: 2301
Quote
to mine an endless number of blocks from minus infinity to -1
This is not how it works.

1. You have the current block height, in each and every coinbase transaction, enforced since BIP-34.
2. Even if you wouldn't have it, then still, a single block hash still commits to a single merkle root, so you would have a single coinbase transaction. If you change anything, then you have a different hash.
3. Even if you would find somehow a way, to maintain the same merkle root, and get different transactions accepted (which is doubtful, because we have duplicated txids, and it wouldn't duplicate anyone's wealth, but only burned some coins as a result), then still, each block header contains a timestamp, and it has to go forward, over a span of 11 blocks, so you cannot use the same time for every block, no matter if you go forwards, or backwards.
4. The Genesis Block is treated differently, than all other blocks. It is an exception in the code. But: every block needs a previous block hash, and you have to put something here. So, if you have block (-1), then which previous block it references? Obviously, you can put zero everywhere, but then, the code protects us from duplicated block IDs in the same way, as it protects us from duplicated transaction IDs: it is used to find this data, and it is treated uniquely. Which means, that both transaction IDs and block IDs are unique, so if your hash for block (-2) is the same, as your hash for block (-1), then you have only one coin.

Also, you can actually experiment with all of that, if you replace the original SHA-256 with some tweaked version, where for original data, you have original hashes, but for your specially crafted data, you have different, weak hashes. Just use a similar way, which was used to make hardened SHA-1, based on SHA-1, but in an opposite direction, and make weakened SHA-256, based on the stronger original. See topic: https://bitcointalksearch.org/topic/hardened-sha-1-vs-weakened-sha-256-how-to-test-them-5467882

Edit: 5. Your peers would not accept an infinite chain, but only coins, up to 2 hours in the future, or in the past. Which means, that you can share only 6 blocks per second in this way (so, 7200 seconds per 2 hours means something around 43200 blocks, which is far less than infinity), even if you avoid Median Time Past 11 blocks rule, by producing identical hashes for different block times, over a span of N blocks.

Edit: 6. The current time of the block is a 32-bit number, which means, that your chain can only consist of 25,769,803,776 blocks, if you change only block time, and nothing else, and it leads you to identical hash somehow. Which is far less than infinity.

Even if you consider running regtest publicly, where blocks can appear at a rate of 6 blocks per second, then still, it gives you only 43,200 blocks per 2 hours, which is far less than infinity. There are many protections in place, to avoid "infinity data bomb", and it is hard to construct the infinitely large .zip file equivalent, even if you can break SHA-256 somehow.

So, if you want to create a large data structures, then having identical hash is not the way to go. Rather, you should produce a chain, where hashes are connected in a "A -> B -> C -> ... -> Z -> A" way, where you have a ring of constantly repeated data.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
You would need 2^256 hashes for each "negative block".
You would need 2^256 hashes for each "negative block" only if you went backwards, but if this logic was enforced, then there would be no way of knowing if the founder used a previous genesis block hash with known pre-image to allow himself to mine an endless number of blocks from minus infinity to -1 with minimum difficulty, and then spend 2^256 hashes to mine backwards only once.
?
Activity: -
Merit: -
I understand, thanks for the answers. The concepts on which this chain is based, tend to be unidirectional (timestamp and hash function). Going in the other direction would be much more tiring and useless.
hero member
Activity: 1386
Merit: 599
From block 0, block 1 originated and then block 2, and so on, with a development on one side of the chain. But what if from block 0, block -1 arose, and then block -2 and so on, developing the other side of the block chain?
Even if you could do it, why would you want to have a negative block and what would be the serving purpose of this!? Makes no sense to reinvent the wheel just go on to the next block and so on.
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
Yes, my assumption was that a "negative" branch of the chain could be generated independent of the "positive" one, starting from block 0.
But regardless of how to identify the blocks in the chain, why weren't blocks added at the other end? Wouldn't the cryptographic efforts be the same?

If there was a way to add transactions in another block which are independent from the chain, this is basically a sidechain.

You are talking about another chain of blocks, you are just using a different name.
copper member
Activity: 821
Merit: 1992
Quote
why weren't blocks added at the other end?
Because it requires finding SHA-256 preimage for a given previous block hash. In case of the Genesis Block, it is set to zero.

Quote
Wouldn't the cryptographic efforts be the same?
You would need 2^256 hashes for each "negative block". But for "positive block", you have the current difficulty, which means something around 2^80 hashes. Which means, that mining a single "negative block" is harder, than mining all of the current chain for 15 years.
?
Activity: -
Merit: -
Yes, my assumption was that a "negative" branch of the chain could be generated independent of the "positive" one, starting from block 0.
But regardless of how to identify the blocks in the chain, why weren't blocks added at the other end? Wouldn't the cryptographic efforts be the same?
copper member
Activity: 821
Merit: 1992
Quote
But what if from block 0, block -1 arose
Then, you need a block, where double SHA-256 of that is equal to zero. Which means, that you can then create any preimage for SHA-256, and then, your hash function is no longer safe.
legendary
Activity: 3472
Merit: 10611
Block height is an arbitrary number that only indicates the position of that block inside the chain. Meaning for example block number 0 indicates the very first block while block number 2 indicates the third block in the chain. There is no "direction" to go, it is a chain.

You can use any numbers to represent this position: A, B, C, D or I, II, III, or -1,-2,-3 or أ,ب,ج,د. The result is the same. You are building a chain of blocks with each new block referencing the last one on the tip.
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
From block 0, block 1 originated and then block 2, and so on, with a development on one side of the chain. But what if from block 0, block -1 arose, and then block -2 and so on, developing the other side of the block chain?

It is not possible because blocks are chained by cryptography. This means that if you change a previous block, all subsequent blocks become invalid (this is why information in the blockchain is immutable)

You can play around here to understand:
https://andersbrownworth.com/blockchain/blockchain

If you change anything in block -1, all blocks after block 0 will become invalid.
?
Activity: -
Merit: -
From block 0, block 1 originated and then block 2, and so on, with a development on one side of the chain. But what if from block 0, block -1 arose, and then block -2 and so on, developing the other side of the block chain?
Jump to: