Skip to content
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

chore: fix compilation errors by using solana-* =1.18.11 #862

Merged
merged 13 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,827 changes: 682 additions & 1,145 deletions Cargo.lock

Large diffs are not rendered by default.

39 changes: 27 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,31 @@ overflow-checks = true
[profile.test]
opt-level = 2

[workspace.dependencies]
solana-banks-interface = "1.18.11"
solana-program = "=1.18.11"
solana-sdk = "=1.18.11"
solana-program-test = "=1.18.11"
solana-client = "=1.18.11"
solana-cli-output = "=1.18.11"

[patch.crates-io]
solana-account-decoder = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
solana-accounts-db = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
solana-banks-client = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
solana-banks-interface = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
solana-banks-server = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
solana-program = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
solana-program-runtime = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
solana-rpc-client = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
solana-rpc-client-api = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
solana-runtime = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
solana-sdk = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
solana-transaction-status = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-account-decoder" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-accounts-db" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-banks-client" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-banks-interface" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-banks-server" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-program" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-cli-output" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-program-test" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-program-runtime" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-rpc-client" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-rpc-client-api" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-runtime" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-sdk" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-sdk-macro" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-client" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-zk-token-sdk" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-frozen-abi" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-frozen-abi-macro" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
"solana-transaction-status" = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
2 changes: 1 addition & 1 deletion circuit-lib/light-prover-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ bytemuck = "1.14.3"

# solana
groth16-solana = "0.0.3"
solana-program = "1.18.11"
solana-program = { workspace = true }
num-bigint = { version = "0.4.4", features = ["serde"] }

once_cell = "1.8"
Expand Down
2 changes: 1 addition & 1 deletion circuit-lib/verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ solana = ["solana-program"]
groth16-solana = "0.0.3"
thiserror = "1.0"
borsh = "0.10"
solana-program = { version = "1.18.11", optional = true }
solana-program = { workspace = true, optional = true }

