Bitcoin Forum
May 21, 2024, 11:14:33 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Where does blockchain store adresses of wallets?  (Read 282 times)
bondcoder (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 1


View Profile WWW
June 19, 2019, 11:12:11 AM
 #1

Hello! I am new person in blockchain technology and I want to fasten my knowledges by writing own primitive version of blockchain. I can not understand where will be my blockchain store wallets public addresses for transactions between users. Should I use helpful database like a MongoDB or MySQL for these purposes? 
bitmover
Legendary
*
Offline Offline

Activity: 2310
Merit: 5957


bitcoindata.science


View Profile WWW
June 19, 2019, 11:26:33 AM
Last edit: June 19, 2019, 04:43:41 PM by bitmover
 #2

Hello! I am new person in blockchain technology and I want to fasten my knowledges by writing own primitive version of blockchain. I can not understand where will be my blockchain store wallets public addresses for transactions between users.

Your wallet is able to create almost unlimited public addresses. Your wallet is basically a seed, which is a mathematical function that canl generate many addresses mathematically related (from that seed).

Those addresses have UTXO (unspent transaction outputs) registered to them, if they have any balance available for them to spent.
Those UTXO are stored in every node in the network (the blockchain), not the addresses or the seed or the wallet, but the UTXO.


from mastering bitcoin by Antonopoulos
Quote
There are no accounts or balances in bitcoin; there are only unspent transaction outputs (UTXO) scattered in the blockchain. Users cannot cut a UTXO in half any more than they can cut a dollar bill in half and use it as currency.
Sending someone bitcoin is creating an unspent transaction output (UTXO) registered to their address and available for them to spend.
https://github.com/bitcoinbook/bitcoinbook


.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
bondcoder (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 1


View Profile WWW
June 19, 2019, 11:55:50 AM
 #3

Thank you for your answer!)
GMAIL RM008
Jr. Member
*
Offline Offline

Activity: 36
Merit: 1


View Profile
June 19, 2019, 02:22:05 PM
 #4

Hello! I am new person in blockchain technology and I want to fasten my knowledges by writing own primitive version of blockchain. I can not understand where will be my blockchain store wallets public addresses for transactions between users. Should I use helpful database like a MongoDB or MySQL for these purposes? 


I think you can Read this article. It will help you a lot to understand the storing sytem.

https://www.bitcoinofamerica.org/blog/where-is-blockchain-stored/
bondcoder (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 1


View Profile WWW
June 19, 2019, 02:41:59 PM
 #5

Thank you for the reference. I understand from this article that it doesn't matter how transaction info stored in the node. The main idea in distributed storage system on different nodes. Type of database on one node touch internal realization and can be various from project to project.
Because it question create a big problem in storing process blockchain data like adresses, transaction lists. Thanks evebody for answer. You  helped me in my problem Smiley
ABCbits
Legendary
*
Offline Offline

Activity: 2884
Merit: 7509


Crypto Swap Exchange


View Profile
June 19, 2019, 03:24:35 PM
Merited by Thirdspace (1)
 #6

For reference, Bitcoin Core use LevelDB and have 3 separate database which are :
1. blocks, which store all blocks
2. chainstate, which store all UTXO
3. txindex, which index of all transaction. It's turned off by default

If you wonder why LevelDB is used, you might want to check https://en.bitcoin.it/wiki/Bitcoin_Core_0.11_(ch_2):_Data_Storage#Use_of_LevelDB

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Thirdspace
Hero Member
*****
Offline Offline

Activity: 1232
Merit: 738


Mixing reinvented for your privacy | chipmixer.com


View Profile
June 19, 2019, 10:58:58 PM
 #7

I can not understand where will be my blockchain store wallets public addresses for transactions between users. Should I use helpful database like a MongoDB or MySQL for these purposes? 
if you're talking about the blockchain of bitcoin, it doesn't actually store public addresses
all nodes use the same standard of LevelDB to store all transaction data, built from raw blocks

if you're talking about the blockchain explorer, you can use the 3 database mentioned by ETFbitcoin
then create your own database for easier implementation for displaying on the web
so web user can search an address and you can easily list all transactions of that address

bondcoder (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 1


View Profile WWW
June 20, 2019, 08:05:48 AM
 #8

Wow, it is really mean that all parameters like adresses, balances, tokens I can calculate from this distributed ledger. Thank you. I started to deep learn creating of keys and it fallen in my mind that address exist only when it appeared in the transaction list (block of blockchain). I read in previous answers about storing transaction in special database LevelDB. Can I change it on MongoDB in my implementation? MongoDB use key-value structure too.
bondcoder (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 1


View Profile WWW
June 21, 2019, 05:41:39 PM
 #9

Yes, you are right, thank you!
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!