Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit b8615ab

Browse files
StanChengundotra
andauthored
Account compression: Init with root allowing trees with a canopy (#6764)
* preinitialize_canopy method with the major modifications to the canopy tests for the canopy are included, the bpf/sbf tests for the contract will follow * append canopy nodes implementation tests will be added later in a form of integration tests next steps: - verify the zero-ed check is valid for the tree; - drop is_initialized_wrapped method. * init_merkle_tree_with_root and refactored prepare_tree * rename init_merkle_tree_with_root into finalize_merkle_tree_with_root * using the Modify context for append_canopy_nodes and finalize_merkle_tree_with_root as the merkle tree account will not be zeroed at that point * tests for preparing and finalizing an offline built tree * cleanup and formatting for rust code * regenerated sdk * fmt/prettier on the new changes in js/ts * cleanup * cargo clippy over new code * nit: updating a comment for Modify context on account compression to better reflect its usage * using the stackoverflow-safe version of the initialize_with_root call + minor fmt * fixed an issue with addressing a canopy directly, without the check for emptiness * alligned the comment style for a constant with other comments * extended the concurrent merkle tree header with a is_batch_initialized flag + comments fixed * updated close account to allow closing prepared and not finalized accounts + updated comments on append_canopy_nodes to reflect the possibility to replace those * adding more tests * refactored tree unitialized check on bytes directly, also moved tree initialization call in a wrapper as it started reporting a stack overflow * typo fix + a docstring for tree_bytes_uninitialized + removed unused import * naming changes * lint the ts * minor naming adjustment in comments * fix formatting, update lock file and generated idl versions * using node 20.5 for 2 workflows that are failing bumped the node version to the latest used in some other flows trying to narrow down the build issue * update versions for release --------- Co-authored-by: Noah Gundotra <[email protected]> Co-authored-by: Noah Gundotra <[email protected]>
1 parent 992c299 commit b8615ab

29 files changed

+2117
-109
lines changed

.github/workflows/pull-request-account-compression.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
js-test-account-compression:
8080
runs-on: ubuntu-latest
8181
env:
82-
NODE_VERSION: 16.x
82+
NODE_VERSION: 20.5
8383
steps:
8484
- uses: actions/checkout@v4
8585
- name: Use Node.js ${{ env.NODE_VERSION }}

.github/workflows/pull-request-libraries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
js-test:
6767
runs-on: ubuntu-latest
6868
env:
69-
NODE_VERSION: 16.x
69+
NODE_VERSION: 20.5
7070
steps:
7171
- uses: actions/checkout@v4
7272
- name: Use Node.js ${{ env.NODE_VERSION }}

account-compression/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

account-compression/programs/account-compression/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "spl-account-compression"
3-
version = "0.3.1"
3+
version = "0.4.0"
44
description = "Solana Program Library Account Compression Program"
55
authors = ["Solana Labs Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
@@ -21,7 +21,7 @@ default = []
2121
anchor-lang = "0.29.0"
2222
bytemuck = "1.13"
2323
solana-program = ">=1.18.11,<=2"
24-
spl-concurrent-merkle-tree = { version = "0.3.0", path = "../../../libraries/concurrent-merkle-tree" }
24+
spl-concurrent-merkle-tree = { version = "0.4.0", path = "../../../libraries/concurrent-merkle-tree" }
2525
spl-noop = { version = "0.2.0", path = "../noop", features = ["no-entrypoint"] }
2626

2727
[profile.release]

0 commit comments

Comments
 (0)