Author

Topic: To know a block in mainchain (Read 1045 times)

legendary
Activity: 1512
Merit: 1036
January 01, 2014, 07:20:14 AM
#16
Have a look at an orphan: https://blockchain.info/block-index/239232

Main chain is another way of saying the longest chain.

If two miners mined the same block number at the same time and transmit it to the network equally well, it is unclear which will become part of the main chain until another block is mined - the next mined block will have chosen which one goes into the permanent record, and the other block will be orphaned.

From a user and transaction point of view, this kind of network orphaning doesn't have much impact, as both chains could have your transaction in them, and miners don't have any specific prejudices against a particular Bitcoin user's transactions.

The reason that confirmations are required before a payment is trustable is that a dedicated adversary may be able to fool you with a payment that will never confirm, because they successfully double-spend the coins to someone else. The payment that is included in the blockchain is the permanent one.
full member
Activity: 165
Merit: 102
December 31, 2013, 05:53:27 AM
#15
It depends on your exact application. For most 0 conf is fine

Yes, it depends on the application, but always not edge cases. :-)

I think ZERO confirmation is NOT fine, because a fraud can make a transaction with ZERO transaction fee which will probably never be confirmed !!!
legendary
Activity: 4256
Merit: 1313
December 31, 2013, 05:15:05 AM
#14
It depends on your exact application. For most 0 conf is fine

Yes, it depends on the application, but always not edge cases. :-)
legendary
Activity: 2912
Merit: 1060
December 30, 2013, 10:50:59 PM
#13
It depends on your exact application. For most 0 conf is fine
legendary
Activity: 4256
Merit: 1313
December 30, 2013, 01:07:26 PM
#12
OK ...So when I am checking a transaction in blockchain, if I go by the following process, is that safe ?

1. Checking if no. of confirmation > 6

2. When it is > 6, the block of the transaction is in the main chain.

This will almost always be true. BUT in March 2013 a fork lasted 24 blocks, iirc.  It is unlikely to happen again - these were extremely rare circumstances - but it should be noted.
full member
Activity: 165
Merit: 102
December 30, 2013, 11:01:00 AM
#11
any help ?
full member
Activity: 165
Merit: 102
December 30, 2013, 07:51:55 AM
#10
OK ...So when I am checking a transaction in blockchain, if I go by the following process, is that safe ?

1. Checking if no. of confirmation > 6

2. When it is > 6, the block of the transaction is in the main chain.
legendary
Activity: 2912
Merit: 1060
December 30, 2013, 05:51:01 AM
#9
6 confirmations guarantees that won't happen
That's the point of confirmations
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
December 30, 2013, 05:32:50 AM
#8
6 blocks means 6 confirmations ?

Yes.

I was reading this: https://en.bitcoin.it/wiki/Confirmation

So what I understand, theoretically at any point of time "main_chain":true may get converted to "main_chain":false. But generally it does not happen after 6 confirmations.

Please correct me if I am wrong.


Well the last 6 block be set to "main_chain:false" if there is another longer (at least 7 blocks) but still valid chain and it is very unlikely that this happens. This would only happen if someone had the majority of the hasingpower and would use it not to mine bitcoins but to manipulate the transactions. If you search for "51% attack" you should be able to fine more on that topic.

Does it mean that just after a transaction is made, its block shows "main_chain:false", till its block height fall below 6 of longest chain ?

No, the last block allways shows "main_chain:true" untill there is a longer chain.

Here is one with main_chain:false

https://blockchain.info/rawblock/454891/00000000000000033cb2a1173ec63df6b57b73695154e18be9b84a98efeb521b

As you can see here https://blockchain.info/blocks

it was block #277712 but whoever made Block #277713 used the other #277712 from 2013-12-30 09:56:31 as the previous block and thus this one was set to main_chain:false, which leads to this
transaction https://blockchain.info/tx/38cac86b901154abdfad7715266395ceef39996be10c802a8a0fc3fe412cc154
(the reward for mining the block) never getting a verification.
full member
Activity: 165
Merit: 102
December 30, 2013, 05:13:33 AM
#7
6 blocks means 6 confirmations ?

Yes.

I was reading this: https://en.bitcoin.it/wiki/Confirmation

So what I understand, theoretically at any point of time "main_chain":true may get converted to "main_chain":false. But generally it does not happen after 6 confirmations.

Please correct me if I am wrong.


Well the last 6 block be set to "main_chain:false" if there is another longer (at least 7 blocks) but still valid chain and it is very unlikely that this happens. This would only happen if someone had the majority of the hasingpower and would use it not to mine bitcoins but to manipulate the transactions. If you search for "51% attack" you should be able to fine more on that topic.

Does it mean that just after a transaction is made, its block shows "main_chain:false", till its block height fall below 6 of longest chain ?
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
December 30, 2013, 04:32:48 AM
#6
6 blocks means 6 confirmations ?

Yes.

I was reading this: https://en.bitcoin.it/wiki/Confirmation

So what I understand, theoretically at any point of time "main_chain":true may get converted to "main_chain":false. But generally it does not happen after 6 confirmations.

Please correct me if I am wrong.


Well the last 6 block be set to "main_chain:false" if there is another longer (at least 7 blocks) but still valid chain and it is very unlikely that this happens. This would only happen if someone had the majority of the hasingpower and would use it not to mine bitcoins but to manipulate the transactions. If you search for "51% attack" you should be able to fine more on that topic.
full member
Activity: 165
Merit: 102
December 30, 2013, 04:06:24 AM
#5
6 blocks means 6 confirmations ?

Yes.

I was reading this: https://en.bitcoin.it/wiki/Confirmation

So what I understand, theoretically at any point of time "main_chain":true may get converted to "main_chain":false. But generally it does not happen after 6 confirmations.

Please correct me if I am wrong.
legendary
Activity: 3472
Merit: 4801
December 29, 2013, 05:51:57 PM
#4
6 blocks means 6 confirmations ?

Yes.
full member
Activity: 165
Merit: 102
December 29, 2013, 04:19:54 PM
#3
Since its from 2011, its not. But there might be orphanblocks that are no longer part of the main chain.
Its the reason that transactions take 6 blocks to get fully accepted.

That Block Hash is just an example. 6 blocks means 6 confirmations ?
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
December 29, 2013, 03:44:19 PM
#2
Since its from 2011, its not. But there might be orphanblocks that are no longer part of the main chain.
Its the reason that transactions take 6 blocks to get fully accepted.
full member
Activity: 165
Merit: 102
December 29, 2013, 03:41:12 PM
#1
I have this...

https://blockchain.info/rawblock/00000000000007d0f98d9edca880a6c124e25095712df8952e0439ac7409738a

Here it shows "main_chain":true. After some Tx inside this block get a few confirmation, is it possible that "main_chain":true will convert to "main_chain":false ?
Jump to: