From a00bd2184ea641415ba79c1c6f2683789edc988e Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Sun, 20 Mar 2022 09:00:29 +0300 Subject: [PATCH 01/24] lang, cli, spl: Update solana toolchain to v1.9.0 --- .github/workflows/tests.yaml | 2 +- CHANGELOG.md | 1 + Cargo.lock | 904 +++++++++++++++-------------------- cli/Cargo.toml | 8 +- docker/Makefile | 2 +- lang/Cargo.toml | 2 +- spl/Cargo.toml | 2 +- 7 files changed, 387 insertions(+), 534 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b648e3d0e6..4c507eab4a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -8,7 +8,7 @@ on: branches: - master env: - SOLANA_CLI_VERSION: 1.8.14 + SOLANA_CLI_VERSION: 1.9.11 NODE_VERSION: 17.0.1 jobs: diff --git a/CHANGELOG.md b/CHANGELOG.md index 93f3d76bc6..b3a3abf78c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ incremented for features. * lang: Handle arrays with const as size in instruction data ([#1623](https://github.com/project-serum/anchor/issues/1623). * spl: Add support for revoke instruction ([#1493](https://github.com/project-serum/anchor/pull/1493)). * ts: Add provider parameter to `Spl.token` factory method ([#1597](https://github.com/project-serum/anchor/pull/1597)). +* lang, cli, spl: Update solana toolchain to v1.9.0 ([#1653](https://github.com/project-serum/anchor/pull/1653)). ### Fixes diff --git a/Cargo.lock b/Cargo.lock index 80108bfc72..f957cb16e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -169,7 +169,7 @@ dependencies = [ "flate2", "heck 0.3.3", "pathdiff", - "rand", + "rand 0.7.3", "reqwest", "semver 1.0.6", "serde", @@ -290,6 +290,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + [[package]] name = "assert_matches" version = "1.5.0" @@ -318,7 +324,7 @@ name = "avm" version = "0.22.1" dependencies = [ "anyhow", - "cfg-if 1.0.0", + "cfg-if", "clap 3.1.6", "dirs 1.0.5", "once_cell", @@ -338,12 +344,11 @@ checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", - "serde", ] [[package]] @@ -352,12 +357,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" -[[package]] -name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" - [[package]] name = "base64" version = "0.12.3" @@ -381,9 +380,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "blake2b_simd" @@ -392,35 +391,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.5.2", "constant_time_eq", ] [[package]] name = "blake3" -version = "0.3.8" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" +checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.7.2", "cc", - "cfg-if 0.1.10", + "cfg-if", "constant_time_eq", - "crypto-mac 0.8.0", - "digest 0.9.0", -] - -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding 0.1.5", - "byte-tools", - "byteorder", - "generic-array 0.12.4", + "digest 0.10.3", ] [[package]] @@ -429,17 +415,17 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", - "generic-array 0.14.5", + "block-padding", + "generic-array", ] [[package]] -name = "block-padding" -version = "0.1.5" +name = "block-buffer" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" dependencies = [ - "byte-tools", + "generic-array", ] [[package]] @@ -556,12 +542,6 @@ dependencies = [ "serde", ] -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" - [[package]] name = "bytemuck" version = "1.8.0" @@ -588,23 +568,6 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "either", - "iovec", -] - -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.1.0" @@ -613,9 +576,9 @@ checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" [[package]] name = "bzip2" -version = "0.3.3" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" +checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0" dependencies = [ "bzip2-sys", "libc", @@ -663,12 +626,6 @@ dependencies = [ "jobserver", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -734,60 +691,39 @@ dependencies = [ "syn 1.0.88", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "console" -version = "0.11.3" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c0994e656bba7b922d8dd1245db90672ffb701e684e45be58f20719d69abc5a" +checksum = "a28b32d32ca44b70c3e4acd7db1babf555fa026e385fb95f18028f88848b3c31" dependencies = [ "encode_unicode", - "lazy_static", "libc", + "once_cell", "regex", "terminal_size", - "termios", "unicode-width", "winapi", - "winapi-util", ] [[package]] -name = "console" -version = "0.14.1" +name = "console_error_panic_hook" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "regex", - "terminal_size", - "unicode-width", - "winapi", + "cfg-if", + "wasm-bindgen", ] [[package]] -name = "console" -version = "0.15.0" +name = "console_log" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28b32d32ca44b70c3e4acd7db1babf555fa026e385fb95f18028f88848b3c31" +checksum = "501a375961cef1a0d44767200e66e4a559283097e91d0730b1d75dfb2f8a1494" dependencies = [ - "encode_unicode", - "libc", - "once_cell", - "regex", - "terminal_size", - "unicode-width", - "winapi", + "log", + "web-sys", ] [[package]] @@ -827,17 +763,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam-channel" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -dependencies = [ - "crossbeam-utils 0.7.2", - "maybe-uninit", + "cfg-if", ] [[package]] @@ -846,8 +772,8 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdbfe11fe19ff083c48923cf179540e8cd0535903dc35e178a1fdeeb59aef51f" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.8", + "cfg-if", + "crossbeam-utils", ] [[package]] @@ -856,9 +782,9 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", - "crossbeam-utils 0.8.8", + "crossbeam-utils", ] [[package]] @@ -868,31 +794,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" dependencies = [ "autocfg", - "cfg-if 1.0.0", - "crossbeam-utils 0.8.8", + "cfg-if", + "crossbeam-utils", "lazy_static", "memoffset", "scopeguard", ] -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", -] - [[package]] name = "crossbeam-utils" version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "lazy_static", ] @@ -903,46 +818,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] -name = "crypto-mac" -version = "0.8.0" +name = "crypto-common" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" dependencies = [ - "generic-array 0.14.5", - "subtle", + "generic-array", + "typenum", ] [[package]] name = "crypto-mac" -version = "0.9.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bcd97a54c7ca5ce2f6eb16f6bede5b0ab5f0055fedc17d2f0b4466e21671ca" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.5", + "generic-array", "subtle", ] [[package]] name = "crypto-mac" -version = "0.10.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" +checksum = "58bcd97a54c7ca5ce2f6eb16f6bede5b0ab5f0055fedc17d2f0b4466e21671ca" dependencies = [ - "generic-array 0.14.5", + "generic-array", "subtle", ] [[package]] -name = "curve25519-dalek" -version = "2.1.3" +name = "crypto-mac" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", + "generic-array", "subtle", - "zeroize", ] [[package]] @@ -964,7 +876,7 @@ version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "num_cpus", "rayon", ] @@ -980,31 +892,34 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.6.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4aa86af7b19b40ef9cbef761ed411a49f0afa06b7b6dcd3dfe2f96a3c546138" +checksum = "61579ada4ec0c6031cfac3f86fdba0d195a7ebeb5e36693bd53cb5999a25beeb" dependencies = [ - "console 0.11.3", + "console", "lazy_static", "tempfile", + "zeroize", ] [[package]] name = "digest" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.12.4", + "generic-array", ] [[package]] name = "digest" -version = "0.9.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "generic-array 0.14.5", + "block-buffer 0.10.2", + "crypto-common", + "subtle", ] [[package]] @@ -1042,7 +957,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -1097,7 +1012,6 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eed12bbf7b5312f8da1c2722bc06d8c6b12c2d86a7fb35a194c7f3e6fc2bbe39" dependencies = [ - "serde", "signature", ] @@ -1107,11 +1021,10 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ - "curve25519-dalek 3.2.0", + "curve25519-dalek", "ed25519", - "rand", + "rand 0.7.3", "serde", - "serde_bytes", "sha2", "zeroize", ] @@ -1147,7 +1060,7 @@ version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1172,9 +1085,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.8.4" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" +checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" dependencies = [ "atty", "humantime", @@ -1226,12 +1139,6 @@ dependencies = [ "synstructure", ] -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - [[package]] name = "fastrand" version = "1.7.0" @@ -1263,7 +1170,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall 0.2.11", "winapi", @@ -1275,7 +1182,7 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crc32fast", "libc", "miniz_oxide", @@ -1312,6 +1219,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" + [[package]] name = "futures" version = "0.3.21" @@ -1401,15 +1314,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - [[package]] name = "generic-array" version = "0.14.5" @@ -1437,7 +1341,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", @@ -1450,7 +1354,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.10.0+wasi-snapshot-preview1", ] @@ -1461,19 +1365,13 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" -[[package]] -name = "glob" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" - [[package]] name = "h2" version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62eeb471aa3e3c9197aa4bfeabfe02982f6dc96f750486c0bb0009ac58b26d2b" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", "futures-core", "futures-sink", @@ -1528,12 +1426,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - [[package]] name = "hidapi" version = "1.3.4" @@ -1567,11 +1459,11 @@ dependencies = [ [[package]] name = "hmac" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "crypto-mac 0.10.1", + "crypto-mac 0.11.1", "digest 0.9.0", ] @@ -1582,7 +1474,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.5", + "generic-array", "hmac 0.8.1", ] @@ -1592,7 +1484,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", "itoa", ] @@ -1603,7 +1495,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" dependencies = [ - "bytes 1.1.0", + "bytes", "http", "pin-project-lite", ] @@ -1632,7 +1524,7 @@ version = "0.14.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "043f0e083e9901b6cc658a77d1eb86f4fc650bbb977a4337dd63192826aa85dd" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -1643,7 +1535,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.4", + "socket2", "tokio", "tower-service", "tracing", @@ -1669,7 +1561,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.1.0", + "bytes", "hyper", "native-tls", "tokio", @@ -1687,6 +1579,12 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "index_list" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a9d968042a4902e08810946fc7cd5851eb75e80301342305af755ca06cb82ce" + [[package]] name = "indexmap" version = "1.8.0" @@ -1699,41 +1597,23 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.15.0" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" +checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" dependencies = [ - "console 0.15.0", + "console", "lazy_static", "number_prefix", "regex", ] -[[package]] -name = "input_buffer" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" -dependencies = [ - "bytes 0.5.6", -] - [[package]] name = "instant" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", + "cfg-if", ] [[package]] @@ -1810,9 +1690,6 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "libc" @@ -1822,19 +1699,19 @@ checksum = "ad5c14e80759d0939d013e6ca49930e59fc53dd8e5009132f76240c179380c09" [[package]] name = "libloading" -version = "0.6.7" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" +checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "winapi", ] [[package]] name = "libsecp256k1" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd1137239ab33b41aa9637a88a28249e5e70c40a42ccc92db7f12cc356c1fcd7" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" dependencies = [ "arrayref", "base64 0.12.3", @@ -1843,7 +1720,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand", + "rand 0.7.3", "serde", "sha2", "typenum", @@ -1884,15 +1761,6 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.6" @@ -1908,7 +1776,7 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1917,12 +1785,6 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "2.4.1" @@ -1931,9 +1793,9 @@ checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] name = "memmap2" -version = "0.1.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" +checksum = "057a3db23999c867821a7a59feb06a578fcb03685e983dff90daf9e7d24ac08f" dependencies = [ "libc", ] @@ -2014,26 +1876,15 @@ dependencies = [ "tempfile", ] -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi", -] - [[package]] name = "nix" -version = "0.20.2" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e06129fb611568ef4e868c14b326274959aa70ff7776e9d55323531c374945" +checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" dependencies = [ "bitflags", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "memoffset", ] @@ -2110,9 +1961,9 @@ dependencies = [ [[package]] name = "number_prefix" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" @@ -2129,12 +1980,6 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - [[package]] name = "opaque-debug" version = "0.3.0" @@ -2148,7 +1993,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -2185,9 +2030,9 @@ dependencies = [ [[package]] name = "ouroboros" -version = "0.10.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84236d64f1718c387232287cf036eb6632a5ecff226f4ff9dccb8c2b79ba0bde" +checksum = "f357ef82d1b4db66fbed0b8d542cbd3c22d0bf5b393b3c257b9ba4568e70c9c3" dependencies = [ "aliasable", "ouroboros_macro", @@ -2196,9 +2041,9 @@ dependencies = [ [[package]] name = "ouroboros_macro" -version = "0.10.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f463857a6eb96c0136b1d56e56c718350cef30412ec065b48294799a088bca68" +checksum = "44a0b52c2cbaef7dffa5fec1a43274afe8bd2a644fa9fc50a9ef4ff0269b1257" dependencies = [ "Inflector", "proc-macro-error", @@ -2209,12 +2054,13 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.10.2" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", + "instant", + "lock_api", + "parking_lot_core 0.8.5", ] [[package]] @@ -2223,20 +2069,20 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" dependencies = [ - "lock_api 0.4.6", + "lock_api", "parking_lot_core 0.9.1", ] [[package]] name = "parking_lot_core" -version = "0.7.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if 0.1.10", - "cloudabi", + "cfg-if", + "instant", "libc", - "redox_syscall 0.1.57", + "redox_syscall 0.2.11", "smallvec", "winapi", ] @@ -2247,7 +2093,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall 0.2.11", "smallvec", @@ -2271,11 +2117,11 @@ dependencies = [ [[package]] name = "pbkdf2" -version = "0.6.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b8c0d71734018084da0c0354193a5edfb81b20d2d57a92c5b154aefc554a4a" +checksum = "f05894bce6a1ba4be299d0c5f29563e08af2bc18bb7d48313113bed71e904739" dependencies = [ - "crypto-mac 0.10.1", + "crypto-mac 0.11.1", ] [[package]] @@ -2426,11 +2272,22 @@ checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ "getrandom 0.1.16", "libc", - "rand_chacha", + "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc", ] +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -2441,6 +2298,16 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", +] + [[package]] name = "rand_core" version = "0.5.1" @@ -2455,6 +2322,9 @@ name = "rand_core" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.5", +] [[package]] name = "rand_hc" @@ -2483,9 +2353,9 @@ version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" dependencies = [ - "crossbeam-channel 0.5.3", + "crossbeam-channel", "crossbeam-deque", - "crossbeam-utils 0.8.8", + "crossbeam-utils", "lazy_static", "num_cpus", ] @@ -2559,7 +2429,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" dependencies = [ "base64 0.13.0", - "bytes 1.1.0", + "bytes", "encoding_rs", "futures-core", "futures-util", @@ -2611,9 +2481,9 @@ dependencies = [ [[package]] name = "rpassword" -version = "4.0.5" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" +checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" dependencies = [ "libc", "winapi", @@ -2628,7 +2498,7 @@ dependencies = [ "base64 0.13.0", "blake2b_simd", "constant_time_eq", - "crossbeam-utils 0.8.8", + "crossbeam-utils", ] [[package]] @@ -2643,15 +2513,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.3.3" @@ -2767,22 +2628,13 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser 0.7.0", -] - [[package]] name = "semver" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" dependencies = [ - "semver-parser 0.10.2", + "semver-parser", ] [[package]] @@ -2791,12 +2643,6 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d" -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "semver-parser" version = "0.10.2" @@ -2890,7 +2736,7 @@ dependencies = [ "arrayref", "bincode", "bs58 0.3.1", - "rand", + "rand 0.7.3", "serde", "serde_json", "serum-borsh", @@ -2924,14 +2770,15 @@ dependencies = [ [[package]] name = "sha-1" -version = "0.8.2" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", ] [[package]] @@ -2941,10 +2788,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -2956,7 +2803,7 @@ dependencies = [ "block-buffer 0.9.0", "digest 0.9.0", "keccak", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -2995,17 +2842,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.4.4" @@ -3018,14 +2854,14 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4c1304620ee4a570462869615f3ce1b4c3500c8675110425d7aff99a2c38679" +checksum = "9ea6959495ecaf5e943d19878afa9c2cde1e7259c539a0a482a2f78323ce4876" dependencies = [ "Inflector", "base64 0.12.3", "bincode", - "bs58 0.3.1", + "bs58 0.4.0", "bv", "lazy_static", "serde", @@ -3039,16 +2875,36 @@ dependencies = [ "zstd", ] +[[package]] +name = "solana-address-lookup-table-program" +version = "1.9.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf6816169fcbf70d6ddd977756990a4d56ec02eee09d2f3d2e28e8a8c97510f" +dependencies = [ + "bincode", + "bytemuck", + "log", + "num-derive", + "num-traits", + "rustc_version 0.4.0", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + [[package]] name = "solana-bloom" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe05f0c59be2ab5283756a707e12ecb39706bfa4f73af668c43738446f7f6521" +checksum = "b6210a39c4a217c46dfefb91af15d72a81bfc4410c41b1ed95b0990ae039af4f" dependencies = [ "bv", "fnv", "log", - "rand", + "rand 0.7.3", "rayon", "rustc_version 0.4.0", "serde", @@ -3058,11 +2914,28 @@ dependencies = [ "solana-sdk", ] +[[package]] +name = "solana-bucket-map" +version = "1.9.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee7acda82f2c8bbd1199c5d90a920fe7c429d676cabf0081defd9836392ad3d8" +dependencies = [ + "fs_extra", + "log", + "memmap2", + "rand 0.7.3", + "rayon", + "solana-logger", + "solana-measure", + "solana-sdk", + "tempfile", +] + [[package]] name = "solana-clap-utils" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d5da8ba4565446a2a7c0e89853ba255fc5ef5063509bb36e74e143735b0013" +checksum = "14f6171679f56afa12559c9849cd6cde67957781e8363c103787b680df02cedb" dependencies = [ "chrono", "clap 2.34.0", @@ -3078,9 +2951,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f6ac179411758ad6a4ad8033974ea16e17f0b72e40be404a9c9fe4665daa1" +checksum = "0866ac61c734701c2c782701d99342176b3c88ec47cd3f73994cdd5f57b151b0" dependencies = [ "dirs-next", "lazy_static", @@ -3092,27 +2965,27 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21f03617eeca735cd62370d135bdc18ee9bd3639d45ceff4034b0bb095e534df" +checksum = "90c3cd0299b1cf59b5ad6a96ea7db9306e93e66ef395bed80ed5df960685083b" dependencies = [ "base64 0.13.0", "bincode", - "bs58 0.3.1", + "bs58 0.4.0", "clap 2.34.0", "indicatif", "jsonrpc-core", "log", - "net2", "rayon", "reqwest", - "semver 0.11.0", + "semver 1.0.6", "serde", "serde_derive", "serde_json", "solana-account-decoder", "solana-clap-utils", "solana-faucet", + "solana-measure", "solana-net-utils", "solana-sdk", "solana-transaction-status", @@ -3126,66 +2999,33 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03bbba7d245abb7b6b9384ce6bca76f8bec34f8aa5e933613c3bf0ac1b58ba77" +checksum = "c9b3bf6b0916134a92b5c87690181680a63d22e20dda8ec6ba05260afbae50a0" dependencies = [ + "solana-program-runtime", "solana-sdk", ] [[package]] name = "solana-config-program" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d9fccdec6f246264b289b3d2ff7e9f23b7f5cd5c150c6245db38d27396dfd25" +checksum = "3ec25faf104c84393f7b4a549e08e952b9ba46c5df283adc59440f32fdce9789" dependencies = [ "bincode", "chrono", - "log", - "rand_core 0.6.3", "serde", "serde_derive", - "solana-sdk", -] - -[[package]] -name = "solana-crate-features" -version = "1.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df7aacb3780ddb5b5f1271bd1245571de59dfafd1ccea6b9ca311292e6257752" -dependencies = [ - "backtrace", - "bytes 0.4.12", - "cc", - "curve25519-dalek 2.1.3", - "ed25519-dalek", - "either", - "lazy_static", - "libc", - "rand_chacha", - "regex-syntax", - "reqwest", - "ring", - "serde", - "syn 0.15.44", - "syn 1.0.88", - "winapi", -] - -[[package]] -name = "solana-ed25519-program" -version = "1.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a29981f1d2b22b620d6ca786fcdc1a3313f0ec084fe98727be40cce165f3e99" -dependencies = [ + "solana-program-runtime", "solana-sdk", ] [[package]] name = "solana-faucet" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cac397bcaf0f5e560639ae691235a13cd7042fd97dab4b900018fb414e3b72b" +checksum = "77dc0e506f92d215422a9cdd6cd3f10a237c5b56ea14bf0bccbf414ecfa404ff" dependencies = [ "bincode", "byteorder", @@ -3206,16 +3046,16 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3495c76034ef52472ff4c5cd82f513073b415a7ac962d9a8aefe906a216e6392" +checksum = "34c9effc54db26704db05c474254e50a69fbd4c527df13aead8c8e38db127d7c" dependencies = [ - "bs58 0.3.1", + "bs58 0.4.0", "bv", - "generic-array 0.14.5", + "generic-array", "log", "memmap2", - "rustc_version 0.2.3", + "rustc_version 0.4.0", "serde", "serde_derive", "sha2", @@ -3226,21 +3066,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2193bd0e23b5bc93fce0533248c43b8aa53b27a91298e49d6fd018f51c43138" +checksum = "d343b3e8f168d009365acc13654ebbecbcd7d98e7100eaf9fdcd2a59a2d99706" dependencies = [ "proc-macro2 1.0.36", "quote 1.0.15", - "rustc_version 0.2.3", + "rustc_version 0.4.0", "syn 1.0.88", ] [[package]] name = "solana-logger" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4adacba4cc6b9d39899718fff3e312b32496ae44e570dfeff23d8b7ac60ad79" +checksum = "b5aea113f74b8ace6baf51256daf9d5228b6c65a774fe21a4416dd7e270d5dd4" dependencies = [ "env_logger", "lazy_static", @@ -3249,20 +3089,19 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afd8f16859d4e84f5552ca911889052f2b60b84676ca17225ad67c3060283208" +checksum = "e48319495b1f657cd1d534903604f568b152b5a264186a632007dd67b9064d2c" dependencies = [ "log", - "solana-metrics", "solana-sdk", ] [[package]] name = "solana-metrics" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd4d8a176edc331f2edad8f25d764c91eb8b185c5161f24b5eb8d5a32870c282" +checksum = "d0fd8731b61c473f5d22e8180119ed84b5de3352d6c46023dbe48a9b94a342c0" dependencies = [ "env_logger", "gethostname", @@ -3274,19 +3113,18 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cab35690808e345750435b451b441f8fe6c32ddafe6f2b724ac9d8e2fad1eeb" +checksum = "304714450324398cabf5b23f8d69122bd0ae6487d67dd89394692b9c2c2409c8" dependencies = [ "bincode", "clap 2.34.0", "log", "nix", - "rand", + "rand 0.7.3", "serde", "serde_derive", - "socket2 0.3.19", - "solana-clap-utils", + "socket2", "solana-logger", "solana-sdk", "solana-version", @@ -3296,21 +3134,23 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3aaa73acee6e4ced74f607ef53b3bbac0b8598bff06c95c790e8068d9c5a948" +checksum = "e08fb7143916963e7aaefff3be26a9d2046559b2c0cbaf2d97a5d064f9f28aed" dependencies = [ "ahash 0.7.6", "bincode", + "bv", "caps", - "curve25519-dalek 2.1.3", + "curve25519-dalek", "dlopen", "dlopen_derive", + "fnv", "lazy_static", "libc", "log", "nix", - "rand", + "rand 0.7.3", "rayon", "serde", "solana-bloom", @@ -3323,28 +3163,33 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f706757ff4b34f0f1fac72204bb2bfbda3c1a939c6c72ae25f1b31635d08bb" +checksum = "9b838bfabf09050f5f66cadf5e486fd415242165f06c9f9aed45162efb68c711" dependencies = [ "base64 0.13.0", "bincode", + "bitflags", "blake3", "borsh", "borsh-derive 0.9.3", - "bs58 0.3.1", + "bs58 0.4.0", "bv", "bytemuck", - "curve25519-dalek 2.1.3", - "hex", - "itertools 0.9.0", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.1.16", + "itertools 0.10.3", + "js-sys", "lazy_static", "libsecp256k1", "log", "num-derive", "num-traits", - "rand", - "rustc_version 0.2.3", + "parking_lot 0.11.2", + "rand 0.7.3", + "rustc_version 0.4.0", "rustversion", "serde", "serde_bytes", @@ -3356,13 +3201,38 @@ dependencies = [ "solana-logger", "solana-sdk-macro", "thiserror", + "wasm-bindgen", +] + +[[package]] +name = "solana-program-runtime" +version = "1.9.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f62c8ba176714b0c8e61ee0b9d2966a8470a85cba0f8cdf0e03ce05f0274f993" +dependencies = [ + "base64 0.13.0", + "bincode", + "itertools 0.10.3", + "libc", + "libloading", + "log", + "num-derive", + "num-traits", + "rustc_version 0.4.0", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-measure", + "solana-sdk", + "thiserror", ] [[package]] name = "solana-rayon-threadlimit" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "012936dd1e5ee19682ba4d09ee628c2ef33ba64988e38415efa6905084f3b283" +checksum = "c2141deb1e2b832e3a5c2faca05caae03c1603cba1c00f032979e41f8dad4271" dependencies = [ "lazy_static", "num_cpus", @@ -3370,20 +3240,20 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f009d977623835959420767d1d9db3b19b3cdac9ff57701f2449d453a2c2d7ee" +checksum = "db96445daeac9cdc7a63e67fd8e7cf2bacc492aab4c88d6511418c026f66885d" dependencies = [ "base32", - "console 0.14.1", + "console", "dialoguer", "hidapi", "log", "num-derive", "num-traits", - "parking_lot 0.10.2", + "parking_lot 0.11.2", "qstring", - "semver 0.9.0", + "semver 1.0.6", "solana-sdk", "thiserror", "uriparse", @@ -3391,49 +3261,50 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c534268069387e3f72a3c68a03e3d255b821730b8cc509ebec892a8facbb1300" +checksum = "4082b20f9cdf699bbb6d00e9a070f1944903e7a42eb57aec531bf64395e9b7dd" dependencies = [ "arrayref", "bincode", "blake3", "bv", + "bytemuck", "byteorder", "bzip2", - "crossbeam-channel 0.4.4", + "crossbeam-channel", "dashmap", "dir-diff", "flate2", "fnv", + "index_list", "itertools 0.10.3", "lazy_static", - "libc", - "libloading", "log", "memmap2", "num-derive", "num-traits", "num_cpus", "ouroboros", - "rand", + "rand 0.7.3", "rayon", "regex", - "rustc_version 0.2.3", + "rustc_version 0.4.0", "serde", "serde_derive", + "solana-address-lookup-table-program", "solana-bloom", + "solana-bucket-map", "solana-compute-budget-program", "solana-config-program", - "solana-ed25519-program", "solana-frozen-abi", "solana-frozen-abi-macro", "solana-logger", "solana-measure", "solana-metrics", + "solana-program-runtime", "solana-rayon-threadlimit", "solana-sdk", - "solana-secp256k1-program", "solana-stake-program", "solana-vote-program", "symlink", @@ -3445,17 +3316,16 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a0f8b4cd2eed1b5e5ea5674cc9e38018645922aa1db4b93d06a741ae8b7fe8" +checksum = "463899455a4a5f92a70c57880b57642432c32a5ab94d60bd126775d7349d7ec6" dependencies = [ "assert_matches", "base64 0.13.0", "bincode", + "bitflags", "borsh", - "borsh-derive 0.9.3", "bs58 0.4.0", - "bv", "bytemuck", "byteorder", "chrono", @@ -3463,22 +3333,21 @@ dependencies = [ "digest 0.9.0", "ed25519-dalek", "ed25519-dalek-bip32", - "generic-array 0.14.5", - "hex", - "hmac 0.10.1", - "itertools 0.9.0", + "generic-array", + "hmac 0.11.0", + "itertools 0.10.3", + "js-sys", "lazy_static", "libsecp256k1", "log", "memmap2", "num-derive", "num-traits", - "pbkdf2 0.6.0", + "pbkdf2 0.9.0", "qstring", - "rand", - "rand_chacha", - "rand_core 0.6.3", - "rustc_version 0.2.3", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version 0.4.0", "rustversion", "serde", "serde_bytes", @@ -3486,7 +3355,6 @@ dependencies = [ "serde_json", "sha2", "sha3", - "solana-crate-features", "solana-frozen-abi", "solana-frozen-abi-macro", "solana-logger", @@ -3494,47 +3362,40 @@ dependencies = [ "solana-sdk-macro", "thiserror", "uriparse", + "wasm-bindgen", ] [[package]] name = "solana-sdk-macro" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11fc226c8458927a632f152e44c80b5eb69e1ea74af444a026a617dd5d691bd9" +checksum = "b25759d80a81f0303b2827344b365f886a74306fa6af7c898921333d04d1c99b" dependencies = [ - "bs58 0.3.1", + "bs58 0.4.0", "proc-macro2 1.0.36", "quote 1.0.15", "rustversion", "syn 1.0.88", ] -[[package]] -name = "solana-secp256k1-program" -version = "1.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd21f5828bd41811bf3847b69a8971cabc976fb62a616904bf7b39ea3da4cf0" -dependencies = [ - "solana-sdk", -] - [[package]] name = "solana-stake-program" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51a563363277e9d933fc1487b682ce9b7e2ae7a832d64fcbbe9a27d1fd4397d1" +checksum = "77874f460d867b58bf7d56a3acf805abe0891b2fce8cc561bce71cc3cb87778d" dependencies = [ "bincode", "log", "num-derive", "num-traits", - "rustc_version 0.2.3", + "rustc_version 0.4.0", "serde", "serde_derive", "solana-config-program", "solana-frozen-abi", "solana-frozen-abi-macro", "solana-metrics", + "solana-program-runtime", "solana-sdk", "solana-vote-program", "thiserror", @@ -3542,14 +3403,14 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b6e2dd8d443b576cf6690bf21ee0251dfeeb4d98c6fc256d9746bb2d9b462a5" +checksum = "7dcbbcd699039257fa62a11e797ab7de932431344e33d416e2793e2cae105d8b" dependencies = [ "Inflector", "base64 0.12.3", "bincode", - "bs58 0.3.1", + "bs58 0.4.0", "lazy_static", "log", "serde", @@ -3569,37 +3430,37 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1639798878b48fbf66f5d93df1b86209f722afe265d31eb6ab6d41d5c032747" +checksum = "977ae37ed94ac11bbd10e534a972e97f44cf83f1be02ab6c147854cea071b35c" dependencies = [ "log", - "rustc_version 0.2.3", + "rustc_version 0.4.0", "serde", "serde_derive", "solana-frozen-abi", "solana-frozen-abi-macro", - "solana-logger", "solana-sdk", ] [[package]] name = "solana-vote-program" -version = "1.8.14" +version = "1.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec510e5dc644aa423260e01ac10341f56b2d16ac796e74cdaa41f603a61ffbf" +checksum = "1d80020b9981aaa45b9f4ce6080a1dc9f1deb25f0553659c25da3acf2437974f" dependencies = [ "bincode", "log", "num-derive", "num-traits", - "rustc_version 0.2.3", + "rustc_version 0.4.0", "serde", "serde_derive", "solana-frozen-abi", "solana-frozen-abi-macro", "solana-logger", "solana-metrics", + "solana-program-runtime", "solana-sdk", "thiserror", ] @@ -3745,7 +3606,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", "redox_syscall 0.2.11", @@ -3772,15 +3633,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "termios" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" -dependencies = [ - "libc", -] - [[package]] name = "textwrap" version = "0.11.0" @@ -3837,7 +3689,7 @@ dependencies = [ "hmac 0.8.1", "once_cell", "pbkdf2 0.4.0", - "rand", + "rand 0.7.3", "rustc-hash", "sha2", "thiserror", @@ -3867,7 +3719,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee" dependencies = [ - "bytes 1.1.0", + "bytes", "libc", "memchr", "mio", @@ -3876,7 +3728,7 @@ dependencies = [ "parking_lot 0.12.0", "pin-project-lite", "signal-hook-registry", - "socket2 0.4.4", + "socket2", "tokio-macros", "winapi", ] @@ -3919,7 +3771,7 @@ version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-core", "futures-sink", "log", @@ -3948,7 +3800,7 @@ version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a1bdf54a7c28a2bbf701e1d2233f6c77f473486b94bee4f9678da5a148dca7f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "pin-project-lite", "tracing-core", ] @@ -3970,22 +3822,24 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "tungstenite" -version = "0.10.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfea31758bf674f990918962e8e5f07071a3161bd7c4138ed23e416e1ac4264e" +checksum = "6ad3713a14ae247f22a728a0456a545df14acf3867f905adff84be99e23b3ad1" dependencies = [ - "base64 0.11.0", + "base64 0.13.0", "byteorder", - "bytes 0.5.6", + "bytes", "http", "httparse", - "input_buffer", "log", - "native-tls", - "rand", + "rand 0.8.5", + "rustls", "sha-1", + "thiserror", "url", "utf-8", + "webpki", + "webpki-roots", ] [[package]] @@ -4145,7 +3999,7 @@ version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -4170,7 +4024,7 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -4373,18 +4227,18 @@ dependencies = [ [[package]] name = "zstd" -version = "0.5.4+zstd.1.4.7" +version = "0.9.2+zstd.1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69996ebdb1ba8b1517f61387a883857818a66c8a295f487b1ffd8fd9d2c82910" +checksum = "2390ea1bf6c038c39674f22d95f0564725fc06034a47129179810b2fc58caa54" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "2.0.6+zstd.1.4.7" +version = "4.1.3+zstd.1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98aa931fb69ecee256d44589d19754e61851ae4769bf963b385119b1cc37a49e" +checksum = "e99d81b99fb3c2c2c794e3fe56c305c63d5173a16a46b5850b07c935ffc7db79" dependencies = [ "libc", "zstd-sys", @@ -4392,12 +4246,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "1.4.18+zstd.1.4.7" +version = "1.6.2+zstd.1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e6e8778706838f43f771d80d37787cb2fe06dafe89dd3aebaf6721b9eaec81" +checksum = "2daf2f248d9ea44454bfcb2516534e8b8ad2fc91bf818a1885495fc42bc8ac9f" dependencies = [ "cc", - "glob", - "itertools 0.9.0", "libc", ] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 1cfab6b64f..9af2d78fe2 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -25,10 +25,10 @@ shellexpand = "2.1.0" toml = "0.5.8" semver = "1.0.4" serde = { version = "1.0.122", features = ["derive"] } -solana-sdk = "~1.8.14" -solana-program = "~1.8.14" -solana-client = "~1.8.14" -solana-cli-config = "~1.8.14" +solana-sdk = "~1.9.11" +solana-program = "~1.9.11" +solana-client = "~1.9.11" +solana-cli-config = "~1.9.11" serum-common = { git = "https://github.com/project-serum/serum-dex", features = ["client"] } dirs = "3.0" heck = "0.3.1" diff --git a/docker/Makefile b/docker/Makefile index 697bca07d2..994e1310ed 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -6,7 +6,7 @@ ANCHOR_CLI=v$(shell awk -F ' = ' '$$1 ~ /version/ { gsub(/[\"]/, "", $$2); print # # Solana toolchain. # -SOLANA_CLI=v1.8.14 +SOLANA_CLI=v1.9.11 # # Build version should match the Anchor cli version. # diff --git a/lang/Cargo.toml b/lang/Cargo.toml index 718720b5e3..a52076a672 100644 --- a/lang/Cargo.toml +++ b/lang/Cargo.toml @@ -39,6 +39,6 @@ arrayref = "0.3.6" base64 = "0.13.0" borsh = "0.9" bytemuck = "1.4.0" -solana-program = "~1.8.14" +solana-program = "~1.9.11" thiserror = "1.0.20" bincode = "1.3.3" diff --git a/spl/Cargo.toml b/spl/Cargo.toml index 762e22cb50..3873da2d3d 100644 --- a/spl/Cargo.toml +++ b/spl/Cargo.toml @@ -20,6 +20,6 @@ dex = ["serum_dex"] [dependencies] anchor-lang = { path = "../lang", version = "0.22.1", features = ["derive"] } serum_dex = { git = "https://github.com/project-serum/serum-dex", rev = "1be91f2", version = "0.4.0", features = ["no-entrypoint"], optional = true } -solana-program = "~1.8.14" +solana-program = "~1.9.11" spl-token = { version = "3.1.1", features = ["no-entrypoint"], optional = true } spl-associated-token-account = { version = "1.0.3", features = ["no-entrypoint"], optional = true } From 7f14c13ff1ce9cb6bda5a34cdb77d4b93b5980b0 Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Sun, 20 Mar 2022 09:57:05 +0300 Subject: [PATCH 02/24] remove sysvar Fees, RecentBlockhashes --- CHANGELOG.md | 2 +- lang/src/lib.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3a3abf78c..6a4696f739 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +23,6 @@ incremented for features. * lang: Handle arrays with const as size in instruction data ([#1623](https://github.com/project-serum/anchor/issues/1623). * spl: Add support for revoke instruction ([#1493](https://github.com/project-serum/anchor/pull/1493)). * ts: Add provider parameter to `Spl.token` factory method ([#1597](https://github.com/project-serum/anchor/pull/1597)). -* lang, cli, spl: Update solana toolchain to v1.9.0 ([#1653](https://github.com/project-serum/anchor/pull/1653)). ### Fixes @@ -46,6 +45,7 @@ incremented for features. * lang: Add support for logging expected and actual values and pubkeys. Add `require_eq` and `require_keys_eq` macros. Add default error code to `require` macro ([#1572](https://github.com/project-serum/anchor/pull/1572)). * lang: Add `system_program` CPI wrapper functions. Make `system_program` module public instead of re-exporting `system_program::System`([#1629](https://github.com/project-serum/anchor/pull/1629)). * cli: `avm use` no long prompts [y/n] if an install is needed first - it just tells the user to `avm install` ([#1565](https://github.com/project-serum/anchor/pull/1565)) +* lang, cli, spl: Update solana toolchain to v1.9.0 ([#1653](https://github.com/project-serum/anchor/pull/1653)). ## [0.22.1] - 2022-02-28 diff --git a/lang/src/lib.rs b/lang/src/lib.rs index c798b42c43..915d8a1943 100644 --- a/lang/src/lib.rs +++ b/lang/src/lib.rs @@ -254,9 +254,7 @@ pub mod prelude { pub use solana_program::pubkey::Pubkey; pub use solana_program::sysvar::clock::Clock; pub use solana_program::sysvar::epoch_schedule::EpochSchedule; - pub use solana_program::sysvar::fees::Fees; pub use solana_program::sysvar::instructions::Instructions; - pub use solana_program::sysvar::recent_blockhashes::RecentBlockhashes; pub use solana_program::sysvar::rent::Rent; pub use solana_program::sysvar::rewards::Rewards; pub use solana_program::sysvar::slot_hashes::SlotHashes; From 08fdc8a5056a73bd5af34ac11eda87bc563efeae Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Sun, 20 Mar 2022 10:59:21 +0300 Subject: [PATCH 03/24] update deprecated api --- cli/src/lib.rs | 24 ++++++++++++------------ client/src/lib.rs | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cli/src/lib.rs b/cli/src/lib.rs index 55a2fc8773..712e641c69 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -1556,12 +1556,12 @@ fn idl_set_buffer(cfg_override: &ConfigOverride, program_id: Pubkey, buffer: Pub }; // Build the transaction. - let (recent_hash, _fee_calc) = client.get_recent_blockhash()?; + let latest_hash = client.get_latest_blockhash()?; let tx = Transaction::new_signed_with_payer( &[set_buffer_ix], Some(&keypair.pubkey()), &[&keypair], - recent_hash, + latest_hash, ); // Send the transaction. @@ -1647,12 +1647,12 @@ fn idl_set_authority( data, }; // Send transaction. - let (recent_hash, _fee_calc) = client.get_recent_blockhash()?; + let latest_hash = client.get_latest_blockhash()?; let tx = Transaction::new_signed_with_payer( &[ix], Some(&keypair.pubkey()), &[&keypair], - recent_hash, + latest_hash, ); client.send_and_confirm_transaction_with_spinner_and_config( &tx, @@ -1732,12 +1732,12 @@ fn idl_write(cfg: &Config, program_id: &Pubkey, idl: &Idl, idl_address: Pubkey) data, }; // Send transaction. - let (recent_hash, _fee_calc) = client.get_recent_blockhash()?; + let latest_hash = client.get_latest_blockhash()?; let tx = Transaction::new_signed_with_payer( &[ix], Some(&keypair.pubkey()), &[&keypair], - recent_hash, + latest_hash, ); client.send_and_confirm_transaction_with_spinner_and_config( &tx, @@ -2156,7 +2156,7 @@ fn start_test_validator( .and_then(|test| test.startup_wait) .unwrap_or(5_000); while count < ms_wait { - let r = client.get_recent_blockhash(); + let r = client.get_latest_blockhash(); if r.is_ok() { break; } @@ -2165,7 +2165,7 @@ fn start_test_validator( } if count == ms_wait { eprintln!( - "Unable to get recent blockhash. Test validator does not look started. Check {} for errors. Consider increasing [test.startup_wait] in Anchor.toml.", + "Unable to get latest blockhash. Test validator does not look started. Check {} for errors. Consider increasing [test.startup_wait] in Anchor.toml.", test_ledger_log_filename ); validator_handle.kill()?; @@ -2385,12 +2385,12 @@ fn create_idl_account( accounts, data, }; - let (recent_hash, _fee_calc) = client.get_recent_blockhash()?; + let latest_hash = client.get_latest_blockhash()?; let tx = Transaction::new_signed_with_payer( &[ix], Some(&keypair.pubkey()), &[&keypair], - recent_hash, + latest_hash, ); client.send_and_confirm_transaction_with_spinner_and_config( &tx, @@ -2451,12 +2451,12 @@ fn create_idl_buffer( }; // Build the transaction. - let (recent_hash, _fee_calc) = client.get_recent_blockhash()?; + let latest_hash = client.get_latest_blockhash()?; let tx = Transaction::new_signed_with_payer( &[create_account_ix, create_buffer_ix], Some(&keypair.pubkey()), &[&keypair, &buffer], - recent_hash, + latest_hash, ); // Send the transaction. diff --git a/client/src/lib.rs b/client/src/lib.rs index af79175855..b3291ac2d6 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -544,12 +544,12 @@ impl<'a> RequestBuilder<'a> { let rpc_client = RpcClient::new_with_commitment(self.cluster, self.options); let tx = { - let (recent_hash, _fee_calc) = rpc_client.get_recent_blockhash()?; + let latest_hash = rpc_client.get_latest_blockhash()?; Transaction::new_signed_with_payer( &instructions, Some(&self.payer.pubkey()), &signers, - recent_hash, + latest_hash, ) }; From 0fc3a0d7b0839d9764ce38e7655c0310c6867ad8 Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Sun, 20 Mar 2022 14:09:16 +0300 Subject: [PATCH 04/24] fix zero-copy test --- tests/zero-copy/programs/zero-copy/tests/compute_unit_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/zero-copy/programs/zero-copy/tests/compute_unit_test.rs b/tests/zero-copy/programs/zero-copy/tests/compute_unit_test.rs index 485782ff35..a489de4578 100644 --- a/tests/zero-copy/programs/zero-copy/tests/compute_unit_test.rs +++ b/tests/zero-copy/programs/zero-copy/tests/compute_unit_test.rs @@ -38,7 +38,7 @@ async fn update_foo() { let mut pt = ProgramTest::new("zero_copy", zero_copy::id(), None); pt.add_account(foo_pubkey, foo_account); - pt.set_bpf_compute_max_units(3077); + pt.set_compute_max_units(3139); let (mut banks_client, payer, recent_blockhash) = pt.start().await; let client = Client::new_with_options( From 703755de31db01e6f4a04f90405c57f65739810f Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 14:31:15 -0400 Subject: [PATCH 05/24] separate test for miscNonRentExempt that uses old validator --- .github/workflows/tests.yaml | 35 +++++++ tests/misc/Anchor.toml | 3 +- tests/misc/tests/misc.ts | 126 +----------------------- tests/misc/tests/miscNonRentExempt.ts | 135 ++++++++++++++++++++++++++ 4 files changed, 176 insertions(+), 123 deletions(-) create mode 100644 tests/misc/tests/miscNonRentExempt.ts diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a93a425f76..836a885759 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -239,6 +239,41 @@ jobs: - run: cd tests/bpf-upgradeable-state && cp bpf_upgradeable_state-keypair.json target/deploy/bpf_upgradeable_state-keypair.json && anchor test --skip-local-validator --skip-build --skip-lint - uses: ./.github/actions/git-diff/ + # this test exists to make sure that anchor + # checks rent correctly for legacy accounts + # that don't have to be rent-exempt + test-misc-non-rent-exempt: + needs: setup-anchor-cli # this is built with a different solana version but that's fine since it's just the cli + name: Test tests/misc/nonRentExempt + runs-on: ubuntu-18.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - uses: ./.github/actions/setup/ + - uses: ./.github/actions/setup-ts/ + - uses: actions/cache@v2 + name: Cache Solana Tool Suite + id: cache-solana + with: + path: | + ~/.cache/solana/ + ~/.local/share/solana/ + key: solana-${{ runner.os }}-v0000-1.8.14 + # using an outdated validator but that is ok as long as the test doesn't include newer incompatible features + - run: sh -c "$(curl -sSfL https://release.solana.com/v1.8.14/install)" + shell: bash + - run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH + shell: bash + - run: solana-keygen new --no-bip39-passphrase + shell: bash + - run: solana config set --url localhost + shell: bash + - run: cd tests/misc && yarn --frozen-lockfile + - run: cd tests/misc && yarn link @project-serum/anchor + - run: cd tests/misc && anchor build --skip-lint + - run: solana-test-validator --bpf-program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS tests/misc/target/deploy/misc.so -r --quiet & + - run: cd tests/misc && anchor run test_non_rent_exempt + test-anchor-init: needs: setup-anchor-cli name: Test Anchor Init diff --git a/tests/misc/Anchor.toml b/tests/misc/Anchor.toml index 12cd643532..712ae84f18 100644 --- a/tests/misc/Anchor.toml +++ b/tests/misc/Anchor.toml @@ -14,4 +14,5 @@ program = "./target/deploy/misc.so" exclude = ["programs/shared"] [scripts] -test = "yarn run ts-mocha -t 1000000 tests/*.ts" +test = "yarn run ts-mocha -t 1000000 tests/misc.ts" +test_non_rent_exempt = "yarn run ts-mocha -t 1000000 tests/miscNonRentExempt.ts" diff --git a/tests/misc/tests/misc.ts b/tests/misc/tests/misc.ts index f8c4e0dec3..b964dfe4b1 100644 --- a/tests/misc/tests/misc.ts +++ b/tests/misc/tests/misc.ts @@ -12,6 +12,7 @@ import { ASSOCIATED_TOKEN_PROGRAM_ID, } from "@solana/spl-token"; import { Misc } from "../target/types/misc"; +import { Misc2 } from "../target/types/misc2"; const utf8 = anchor.utils.bytes.utf8; const { assert } = require("chai"); const nativeAssert = require("assert"); @@ -20,8 +21,8 @@ const miscIdl = require("../target/idl/misc.json"); describe("misc", () => { // Configure the client to use the local cluster. anchor.setProvider(anchor.Provider.env()); - const program = anchor.workspace.Misc; - const misc2Program = anchor.workspace.Misc2; + const program = anchor.workspace.Misc as Program; + const misc2Program = anchor.workspace.Misc2 as Program; it("Can allocate extra space for a state constructor", async () => { const tx = await program.state.rpc.new(); @@ -159,7 +160,7 @@ describe("misc", () => { "Program data: jvbowsvlmkcJAAAA", "Program data: zxM5neEnS1kBAgMEBQYHCAkK", "Program data: g06Ei2GL1gIBAgMEBQYHCAkKCw==", - "Program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS consumed 5320 of 200000 compute units", + "Program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS consumed 5395 of 1400000 compute units", "Program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS success", ]; @@ -1456,34 +1457,6 @@ describe("misc", () => { } }); - it("init_if_needed checks rent_exemption if init is not needed", async () => { - const data = anchor.web3.Keypair.generate(); - await program.rpc.initDecreaseLamports({ - accounts: { - data: data.publicKey, - user: anchor.getProvider().wallet.publicKey, - systemProgram: SystemProgram.programId, - }, - signers: [data], - }); - - try { - await program.rpc.initIfNeededChecksRentExemption({ - accounts: { - data: data.publicKey, - user: anchor.getProvider().wallet.publicKey, - systemProgram: SystemProgram.programId, - }, - signers: [data], - }); - assert.ok(false); - } catch (_err) { - assert.isTrue(_err instanceof AnchorError); - const err: AnchorError = _err; - assert.strictEqual(err.error.errorCode.number, 2005); - } - }); - it("Can use multidimensional array", async () => { const array2d = new Array(10).fill(new Array(10).fill(99)); const data = anchor.web3.Keypair.generate(); @@ -1525,97 +1498,6 @@ describe("misc", () => { assert.deepStrictEqual(dataAccount.data, array2d); }); - it("allows non-rent exempt accounts", async () => { - const data = anchor.web3.Keypair.generate(); - await program.rpc.initializeNoRentExempt({ - accounts: { - data: data.publicKey, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, - }, - signers: [data], - instructions: [ - SystemProgram.createAccount({ - programId: program.programId, - space: 8 + 16 + 16, - lamports: - await program.provider.connection.getMinimumBalanceForRentExemption( - 39 - ), - fromPubkey: anchor.getProvider().wallet.publicKey, - newAccountPubkey: data.publicKey, - }), - ], - }); - await program.rpc.testNoRentExempt({ - accounts: { - data: data.publicKey, - }, - }); - }); - - it("allows rent exemption to be skipped", async () => { - const data = anchor.web3.Keypair.generate(); - await program.rpc.initializeSkipRentExempt({ - accounts: { - data: data.publicKey, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, - }, - signers: [data], - instructions: [ - SystemProgram.createAccount({ - programId: program.programId, - space: 8 + 16 + 16, - lamports: - await program.provider.connection.getMinimumBalanceForRentExemption( - 39 - ), - fromPubkey: anchor.getProvider().wallet.publicKey, - newAccountPubkey: data.publicKey, - }), - ], - }); - }); - - it("can use rent_exempt to enforce rent exemption", async () => { - const data = anchor.web3.Keypair.generate(); - await program.rpc.initializeSkipRentExempt({ - accounts: { - data: data.publicKey, - rent: anchor.web3.SYSVAR_RENT_PUBKEY, - }, - signers: [data], - instructions: [ - SystemProgram.createAccount({ - programId: program.programId, - space: 8 + 16 + 16, - lamports: - await program.provider.connection.getMinimumBalanceForRentExemption( - 39 - ), - fromPubkey: anchor.getProvider().wallet.publicKey, - newAccountPubkey: data.publicKey, - }), - ], - }); - - try { - await program.rpc.testEnforceRentExempt({ - accounts: { - data: data.publicKey, - }, - }); - assert.ok(false); - } catch (_err) { - assert.isTrue(_err instanceof AnchorError); - const err: AnchorError = _err; - assert.strictEqual(err.error.errorCode.number, 2005); - assert.strictEqual( - "A rent exemption constraint was violated", - err.error.errorMessage - ); - } - }); - describe("Can validate PDAs derived from other program ids", () => { it("With bumps using create_program_address", async () => { const [firstPDA, firstBump] = diff --git a/tests/misc/tests/miscNonRentExempt.ts b/tests/misc/tests/miscNonRentExempt.ts new file mode 100644 index 0000000000..168edb5a7d --- /dev/null +++ b/tests/misc/tests/miscNonRentExempt.ts @@ -0,0 +1,135 @@ +import * as anchor from "@project-serum/anchor"; +import { Program, BN, IdlAccounts, AnchorError } from "@project-serum/anchor"; +import { + PublicKey, + Keypair, + SystemProgram, + SYSVAR_RENT_PUBKEY +} from "@solana/web3.js"; +import { Misc } from "../target/types/misc"; +const { assert } = require("chai"); + +describe("miscNonRentExempt", () => { + // Configure the client to use the local cluster. + anchor.setProvider(anchor.Provider.env()); + const program = anchor.workspace.Misc as Program; + + it("init_if_needed checks rent_exemption if init is not needed", async () => { + const data = Keypair.generate(); + await program.rpc.initDecreaseLamports({ + accounts: { + data: data.publicKey, + user: anchor.getProvider().wallet.publicKey, + systemProgram: SystemProgram.programId, + }, + signers: [data], + }); + + try { + await program.rpc.initIfNeededChecksRentExemption({ + accounts: { + data: data.publicKey, + user: anchor.getProvider().wallet.publicKey, + systemProgram: SystemProgram.programId, + }, + signers: [data], + }); + assert.ok(false); + } catch (_err) { + assert.isTrue(_err instanceof AnchorError); + const err: AnchorError = _err; + assert.strictEqual(err.error.errorCode.number, 2005); + } + }); + + it("allows non-rent exempt accounts", async () => { + const data = Keypair.generate(); + await program.rpc.initializeNoRentExempt({ + accounts: { + data: data.publicKey, + rent: SYSVAR_RENT_PUBKEY, + }, + signers: [data], + instructions: [ + SystemProgram.createAccount({ + programId: program.programId, + space: 8 + 16 + 16, + lamports: + await program.provider.connection.getMinimumBalanceForRentExemption( + 39 + ), + fromPubkey: anchor.getProvider().wallet.publicKey, + newAccountPubkey: data.publicKey, + }), + ], + }); + await program.rpc.testNoRentExempt({ + accounts: { + data: data.publicKey, + }, + }); + }); + + it("allows rent exemption to be skipped", async () => { + const data = anchor.web3.Keypair.generate(); + await program.rpc.initializeSkipRentExempt({ + accounts: { + data: data.publicKey, + rent: SYSVAR_RENT_PUBKEY, + }, + signers: [data], + instructions: [ + SystemProgram.createAccount({ + programId: program.programId, + space: 8 + 16 + 16, + lamports: + await program.provider.connection.getMinimumBalanceForRentExemption( + 39 + ), + fromPubkey: anchor.getProvider().wallet.publicKey, + newAccountPubkey: data.publicKey, + }), + ], + }); + }); + + it("can use rent_exempt to enforce rent exemption", async () => { + const data = Keypair.generate(); + await program.rpc.initializeSkipRentExempt({ + accounts: { + data: data.publicKey, + rent: SYSVAR_RENT_PUBKEY, + }, + signers: [data], + instructions: [ + SystemProgram.createAccount({ + programId: program.programId, + space: 8 + 16 + 16, + lamports: + await program.provider.connection.getMinimumBalanceForRentExemption( + 39 + ), + fromPubkey: anchor.getProvider().wallet.publicKey, + newAccountPubkey: data.publicKey, + }), + ], + }); + + try { + await program.rpc.testEnforceRentExempt({ + accounts: { + data: data.publicKey, + }, + }); + assert.ok(false); + } catch (_err) { + assert.isTrue(_err instanceof AnchorError); + const err: AnchorError = _err; + assert.strictEqual(err.error.errorCode.number, 2005); + assert.strictEqual( + "A rent exemption constraint was violated", + err.error.errorMessage + ); + } + }); +}); From 49d1981c39154101987128fdf6500b3d63f5fb89 Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 14:32:20 -0400 Subject: [PATCH 06/24] update to solana 1.9.13 --- .github/workflows/tests.yaml | 2 +- cli/Cargo.toml | 10 +++++----- docker/Makefile | 2 +- lang/Cargo.toml | 2 +- spl/Cargo.toml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 836a885759..f32521422b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -8,7 +8,7 @@ on: branches: - master env: - SOLANA_CLI_VERSION: 1.9.11 + SOLANA_CLI_VERSION: 1.9.13 NODE_VERSION: 17.0.1 jobs: diff --git a/cli/Cargo.toml b/cli/Cargo.toml index c74e80d60f..b4d3b06ce6 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -25,11 +25,11 @@ shellexpand = "2.1.0" toml = "0.5.8" semver = "1.0.4" serde = { version = "1.0.122", features = ["derive"] } -solana-sdk = "~1.9.11" -solana-program = "~1.9.11" -solana-client = "~1.9.11" -solana-cli-config = "~1.9.11" -solana-faucet = "~1.9.11" +solana-sdk = "~1.9.13" +solana-program = "~1.9.13" +solana-client = "~1.9.13" +solana-cli-config = "~1.9.13" +solana-faucet = "~1.9.13" dirs = "3.0" heck = "0.3.1" flate2 = "1.0.19" diff --git a/docker/Makefile b/docker/Makefile index 994e1310ed..4374dc1fcf 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -6,7 +6,7 @@ ANCHOR_CLI=v$(shell awk -F ' = ' '$$1 ~ /version/ { gsub(/[\"]/, "", $$2); print # # Solana toolchain. # -SOLANA_CLI=v1.9.11 +SOLANA_CLI=v1.9.13 # # Build version should match the Anchor cli version. # diff --git a/lang/Cargo.toml b/lang/Cargo.toml index f4edd8e275..aae131de83 100644 --- a/lang/Cargo.toml +++ b/lang/Cargo.toml @@ -39,6 +39,6 @@ arrayref = "0.3.6" base64 = "0.13.0" borsh = "0.9" bytemuck = "1.4.0" -solana-program = "~1.9.11" +solana-program = "~1.9.13" thiserror = "1.0.20" bincode = "1.3.3" diff --git a/spl/Cargo.toml b/spl/Cargo.toml index 88269c2257..a038c1dcb4 100644 --- a/spl/Cargo.toml +++ b/spl/Cargo.toml @@ -20,6 +20,6 @@ dex = ["serum_dex"] [dependencies] anchor-lang = { path = "../lang", version = "0.23.0", features = ["derive"] } serum_dex = { git = "https://github.com/project-serum/serum-dex", rev = "1be91f2", version = "0.4.0", features = ["no-entrypoint"], optional = true } -solana-program = "~1.9.11" +solana-program = "~1.9.13" spl-token = { version = "3.1.1", features = ["no-entrypoint"], optional = true } spl-associated-token-account = { version = "1.0.3", features = ["no-entrypoint"], optional = true } From 1c9cf1aa0860d834581f454825c36d0644e03b9a Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 14:58:23 -0400 Subject: [PATCH 07/24] lint:fix --- tests/misc/tests/miscNonRentExempt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/misc/tests/miscNonRentExempt.ts b/tests/misc/tests/miscNonRentExempt.ts index 168edb5a7d..03bfa6d68b 100644 --- a/tests/misc/tests/miscNonRentExempt.ts +++ b/tests/misc/tests/miscNonRentExempt.ts @@ -4,7 +4,7 @@ import { PublicKey, Keypair, SystemProgram, - SYSVAR_RENT_PUBKEY + SYSVAR_RENT_PUBKEY, } from "@solana/web3.js"; import { Misc } from "../target/types/misc"; const { assert } = require("chai"); From d8b45870163d39b38eb37e35204e11692772843a Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 14:59:05 -0400 Subject: [PATCH 08/24] fix ci --- .github/workflows/tests.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f32521422b..303b4b3a9a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -268,6 +268,18 @@ jobs: shell: bash - run: solana config set --url localhost shell: bash + - uses: actions/download-artifact@v2 + with: + name: anchor-binary + path: ~/.cargo/bin/ + + - uses: actions/cache@v2 + name: Cache tests/misc target + id: cache-test-target + with: + path: tests/misc/target + key: cargo-${{ runner.os }}-tests/misc-${{ env.ANCHOR_VERSION }}-1.8.14-${{ hashFiles('**/Cargo.lock') }} + - run: cd tests/misc && yarn --frozen-lockfile - run: cd tests/misc && yarn link @project-serum/anchor - run: cd tests/misc && anchor build --skip-lint From 9ab2c41edcd6cfc4b5e7da2fd3c30b542bd1452a Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 15:32:58 -0400 Subject: [PATCH 09/24] tests: fix zero copy test --- tests/zero-copy/programs/zero-copy/tests/compute_unit_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/zero-copy/programs/zero-copy/tests/compute_unit_test.rs b/tests/zero-copy/programs/zero-copy/tests/compute_unit_test.rs index a489de4578..0e4e843078 100644 --- a/tests/zero-copy/programs/zero-copy/tests/compute_unit_test.rs +++ b/tests/zero-copy/programs/zero-copy/tests/compute_unit_test.rs @@ -38,7 +38,7 @@ async fn update_foo() { let mut pt = ProgramTest::new("zero_copy", zero_copy::id(), None); pt.add_account(foo_pubkey, foo_account); - pt.set_compute_max_units(3139); + pt.set_compute_max_units(3157); let (mut banks_client, payer, recent_blockhash) = pt.start().await; let client = Client::new_with_options( From 44f0daba90fca0e7072d48213a92d1ec09389f17 Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 15:33:15 -0400 Subject: [PATCH 10/24] ci: fix ci --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 303b4b3a9a..1e940d9870 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -272,7 +272,7 @@ jobs: with: name: anchor-binary path: ~/.cargo/bin/ - + - run: chmod +x ~/.cargo/bin/anchor - uses: actions/cache@v2 name: Cache tests/misc target id: cache-test-target From 3deea670d36a1235814e66213be50dd70018ed99 Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 15:50:23 -0400 Subject: [PATCH 11/24] ci: add validator startup time --- .github/workflows/tests.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 1e940d9870..ebe254a8f1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -284,6 +284,8 @@ jobs: - run: cd tests/misc && yarn link @project-serum/anchor - run: cd tests/misc && anchor build --skip-lint - run: solana-test-validator --bpf-program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS tests/misc/target/deploy/misc.so -r --quiet & + - run: sleep 5 + name: wait for validator to start up - run: cd tests/misc && anchor run test_non_rent_exempt test-anchor-init: From 1dfe297c6829970ab8e63fcafa79134053f0ed18 Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 16:04:13 -0400 Subject: [PATCH 12/24] debug: cat validator logs --- .github/workflows/tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ebe254a8f1..a591de3491 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -286,6 +286,7 @@ jobs: - run: solana-test-validator --bpf-program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS tests/misc/target/deploy/misc.so -r --quiet & - run: sleep 5 name: wait for validator to start up + - run: cat tests/misc/.anchor/test-ledger/validator.log - run: cd tests/misc && anchor run test_non_rent_exempt test-anchor-init: From a0d40d5850919baa0253baf2b66ffea3614e728f Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 16:19:36 -0400 Subject: [PATCH 13/24] ci: fix --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a591de3491..a2c148776d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -286,7 +286,7 @@ jobs: - run: solana-test-validator --bpf-program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS tests/misc/target/deploy/misc.so -r --quiet & - run: sleep 5 name: wait for validator to start up - - run: cat tests/misc/.anchor/test-ledger/validator.log + - run: cat ./test-ledger/validator.log - run: cd tests/misc && anchor run test_non_rent_exempt test-anchor-init: From fa20acc86124a49d894cf9de7d138a27992199aa Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 17:11:59 -0400 Subject: [PATCH 14/24] update auction-house submodule --- tests/auction-house | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auction-house b/tests/auction-house index 63e7bb81be..1de149a19d 160000 --- a/tests/auction-house +++ b/tests/auction-house @@ -1 +1 @@ -Subproject commit 63e7bb81beb76f2722245a37c16a7b0b00d6905a +Subproject commit 1de149a19ded49afd064db85722f0f71da2a3843 From c1dc93440b7b1d3c19e0a964a203bff7ee10b9d6 Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 17:20:41 -0400 Subject: [PATCH 15/24] ci: start validator ahdn then deploy --- .github/workflows/tests.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a2c148776d..c9cda0bc1d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -283,9 +283,10 @@ jobs: - run: cd tests/misc && yarn --frozen-lockfile - run: cd tests/misc && yarn link @project-serum/anchor - run: cd tests/misc && anchor build --skip-lint - - run: solana-test-validator --bpf-program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS tests/misc/target/deploy/misc.so -r --quiet & + - run: solana-test-validator -r --quiet & - run: sleep 5 name: wait for validator to start up + - run: cd tests/misc && solana program deploy --program-id Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS target/deploy/misc.so - run: cat ./test-ledger/validator.log - run: cd tests/misc && anchor run test_non_rent_exempt From d01e3995ec72c7610a1e84f8e9be284258b143b1 Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 17:23:27 -0400 Subject: [PATCH 16/24] update submodule --- tests/auction-house | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auction-house b/tests/auction-house index 1de149a19d..2870d5aecb 160000 --- a/tests/auction-house +++ b/tests/auction-house @@ -1 +1 @@ -Subproject commit 1de149a19ded49afd064db85722f0f71da2a3843 +Subproject commit 2870d5aecbb47648ffcae94ce771f1de16241953 From 271fe2020dee4c188cc82643dffe884223a712ac Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 17:36:48 -0400 Subject: [PATCH 17/24] ci: fix tests and ci --- .github/workflows/tests.yaml | 2 +- tests/misc/Anchor.toml | 2 +- tests/misc/programs/misc/src/lib.rs | 2 +- tests/misc/tests/misc.ts | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c9cda0bc1d..531051614c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -286,7 +286,7 @@ jobs: - run: solana-test-validator -r --quiet & - run: sleep 5 name: wait for validator to start up - - run: cd tests/misc && solana program deploy --program-id Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS target/deploy/misc.so + - run: cd tests/misc && solana program deploy --program-id USED_IN_CI.json target/deploy/misc.so - run: cat ./test-ledger/validator.log - run: cd tests/misc && anchor run test_non_rent_exempt diff --git a/tests/misc/Anchor.toml b/tests/misc/Anchor.toml index 712ae84f18..e4ee23199f 100644 --- a/tests/misc/Anchor.toml +++ b/tests/misc/Anchor.toml @@ -3,7 +3,7 @@ cluster = "localnet" wallet = "~/.config/solana/id.json" [programs.localnet] -misc = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" +misc = "3TEqcc8xhrhdspwbvoamUJe2borm4Nr72JxL66k6rgrh" misc2 = "HmbTLCmaGvZhKnn1Zfa1JVnp7vkMV4DYVxPLWBVoN65L" [[test.genesis]] diff --git a/tests/misc/programs/misc/src/lib.rs b/tests/misc/programs/misc/src/lib.rs index fa09a7e9fe..149ce654b2 100644 --- a/tests/misc/programs/misc/src/lib.rs +++ b/tests/misc/programs/misc/src/lib.rs @@ -11,7 +11,7 @@ mod account; mod context; mod event; -declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"); +declare_id!("3TEqcc8xhrhdspwbvoamUJe2borm4Nr72JxL66k6rgrh"); #[constant] pub const BASE: u128 = 1_000_000; diff --git a/tests/misc/tests/misc.ts b/tests/misc/tests/misc.ts index b964dfe4b1..f02d7f1a53 100644 --- a/tests/misc/tests/misc.ts +++ b/tests/misc/tests/misc.ts @@ -153,15 +153,15 @@ describe("misc", () => { it("Can retrieve events when simulating a transaction", async () => { const resp = await program.simulate.testSimulate(44); const expectedRaw = [ - "Program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS invoke [1]", + "Program 3TEqcc8xhrhdspwbvoamUJe2borm4Nr72JxL66k6rgrh invoke [1]", "Program log: Instruction: TestSimulate", "Program data: NgyCA9omwbMsAAAA", "Program data: fPhuIELK/k7SBAAA", "Program data: jvbowsvlmkcJAAAA", "Program data: zxM5neEnS1kBAgMEBQYHCAkK", "Program data: g06Ei2GL1gIBAgMEBQYHCAkKCw==", - "Program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS consumed 5395 of 1400000 compute units", - "Program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS success", + "Program 3TEqcc8xhrhdspwbvoamUJe2borm4Nr72JxL66k6rgrh consumed 5395 of 1400000 compute units", + "Program 3TEqcc8xhrhdspwbvoamUJe2borm4Nr72JxL66k6rgrh success", ]; assert.deepStrictEqual(expectedRaw, resp.raw); From b614261ba8a916011384963cde57fa62f744370e Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 17:46:40 -0400 Subject: [PATCH 18/24] add USED_IN_CI keypair --- tests/misc/USED_IN_CI.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/misc/USED_IN_CI.json diff --git a/tests/misc/USED_IN_CI.json b/tests/misc/USED_IN_CI.json new file mode 100644 index 0000000000..f2d0f344ef --- /dev/null +++ b/tests/misc/USED_IN_CI.json @@ -0,0 +1 @@ +[156,44,220,206,65,88,13,39,74,158,43,12,39,202,14,183,93,39,125,124,11,198,19,157,67,169,221,158,115,202,132,115,36,112,31,43,136,102,227,71,225,62,103,95,68,124,18,191,52,169,97,188,151,165,107,47,74,229,109,37,97,143,89,86] \ No newline at end of file From 4944efd12940fa20ef44634da4910b7162a83ace Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 18:01:58 -0400 Subject: [PATCH 19/24] ci: fix pls --- .github/workflows/tests.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 531051614c..e0887a3953 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -280,15 +280,13 @@ jobs: path: tests/misc/target key: cargo-${{ runner.os }}-tests/misc-${{ env.ANCHOR_VERSION }}-1.8.14-${{ hashFiles('**/Cargo.lock') }} + - run: solana-test-validator -r --quiet & - run: cd tests/misc && yarn --frozen-lockfile - run: cd tests/misc && yarn link @project-serum/anchor - run: cd tests/misc && anchor build --skip-lint - - run: solana-test-validator -r --quiet & - - run: sleep 5 - name: wait for validator to start up - run: cd tests/misc && solana program deploy --program-id USED_IN_CI.json target/deploy/misc.so - - run: cat ./test-ledger/validator.log - run: cd tests/misc && anchor run test_non_rent_exempt + - uses: ./.github/actions/git-diff/ test-anchor-init: needs: setup-anchor-cli From 3e96ccdedca3f3280c417fc3bda910d6d3b313fc Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 18:20:52 -0400 Subject: [PATCH 20/24] ci: wip --- .github/workflows/tests.yaml | 2 +- tests/misc/Anchor.toml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e0887a3953..a9ccb69b3d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -285,7 +285,7 @@ jobs: - run: cd tests/misc && yarn link @project-serum/anchor - run: cd tests/misc && anchor build --skip-lint - run: cd tests/misc && solana program deploy --program-id USED_IN_CI.json target/deploy/misc.so - - run: cd tests/misc && anchor run test_non_rent_exempt + - run: cd tests/misc && anchor test --skip-lint - uses: ./.github/actions/git-diff/ test-anchor-init: diff --git a/tests/misc/Anchor.toml b/tests/misc/Anchor.toml index e4ee23199f..30bc243fb6 100644 --- a/tests/misc/Anchor.toml +++ b/tests/misc/Anchor.toml @@ -14,5 +14,4 @@ program = "./target/deploy/misc.so" exclude = ["programs/shared"] [scripts] -test = "yarn run ts-mocha -t 1000000 tests/misc.ts" -test_non_rent_exempt = "yarn run ts-mocha -t 1000000 tests/miscNonRentExempt.ts" +test = "yarn run ts-mocha -t 1000000 tests/*.ts" From 3071838747aa3bf9918182ebdea6149f1e58a8b7 Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 18:33:00 -0400 Subject: [PATCH 21/24] fix ci --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a9ccb69b3d..cf9ea54978 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -285,7 +285,7 @@ jobs: - run: cd tests/misc && yarn link @project-serum/anchor - run: cd tests/misc && anchor build --skip-lint - run: cd tests/misc && solana program deploy --program-id USED_IN_CI.json target/deploy/misc.so - - run: cd tests/misc && anchor test --skip-lint + - run: cd tests/misc && anchor test --skip-lint --skip-deploy --skip-local-validator --skip-build - uses: ./.github/actions/git-diff/ test-anchor-init: From 93ebf86d0671e6c5f349693cf59d98118740ce23 Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 18:56:16 -0400 Subject: [PATCH 22/24] ci: fix ci --- .github/workflows/tests.yaml | 6 ++---- tests/misc/USED_IN_CI.json | 1 - tests/misc/ci.sh | 4 ++++ tests/misc/{tests => }/miscNonRentExempt.ts | 0 4 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 tests/misc/USED_IN_CI.json create mode 100755 tests/misc/ci.sh rename tests/misc/{tests => }/miscNonRentExempt.ts (100%) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index cf9ea54978..201e0fdda3 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -280,12 +280,10 @@ jobs: path: tests/misc/target key: cargo-${{ runner.os }}-tests/misc-${{ env.ANCHOR_VERSION }}-1.8.14-${{ hashFiles('**/Cargo.lock') }} - - run: solana-test-validator -r --quiet & - run: cd tests/misc && yarn --frozen-lockfile - run: cd tests/misc && yarn link @project-serum/anchor - - run: cd tests/misc && anchor build --skip-lint - - run: cd tests/misc && solana program deploy --program-id USED_IN_CI.json target/deploy/misc.so - - run: cd tests/misc && anchor test --skip-lint --skip-deploy --skip-local-validator --skip-build + - run: cd tests/misc && chmod +x ci.sh && ./ci.sh + - run: cd tests/misc && anchor test --skip-lint - uses: ./.github/actions/git-diff/ test-anchor-init: diff --git a/tests/misc/USED_IN_CI.json b/tests/misc/USED_IN_CI.json deleted file mode 100644 index f2d0f344ef..0000000000 --- a/tests/misc/USED_IN_CI.json +++ /dev/null @@ -1 +0,0 @@ -[156,44,220,206,65,88,13,39,74,158,43,12,39,202,14,183,93,39,125,124,11,198,19,157,67,169,221,158,115,202,132,115,36,112,31,43,136,102,227,71,225,62,103,95,68,124,18,191,52,169,97,188,151,165,107,47,74,229,109,37,97,143,89,86] \ No newline at end of file diff --git a/tests/misc/ci.sh b/tests/misc/ci.sh new file mode 100755 index 0000000000..d534875172 --- /dev/null +++ b/tests/misc/ci.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +rm ./tests/misc.ts +mv miscNonRentExempt.ts ./tests/miscNonRentExempt.ts diff --git a/tests/misc/tests/miscNonRentExempt.ts b/tests/misc/miscNonRentExempt.ts similarity index 100% rename from tests/misc/tests/miscNonRentExempt.ts rename to tests/misc/miscNonRentExempt.ts From 3403486eb095002e5292b7988494e0c81578052b Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 19:06:00 -0400 Subject: [PATCH 23/24] ci: fix ci --- .github/workflows/tests.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 201e0fdda3..246aeeef1c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -284,7 +284,6 @@ jobs: - run: cd tests/misc && yarn link @project-serum/anchor - run: cd tests/misc && chmod +x ci.sh && ./ci.sh - run: cd tests/misc && anchor test --skip-lint - - uses: ./.github/actions/git-diff/ test-anchor-init: needs: setup-anchor-cli From 57a6eb8135f351f4545e7373a74cb164de1e1f17 Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Sat, 26 Mar 2022 20:07:34 -0400 Subject: [PATCH 24/24] update auction house submodule and add comments --- .github/workflows/tests.yaml | 8 ++++++-- tests/auction-house | 2 +- tests/misc/ci.sh | 7 +++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 246aeeef1c..5dab93241e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -243,7 +243,9 @@ jobs: # checks rent correctly for legacy accounts # that don't have to be rent-exempt test-misc-non-rent-exempt: - needs: setup-anchor-cli # this is built with a different solana version but that's fine since it's just the cli + # the anchor cli is built with a different solana version + # but that's fine since it's just the cli + needs: setup-anchor-cli name: Test tests/misc/nonRentExempt runs-on: ubuntu-18.04 timeout-minutes: 30 @@ -259,7 +261,9 @@ jobs: ~/.cache/solana/ ~/.local/share/solana/ key: solana-${{ runner.os }}-v0000-1.8.14 - # using an outdated validator but that is ok as long as the test doesn't include newer incompatible features + # using an outdated validator but that + # is ok as long as the test doesn't + # include newer incompatible features - run: sh -c "$(curl -sSfL https://release.solana.com/v1.8.14/install)" shell: bash - run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH diff --git a/tests/auction-house b/tests/auction-house index 2870d5aecb..967650c531 160000 --- a/tests/auction-house +++ b/tests/auction-house @@ -1 +1 @@ -Subproject commit 2870d5aecbb47648ffcae94ce771f1de16241953 +Subproject commit 967650c531ba0f23c88374875ccfcecb9b1a7800 diff --git a/tests/misc/ci.sh b/tests/misc/ci.sh index d534875172..6648ddc57f 100755 --- a/tests/misc/ci.sh +++ b/tests/misc/ci.sh @@ -1,4 +1,11 @@ #!/bin/sh +# this script ensures that the Misc test does not +# test the miscNonRentExempt.ts during its test in the ci +# because the misc test uses a newer solana version +# than the miscNonRentExempt one. The latter needs to be on +# a validator with a version < 1.9, so it can test +# whether anchor's rent-exemption checks work for +# legacy accounts which dont have to be rent-exempt rm ./tests/misc.ts mv miscNonRentExempt.ts ./tests/miscNonRentExempt.ts