Skip to content

Conversation

@joncinque
Copy link
Contributor

@joncinque joncinque commented Nov 19, 2024

Problem

It's time to move over the SPL program implementations to their specific repos, but it hasn't been done.

Summary of changes

Following the PR for the stake interface at solana-program/stake#12, but for SPL. I ran:

# add the remote for the source repo
git remote add spl https://github.com/solana-labs/solana-program-library.git
# fetch the master from spl under a different local branch
git fetch spl master:fromspl
git switch fromspl
# be safe, remove the remote
git remote rm spl
# filter the stake related files
python3 ../../git-filter-repo \
                                 --path memo/program/src/entrypoint.rs \
                                 --path memo/program/src/lib.rs \
                                 --path memo/program/src/processor.rs \
                                 --path memo/program/Cargo.toml \
                                 --path memo/program/tests/functional.rs \
                                 --path memo/program/README.md \
                                 --path-rename memo/program/src/entrypoint.rs:program/src/entrypoint.rs \
                                 --path-rename memo/program/src/lib.rs:program/src/lib.rs \
                                 --path-rename memo/program/src/processor.rs:program/src/processor.rs \
                                 --path-rename memo/program/Cargo.toml:program/src/Cargo.toml \
                                 --path-rename memo/program/tests/functional.rs:program/tests/functional.rs \
                                 --path-rename memo/program/README.md:program/README.md \
                                 --force
# NOTE: I got the destination for Cargo.toml wrong, so had to git mv it afterwards
# re-add this repo
git remote add origin git@github.com:joncinque/memo.git
git fetch origin main
git rebase main

