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: account-compression/sdk/idl/spl_account_compression.json
+14-10Lines changed: 14 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -54,19 +54,22 @@
54
54
{
55
55
"name": "prepareTree",
56
56
"docs": [
57
-
"In order to initialize a tree with a root, we need to create the tree on-chain first with the proper authority.",
58
-
"The tree might contain a canopy, which is a cache of the uppermost nodes.",
59
-
"The canopy is used to decrease the size of the proof required to update the tree.",
57
+
"In order to initialize a tree with a root, we need to create the tree on-chain first with",
58
+
"the proper authority. The tree might contain a canopy, which is a cache of the uppermost",
59
+
"nodes. The canopy is used to decrease the size of the proof required to update the tree.",
60
60
"If the tree is expected to have a canopy, it needs to be prefilled with the necessary nodes.",
61
61
"There are 2 ways to initialize a merkle tree:",
62
62
"1. Initialize an empty tree",
63
63
"2. Initialize a tree with a root and leaf",
64
-
"For the former case, the canopy will be empty which is expected for an empty tree. The expected flow is `init_empty_merkle_tree`.",
65
-
"For the latter case, the canopy should be filled with the necessary nodes to render the tree usable.",
66
-
"Thus we need to prefill the canopy with the necessary nodes.",
67
-
"The expected flow for a tree without canopy is `prepare_tree` -> `init_merkle_tree_with_root`.",
68
-
"The expected flow for a tree with canopy is `prepare_tree` -> `append_canopy_nodes` (multiple times until all of the canopy is filled) -> `init_merkle_tree_with_root`.",
69
-
"This instruction initializes the tree header while leaving the tree itself uninitialized. This allows distinguishing between an empty tree and a tree prepare to be initialized with a root."
64
+
"For the former case, the canopy will be empty which is expected for an empty tree. The",
65
+
"expected flow is `init_empty_merkle_tree`. For the latter case, the canopy should be",
66
+
"filled with the necessary nodes to render the tree usable. Thus we need to prefill the",
67
+
"canopy with the necessary nodes. The expected flow for a tree without canopy is",
68
+
"`prepare_tree` -> `init_merkle_tree_with_root`. The expected flow for a tree with canopy",
69
+
"is `prepare_tree` -> `append_canopy_nodes` (multiple times until all of the canopy is",
70
+
"filled) -> `init_merkle_tree_with_root`. This instruction initializes the tree header",
71
+
"while leaving the tree itself uninitialized. This allows distinguishing between an empty",
72
+
"tree and a tree prepare to be initialized with a root."
70
73
],
71
74
"accounts": [
72
75
{
@@ -105,7 +108,8 @@
105
108
"name": "appendCanopyNodes",
106
109
"docs": [
107
110
"This instruction pre-initializes the canopy with the specified leaf nodes of the canopy.",
108
-
"This is intended to be used after `prepare_tree` and in conjunction with the `init_merkle_tree_with_root` instruction that'll finalize the tree initialization."
111
+
"This is intended to be used after `prepare_tree` and in conjunction with the",
112
+
"`init_merkle_tree_with_root` instruction that'll finalize the tree initialization."
0 commit comments