Search content
Sort by

Showing 20 of 35 results by BoyFromDubai
Post
Topic
Board Development & Technical Discussion
Topic OP
What is the format data in LevelDB that is for blocks?
by
BoyFromDubai
on 22/05/2023, 13:33:30 UTC
Am I right that LevelDB stores information like number_of_block -> file_for_that_block and it's done for downloading blocks in parallel? If so, then what is the format of data in LevelDB for blocks? And why data of blocks are not sent like block_data + block_num so the receiver can save the file with the got number and we don't need a database?
Post
Topic
Board Development & Technical Discussion
Re: What's happening to a new transaction that was created with the existing txid?
by
BoyFromDubai
on 18/04/2023, 11:04:07 UTC
Thank you a lot! You've really helped me Smiley
Post
Topic
Board Development & Technical Discussion
Re: What's happening to a new transaction that was created with the existing txid?
by
BoyFromDubai
on 18/04/2023, 10:18:40 UTC
It is possible that there could be a txid collision (and in fact they have occurred in the past due to a specific oversight in the protocol), but normally they are extremely unlikely because like private keys, they are effectively 256-bit random numbers. However, collisions are avoided by rejecting new txids duplicating txids of any transactions with unspent outputs (see BIP-30).

Are these transactions actually rejected and deleted from mempool or these transactions are skipped and still waiting for the previous transaction with the same txid will be deleted from LevelDB?

I'm actually asking this question cause I've seen somewhere that when the UTXO is spent, it would be deleted from DB, am I right about it?
Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Re: What's happening to a new transaction that was created with the existing txid?
by
BoyFromDubai
on 18/04/2023, 08:43:19 UTC
⭐ Merited by vapourminer (1)
But what happens to the transaction if the same txid already exists? Cause it can’t be 100% impossible of creating transaction with the unique txid? This transaction will be be waiting in the mempool for the moment when existing txid will be deleted from the LevelDB?
Post
Topic
Board Development & Technical Discussion
Re: What's happening to a new transaction that was created with the existing txid?
by
BoyFromDubai
on 17/04/2023, 18:38:48 UTC
I understand this, but I'm talking about absolutely different transaction because it's possible due to collision and it's not possible that every transaction will have the absolutely unique txid. I mean, that I have created a new tx with spending my own UTXO and the tx got the txid of a tx that is owned by a man who has lost his password.
Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Topic OP
What's happening to a new transaction is created with the same txid?
by
BoyFromDubai
on 17/04/2023, 17:47:22 UTC
⭐ Merited by ETFbitcoin (1)
I know, that LevelDB stores information about all UTXOs. The pairs in there are key + value, where keys is txid + number of vout.
But if one man has some UTXOs and has lost his password, then these UTXOs will be in the DB forever? If i have created a new tx with the same txid that this man had, then my transaction won't be added to the blockchain ever?
Post
Topic
Board Development & Technical Discussion
Re: What data LevelDB stores?
by
BoyFromDubai
on 09/04/2023, 20:11:16 UTC
Can one explain please what does "'C'+ 32-byte transaction hash + output index length + output index" mean?
Firstly i decided, that hex C is stored in DB, but then I saw in there other letters, like T, or R, which are not hex numbers. So does that mean, that it's real letters, which are decoded in bytes via utf-8 for example?
And also it's not clear what output index length means. It means that if real vout index is 16 for example, then in bytes it's compared to '10' which has length of 2, and this output index length == '2' in bytes? And for vout 4096 for example hex representation is '1000', which has length of 4 bytes.
If so, then it's a bit strange. Is there any limit for the number of vouts per transaction, or I can send coins for a million users for example?
Post
Topic
Board Development & Technical Discussion
How bitcoin core handles your own UTXOs?
by
BoyFromDubai
on 27/02/2023, 03:55:37 UTC
I know that all UTXOs are stored in LevelDB, but where your own UTXOs are?
Post
Topic
Board Development & Technical Discussion
Re: What data LevelDB stores?
by
BoyFromDubai
on 09/02/2023, 20:09:11 UTC


What do these letters at the beginning mean? 'c' + smth it means that a key consists of the letter c at the begging + smth?
Post
Topic
Board Development & Technical Discussion
Re: What data LevelDB stores?
by
BoyFromDubai
on 09/02/2023, 11:21:00 UTC
But what kind of data about UTXO is stored in there? I've heard that it's like txid -> data about all UTXOs, but what kind of data? Saw that there are some bits that indicates if a vout is spent or not. And when all bits stand for all vouts are spent, this pair txid -> vouts will be deleted
Post
Topic
Board Development & Technical Discussion
Merits 3 from 2 users
Topic OP
What data stores LevelDB?
by
BoyFromDubai
on 09/02/2023, 00:19:19 UTC
⭐ Merited by vapourminer (2) ,ETFbitcoin (1)
I know that LevelDB stores information about current UTXO in the whole network. But what data exactly in this database, that allows nodes create transactions? For example in a block the fields are: previous hash, timestamp, merkle root, nonce, difficulty and etc. But what are the fields in LevelDB?
Post
Topic
Board Development & Technical Discussion
Re: Why difference in 6 blocks is enough to think the transaction is secure?
by
BoyFromDubai
on 01/02/2023, 13:30:31 UTC
Yes, I know this, but I need mathematical proof
Post
Topic
Board Development & Technical Discussion
Merits 3 from 3 users
Topic OP
Why difference in 6 blocks is enough to think the transaction is secure?
by
BoyFromDubai
on 01/02/2023, 12:55:45 UTC
⭐ Merited by baro77 (1) ,vapourminer (1) ,ETFbitcoin (1)
Everywhere it's said that 6 blocks is enough but why? I'm not talking about the probability that is in Bitcoin whitepaper, but I've heard that it was proven mathematically that it's impossible to attack the chain if the difference is 6 blocks and more. Maybe someone knows where I can find this thing?
Post
Topic
Board Development & Technical Discussion
Re: What is happening with transactions that is unique but with an existing txid?
by
BoyFromDubai
on 26/12/2022, 20:33:00 UTC
Yes, miners need to know about unconfirmed transactions, but they do so via nodes. Usually what happens is that mining pools run several nodes, and then create candidate blocks which are sent to individual miners. The individual miners themselves don't need to keep their own mempool or run their own node, because the mining pool gathers the necessary data for them via its nodes.
In here you’re taking about miners which are a part of a mining pool?
Cause if so, then okey, I didn’t actually look through technical part of these mining pools.
But what about a client who launched his own Bitcoin Core client? Does he have a mempool? Cause as far as I know — yes, he does. But maybe I’m mistaken
Post
Topic
Board Development & Technical Discussion
Re: What is happening with transactions that is unique but with an existing txid?
by
BoyFromDubai
on 25/12/2022, 19:33:57 UTC
It's not miners which are holding the tx in their mempool, it's any node connected to the network.
Why did you say that not miners hold these transactions? Anyone in the network, who have to mine, have to hold it, if I'm not mistaken. Cause miner just takes some transactions from a file and puts it in a new block. Nodes can be far away from each other and it can take some time to get new transactions from another node. (Longer, than just to read them from a file)
And in here https://www.politico.com/newsletters/digital-future-daily/2022/06/21/inside-the-mempool-where-crypto-risks-hide-00041132 it's said: "“Mem” is short for memory, and the mempool is where each network node keeps a list of spending crypto transactions."
If I'm mistaken, correct me please
Post
Topic
Board Development & Technical Discussion
Merits 6 from 2 users
Topic OP
What is happening with transactions that is unique but with an existing txid?
by
BoyFromDubai
on 25/12/2022, 11:25:13 UTC
⭐ Merited by o_e_l_e_o (4) ,ETFbitcoin (2)
According to BIP-30 it's said, that new transaction with the same txid of unspent one won't replace that one, that's still unspent. But what is happening to this new tx that must be inculded to the chain? Miners are holding this new one in the mempool and this tx is waiting for the moment when the existing one with the same txid will be removed from LevelDB that is in chainstate folder? (I'm talking not of doublespending of the same transaction but when it's two different transactions and they have the same txid)
Post
Topic
Board Development & Technical Discussion
Topic OP
Do nodes share their mempool with each other?
by
BoyFromDubai
on 21/12/2022, 12:22:22 UTC
When a new node connects to the network, other nodes start to share new transactions they got. But do they share their mempool, when a node disconnects from the network for some time for example? I think that the mempool size is too large and it would be difficult to share their mempool state, but maybe I'm wrong...
Post
Topic
Board Development & Technical Discussion
Re: Does LevelDB remove spent transaction instantly after creating new block?
by
BoyFromDubai
on 20/12/2022, 14:22:46 UTC
Oh, no. Not after each transaction, ofc. The question was about updating it every block and deleting spent transactions with all spent utxos each block. Does it work that way or it deletes spent transactions every 5 blocks for example
Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Topic OP
Does LevelDB remove spent transaction instantly after creating new block?
by
BoyFromDubai
on 20/12/2022, 12:11:16 UTC
⭐ Merited by ETFbitcoin (1)
I know that LevelDB stores information about UTXOs in the way like txid->utxos. And when all utxos are spent in this transaction, it is removed from DB. But is it an instant action after new block was created, where the last unspent utxo becomes spent?
I mean when the last unspent vout is in DB for txid X and it is spent in the block N, it will be removed from DB after block N instantly?
Post
Topic
Board Development & Technical Discussion
Re: Which files are used for storing information about vouts for a block?
by
BoyFromDubai
on 16/12/2022, 17:09:20 UTC
But what kind of data is stored there? Vins, vouts or both?