Blockchain ledger storage
up vote
0
down vote
favorite
I've been studying Blockchain since a while and I've been looking out for information explaining where the blockchain ledger is saved and how it is saved locally (as in, locally in a full node). What I have most of the time found is state database being used by Ethereum or Hyperledger Fabric using LevelDB or RocksDB e.t.c for saving state information. I've been struggling real hard to know where the blockchain ledger gets saved apart from states being saved in some on-disk key-value store/database as I am studying LinkedList and Merkle Tree (Hash Tree) which are being used to store new blocks that gets created and being hashed and saved in merkle tree for verification purpose by full nodes and half nodes can query & verify if transactions exist.
Thanks and best,
Rohit
linked-list hyperledger-fabric blockchain ethereum merkle-tree
add a comment |
up vote
0
down vote
favorite
I've been studying Blockchain since a while and I've been looking out for information explaining where the blockchain ledger is saved and how it is saved locally (as in, locally in a full node). What I have most of the time found is state database being used by Ethereum or Hyperledger Fabric using LevelDB or RocksDB e.t.c for saving state information. I've been struggling real hard to know where the blockchain ledger gets saved apart from states being saved in some on-disk key-value store/database as I am studying LinkedList and Merkle Tree (Hash Tree) which are being used to store new blocks that gets created and being hashed and saved in merkle tree for verification purpose by full nodes and half nodes can query & verify if transactions exist.
Thanks and best,
Rohit
linked-list hyperledger-fabric blockchain ethereum merkle-tree
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've been studying Blockchain since a while and I've been looking out for information explaining where the blockchain ledger is saved and how it is saved locally (as in, locally in a full node). What I have most of the time found is state database being used by Ethereum or Hyperledger Fabric using LevelDB or RocksDB e.t.c for saving state information. I've been struggling real hard to know where the blockchain ledger gets saved apart from states being saved in some on-disk key-value store/database as I am studying LinkedList and Merkle Tree (Hash Tree) which are being used to store new blocks that gets created and being hashed and saved in merkle tree for verification purpose by full nodes and half nodes can query & verify if transactions exist.
Thanks and best,
Rohit
linked-list hyperledger-fabric blockchain ethereum merkle-tree
I've been studying Blockchain since a while and I've been looking out for information explaining where the blockchain ledger is saved and how it is saved locally (as in, locally in a full node). What I have most of the time found is state database being used by Ethereum or Hyperledger Fabric using LevelDB or RocksDB e.t.c for saving state information. I've been struggling real hard to know where the blockchain ledger gets saved apart from states being saved in some on-disk key-value store/database as I am studying LinkedList and Merkle Tree (Hash Tree) which are being used to store new blocks that gets created and being hashed and saved in merkle tree for verification purpose by full nodes and half nodes can query & verify if transactions exist.
Thanks and best,
Rohit
linked-list hyperledger-fabric blockchain ethereum merkle-tree
linked-list hyperledger-fabric blockchain ethereum merkle-tree
asked Nov 20 at 9:13
rohitpaniker
1971213
1971213
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
In Bitcoin-core, the blocks are stored in .dat
files in the blocks
filder under the data directory (default on linux is ~/.bitcoin
). These files are not necessarily numbered or organized in any strict fashion, because they are downloaded as available, instead of waiting for each sequential block to become available for download from a peer. For those reasons, the .dat
files There is a levelDB (in ~/.bitcoin/blocks/index
) which indexes the blockchain by storing the names and locations of the .dat
files.
Linked lists and merkle trees are not data storage mechanisms, but abstract data types, which can exist in a database, as flat files, etc. A merkle tree can make validation much faster because it improves the efficiency of the verification algorithms, usually a hash function.
Oh okay so if there are 100 transactions then there would be 100 .dat files, one .dat file per transaction and each transaction is being stored in LevelDB ?
– rohitpaniker
Nov 21 at 11:22
Not quite, one.dat file can contain multiple blocks, which each contains many transactions. LevelDB contains references to the files.
– JBaczuk
Nov 21 at 12:17
add a comment |
up vote
1
down vote
In Hyperledger Fabric, the state database is not for storing all the blocks, it saves the current state of an asset only e.g. if a bank account has a transaction of 10 debit and another transaction of 2 credit, the state DB will have the current value of 8.
The actual blocks are saved in in a local file in peers, which can be queried via the SDK.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
In Bitcoin-core, the blocks are stored in .dat
files in the blocks
filder under the data directory (default on linux is ~/.bitcoin
). These files are not necessarily numbered or organized in any strict fashion, because they are downloaded as available, instead of waiting for each sequential block to become available for download from a peer. For those reasons, the .dat
files There is a levelDB (in ~/.bitcoin/blocks/index
) which indexes the blockchain by storing the names and locations of the .dat
files.
Linked lists and merkle trees are not data storage mechanisms, but abstract data types, which can exist in a database, as flat files, etc. A merkle tree can make validation much faster because it improves the efficiency of the verification algorithms, usually a hash function.
Oh okay so if there are 100 transactions then there would be 100 .dat files, one .dat file per transaction and each transaction is being stored in LevelDB ?
– rohitpaniker
Nov 21 at 11:22
Not quite, one.dat file can contain multiple blocks, which each contains many transactions. LevelDB contains references to the files.
– JBaczuk
Nov 21 at 12:17
add a comment |
up vote
1
down vote
In Bitcoin-core, the blocks are stored in .dat
files in the blocks
filder under the data directory (default on linux is ~/.bitcoin
). These files are not necessarily numbered or organized in any strict fashion, because they are downloaded as available, instead of waiting for each sequential block to become available for download from a peer. For those reasons, the .dat
files There is a levelDB (in ~/.bitcoin/blocks/index
) which indexes the blockchain by storing the names and locations of the .dat
files.
Linked lists and merkle trees are not data storage mechanisms, but abstract data types, which can exist in a database, as flat files, etc. A merkle tree can make validation much faster because it improves the efficiency of the verification algorithms, usually a hash function.
Oh okay so if there are 100 transactions then there would be 100 .dat files, one .dat file per transaction and each transaction is being stored in LevelDB ?
– rohitpaniker
Nov 21 at 11:22
Not quite, one.dat file can contain multiple blocks, which each contains many transactions. LevelDB contains references to the files.
– JBaczuk
Nov 21 at 12:17
add a comment |
up vote
1
down vote
up vote
1
down vote
In Bitcoin-core, the blocks are stored in .dat
files in the blocks
filder under the data directory (default on linux is ~/.bitcoin
). These files are not necessarily numbered or organized in any strict fashion, because they are downloaded as available, instead of waiting for each sequential block to become available for download from a peer. For those reasons, the .dat
files There is a levelDB (in ~/.bitcoin/blocks/index
) which indexes the blockchain by storing the names and locations of the .dat
files.
Linked lists and merkle trees are not data storage mechanisms, but abstract data types, which can exist in a database, as flat files, etc. A merkle tree can make validation much faster because it improves the efficiency of the verification algorithms, usually a hash function.
In Bitcoin-core, the blocks are stored in .dat
files in the blocks
filder under the data directory (default on linux is ~/.bitcoin
). These files are not necessarily numbered or organized in any strict fashion, because they are downloaded as available, instead of waiting for each sequential block to become available for download from a peer. For those reasons, the .dat
files There is a levelDB (in ~/.bitcoin/blocks/index
) which indexes the blockchain by storing the names and locations of the .dat
files.
Linked lists and merkle trees are not data storage mechanisms, but abstract data types, which can exist in a database, as flat files, etc. A merkle tree can make validation much faster because it improves the efficiency of the verification algorithms, usually a hash function.
edited Nov 20 at 14:35
answered Nov 20 at 14:28
JBaczuk
5,36852549
5,36852549
Oh okay so if there are 100 transactions then there would be 100 .dat files, one .dat file per transaction and each transaction is being stored in LevelDB ?
– rohitpaniker
Nov 21 at 11:22
Not quite, one.dat file can contain multiple blocks, which each contains many transactions. LevelDB contains references to the files.
– JBaczuk
Nov 21 at 12:17
add a comment |
Oh okay so if there are 100 transactions then there would be 100 .dat files, one .dat file per transaction and each transaction is being stored in LevelDB ?
– rohitpaniker
Nov 21 at 11:22
Not quite, one.dat file can contain multiple blocks, which each contains many transactions. LevelDB contains references to the files.
– JBaczuk
Nov 21 at 12:17
Oh okay so if there are 100 transactions then there would be 100 .dat files, one .dat file per transaction and each transaction is being stored in LevelDB ?
– rohitpaniker
Nov 21 at 11:22
Oh okay so if there are 100 transactions then there would be 100 .dat files, one .dat file per transaction and each transaction is being stored in LevelDB ?
– rohitpaniker
Nov 21 at 11:22
Not quite, one.dat file can contain multiple blocks, which each contains many transactions. LevelDB contains references to the files.
– JBaczuk
Nov 21 at 12:17
Not quite, one.dat file can contain multiple blocks, which each contains many transactions. LevelDB contains references to the files.
– JBaczuk
Nov 21 at 12:17
add a comment |
up vote
1
down vote
In Hyperledger Fabric, the state database is not for storing all the blocks, it saves the current state of an asset only e.g. if a bank account has a transaction of 10 debit and another transaction of 2 credit, the state DB will have the current value of 8.
The actual blocks are saved in in a local file in peers, which can be queried via the SDK.
add a comment |
up vote
1
down vote
In Hyperledger Fabric, the state database is not for storing all the blocks, it saves the current state of an asset only e.g. if a bank account has a transaction of 10 debit and another transaction of 2 credit, the state DB will have the current value of 8.
The actual blocks are saved in in a local file in peers, which can be queried via the SDK.
add a comment |
up vote
1
down vote
up vote
1
down vote
In Hyperledger Fabric, the state database is not for storing all the blocks, it saves the current state of an asset only e.g. if a bank account has a transaction of 10 debit and another transaction of 2 credit, the state DB will have the current value of 8.
The actual blocks are saved in in a local file in peers, which can be queried via the SDK.
In Hyperledger Fabric, the state database is not for storing all the blocks, it saves the current state of an asset only e.g. if a bank account has a transaction of 10 debit and another transaction of 2 credit, the state DB will have the current value of 8.
The actual blocks are saved in in a local file in peers, which can be queried via the SDK.
answered Nov 20 at 16:28
adnan.c
373112
373112
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53389668%2fblockchain-ledger-storage%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown