From a866d2c92210d4fade7b0465cd4d68e5022bea5a Mon Sep 17 00:00:00 2001 From: Nick Garfield Date: Tue, 10 Jan 2023 17:50:29 -0600 Subject: [PATCH] Upgrade Solana to v1.14 (#120) * Upgrade to v1.14 * Update to Solana v1.14.12 --- Cargo.lock | 195 ++++++++++++++++++++++++++----------------- cli/Cargo.toml | 10 +-- client/Cargo.toml | 4 +- plugin/Cargo.toml | 14 ++-- plugin/src/plugin.rs | 11 +++ 5 files changed, 144 insertions(+), 90 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 80c77026c..22d3ca1ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1280,6 +1280,12 @@ dependencies = [ "syn 0.15.44", ] +[[package]] +name = "eager" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" + [[package]] name = "ed25519" version = "1.5.2" @@ -1338,18 +1344,18 @@ dependencies = [ [[package]] name = "enum-iterator" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eeac5c5edb79e4e39fe8439ef35207780a11f69c52cbe424ce3dfad4cb78de6" +checksum = "2953d1df47ac0eb70086ccabf0275aa8da8591a28bd358ee2b52bd9f9e3ff9e9" dependencies = [ "enum-iterator-derive", ] [[package]] name = "enum-iterator-derive" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159" +checksum = "8958699f9359f0b04e691a13850d48b7de329138023876d07cbd024c2c820598" dependencies = [ "proc-macro2 1.0.46", "quote 1.0.21", @@ -1581,8 +1587,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -2094,15 +2102,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "lru" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" -dependencies = [ - "hashbrown 0.12.3", -] - [[package]] name = "match_cfg" version = "0.1.0" @@ -2223,12 +2222,11 @@ dependencies = [ [[package]] name = "nix" -version = "0.23.2" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ "bitflags", - "cc", "cfg-if", "libc", "memoffset", @@ -2538,9 +2536,9 @@ dependencies = [ [[package]] name = "pbkdf2" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271779f35b581956db91a3e55737327a03aa051e90b1c47aeb189508533adfd7" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ "digest 0.10.5", ] @@ -3456,9 +3454,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1998c0529f78c99fe830f734b972e110fb846c75273773647d4071cbf6e600ee" +checksum = "87b4533fe4abfd4c540ece335ad767cc91e93a5263069e2e59225be555c5c839" dependencies = [ "Inflector", "base64 0.13.1", @@ -3469,6 +3467,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", + "solana-address-lookup-table-program", "solana-config-program", "solana-sdk", "solana-vote-program", @@ -3478,11 +3477,32 @@ dependencies = [ "zstd", ] +[[package]] +name = "solana-address-lookup-table-program" +version = "1.14.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ceb299cd9df79f4c1abda6f140813f1e451a9a8810d18b84ff9dc3b81f1593c6" +dependencies = [ + "bincode", + "bytemuck", + "log 0.4.17", + "num-derive", + "num-traits", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + [[package]] name = "solana-clap-utils" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9539c38af9dd5f2ffc82f0c8e195dc87f09fa4e19f655e711642da990894a85" +checksum = "dde26cacc87164747988cf1cef8e701155188a8d51ed45a7d1be268bc49c41c2" dependencies = [ "chrono", "clap 2.34.0", @@ -3498,9 +3518,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a097895b3ab77e493e2f9ff22f5d50bdae03eccb8a6ecd7ba5531d37cc485ede" +checksum = "aad3cc2faa1721149f1af05b8f10daed33c68b7523bcc82bc7f2835f2ed51746" dependencies = [ "dirs-next", "lazy_static", @@ -3514,9 +3534,9 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b535d233e2a5f710d32ed73199d71c0433b0c8934ad4df583d74003a5905c80" +checksum = "d2d59b69ee79e5b32f41b381d0e54d81e3a89e3ebe35335a586241dc000e8374" dependencies = [ "async-mutex", "async-trait", @@ -3535,7 +3555,6 @@ dependencies = [ "jsonrpc-core", "lazy_static", "log 0.4.17", - "lru", "quinn", "quinn-proto", "rand 0.7.3", @@ -3569,9 +3588,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f2a6a7b6f75a93edc3bcf33994ae5633bed7560bde51af746ef2854ecc8d3c3" +checksum = "b80b3dd0cd746511a4bbf9a64a8ddb2b528800437928dd90a1a16ef0e1b95be3" dependencies = [ "bincode", "chrono", @@ -3583,9 +3602,9 @@ dependencies = [ [[package]] name = "solana-faucet" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9991f45926da302739b6cdeab3478fb125262246bcd24c92494a90a0ab9db9f" +checksum = "9e0634db95537eeb77d78f402ea70b513b8bc12ed926b379eca53a1ba5038bbc" dependencies = [ "bincode", "byteorder", @@ -3607,31 +3626,43 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1187f9d6ec545567c7d3bdfc3c22c3886331aa4e49b2ad17c8ec5ec3b5334" +checksum = "1c39813ee5b249cb8ccb325d3639323eb3616e7bb9a2b1502936d7ea20530097" dependencies = [ + "ahash", + "blake3", + "block-buffer 0.9.0", "bs58 0.4.0", "bv", + "byteorder", + "cc", + "either", "generic-array", + "getrandom 0.1.16", + "hashbrown 0.12.3", "im", "lazy_static", "log 0.4.17", "memmap2", + "once_cell", + "rand_core 0.6.4", "rustc_version", "serde", "serde_bytes", "serde_derive", + "serde_json", "sha2 0.10.6", "solana-frozen-abi-macro", + "subtle", "thiserror", ] [[package]] name = "solana-frozen-abi-macro" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1427b307e619e53e33987967112b0bc5ae2983915e00a46720b589bffe7f924b" +checksum = "dad43ac27c4b8d7a3ce0e2cb8642a7e3b8ea5e3c29ecea38045a8518519adccf" dependencies = [ "proc-macro2 1.0.46", "quote 1.0.21", @@ -3641,9 +3672,9 @@ dependencies = [ [[package]] name = "solana-geyser-plugin-interface" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63c4250b33c8299bfa804acfbbdc0784fa53c05cacd650a1b44839b2b4595c81" +checksum = "495f52e8fe04e8b2c9af75539c55a87bf9c2c86d64afc229631e6be436532643" dependencies = [ "log 0.4.17", "solana-sdk", @@ -3653,9 +3684,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08771de3ef286519b64ff9f792388d7d37bf093811e8705c8d2e00d2948cb7e5" +checksum = "13a18f8d7490f712a4340998fca2b0d35afcdef671320a0e51f40b537363d592" dependencies = [ "env_logger", "lazy_static", @@ -3664,9 +3695,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "275f4254ff6fe907cb9e3ea80d0dfabfaddd7402af08c3031f40c0f8bf808a2e" +checksum = "a3e365647d451d2b124d9705e92fcfc6e90790ae317495ff20043b6812eb8c41" dependencies = [ "log 0.4.17", "solana-sdk", @@ -3674,9 +3705,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c14ecc74dca691113cbe7a9e90f0d7197299dda900d9c7a1ecf6958d5a18c71" +checksum = "9c4630a427e772ad5a4a64ca43f0d80848af19a1057084c9611a1e71bf027fce" dependencies = [ "crossbeam-channel", "gethostname", @@ -3688,12 +3719,12 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ba386861e4efc8be7fdda149f75660f77c44d33ad1e9561c09ee93d8d7116fb" +checksum = "740fb87bea9d7b9eee070244441c9079b44fa223224fb1d6bd23da1b8ec0f2b3" dependencies = [ "bincode", - "clap 2.34.0", + "clap 3.2.22", "crossbeam-channel", "log 0.4.17", "nix", @@ -3710,9 +3741,9 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4f894bdd66555a4b0943c7d5e6d4a41b290388babbf2fb7b431ee7b2d1691a" +checksum = "079105b92b89a0e0b3f238f1c2c40ebffd2171d632236c20f59abac79a8aa978" dependencies = [ "ahash", "bincode", @@ -3737,9 +3768,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77cdaa890475c0e21d23f24c5bcc12e0991cf73f2fe98fc1064f065365f6873" +checksum = "0dafff676128fe508ab83147b6fb19534fc33f43ec14789da1f1867e9ea06887" dependencies = [ "base64 0.13.1", "bincode", @@ -3750,41 +3781,49 @@ dependencies = [ "bs58 0.4.0", "bv", "bytemuck", + "cc", "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.1.16", + "getrandom 0.2.7", "itertools", "js-sys", "lazy_static", + "libc", "libsecp256k1", "log 0.4.17", + "memoffset", "num-derive", "num-traits", "parking_lot 0.12.1", "rand 0.7.3", + "rand_chacha 0.2.2", "rustc_version", "rustversion", "serde", "serde_bytes", "serde_derive", + "serde_json", "sha2 0.10.6", "sha3 0.10.5", "solana-frozen-abi", "solana-frozen-abi-macro", "solana-sdk-macro", "thiserror", + "tiny-bip39", "wasm-bindgen", + "zeroize", ] [[package]] name = "solana-program-runtime" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d782a73c19f8cd565ae5eacb2e66ddc8d1665defca7d68ec8d8c3b4eea2222" +checksum = "17865dc487a5f38e8f64a8ff3ff14e92a8a71be87ca6ee958ad07f5d1fa4cdf4" dependencies = [ "base64 0.13.1", "bincode", + "eager", "enum-iterator", "itertools", "libc", @@ -3792,20 +3831,22 @@ dependencies = [ "log 0.4.17", "num-derive", "num-traits", + "rand 0.7.3", "rustc_version", "serde", "solana-frozen-abi", "solana-frozen-abi-macro", "solana-measure", + "solana-metrics", "solana-sdk", "thiserror", ] [[package]] name = "solana-rayon-threadlimit" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b6f638d46885f552e4f6f7713d580b9f7307967bbd452f5bd69b8b9e3e8b04c" +checksum = "f82e4deecbe820847c88f091f9b721fad46276575fcfdf177bbc2743731dc25b" dependencies = [ "lazy_static", "num_cpus", @@ -3813,9 +3854,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f907c55396a314938d1fee4ebb87c45df9b8766c999bf16727449df8d05c79f" +checksum = "09863751b4d9ca46297f0662293561c4a3846abc9cab7b691b091ea9ae3c9340" dependencies = [ "console", "dialoguer", @@ -3832,9 +3873,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658e7daee16ced9f3c9c2b5add497ac79fc1e7fad162590f3bfd63cb63ef8873" +checksum = "9c702cc57432bc16eab54ad7b5668c2a3cdc72b0f820175972b4857e26ac4f49" dependencies = [ "assert_matches", "base64 0.13.1", @@ -3859,7 +3900,7 @@ dependencies = [ "memmap2", "num-derive", "num-traits", - "pbkdf2 0.10.1", + "pbkdf2 0.11.0", "qstring", "rand 0.7.3", "rand_chacha 0.2.2", @@ -3883,9 +3924,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df36a10a657b35accd2fd7ae097e9426cbbdbf8219a79e8a7d3be7b500be0e7e" +checksum = "f89a14a8f1e7708fe19ee3140125e9d8279945ead74cb09e65c94dd5cf0640c3" dependencies = [ "bs58 0.4.0", "proc-macro2 1.0.46", @@ -3896,9 +3937,9 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054c117c1c44d2e6a06168aa88afbfaef2b8d6c2d95637bcb83e7163da1f2835" +checksum = "7116f13d20003e99f3f8fb5b1b20cb638a8c797ec8fe40dc4840a284bab1e53c" dependencies = [ "crossbeam-channel", "futures-util", @@ -3925,9 +3966,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7233a3bc7bea0c786f8400a0447acae796c1ce1cadde1389e6334cc8770050" +checksum = "ff48b27221d728dd907400711aa42d07d5fe78c6bf9e35f850c78e89ee800e97" dependencies = [ "Inflector", "base64 0.13.1", @@ -3940,6 +3981,7 @@ dependencies = [ "serde_derive", "serde_json", "solana-account-decoder", + "solana-address-lookup-table-program", "solana-measure", "solana-metrics", "solana-sdk", @@ -3953,9 +3995,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05fc1cf71609526b7786b96365035141f51d4f963b9ed329368fa862a916ea" +checksum = "18f9c97e7d62d3e0ef04426cd7731689f5c675e0b4540fa5dca172ab261b57a3" dependencies = [ "log 0.4.17", "rustc_version", @@ -3969,9 +4011,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09341e031c7838d8e8c4adb3658473860663a0972c2d4da5547508c76b673baf" +checksum = "694e6ecff6764540b555224308fa3cbccb59135e6029761febdba49d8197faaf" dependencies = [ "bincode", "log 0.4.17", @@ -3990,9 +4032,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.13.5" +version = "1.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a98e67bdd7f3e90ff46284c4f0bb0c30d414c5ea06c2f3eaae771100a7d0827" +checksum = "32395c4561673f7b4aa1f3a5b5a654eaa363041f67d92f5d680de72293ef7d1b" dependencies = [ "aes-gcm-siv", "arrayref", @@ -4003,6 +4045,7 @@ dependencies = [ "cipher 0.4.3", "curve25519-dalek", "getrandom 0.1.16", + "itertools", "lazy_static", "merlin", "num-derive", @@ -4036,9 +4079,9 @@ dependencies = [ [[package]] name = "spl-associated-token-account" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a33ecc83137583902c3e13c02f34151c8b2f2b74120f9c2b3ff841953e083d" +checksum = "fbc000f0fdf1f12f99d77d398137c1751345b18c88258ce0f99b7872cf6c9bd6" dependencies = [ "assert_matches", "borsh", @@ -4076,9 +4119,9 @@ dependencies = [ [[package]] name = "spl-token-2022" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a97cbf60b91b610c846ccf8eecca96d92a24a19ffbf9fe06cd0c84e76ec45e" +checksum = "0edb869dbe159b018f17fb9bfa67118c30f232d7f54a73742bc96794dff77ed8" dependencies = [ "arrayref", "bytemuck", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 6bb4539bb..11e4ed988 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -22,11 +22,11 @@ regex = "1.6.0" serde = { version = "1.0.136", features = ["derive"] } serde_json = "1.0.79" serde_yaml = "0.9.4" -solana-account-decoder = "~1.13.5" -solana-client = "~1.13.5" -solana-clap-utils = "~1.13.5" -solana-cli-config = "~1.13.5" -solana-sdk = "~1.13.5" +solana-account-decoder = "~1.14.12" +solana-client = "~1.14.12" +solana-clap-utils = "~1.14.12" +solana-cli-config = "~1.14.12" +solana-sdk = "~1.14.12" spl-associated-token-account = "1.1.1" spl-memo = "3.0.1" spl-token = "~3.5.0" diff --git a/client/Cargo.toml b/client/Cargo.toml index f7e280ea4..df1ff7ca7 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -23,7 +23,7 @@ clockwork-network-program = { path = "../programs/network", features = ["no-entr clockwork-thread-program = { path = "../programs/thread", features = ["no-entrypoint"], version = "1.4.0" } clockwork-utils = { path = "../utils", version = "1.4.0" } clockwork-webhook-program = { path = "../programs/webhook", features = ["no-entrypoint"], version = "1.4.0" } -solana-client = "~1.13.5" -solana-sdk = "~1.13.5" +solana-client = "~1.14.12" +solana-sdk = "~1.14.12" spl-associated-token-account = { version = "1.1.1", features = ["no-entrypoint"] } thiserror = "1.0.31" diff --git a/plugin/Cargo.toml b/plugin/Cargo.toml index e54676f2f..8d7e837a0 100644 --- a/plugin/Cargo.toml +++ b/plugin/Cargo.toml @@ -31,13 +31,13 @@ sentry = "0.27.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" simple-error = "0.2.3" -solana-account-decoder = "~1.13.5" -solana-client = "~1.13.5" -solana-geyser-plugin-interface = "~1.13.5" -solana-logger = "~1.13.5" -solana-program = "~1.13.5" -solana-sdk = "~1.13.5" -solana-transaction-status = "~1.13.5" +solana-account-decoder = "~1.14.12" +solana-client = "~1.14.12" +solana-geyser-plugin-interface = "~1.14.12" +solana-logger = "~1.14.12" +solana-program = "~1.14.12" +solana-sdk = "~1.14.12" +solana-transaction-status = "~1.14.12" thiserror = "1.0.30" tokio = "~1.14.1" diff --git a/plugin/src/plugin.rs b/plugin/src/plugin.rs index 91778a7ce..a6ed37b38 100644 --- a/plugin/src/plugin.rs +++ b/plugin/src/plugin.rs @@ -1,3 +1,5 @@ +use solana_geyser_plugin_interface::geyser_plugin_interface::ReplicaAccountInfo; + use { crate::{ config::PluginConfig, @@ -72,6 +74,15 @@ impl GeyserPlugin for ClockworkPlugin { // Fetch account info let account_info = match account { ReplicaAccountInfoVersions::V0_0_1(account_info) => account_info.clone(), + ReplicaAccountInfoVersions::V0_0_2(account_info) => ReplicaAccountInfo { + pubkey: account_info.pubkey, + lamports: account_info.lamports, + owner: account_info.owner, + executable: account_info.executable, + rent_epoch: account_info.rent_epoch, + data: account_info.data, + write_version: account_info.write_version, + }, }; let account_pubkey = Pubkey::new(account_info.clone().pubkey);