Bitcoin Forum
May 21, 2024, 07:41:22 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: To know a block in mainchain  (Read 1025 times)
upal (OP)
Full Member
***
Offline Offline

Activity: 165
Merit: 102


View Profile
December 29, 2013, 08: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 ?
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
December 29, 2013, 08: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.

Im not really here, its just your imagination.
upal (OP)
Full Member
***
Offline Offline

Activity: 165
Merit: 102


View Profile
December 29, 2013, 09: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 ?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
December 29, 2013, 10:51:57 PM
 #4

6 blocks means 6 confirmations ?

Yes.
upal (OP)
Full Member
***
Offline Offline

Activity: 165
Merit: 102


View Profile
December 30, 2013, 09: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.
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
December 30, 2013, 09: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.

Im not really here, its just your imagination.
upal (OP)
Full Member
***
Offline Offline

Activity: 165
Merit: 102


View Profile
December 30, 2013, 10: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 ?
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
December 30, 2013, 10: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.

Im not really here, its just your imagination.
bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
December 30, 2013, 10:51:01 AM
 #9

6 confirmations guarantees that won't happen
That's the point of confirmations

upal (OP)
Full Member
***
Offline Offline

Activity: 165
Merit: 102


View Profile
December 30, 2013, 12:51:55 PM
 #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.
upal (OP)
Full Member
***
Offline Offline

Activity: 165
Merit: 102


View Profile
December 30, 2013, 04:01:00 PM
 #11

any help ?
cr1776
Legendary
*
Offline Offline

Activity: 4046
Merit: 1301


View Profile
December 30, 2013, 06: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.
bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
December 31, 2013, 03:50:59 AM
 #13

It depends on your exact application. For most 0 conf is fine

cr1776
Legendary
*
Offline Offline

Activity: 4046
Merit: 1301


View Profile
December 31, 2013, 10: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. :-)
upal (OP)
Full Member
***
Offline Offline

Activity: 165
Merit: 102


View Profile
December 31, 2013, 10: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 !!!
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1032



View Profile WWW
January 01, 2014, 12:20:14 PM
 #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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!