You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 11, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/src/account-compression.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,22 +8,22 @@ This on-chain program provides an interface for composing smart-contracts to cre
8
8
9
9
- The high throughput of the Solana blockchain has increased the creation of Non fungible assets i.e NFTs due to their custodial ownership and censorship resistance characteristics. However, the practical use cases of these NFTs are limited by network storage costs when these are created at scale. It's rather inexpensive to mint a single non fungible token, however as you increase the quantity the cost of storing the asset's data on-chain becomes uneconomical.
10
10
11
-
- To fix this we must ensure the cost per token is as close to zero as possible. The solution is to store a compressed hash of the asset data on chain while maintaining the actual data off chain in a database. The program provides a way to verify the off chain data on chain and also make concurrent writes to the data. In-order to do this we introduced a new data structure called a Concurrent Merkle Tree that avoids proof collision while making concurrent writes.
11
+
- To fix this we must ensure the cost per token is as close to zero as possible. The solution is to store a compressed hash of the asset data on chain while maintaining the actual data off chain in a database. The program provides a way to verify the off chain data on chain and also make concurrent writes to the data. Inorder to do this we introduced a new data structure called a Concurrent Merkle Tree that avoids proof collision while making concurrent writes.
12
12
13
13
14
14
## Background
15
15
16
16
The account compression program is currently being used for the [Metaplex Bubblegum Program](https://github.com/metaplex-foundation/metaplex-program-library/blob/master/bubblegum/)
17
17
18
-
To solve the problem of the high on-chain storage cost per unit of these assets, we need to store a compressed fingrprint on-chain that can verify the off-chain asset data. To do this we need
18
+
To solve the problem of the high on-chain storage cost per unit of these assets, we need to store a compressed fingerprint on-chain that can verify the off-chain asset data. To do this we need
19
19
- Concurrent Merkle Trees
20
-
- The concurrent merkle tress allows us to compress all the data into a single root hash stored on-chain while allowing concurrent replacements and appends to the data.
20
+
- The concurrent merkle trees allow us to compress all the data into a single root hash stored on-chain while allowing concurrent replacements and appends to the data.
21
21
- Program indexer
22
-
- The indexer is incharge of indexing the latest writes to the tree on chain so you know which nodes have been replaced and which have been appended to so you can avoid proof collision
22
+
- The indexer is in charge of indexing the latest writes to the tree on chain so you know which nodes have been replaced and which have been appended to so you can avoid proof collision
23
23
- Off-chain Database
24
24
- The db stores the actual asset data on chain as we are only storing the merkle root on chain and we need to be able to verify the data on chain.
25
25
26
-
The crux of the this is the concurrent merkle tree and we shall learn about it in the next section.
26
+
The crux of this is the concurrent merkle tree and we shall learn about it in the next section.
27
27
28
28
## Source
29
29
@@ -50,8 +50,8 @@ The Account Compression Program is written in rust and also has a typescript sdk
50
50
51
51
Testing contracts locally requires the SDK to be built.
52
52
53
-
With a built local SDK, the test suite can be ran with:
53
+
With a built local SDK, the test suite can be run with:
0 commit comments