Browse Source

Merge pull request #79 from heyAyushh/fix-cargo-native

fix solana-program versions, edited workflows
John 1 year ago
parent
commit
dbadf9d681

+ 2 - 2
.github/workflows/anchor.yml

@@ -2,7 +2,7 @@ name: Anchor
 
 on:
   schedule:
-    - cron: "0 0 * * *"
+    - cron: '0 0 * * *'
   push:
     branches:
       - main
@@ -17,7 +17,7 @@ jobs:
     strategy:
       matrix:
         node-version: [20.x]
-        solana-version: [stable, 1.17.25]
+        solana-version: [1.18.8, beta]
         anchor-version: [0.30.0]
     steps:
       - uses: actions/checkout@v4

+ 4 - 4
.github/workflows/solana-native.yml

@@ -2,7 +2,7 @@ name: Native
 
 on:
   schedule:
-    - cron: "0 0 * * *"
+    - cron: '0 0 * * *'
   push:
     branches:
       - main
@@ -17,7 +17,7 @@ jobs:
     strategy:
       matrix:
         node-version: [20.x]
-        solana-version: [stable, 1.18.4]
+        solana-version: [1.17.25, stable, beta]
     steps:
       - uses: actions/checkout@v4
       - name: Use Node.js ${{ matrix.node-version }}
@@ -79,7 +79,7 @@ jobs:
     strategy:
       matrix:
         node-version: [20.x]
-        solana-version: [stable, 1.18.4]
+        solana-version: [1.17.25, stable, beta]
     steps:
       - uses: actions/checkout@v4
       - name: Use Node.js ${{ matrix.node-version }}
@@ -133,7 +133,7 @@ jobs:
             echo "*****************************"
             echo "Programs that failed testing:"
             printf "%s\n" "${failed_tests[@]}"
-            # exit 1
+            exit 1
           else
             echo "All tests passed."
           fi

+ 31 - 113
Cargo.lock