[dev-dependencies]
tokio = { version = "1.36.0", features = ["rt", "macros"] }
Expand Down
2 changes: 1 addition & 1 deletion examples/token-escrow/programs/token-escrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ light-sdk = { path = "../../../../sdk", version = "0.2.0", features = ["cpi", "c
solana-sdk = "1.18.11"

[dev-dependencies]
solana-program-test = "1.18.11"
solana-program-test = { workspace = true }
light-test-utils = { version = "0.2.0", path = "../../../../test-utils", features = ["cpi-context"] }
reqwest = "0.12"
tokio = "1.36.0"
Expand Down
2 changes: 1 addition & 1 deletion merkle-tree/bounded-vec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ solana = ["solana-program"]
[dependencies]
bytemuck = { version = "1.14", features = ["min_const_generics"] }
memoffset = "0.9"
solana-program = { version = "1.18.11", optional = true }
solana-program = { workspace = true, optional = true }
thiserror = "1.0"

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions merkle-tree/concurrent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ light-bounded-vec = { path = "../bounded-vec", version = "0.2.0" }
light-hasher = { path = "../hasher", version = "0.2.0" }
light-utils = { version = "0.2.0", path = "../../utils" }
memoffset = "0.8"
solana-program = { version = "1.18.11", optional = true }
solana-program = { workspace = true, optional = true }
thiserror = "1.0"

[dev-dependencies]
Expand All @@ -30,7 +30,7 @@ ark-ff = "0.4"
light-merkle-tree-reference = { path = "../reference", version = "0.2.0" }
light-hash-set = { version = "0.2.0", path = "../hash-set", features = ["solana"] }
rand = "0.8"
solana-program = { version = "1.18.11" }
solana-program = { workspace = true }
spl-account-compression = { version = "0.3.0", default-features = false}
spl-concurrent-merkle-tree = { version = "0.2.0", default-features = false}
tokio = { version = "1.35", features = ["full"] }
Expand Down
2 changes: 1 addition & 1 deletion merkle-tree/hash-set/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ light-utils = { path = "../../utils", version = "0.2.0" }
memoffset = "0.9"
num-bigint = "0.4"
num-traits = "0.2"
solana-program = { version = "1.18.11", optional = true }
solana-program = { workspace = true, optional = true }
thiserror = "1.0"
[target.'cfg(target_os = "solana")'.dependencies]
light-heap = { path = "../../heap", version = "0.2.0" }
Expand Down
2 changes: 1 addition & 1 deletion merkle-tree/hasher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ solana = ["solana-program"]

[dependencies]
light-poseidon = "0.2.0"
solana-program = { version = "1.18.11", optional = true }
solana-program = { workspace = true, optional = true }
thiserror = "1.0"

[target.'cfg(not(target_os = "solana"))'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion merkle-tree/indexed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ memoffset = "0.9"
num-bigint = "0.4"
num-traits = "0.2"

solana-program = { version = "1.18.11", optional = true }
solana-program = { workspace = true, optional = true }
thiserror = "1.0"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion programs/account-compression/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ num-traits = "0.2.18"
solana-security-txt = "1.1.0"

[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-sdk = "1.18.11"
solana-sdk = { workspace = true }
4 changes: 2 additions & 2 deletions programs/compressed-token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ light-heap = { version = "0.2.0", path = "../../heap", optional = true }
light-utils = { version = "0.2.0", path = "../../utils" }

[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-sdk = "1.18.11"
solana-sdk = { workspace = true }

[dev-dependencies]
rand = "0.8.5"
rand = "0.8.5"
6 changes: 3 additions & 3 deletions programs/registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ light-heap = { version = "0.2.0", path = "../../heap", optional = true }
account-compression = { version = "0.4.0", path = "../account-compression", features = ["cpi"] }

[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-sdk = "1.18.11"
solana-sdk = { workspace = true }

[dev-dependencies]
solana-program-test = "1.18.11"
solana-sdk = "1.18.11"
solana-program-test = { workspace = true }
solana-sdk = { workspace = true }
tokio = "1.36.0"
light-macros= { version = "0.4.0", path = "../../macros/light" }
2 changes: 1 addition & 1 deletion programs/system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ light-verifier = { path = "../../circuit-lib/verifier", version = "0.2.0", featu
solana-security-txt = "1.1.0"

[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-sdk = "1.18.11"
solana-sdk = { workspace = true }

[dev-dependencies]
rand = "0.8.5"
3 changes: 2 additions & 1 deletion scripts/release-all-rust-crates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ echo "Tagging and releasing all Rust projects..."
echo "Logging in to crates.io..."
cargo login "${CRATES_IO_TOKEN}"
# TODO: allow dynamic releases, and add gh release workflow
PACKAGES=("aligned-sized" "light-heap" "light-bounded-vec" "light-utils" "light-hasher" "light-macros" "light-hash-set" "light-merkle-tree-reference" "light-concurrent-merkle-tree" "light-indexed-merkle-tree" "light-prover-client" "light-verifier" "account-compression" "light-registry" "light-system-program" "light-compressed-token" "light-test-utils")
# PACKAGES=("aligned-sized" "light-heap" "light-bounded-vec" "light-utils" "light-hasher" "light-macros" "light-hash-set" "light-merkle-tree-reference" "light-concurrent-merkle-tree" "light-indexed-merkle-tree" "light-prover-client" "light-verifier" "account-compression" "light-registry" "light-system-program" "light-compressed-token" "light-test-utils")
PACKAGES=("light-compressed-token" "light-test-utils")
for PACKAGE in "${PACKAGES[@]}"; do
PKG_VERSION=$(cargo pkgid -p "$PACKAGE" | cut -d "#" -f2)
VERSION=${PKG_VERSION#*@}
Expand Down
10 changes: 5 additions & 5 deletions sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ light-verifier = { path = "../circuit-lib/verifier", version = "0.2.0", features
borsh = "0.10.0"

[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-sdk = "1.18.11"
solana-sdk = { workspace = true }

[dev-dependencies]
solana-banks-interface = "1.18.11"
solana-cli-output = "1.18.11"
solana-program-test = "1.18.11"
solana-sdk = "1.18.11"
solana-banks-interface = { workspace = true }
solana-cli-output = { workspace = true }
solana-program-test = { workspace = true }
solana-sdk = { workspace = true }
serde_json = "1.0.114"
reqwest = "0.12"
tokio = "1.36.0"
Expand Down
4 changes: 2 additions & 2 deletions test-programs/account-compression-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ default = ["custom-heap"]


[dev-dependencies]
solana-program-test = "1.18.11"
solana-program-test = { workspace = true}
light-test-utils = { version = "0.2.0", path = "../../test-utils" }
reqwest = "0.11.26"
tokio = "1.36.0"
Expand All @@ -44,6 +44,6 @@ light-utils = {path = "../../utils"}
light-verifier = {path = "../../circuit-lib/verifier"}
solana-cli-output = "1.18.11"
serde_json = "1.0.114"
solana-sdk = "1.18.11"
solana-sdk = { workspace = true }
thiserror = "1.0"
memoffset = "0.9.1"
4 changes: 2 additions & 2 deletions test-programs/compressed-token-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ light-utils = {path = "../../utils"}
light-verifier = {path = "../../circuit-lib/verifier"}

[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-sdk = "1.18.11"
solana-sdk = { workspace = true }


[dev-dependencies]
solana-program-test = "1.18.11"
solana-program-test = { workspace = true }
light-test-utils = { version = "0.2.0", path = "../../test-utils" }
reqwest = "0.11.26"
tokio = "1.36.0"
Expand Down
6 changes: 3 additions & 3 deletions test-programs/e2e-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ light-utils = {path = "../../utils"}
light-verifier = {path = "../../circuit-lib/verifier"}

[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-sdk = "1.18.11"
solana-client = "1.18.11"
solana-sdk = { workspace = true }
solana-client = { workspace = true }

[dev-dependencies]
solana-program-test = "1.18.11"
solana-program-test = { workspace = true }
light-test-utils = { version = "0.2.0", path = "../../test-utils" }
reqwest = "0.11.26"
tokio = "1.36.0"
Expand Down
6 changes: 3 additions & 3 deletions test-programs/registry-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ default = ["custom-heap"]


[dev-dependencies]
solana-program-test = "1.18.11"
solana-program-test = { workspace = true }
light-test-utils = { version = "0.2.0", path = "../../test-utils" }
reqwest = "0.11.26"
tokio = "1.36.0"
Expand All @@ -40,6 +40,6 @@ light-concurrent-merkle-tree = {path = "../../merkle-tree/concurrent"}
light-indexed-merkle-tree = {path = "../../merkle-tree/indexed"}
light-utils = {path = "../../utils"}
light-verifier = {path = "../../circuit-lib/verifier"}
solana-cli-output = "1.18.11"
solana-cli-output = { workspace = true }
serde_json = "1.0.114"
solana-sdk = "1.18.11"
solana-sdk = { workspace = true }
5 changes: 2 additions & 3 deletions test-programs/system-cpi-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ light-hasher = { path = "../../merkle-tree/hasher", version = "0.2.0" }
light-utils = { path = "../../utils", version = "0.2.0" }

[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-sdk = "1.18.11"

solana-sdk = { workspace = true }

[dev-dependencies]
solana-program-test = "1.18.11"
solana-program-test = { workspace = true }
light-test-utils = { version = "0.2.0", path = "../../test-utils" }
reqwest = "0.11.26"
tokio = "1.36.0"
Expand Down
4 changes: 2 additions & 2 deletions test-programs/system-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ default = ["custom-heap"]


[dev-dependencies]
solana-program-test = "1.18.11"
solana-program-test = { workspace = true }
light-test-utils = { version = "0.2.0", path = "../../test-utils" }
reqwest = "0.11.26"
tokio = "1.36.0"
Expand All @@ -41,4 +41,4 @@ light-utils = {path = "../../utils"}
light-verifier = {path = "../../circuit-lib/verifier"}
solana-cli-output = "1.18.11"
serde_json = "1.0.114"
solana-sdk = "1.18.11"
solana-sdk = { workspace = true }
6 changes: 3 additions & 3 deletions test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ ark-ff = "0.4"
light-hash-set = { path = "../merkle-tree/hash-set", version = "0.2.0" }
num-bigint = "0.4"
num-traits = "0.2"
solana-program-test = "1.18.11"
solana-sdk = "1.18.11"
solana-client = "1.18.11"
solana-program-test = { workspace = true }
solana-sdk = { workspace = true }
solana-client = { workspace = true }
thiserror = "1.0"
light-macros = { path = "../macros/light", version = "0.4.0" }
account-compression = { path = "../programs/account-compression", version = "0.4.0", features = ["cpi"] }
Expand Down
2 changes: 1 addition & 1 deletion utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ ark-ff = "0.4"
light-bounded-vec = { version = "0.2.0", path = "../merkle-tree/bounded-vec" }
num-bigint = { version = "0.4", features = ["rand"] }
thiserror = "1.0"
solana-program = "1.18.11"
solana-program = { workspace = true }
ark-bn254 = "0.4.0"
rand = "0.8"
2 changes: 1 addition & 1 deletion xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ num-bigint = "0.4"
rand = "0.8"
quote = "1.0"
sha2 = "0.10"
solana-program = "1.18.11"
solana-program = { workspace = true }
tabled = "0.15"