diff --git a/js/compressed-token/CHANGELOG.md b/js/compressed-token/CHANGELOG.md index 07d43d5a2f..72ead55aa2 100644 --- a/js/compressed-token/CHANGELOG.md +++ b/js/compressed-token/CHANGELOG.md @@ -1,3 +1,70 @@ +## 2026-03-24 + +### Breaking Changes + +- `transferInterface()` takes a recipient wallet `PublicKey` as `recipient` (not a pre-derived ATA). Derives the ATA internally. + Before: `transferInterface(rpc, payer, source, mint, ataAddress, ownerKeypair, amount, ...)` + After: `transferInterface(rpc, payer, source, mint, walletPublicKey, owner.publicKey, ownerKeypair, amount, ...)` + Migration: pass the recipient wallet public key; add `owner.publicKey` before the signing keypair. For delegated flows: `ownerPublicKey, delegateSigner`. (#2347) + +- `decompressInterface()` removed. Use `loadAta()` (action) or `createLoadAtaInstructions()` (builder). + Before: `decompressInterface(rpc, payer, owner, mint, amount?, destinationAta?, ...)` + After: `loadAta(rpc, ata, owner, mint, payer?, confirmOptions?, interfaceOptions?, wrap?)` + Migration: derive target ATA with `getAssociatedTokenAddressInterface(mint, owner)` and pass to `loadAta()`. Supports >8 compressed inputs. (#2341) + +- `CTOKEN_PROGRAM_ID` renamed to `LIGHT_TOKEN_PROGRAM_ID`. Related: `createAssociatedCTokenAccountInstruction` -> `createAssociatedLightTokenAccountInstruction`, `parseCTokenHot`/`parseCTokenCold` -> `parseLightTokenHot`/`parseLightTokenCold`, `mintToCToken` -> `mintToLightToken`, `createCTokenTransferInstruction` -> `createLightTokenTransferInstruction`. + Migration: update all call sites to the new LightToken names. (#2330) + +- `createTransferInterfaceInstructions()` and `createLoadAtaInstructions()` now return `TransactionInstruction[][]` (one inner array per transaction) instead of flat instruction arrays. + Before: `const ixs = await createTransferInterfaceInstructions(...)` + After: `const batches = await createTransferInterfaceInstructions(...)` — send each inner array as a separate transaction + Migration: iterate outer array. Use `sliceLast(batches)` to split load transactions from the final transfer. (#2344) + +- `InterfaceOptions.owner` removed. Use the flat `owner` param. + Before: `options: { owner: ownerPublicKey, ... }` + After: flat `owner` argument. For delegated instruction planning use `options.delegatePubkey` instead. (#2347) + +- `createLoadAtaInstructionsFromInterface` no longer exported from the package root. Use `createLoadAtaInstructions`. (#2341) + +- `createLoadAccountsParams` and `calculateCompressibleLoadComputeUnits` removed. Use `createLoadAtaInstructions` and `calculateLoadBatchComputeUnits`. (#2341) + +- `mintToCompressed()`: `maxTopUp` inserted before `confirmOptions`. + Before: `mintToCompressed(rpc, payer, mint, owner, amount, confirmOptions?)` + After: `mintToCompressed(rpc, payer, mint, owner, amount, maxTopUp?, confirmOptions?)` + Migration: update positional call sites that pass `confirmOptions`. (#2338) + +- `getAccountInterface()`, `getAtaInterface()`, `getMintInterface()`: unexpected RPC failures now throw instead of being silently treated as empty/not-found. + Migration: add explicit error handling at call sites. (#2340) + +- `createTransferInterfaceInstruction` (multi-program dispatcher) deprecated. Use `createLightTokenTransferInstruction` for Light token transfers, or SPL's `createTransferCheckedInstruction` for SPL/Token-2022. (#2330) + +- `createTokenPool` deprecated. Use `CompressedTokenProgram.createSplInterface`. (#2309) + +### Features + +- `approveInterface()` and `revokeInterface()` actions for delegate approval/revocation on Light token, SPL Token, and Token-2022 accounts. (#2350) +- `createApproveInterfaceInstructions()` and `createRevokeInterfaceInstructions()` instruction builders returning batched `TransactionInstruction[][]`. (#2350) +- `createLightTokenApproveInstruction()` and `createLightTokenRevokeInstruction()` low-level program helpers. (#2350) +- `loadAta()` replaces `decompressInterface()`; parallel batched transactions for >8 compressed inputs; creates ATA if needed. (#2341) +- `createUnwrapInstructions()` returns `TransactionInstruction[][]` with amount-aware input selection. (#2342) +- `selectInputsForAmount()` for greedy amount-aware compressed account selection. (#2342) +- `createLightTokenFreezeAccountInstruction()` and `createLightTokenThawAccountInstruction()` for native freeze/thaw of decompressed light-token accounts (discriminators 10 and 11). (#2333) +- `MAX_TOP_UP` constant (65535) exported from constants. (#2338) +- `maxTopUp` optional param on all compressible instruction builders for explicit rent top-up capping. (#2338) +- `LightTokenProgram` alias for `CompressedTokenProgram`. (#2330) +- `assertV2Only()` guard on load/decompress paths; V1 inputs fail fast with a clear error. (#2341) +- `sliceLast()`, `chunkAccountsByTreeVersion()`, `assertUniqueInputHashes()` for batch orchestration. (#2344) + +### Fixes + +- `maxTopUp` default changed from `0` to `MAX_TOP_UP` (65535); rent top-ups no longer silently blocked. (#2338) +- `delegatedAmount` correctly parsed from CompressedOnly TLV extension instead of defaulting to 0. (#2339) +- Browser bundles: Terser no longer rewrites `AccountMeta` `isSigner`/`isWritable` flags to integers; flags stay boolean-compatible with `@solana/web3.js`. (#2347) +- `parseLightTokenHot` uses `unpackAccountSPL` for correct hot token account parsing. (#2339) +- Frozen light-token-hot sources correctly excluded from load paths. (#2339) +- SPL interface fetch errors rethrown in load paths when SPL or Token-2022 balance exists. (#2339) +- `getSplOrToken2022AccountInterface` fetches hot and cold accounts in parallel. (#2339) + ## [0.23.0-beta.9] ### Fixed diff --git a/js/stateless.js/CHANGELOG.md b/js/stateless.js/CHANGELOG.md index 0b853bd9eb..e8d5d20e9b 100644 --- a/js/stateless.js/CHANGELOG.md +++ b/js/stateless.js/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 2026-03-24 + +### Breaking Changes + +- V2 is the default for published npm packages. Consumers who relied on implicit V1 builds must set `LIGHT_PROTOCOL_VERSION=V1` when building from source. + Before: packages defaulted to V1 builds + After: packages default to ZK Compression V2 + Migration: set `LIGHT_PROTOCOL_VERSION=V1` only for source builds targeting V1 artifacts. No change needed for npm consumers. + +- `getAccountInfoInterface()`: unexpected RPC failures now throw errors instead of silently returning `null`. + Before: function returned `null` on some failure paths + After: throws on unexpected RPC failures when no definitive account result is available + Migration: add explicit error handling at call sites where `null` was previously assumed for all failure paths. + +- `Rpc` in V2 mode uses V2-suffixed JSON-RPC methods (e.g. `getCompressedAccountV2`). Photon/compression endpoints must support the V2 API surface. + +### Fixes + +- Browser bundles: `AccountMeta` `isSigner`/`isWritable` flags stay boolean-compatible with `@solana/web3.js`; Terser `booleans_as_integers` disabled. (#2347) +- `PackedAccounts`: `addPreAccountsMeta()` and `insertOrGetConfig()` normalize signer/writable flags so `0`/`1` from minified or external callers are treated as booleans consistently. (#2347) + +### Deprecated + +- `featureFlags.isBeta`, `enableBeta`, `disableBeta` are deprecated no-ops. Use `LIGHT_PROTOCOL_VERSION` for source builds; V2 is the default for published packages. + ## [0.22.0] - 2025-06-16 ### Breaking Changes diff --git a/programs/account-compression/CHANGELOG.md b/programs/account-compression/CHANGELOG.md new file mode 100644 index 0000000000..4d5608b5c5 --- /dev/null +++ b/programs/account-compression/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +All notable changes to this package will be documented in this file. + +## 2026-03-10 + +### Features + +- V1 tree initialization now logs a deprecation warning. V1 trees will be removed in a future release. (#2329) +- Tree default values updated to match mainnet configuration. (#2124) diff --git a/programs/compressed-token/program/CHANGELOG.md b/programs/compressed-token/program/CHANGELOG.md new file mode 100644 index 0000000000..43c86b1db5 --- /dev/null +++ b/programs/compressed-token/program/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this package will be documented in this file. + +## 2026-03-10 + +### Breaking Changes + +- `CreateMintInputs` now requires a `rent_sponsor` field. Mint creation charges `MINT_CREATION_FEE` (50,000 lamports), transferred from the fee payer to the `rent_sponsor`. (#2309) + Before: `CreateMintInputs { ... }` -- no rent_sponsor field. + After: `CreateMintInputs { ..., rent_sponsor: Pubkey }` -- use `MintActionMetaConfig::with_rent_sponsor()` to configure the recipient. + Migration: Add a `rent_sponsor` account to all mint creation calls and set it via `MintActionMetaConfig::with_rent_sponsor()`. + +- `handle_compressible_top_up()` and `process_compressible_top_up()` now take a `FEE_PAYER_IDX` const generic. `APPROVE_PAYER_IDX` and `REVOKE_PAYER_IDX` are renamed to `OWNER_IDX`. The optional `FEE_PAYER_IDX` specifies a fee payer with fallback to the owner. (#2306) + Before: `handle_compressible_top_up::(...)` + After: `handle_compressible_top_up::(...)` + Migration: Update const generic parameters and rename `APPROVE_PAYER_IDX`/`REVOKE_PAYER_IDX` to `OWNER_IDX` in all call sites. + +### Fixes + +- Additional self-transfer validation prevents invalid self-transfers. (#2292) +- `create_token_account()` now checks rent exemption before creating the account. (#2292) +- `create_ata_idempotent()` now guards against double-creation. (#2292) diff --git a/programs/registry/CHANGELOG.md b/programs/registry/CHANGELOG.md new file mode 100644 index 0000000000..a9c8f27d44 --- /dev/null +++ b/programs/registry/CHANGELOG.md @@ -0,0 +1,42 @@ +# Changelog + +All notable changes to this package will be documented in this file. + +## 2026-03-18 + +### Features + +- `batch_append()` reimburses the forester fee payer 2x the network fee from the output queue when network_fee >= 5,000 lamports. A `fee_payer` account is now required in the instruction. (#2335) +- `batch_update_address_tree()` reimburses the forester fee payer 1x the network fee from the merkle tree when network_fee >= 5,000 lamports. A `fee_payer` account is now required in the instruction. (#2335) +- `nullify_dedup` instruction batches 2-4 nullifications in one transaction using proof deduplication. +- `nullify_2` uses a shared proof node and a 1-byte discriminator. +- Forester dedup integration adds `min_queue_items` threshold, versioned transaction support, and a transaction size fix. +- V1 state multi-nullify is disabled when the queue exceeds 10,000 items. + +### Fixes + +- `count_from_leaf_indices()` rejects non-trailing sentinels. + +## 2026-03-10 + +### Breaking Changes + +- `create_initialize_merkle_tree_instruction()`, `create_initialize_batched_merkle_tree_instruction()`, and `create_initialize_batched_address_merkle_tree_instruction()` now require the protocol authority as signer. The `payer` parameter is renamed to `authority` and must be `protocol_config_pda.authority`. + Before: `create_initialize_merkle_tree_instruction(payer, ...)` + After: `create_initialize_merkle_tree_instruction(authority, ...)` -- `authority` must be the protocol config authority. + Migration: Replace the payer account with the protocol authority in all tree initialization calls. (#2325) + +### Features + +- V1 tree initialization now logs a deprecation warning. V1 trees will be removed in a future release. (#2329) + +### Fixes + +- `init_v1_tree_with_custom_forester()` now correctly sets the custom forester on v1 trees. (#2319) +- `migrate_trees_ix()` no longer discards in-progress work during migration. (#2320) + +## 2026-03-02 + +### Features + +- `is_registration_phase()` no longer enforces the registration time window check. Foresters can now register for an epoch at any time within the activation window, not only during the designated registration phase. (#2321) diff --git a/programs/system/CHANGELOG.md b/programs/system/CHANGELOG.md new file mode 100644 index 0000000000..b1e4314b61 --- /dev/null +++ b/programs/system/CHANGELOG.md @@ -0,0 +1,50 @@ +# Changelog + +All notable changes to this package will be documented in this file. + +## 2026-03-10 + +### Breaking Changes + +- `COMPRESSIBLE_CONFIG_SEED` renamed to `LIGHT_CONFIG_SEED`. (#2222) + Before: `COMPRESSIBLE_CONFIG_SEED` + After: `LIGHT_CONFIG_SEED` + Migration: Update all references to `COMPRESSIBLE_CONFIG_SEED`. + +- `COMPRESSIBLE_CONFIG_V1` renamed to `LIGHT_TOKEN_CONFIG`. (#2222) + Before: `COMPRESSIBLE_CONFIG_V1` + After: `LIGHT_TOKEN_CONFIG` + Migration: Update all references to `COMPRESSIBLE_CONFIG_V1`. + +- In `#[light_account]`, `token::authority` renamed to `token::owner_seeds`. Owner seeds must now be constants. (#2222) + Before: `#[light_account(token::authority = ...)]` + After: `#[light_account(token::owner_seeds = ...)]` + Migration: Rename `token::authority` to `token::owner_seeds` and ensure all values are constants. + +- `#[light_account(init)]` now requires a `pda_rent_sponsor` account info. (#2222) + Before: No `pda_rent_sponsor` required. + After: `pda_rent_sponsor` account must be present in instruction accounts when initializing compressed PDAs. + Migration: Add `pda_rent_sponsor` to all instruction accounts that use `#[light_account(init)]`. + +- `#[derive(Compressible)]` removed from `light-sdk-macros`. (#2230) + Before: `#[derive(Compressible)]` + After: Use `#[derive(LightAccount)]` (Anchor/Solana) or `#[derive(LightProgramPinocchio)]` (Pinocchio). + Migration: Replace all `#[derive(Compressible)]` usages with the appropriate new derive macro. + +### Features + +- New `light-account` crate provides Anchor/Solana-specific type aliases (`CpiAccounts`, `CompressCtx`, `DecompressCtx`, `ValidatedPdaContext`, `PackedAccounts`) and re-exports all macros from `light-sdk-macros`. (#2230) +- New `light-account-pinocchio` crate provides Pinocchio-specific type aliases and re-exports `#[derive(LightProgramPinocchio)]`. (#2230) +- `AccountLoader` added for loading compressed accounts without derive macros. (#2222) +- `DECOMPRESSED_PDA_DISCRIMINATOR` constant (`[255u8; 8]`) added to `light-compressible` to mark decompressed PDA placeholder accounts. (#2208) +- Compressed mint photon API added. (#2198) +- V1 tree initialization now logs a deprecation warning. V1 trees will be removed in a future release. (#2329) + +### Fixes + +- `MintCloseAuthority` added to `RESTRICTED_EXTENSION_TYPES` and `has_mint_extensions()` detection. A mint with this extension could previously be compressed without `CompressOnly` mode, allowing the mint authority to close the mint and strand compressed tokens. Certora audit finding M-03. (#2263) +- `store_data()` no longer caches the incorrect owner when re-entering a cached account context. (#2277) +- V2 tree rollover balance check corrected. (#2278) +- Canonical bump is now enforced during ATA verification. (#2249) +- Batched address tree initialization now asserts tree index and queue index match. (#2318) +- System program addresses corrected. (#2298)