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

Releases: solana-labs/solana-program-library

SPL Token Client v0.8.0

13 Dec 13:11
5d3307d
Compare
Choose a tag to compare
token-client-v0.8.0

transfer hook cli: bump (#5984)

SPL Token CLI - v3.3.0

13 Dec 13:09
5d3307d
Compare
Choose a tag to compare

What's new

The new version of the token CLI supports confidential transfers end-to-end for networks running at least v1.17.6 with the appropriate feature gates enabled.

Changes

  • Performing a confidential transfer sequentially (#5670)
  • Update token-2022 extensions (#5788)
  • Fix set-transfer-hook-program "authority" flag (#5734)
  • Make update confidential accept multiple args (#5814)
  • Support creating mint with fee and conf transfer (#5862)
  • Cleanup conflicts_with and output colons (#5688)

Miscellaneous Tasks

  • Refactor tests out of main.rs (#5804)
  • Use libtest-mimic to parallelize tests (#5821)
  • Bump repo to Solana 1.17 (#5575) and 1.17.6 (#5863)

SPL Token 2022 - v1.0.0

11 Dec 12:25
15ebdb6
Compare
Choose a tag to compare

What's new

With the last Token-2022 audit complete, the program is ready to enter its first
major version with v1.0.0!

Audits

All audits are hosted at https://github.com/solana-labs/security-audits#token-2022.

Verification

This build provided on the release uses solana-verifiable-build.

You can verify it by checking out the repo at commit 15ebdb6 and running:

$ solana-verify build --library-name spl_token_2022 -- --no-default-features

The --no-default-features flag ensures that the unsupported zero-knowledge proof functionality and the unaudited token-group functionality is omitted. Once the program is built, it's possible to verify it by running:

$ solana-verify get-executable-hash target/deploy/spl_token_2022.so
d941635f5df9dcb42e2fd7f25149051048dd27d02c7cb8dbb7a9e39933722fd3

Summary of changes

Various fixes

  • Add security.txt (#5928)
  • Fix build with zk-ops disabled (#5372)
  • Add serialisation option for the extensions (#5437)
  • Use serde with rename_all = "camelCase" (#5624)
  • [OS-SPL-ADV-02] Fix instruction creator (#5900)
  • [OS-SPL-ADV-03] Check account mint in approve (#5901)
  • [OS-SPL-ADV-00] Enable and fix account ordering on confidential transfer with split proofs (#5931)

Miscellaneous Tasks

  • Bump repo to Solana 1.17 (#5575) and 1.17.6 (#5863)

SPL TLV Account Resolution v0.5.0

11 Dec 17:56
724cb8d
Compare
Choose a tag to compare

New function ExtraAccountMetaList::update(..) for updating a TLV-encoded list of account metas.

Shout out to @tonton-sol for the PR! #5894

SPL Stake Pool and CLI - v1.0.0

04 Dec 23:47
b7dd8fe
Compare
Choose a tag to compare

What's new

The SPL Stake Pool program graduates into its first major version with 1.0.0, over two years
after its first launch! There are any changes from the last version released to mainnet, 0.6.4, so
please read carefully.

Audits

All audits are hosted at https://github.com/solana-labs/security-audits#stake-pool. The
audits between this release and the previous are all of the ones conducted in 2023:

Verification

This build provided on the release uses solana-verifiable-build.

You can verify it by checking out the repo at commit b7dd8fe and running:

$ solana-verify build --library-name spl_stake_pool

Followed by:

$ solana-verify get-executable-hash target/deploy/spl_stake_pool.so
ef6cacb43ad5a4853f37c1254eb5ff9983bfdb77dfa9452a9dde375c5d762a37

Token Metadata

With two new instructions, CreateTokenMetadata and UpdateTokenMetadata,
a stake pool manager may manage Metaplex Token-Metadata for their pool token.
Only the name, symbol, and URI may be changed.

Relevant PRs:

  • Instruction to add metadata for pool token (#3335)
  • Update to newest token-metadata program (#4012)
  • Remove MPL crate dependency for 1.16 upgrade (#4588)

Token-2022

Stake pools may use mints on token-2022, including certain extensions:

  • transfer fees
  • confidential transfers
  • confidential transfers with fee
  • interest-bearing
  • metadata pointer
  • token metadata

Relevant PRs:

  • Support token-2022 (#3714)
  • Allow pool token mint to include metadata (#4770)
  • Allow mints with confidential transfer fee (#5610)

Minimum Delegation

With feature-gate
9onWzzvCzNC2jfhxxeqRgs5q7nFAAKpCUvkj6T6GJK9i,
the cluster may raise the required minimum stake delegation amount to 1 SOL.

Currently, the stake pool program requires stakers to pre-fund the rent-exempt
reserve and 0.001 SOL into any new validator stake account added to the pool.
When removing a validator stake account, the stake pool again requires that same
amount of lamports in the account. This behavior allows the staker to reclaim
the SOL they put into the pool, without taking any customer funds.

If the minimum delegation amount is raised to 1 SOL, however, then it will be
impossible for stakers to remove validators from the pool: stake accounts cannot
have a delegation of 0.001 SOL.

If the stake pool program just updates that number to 1 SOL whenever the cluster
decides, then the stake pool would actually be stealing 0.999 SOL from users for
each validator in the pool. The staker can bring a stake account to the new minimum
of 1 SOL, then take the whole account back.

The chosen solution funds all new validator stake accounts directly from the
stake pool's reserve, which means that stakers no longer need to put their own
SOL into the pool. On the other hand, this means that the pool will steal
rent-exemption (0.00228288 SOL) + 0.001 SOL from the staker for each validator
in the pool.

You can avoid losing these funds by removing validators from the pool prior to
the upgrade. Once the upgrade happens, then you can re-include them, and they
will be funded by the stake pool reserve.

Relevant PRs:

  • Update program to work with minimum delegation (#3127)
  • Use stake program minimum delegation (#3547)
  • Add / remove validators from the reserve (#3714)
  • Add tolerance for stake accounts at minimum (#3839)
  • Remove lamport minimum for validator removal by staker (#3999)
  • Update minimum reserve balance to 0 (#5031)

Force-Destaked Accounts

With the new DeactivateDelinquent instruction on the stake program, enabled with
437r62HoAdUb63amq3D7ENnBLDhHT2xY8eFkLJYVKK4x,
anyone may deactivate stake accounts on delinquent validators. The stake pool
program now handles this situation properly.

Relevant PRs:

  • Handle force destaked accounts (#3152)
  • Allow removal of force-destaked validator (#5439)

Redelegation

With feature
GUrp5BKMyDazsAp9mBoVD6orE5ihXNRPC3jkBRfx6Lq7,
the stake program allows direct redelegation from one stake account to another,
without losing any rewards. The stake pool program now exposes a similar
Redelegate instruction to allow moving from one validator to another.

Relevant PRs:

  • Support stake redelegation (#3856)
  • Document redelegate behavior better (#3986)
  • Add IncreaseAdditionalValidatorStake instruction (#3924)
  • Add DecreaseAdditionalValidatorStake instruction (#3925)
  • Check transient stake state (#3987)
  • Make activating / deactivating check stricter (#4002)

Pre-Funded Stake Destinations

With feature
D2aip4BBr8NPWtU9vLrwrBvbuaQ8w1zV38zFLxx4pfBV,
the destination stake account during a split must be rent-exempt. The stake pool
program will fund the rent-exempt reserve from the stake pool reserve, so managers
must keep some liquid SOL in the reserve to rebalance the pool.

Relevant PRs:

  • Prefund split account during redelegate (#5285)
  • Fund rent-exemption from reserve in decrease_additional (#5288)
  • Add new version of DecreaseValidatorStake to use reserve, add compatibility with master (#5322)

Fees

The stake pool program currently waits one epoch boundary before updating withdrawal
and epoch fees. To give depositors more safety, the program will wait two epoch
boundaries.

Additionally, there are new deposit and withdraw instructions that include
slippage, making it impossible for a user to be surprised by a fee.

Relevant PRs:

  • Wait at least two epoch boundaries to set fee (#3979)
  • Add slippage to all deposit and withdraw ixs (#3980)

Other Pull Requests

  • Bump Solana dependencies to 1.17 (#5575)
  • Specify the space used for new stake accounts (OS-SSP-SUG-00) (#4000)
  • Add comments about unnecessary ownership checks (HAL-01) (#5084)
  • Enforce that pool mint uses 9 decimal places (HAL-03) (#5085)
  • Remove some unwraps (#4003)
  • Use unaligned types for safe pointer cast (#5179)
  • Remove unsafe pointer casts via Pod types (#5185)
  • Truncate on withdrawal calculation (#3804)
  • Add lamports check for transient stake account on decrease (#3805)
  • Use to_writer API to serialize (#4228)

SPL Token Metadata JS - v0.1.1

14 Nov 16:42
b5e20aa
Compare
Choose a tag to compare

Exports pack and unpack using the TokenMetadataCodec for working with serializing token metadata

SPL Token JS - v0.3.9

14 Nov 14:17
2b30a1b
Compare
Choose a tag to compare

Introduces support for new Token2022 extension functionality:

  • TransferHook extension:
    • Account data seed configurations for account resolution (#5815)
    • Account meta de-escalation checks when adding extra metas to instructions (#5816)
    • Accounts list ordering ensured to match Rust offchain implementation (#5817)
  • MetadataPointer extension:
    • Adds the MetadataPointer extension to the library's extension support (#5805)

Thanks for the contributions, @mistersimon !

SPL Token Collection - v0.1.0

25 Oct 07:45
4af4cca
Compare
Choose a tag to compare

A new SPL program implementing the SPL Token Group interface to create collections of tokens!

Check out the test to see how it works!

https://github.com/solana-labs/solana-program-library/blob/4af4cca64c389158f04b8e605d8ce11be79ac285/token-collection/program/tests/token_collection.rs

SPL Token Metadata JS - v0.1.0

24 Oct 11:18
367dff4
Compare
Choose a tag to compare

The new JavaScript library for building clients for on-chain programs that implement the SPL Token Metadata interface!

Huge thanks to @mistersimon for rolling this one out! 🎉 🎉

https://www.npmjs.com/package/@solana/spl-token-metadata

SPL Token Group Interface - v0.1.0

24 Oct 09:33
83fc15f
Compare
Choose a tag to compare

An interface for working with groups of tokens - such as collections and editions!

https://crates.io/crates/spl-token-group-interface