Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: meetreks on July 24, 2015, 11:27:40 AM



Title: Bitcoin Sequence
Post by: meetreks on July 24, 2015, 11:27:40 AM
Hi,

I am looking at the src using the following link

https://github.com/bitcoin/bitcoin/tree/master/src

What is the sequence with this source so that I can line them up and start debugging it to understand it better?

Is there any better documentation explain this?

Meetreks


Title: Re: Bitcoin Sequence
Post by: cr1776 on July 24, 2015, 12:03:08 PM
Hi,
I am not sure what you mean by "the sequence" and "line them up," but there is documentation here:

https://bitcoin.org/en/developer-documentation

If you can rephrase the question, perhaps we can give you more information.  ;-)


Title: Re: Bitcoin Sequence
Post by: achow101 on July 24, 2015, 03:54:56 PM
Also not sure what you mean by sequence and line them up. However, there are source code docs that are very useful. You can find them here: https://dev.visucore.com/bitcoin/doxygen/


Title: Re: Bitcoin Sequence
Post by: mamafii on July 24, 2015, 04:50:28 PM
bitcoin sequence is Part of all transactions. A number intended to allow unconfirmed time-locked transactions to be updated before being finalized; not currently used except to disable locktime in a transaction
Not To Be Confused With Output index number / vout (this is the 0-indexed number of an output within a transaction used by a later transaction to refer to that specific output)

Links :
Sequence number — Bitcoin.org Developer Guide

Tx message (describes sequence number) — Bitcoin Wiki

What is the sequence number? — Bitcoin StackExchange


Title: Re: Bitcoin Sequence
Post by: meetreks on July 25, 2015, 12:39:24 AM
What I really need is how is the source code sequenced and how to place the code to read them in the order they are executed (if any)


Title: Re: Bitcoin Sequence
Post by: achow101 on July 25, 2015, 01:18:04 AM
What I really need is how is the source code sequenced and how to place the code to read them in the order they are executed (if any)
Take a look at the docs I linked above. They also show the call graphs and flow charts. The first point is AppInit() located in bitcoind.cpp then AppInit2() in init.cpp.


Title: Re: Bitcoin Sequence
Post by: meetreks on July 27, 2015, 05:22:49 AM
Thanks, it is really helpful.

One final note which I wanted to ask.

The DB - is this a file or a DB? If so, what are the underlying modules and schema can you point out?

Meetreks


Title: Re: Bitcoin Sequence
Post by: achow101 on July 27, 2015, 04:37:38 PM
Thanks, it is really helpful.

One final note which I wanted to ask.

The DB - is this a file or a DB? If so, what are the underlying modules and schema can you point out?

Meetreks

What DB? Bitcoin Core uses two databases, Berkeley DB and Level DB. The Berkeley DB file is the wallet file. Or is used in the wallet for sitting you private keys. The level DB is for storing the blockchain. It contains an index of blocks and transactions.


Title: Re: Bitcoin Sequence
Post by: meetreks on July 28, 2015, 12:52:21 AM
Thanks, that was helpful.