@@ -31,11 +31,12 @@ dependencies = [
 
 [[package]]
 name = "ahash"
-version = "0.8.11"
+version = "0.8.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
+checksum = "cd7d5a2cecb58716e47d67d5703a249964b14c7be1ec3cad3affc295b2d1c35d"
 dependencies = [
  "cfg-if",
+ "getrandom 0.2.15",
  "once_cell",
  "version_check",
  "zerocopy",
@@ -207,6 +208,13 @@ dependencies = [
  "anchor-lang",
 ]
 
+[[package]]
+name = "anchor-realloc"
+version = "0.1.0"
+dependencies = [
+ "anchor-lang",
+]
+
 [[package]]
 name = "anchor-syn"
 version = "0.30.0"
@@ -458,16 +466,6 @@ dependencies = [
  "hashbrown 0.13.2",
 ]
 
-[[package]]
-name = "borsh"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbe5b10e214954177fb1dc9fbd20a1a2608fe99e6c832033bdc7cea287a20d77"
-dependencies = [
- "borsh-derive 1.5.0",
- "cfg_aliases",
-]
-
 [[package]]
 name = "borsh-derive"
 version = "0.9.3"
@@ -476,7 +474,7 @@ checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775"
 dependencies = [
  "borsh-derive-internal 0.9.3",
  "borsh-schema-derive-internal 0.9.3",
- "proc-macro-crate 0.1.5",
+ "proc-macro-crate",
  "proc-macro2",
  "syn 1.0.109",
 ]
@@ -489,25 +487,11 @@ checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7"
 dependencies = [
  "borsh-derive-internal 0.10.3",
  "borsh-schema-derive-internal 0.10.3",
- "proc-macro-crate 0.1.5",
+ "proc-macro-crate",
  "proc-macro2",
  "syn 1.0.109",
 ]
 
-[[package]]
-name = "borsh-derive"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7a8646f94ab393e43e8b35a2558b1624bed28b97ee09c5d15456e3c9463f46d"
-dependencies = [
- "once_cell",
- "proc-macro-crate 3.1.0",
- "proc-macro2",
- "quote",
- "syn 2.0.61",
- "syn_derive",
-]
-
 [[package]]
 name = "borsh-derive-internal"
 version = "0.9.3"
@@ -643,12 +627,6 @@ version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 
-[[package]]
-name = "cfg_aliases"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
-
 [[package]]
 name = "checking-accounts-anchor-program-example"
 version = "0.1.0"
@@ -944,7 +922,7 @@ version = "0.13.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
 dependencies = [
- "ahash 0.8.11",
+ "ahash 0.8.5",
 ]
 
 [[package]]
@@ -1196,13 +1174,13 @@ dependencies = [
 
 [[package]]
 name = "num-derive"
-version = "0.4.2"
+version = "0.3.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
+checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.61",
+ "syn 1.0.109",
 ]
 
 [[package]]
@@ -1304,38 +1282,6 @@ dependencies = [
  "toml 0.5.11",
 ]
 
-[[package]]
-name = "proc-macro-crate"
-version = "3.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284"
-dependencies = [
- "toml_edit 0.21.1",
-]
-
-[[package]]
-name = "proc-macro-error"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
-dependencies = [
- "proc-macro-error-attr",
- "proc-macro2",
- "quote",
- "version_check",
-]
-
-[[package]]
-name = "proc-macro-error-attr"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
-dependencies = [
- "proc-macro2",
- "quote",
- "version_check",
-]
-
 [[package]]
 name = "proc-macro2"
 version = "1.0.82"
@@ -1725,13 +1671,17 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
 
 [[package]]
 name = "solana-frozen-abi"
-version = "1.18.12"
+version = "1.17.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35a0b24cc4d0ebd5fd45d6bd47bed3790f8a75ade67af8ff24a3d719a8bc93bc"
+checksum = "de577bb681dfc3afeda6247dbc381f8c74a31eeed141883e6a9a36e93fdcf784"
 dependencies = [
+ "ahash 0.8.5",
+ "blake3",
  "block-buffer 0.10.4",
  "bs58 0.4.0",
  "bv",
+ "byteorder",
+ "cc",
  "either",
  "generic-array",
  "im",
@@ -1742,6 +1692,7 @@ dependencies = [
  "serde",
  "serde_bytes",
  "serde_derive",
+ "serde_json",
  "sha2 0.10.8",
  "solana-frozen-abi-macro",
  "subtle",
@@ -1750,9 +1701,9 @@ dependencies = [
 
 [[package]]
 name = "solana-frozen-abi-macro"
-version = "1.18.12"
+version = "1.17.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51600f4066d3663ab2981fd24e77a8c2e65f5d20ea71b550b853ca9ae40eee7f"
+checksum = "e6373184605334be54d85564b657e7b4d88bdf4e3c011abccce4fd2712c96caf"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -1762,9 +1713,9 @@ dependencies = [
 
 [[package]]
 name = "solana-program"
-version = "1.18.12"
+version = "1.17.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a5513a02d622ba89e76baf4b49d25ae20c2c2c623fced12b0d6dd7b8f23e006"
+checksum = "9dd3bcc37b433d7e8d45236a0f5aa68df462c4d5c6a709a6efd916988ce3ac08"
 dependencies = [
  "ark-bn254",
  "ark-ec",
@@ -1776,7 +1727,6 @@ dependencies = [
  "blake3",
  "borsh 0.10.3",
  "borsh 0.9.3",
- "borsh 1.5.0",
  "bs58 0.4.0",
  "bv",
  "bytemuck",
@@ -1817,9 +1767,9 @@ dependencies = [
 
 [[package]]
 name = "solana-sdk-macro"
-version = "1.18.12"
+version = "1.17.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cb099b2f9c0a65a6f23ced791325141cd68c27b04d11c04fef838a00f613861"
+checksum = "9b5055c4b785cf3e5f2f52d687bdd1a795755105fe4365182396bc8b6bb41cd5"
 dependencies = [
  "bs58 0.4.0",
  "proc-macro2",
@@ -1856,18 +1806,6 @@ dependencies = [
  "unicode-ident",
 ]
 
-[[package]]
-name = "syn_derive"
-version = "0.1.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b"
-dependencies = [
- "proc-macro-error",
- "proc-macro2",
- "quote",
- "syn 2.0.61",
-]
-
 [[package]]
 name = "thiserror"
 version = "1.0.60"
@@ -1940,7 +1878,7 @@ dependencies = [
  "serde",
  "serde_spanned",
  "toml_datetime",
- "toml_edit 0.22.12",
+ "toml_edit",
 ]
 
 [[package]]
@@ -1952,17 +1890,6 @@ dependencies = [
  "serde",
 ]
 
-[[package]]
-name = "toml_edit"
-version = "0.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"
-dependencies = [
- "indexmap",
- "toml_datetime",
- "winnow 0.5.40",
-]
-
 [[package]]
 name = "toml_edit"
 version = "0.22.12"
@@ -1973,7 +1900,7 @@ dependencies = [
  "serde",
  "serde_spanned",
  "toml_datetime",
- "winnow 0.6.8",
+ "winnow",
 ]
 
 [[package]]
@@ -2165,15 +2092,6 @@ version = "0.52.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
 
-[[package]]
-name = "winnow"
-version = "0.5.40"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
-dependencies = [
- "memchr",
-]
-
 [[package]]
 name = "winnow"
 version = "0.6.8"

+ 2 - 1
Cargo.toml

@@ -23,11 +23,12 @@ members = [
     "basics/program-derived-addresses/native/program",
     "basics/program-derived-addresses/anchor/programs/*",
     "basics/realloc/native/program",
+    "basics/realloc/anchor/programs/*",
     "basics/rent/native/program",
     "basics/rent/anchor/programs/*",
     "basics/repository-layout/native/program",
     "basics/repository-layout/anchor/programs/*",
     "basics/transfer-sol/native/program",
-    "basics/transfer-sol/anchor/programs/*"
+    "basics/transfer-sol/anchor/programs/*",
 ]
 resolver = "2"

+ 1 - 1
basics/account-data/native/program/Cargo.toml

@@ -4,7 +4,7 @@ version = "0.1.0"
 edition = "2021"
 
 [dependencies]
-solana-program = "1.16.10"
+solana-program = "=1.17.25"
 borsh = "0.9.3"
 borsh-derive = "0.9.1"
 

+ 1 - 1
basics/checking-accounts/native/program/Cargo.toml

@@ -4,7 +4,7 @@ version = "0.1.0"
 edition = "2021"
 
 [dependencies]
-solana-program = "1.10.12"
+solana-program = "=1.17.25"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 1 - 1
basics/close-account/native/program/Cargo.toml

@@ -6,7 +6,7 @@ edition = "2021"
 [dependencies]
 borsh = "0.9.3"
 borsh-derive = "0.9.1"
-solana-program = "1.16.10"
+solana-program = "=1.17.25"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 1 - 1
basics/counter/mpl-stack/Cargo.toml

@@ -14,4 +14,4 @@ default = []
 [dependencies]
 borsh = "0.9"
 shank = "0.0.8"
-solana-program = "1.16.10"
+solana-program = "=1.17.25"

+ 1 - 1
basics/counter/native/program/Cargo.toml

@@ -13,4 +13,4 @@ default = []
 
 [dependencies]
 borsh = "0.9.3"
-solana-program = "1.16.10"
+solana-program = "=1.17.25"

+ 1 - 1
basics/create-account/native/program/Cargo.toml

@@ -4,7 +4,7 @@ version = "0.1.0"
 edition = "2021"
 
 [dependencies]
-solana-program = "1.16.10"
+solana-program = "=1.17.25"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 2
basics/cross-program-invocation/native/programs/hand/Cargo.toml

@@ -10,8 +10,8 @@ cpi = ["no-entrypoint"]
 [dependencies]
 borsh = "0.10"
 borsh-derive = "0.10"
-solana-program = "1.16.10"
-cross-program-invocatio-native-lever = { path = "../lever", features = [ "cpi" ] }
+solana-program = "=1.17.25"
+cross-program-invocatio-native-lever = { path = "../lever", features = ["cpi"] }
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 1 - 1
basics/cross-program-invocation/native/programs/lever/Cargo.toml

@@ -10,7 +10,7 @@ cpi = ["no-entrypoint"]
 [dependencies]
 borsh = "0.10"
 borsh-derive = "0.10"
-solana-program = "1.16.10"
+solana-program = "=1.17.25"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 1 - 1
basics/hello-solana/native/program/Cargo.toml

@@ -4,7 +4,7 @@ version = "0.1.0"
 edition = "2021"
 
 [dependencies]
-solana-program = "1.16.10"
+solana-program = "=1.17.25"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 1 - 1
basics/pda-rent-payer/native/program/Cargo.toml

@@ -4,7 +4,7 @@ version = "0.1.0"
 edition = "2021"
 
 [dependencies]
-solana-program = "1.16.10"
+solana-program = "=1.17.25"
 borsh = "0.9.3"
 borsh-derive = "0.9.1"
 

+ 1 - 1
basics/processing-instructions/native/program/Cargo.toml

@@ -6,7 +6,7 @@ edition = "2021"
 [dependencies]
 borsh = "0.9.3"
 borsh-derive = "0.9.1"
-solana-program = "1.16.10"
+solana-program = "=1.17.25"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 1 - 1
basics/program-derived-addresses/native/program/Cargo.toml

@@ -4,7 +4,7 @@ version = "0.1.0"
 edition = "2021"
 
 [dependencies]
-solana-program = "1.16.10"
+solana-program = "=1.17.25"
 borsh = "0.9.3"
 borsh-derive = "0.9.1"
 

+ 1 - 1
basics/realloc/native/program/Cargo.toml

@@ -6,7 +6,7 @@ edition = "2021"
 [dependencies]
 borsh = "0.9.3"
 borsh-derive = "0.9.1"
-solana-program = "1.16.10"
+solana-program = "=1.17.25"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 1 - 1
basics/rent/native/program/Cargo.toml

@@ -6,7 +6,7 @@ edition = "2021"
 [dependencies]
 borsh = "0.9.3"
 borsh-derive = "0.9.1"
-solana-program = "1.16.10"
+solana-program = "=1.17.25"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 1 - 1
basics/repository-layout/native/program/Cargo.toml

@@ -6,7 +6,7 @@ edition = "2021"
 [dependencies]
 borsh = "0.9.3"
 borsh-derive = "0.9.1"
-solana-program = "1.16.10"
+solana-program = "=1.17.25"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 1 - 1
basics/transfer-sol/native/program/Cargo.toml

@@ -6,7 +6,7 @@ edition = "2021"
 [dependencies]
 borsh = "0.9.3"
 borsh-derive = "0.9.1"
-solana-program = "1.16.10"
+solana-program = "=1.17.25"
 
 [lib]
 crate-type = ["cdylib", "lib"]