Skip to content

feat: compressible proc macro draft #1857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
551f0f1
wip
SwenSchaeferjohann Jul 3, 2025
d2d0948
add compress_pda helper
SwenSchaeferjohann Jul 3, 2025
88e043d
compress_pda compiling
SwenSchaeferjohann Jul 3, 2025
152b6e2
decompress_idempotent.rs
SwenSchaeferjohann Jul 4, 2025
567d9f6
wip
SwenSchaeferjohann Jul 4, 2025
117d354
wip
SwenSchaeferjohann Jul 4, 2025
9d78913
decompress batch idempotent
SwenSchaeferjohann Jul 4, 2025
baf768f
wip
SwenSchaeferjohann Jul 4, 2025
ec3b731
add compress_pda_new and compress_multiple_pdas_new
SwenSchaeferjohann Jul 4, 2025
adfcf9f
native program with decompress done
SwenSchaeferjohann Jul 6, 2025
43e87ca
compress_dynamic, decompress_dynamic
SwenSchaeferjohann Jul 6, 2025
f34254e
wip
SwenSchaeferjohann Jul 6, 2025
7679d8b
adding anchor
SwenSchaeferjohann Jul 6, 2025
d2774f3
testprogram uses sdk
SwenSchaeferjohann Jul 6, 2025
97c9822
fix compilation
SwenSchaeferjohann Jul 6, 2025
bc645a6
wip
SwenSchaeferjohann Jul 6, 2025
35821ec
experiment with procmacro
SwenSchaeferjohann Jul 6, 2025
bbf7d2c
skip SLOT check at compress_pda_new
SwenSchaeferjohann Jul 6, 2025
7cc5364
wip
SwenSchaeferjohann Jul 7, 2025
c8a4d30
add_compressible_instructions() works for compress, idl gen works
SwenSchaeferjohann Jul 7, 2025
4d36fd0
add proc macro
SwenSchaeferjohann Jul 7, 2025
f8c8b0b
decompress_multiple_pdas is working as it should
SwenSchaeferjohann Jul 7, 2025
eb6aada
fix decompress_idempotent impl
SwenSchaeferjohann Jul 8, 2025
39183f0
rm expanded
SwenSchaeferjohann Jul 8, 2025
ef86810
add remove_data
SwenSchaeferjohann Jul 8, 2025
c93e86c
force apps to pass the whole signer_seeds directly
SwenSchaeferjohann Jul 9, 2025
cc2fde5
add compressible_config draft
SwenSchaeferjohann Jul 9, 2025
b13d0c7
add create_config_unchecked and checked
SwenSchaeferjohann Jul 9, 2025
5cc5ff4
use config, add unified header struct (just last_written_slot) for now
SwenSchaeferjohann Jul 9, 2025
f2bf713
use hascompressioninfo and compressioninfo
SwenSchaeferjohann Jul 10, 2025
9fa7c58
add config support to compressible macro
SwenSchaeferjohann Jul 10, 2025
2de8a5c
add expanded.rs
SwenSchaeferjohann Jul 10, 2025
ffe591b
cleanup anchor-derived example
SwenSchaeferjohann Jul 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ members = [
"forester-utils",
"forester",
"sparse-merkle-tree",
"program-tests/anchor-compressible-user",
"program-tests/anchor-compressible-user-derived",
]

resolver = "2"
Expand Down Expand Up @@ -90,6 +92,7 @@ solana-transaction = { version = "2.2" }
solana-transaction-error = { version = "2.2" }
solana-hash = { version = "2.2" }
solana-clock = { version = "2.2" }
solana-rent = { version = "2.2" }
solana-signature = { version = "2.2" }
solana-commitment-config = { version = "2.2" }
solana-account = { version = "2.2" }
Expand Down
13 changes: 3 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions program-tests/anchor-compressible-user-derived/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[package]
name = "anchor-compressible-user-derived"
version = "0.1.0"
description = "Anchor program template with user records and derived accounts"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "anchor_compressible_user_derived"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = ["idl-build"]
idl-build = ["anchor-lang/idl-build", "light-sdk/idl-build"]

test-sbf = []


[dependencies]
light-sdk = { workspace = true, features = ["anchor", "idl-build"] }
light-sdk-types = { workspace = true }
light-sdk-macros = { workspace = true }
light-hasher = { workspace = true, features = ["solana"] }
solana-program = { workspace = true }
light-macros = { workspace = true, features = ["solana"] }
borsh = { workspace = true }
light-compressed-account = { workspace = true, features = ["solana"] }
anchor-lang = { workspace = true, features = ["idl-build"] }

[dev-dependencies]
light-program-test = { workspace = true, features = ["devenv"] }
light-client = { workspace = true, features = ["devenv"] }
light-test-utils = { workspace = true, features = ["devenv"] }
tokio = { workspace = true }
solana-sdk = { workspace = true }

[lints.rust.unexpected_cfgs]
level = "allow"
check-cfg = [
'cfg(target_os, values("solana"))',
'cfg(feature, values("frozen-abi", "no-entrypoint"))',
]
Loading