mvines and others added 30 commits November 19, 2024 13:11
Bumps [solana-sdk](https://github.com/solana-labs/solana) from 1.3.2 to 1.3.4.
- [Release notes](https://github.com/solana-labs/solana/releases)
- [Changelog](https://github.com/solana-labs/solana/blob/master/RELEASE.md)
- [Commits](solana-labs/solana@v1.3.2...v1.3.4)

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [solana-sdk](https://github.com/solana-labs/solana) from 1.3.9 to 1.3.11.
- [Release notes](https://github.com/solana-labs/solana/releases)
- [Changelog](https://github.com/solana-labs/solana/blob/master/RELEASE.md)
- [Commits](solana-labs/solana@v1.3.9...v1.3.11)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* token-swap: Assess swap fee on input token

* Update token-swap/program/src/curve.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update token-swap/program/src/curve.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Fix new var name everywhere

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Bumps [solana-program](https://github.com/solana-labs/solana) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/solana-labs/solana/releases)
- [Changelog](https://github.com/solana-labs/solana/blob/master/RELEASE.md)
- [Commits](solana-labs/solana@v1.4.5...v1.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [solana-program](https://github.com/solana-labs/solana) from 1.4.9 to 1.4.13.
- [Release notes](https://github.com/solana-labs/solana/releases)
- [Changelog](https://github.com/solana-labs/solana/blob/master/RELEASE.md)
- [Commits](solana-labs/solana@v1.4.9...v1.4.13)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
To pick up cargo audit fixes for monorepo
Bumps [solana-program](https://github.com/solana-labs/solana) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/solana-labs/solana/releases)
- [Changelog](https://github.com/solana-labs/solana/blob/master/RELEASE.md)
- [Commits](solana-labs/solana@v1.5.0...v1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
joncinque and others added 25 commits November 19, 2024 13:11
#### Problem

The 1.16 Solana crates are out, but SPL is still on 1.14 and needs the
new functionality.

#### Solution

Update the:

* rust version to 1.69
* nightly to 2023-04-19
* solana tools to 1.16.1
* solana crates to 1.16.1
* borsh to 0.10

And fix:

* new clippy warnings
* deprecated warnings in the new solana crates
* upgrade to solana 1.16.3

* bring down hashbrown dependency to 0.12.3
* Run update script

* Update everything to use non-deprecated functions
* Update workspace for new cargo resolver, remove ntapi patch

* Update Rust versions

* Update dependencies with `./update-solana-dependencies.sh 1.17.2`

* Update lockfile

* Fix build errors

* Run clippy with `--fix`

* concurrent-merkle-tree: Fix function to not use mutable ref

* Replace StakeState with StakeStateV2

* governance: Fix clippy lint

* governance: Fix unnecessary mut

* Allow `clippy::items_after_module`

* token: Make error tests clearer

* token-2022: Fix private glob re-export

* token-upgrade-cli: Replace validator with parser

* single-pool-cli: Fix parsers

* ci: Update clippy command

* Update anchor version

* token-metadata: Use `no-entrypoint` feature in token-2022

* ci: Add protobuf-compiler to build deps

* discriminator-syn: *Don't* specify type of lib to build

* ci: Blast directories in cargo-build-test

* account-compression: Update build and lockfile

* Update token-group and feature-gate

* single-pool: revert WrongStakeStateV2

* stake-pool: revert WrongStakeStateV2

* stake-pool-py: revert StakeStateV2

---------

Co-authored-by: hanako mumei <81144685+2501babe@users.noreply.github.com>
This PR swaps any calls to the `entrypoint!` macro with the full path, ie: `solana_program::entrypoint!`.

This will play a role in the effort to introduce a linting standard to SPL.
This PR adds import formatting configurations to the repository's `rustfmt.toml` file, and the associated changes from `cargo +nightly fmt --all`.
This PR adds comment formatting configurations to the repository's `rustfmt.toml` file, and the associated changes from `cargo +nightly fmt --all`.

Comment width 80.
* repo: Update to 1.17.6 with script

* Update lockfile

* Remove disabling feature in token-cli tests
* token 2022: upgrade sdk to 1.17.13

* Upgrade all remaining packages

---------

Co-authored-by: Jon C <me@jonc.dev>
* Update solana dependency version to allow 2.0.0

* Fix version number in solana-version.sh

* Fix version numbers

* Revert solana-version.sh with note

* Revert Anchor version change

* Relax dependency version upper bound to 2
* upgrade to solana version 1.17.17

* add display for the group extensions

* upgrade to solana version 1.17.17

* update cargo lock
* Update associated-token-account version to 2.3.1

* Update discriminator version to 0.1.1

* Update discriminator-derive version to 0.1.2

* Update discriminator-syn version to 0.1.2

* Update instruction-padding version to 0.1.1

* Update memo version to 4.0.1

* Update pod version to 0.1.1

* Update program-error version to 0.3.1

* Update program-error-derive version to 0.3.2

* Update tlv-account-resolution version to 0.5.2

* Update token version to 4.0.1

* Cargo.lock

* Update token-group-interface version to 0.1.1

* Update token-metadata-interface version to 0.2.1

* Update transfer-hook-interface version to 0.5.1

* Update type-length-value version to 0.3.1

* Cargo.lock

* Remove extraneous whitespace
* upgrade to solana 1.18.2

* upgrade rust version to 1.76.0

* update borsh to 1.2.1

* replace deprecated `try_to_vec` with `borsh::to_vec`

* temporarily allow deprecated functions in cli that uses clap-v3

* use `repr(u32)` for enums in token lending
upgrade solana version to 1.18.11
* solana: Update deps to 2.0.0

* Update lockfile

* Update toolchain version

* Update nightly version

* Fix check issues

* Fix clippy

* Revert upgrade for account compression libs

* Install build deps for serde test

* Fixup versions

* Fixup twoxtx build

* Revert solana install version

* Actually, get version 2.0.0 from the correct place
* Run script

* Update lockfile

* Use "processed" instead of deprecated "recent"

* Fixup account compression tests

* account-compression: Remove `only` in test
* Run update script, update curve25519-dalek dep, rust

* Run clippy + fmt

* Add workspace lints, start fixing doc comments

* Update doc comments for clippy

* Re-run cargo fmt after doc comment update

* Update solana-version

* Update CI jobs
* remove solana-program from spl-memo

* fix imports in tests

* fix more test imports

* fmt
@joncinque joncinque requested a review from febo November 19, 2024 12:17
Copy link
Contributor

@febo febo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just a tiny nit on your "script" comments:

# fetch the master from agave under a different local branch

Probably you meant "from spl".

@joncinque
Copy link
Contributor Author

I sure did -- thanks!

@joncinque joncinque merged commit 1207011 into solana-program:main Nov 19, 2024
5 checks passed
@joncinque joncinque deleted the fromspl branch November 19, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.