diff --git a/Cargo.lock b/Cargo.lock index f7911b3..70b3e1e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3720,9 +3720,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0d523cdad11e0b9d1318d6801860e5b295086b34ab5625126f91035b18c3a2" +checksum = "e92694b819c0baf7fe9d1f3d74c0360b08c49054e888f9bfbba731653bb7ff22" dependencies = [ "Inflector", "base64 0.22.1", @@ -3745,9 +3745,9 @@ dependencies = [ [[package]] name = "solana-accounts-db" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f905234cf05e781dd2ad665c198dd938c67ac8ca4aace3017cf504e84db360c0" +checksum = "4b63694c7259bc34439a6619cec9c4c3b256faa30af32172b993aa017bb30d1d" dependencies = [ "bincode", "blake3", @@ -3790,9 +3790,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cec39fdaa1bc8793a27a75662ab9edd12b64a8aead329f2bf56d9e4730b654a6" +checksum = "6b04b5b8108d715e4f1472e0a932782b470498342117944c949cf0e7f9ce575b" dependencies = [ "bincode", "bytemuck", @@ -3808,9 +3808,9 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e00220eb0c29d09ba74727082233bb5a0e07402f01fa287026fc8f9979aa5f5" +checksum = "3fbc546f2af4f4d3b4febcaf56cc1cce2a6cad6c8396341f71356818cba832ca" dependencies = [ "borsh 1.5.1", "futures", @@ -3825,9 +3825,9 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b4f1f69fc2ab9de92acc3193e026ce528d6019bce2b1ceb34f1da34fad5ce12" +checksum = "f45cd531e9c6b983196fba74f7e0f080d454bf3e531786fc389dc1d33b2b3734" dependencies = [ "serde", "serde_derive", @@ -3837,9 +3837,9 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07837906972a1a0e00940ce14fafc7539cfda50b0186479fc89ae2ac2ae01e7e" +checksum = "8cf2440757eff30b04bf39c74ae221b7bf5a03557f5e82744f6267e71d1c913c" dependencies = [ "bincode", "crossbeam-channel", @@ -3857,9 +3857,9 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459b03baab83375188f27ee160f6516de99db655c796d0327eda4fea0abbc31a" +checksum = "0afab9603ad56a836daf03444ea3a08682cead8c12b35f47641170b3dd1c1586" dependencies = [ "bincode", "byteorder", @@ -3879,9 +3879,9 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95d687280e9a2aeb6338c535fe76278068d0d8d5fc1b34b1a2f580c6218f854c" +checksum = "6ec81d062e8929d66bf09bc5c67d25e4123794607682d72ff16c33714a1cdb1d" dependencies = [ "bv", "bytemuck", @@ -3898,9 +3898,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b483b55443a2003915c6c907c13b821703d794fbe9892e8b8e9b88c692d452" +checksum = "bf985fe4abeed8401b715d3c3cf08551455ea18bfe1e6fcf96f995f20723e053" dependencies = [ "chrono", "clap 2.34.0", @@ -3915,9 +3915,9 @@ dependencies = [ [[package]] name = "solana-client" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa31b8da8b58753d45e9e65e3f8af5cb0e417d68da5a0c757982ea8235ff34c0" +checksum = "9a455a20e3e03d2da6d1e4f6c1f122c4ba4ab119651f02bd6744cc5af03e7774" dependencies = [ "async-trait", "bincode", @@ -3948,9 +3948,9 @@ dependencies = [ [[package]] name = "solana-compute-budget" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff38c72013ff65fb7d17770240feee432217bb73de68c4e1521d715cb0df274" +checksum = "f1610de88eddf42a9a4b0a8f31eb3f7f9863850dedf51355508550975e8895cd" dependencies = [ "rustc_version", "solana-sdk", @@ -3958,9 +3958,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473df37b57db8bb054c2018c588c9f21305b6fe136d277c0a5706c51be5c0c" +checksum = "d7405a9ed256c5a972c7b04396d912206e4547733c8bb109c72f5fab5f16f271" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -3968,9 +3968,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "066928ca504549466522b7be6ab91fde61d138e5ecfb2b19a401948de33dfa2a" +checksum = "4e7961fbad7a0facdc03037b484bacbf80198f68347d37ed84b2866b63c24015" dependencies = [ "bincode", "chrono", @@ -3982,9 +3982,9 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5fabec573384b5885d9f3a99ddef602694b77e53b5d50b5e6baf53b5e12d79" +checksum = "163e56d6851952e4ccde37a9b3fb6edab0207b6eb871da506434d55df4e8de94" dependencies = [ "async-trait", "bincode", @@ -4003,9 +4003,9 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add8084aadf3e08a897b4b45c53b7fe6770e5cd139d000dc23ecccd8d02dee85" +checksum = "c01d51484359e01726e93f4dbb7e72459cf707cc8f07b1adfc66c3821bcd6f34" dependencies = [ "ahash", "lazy_static", @@ -4026,9 +4026,9 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0e4796ea1c84c8ed80023ab93f03aaeca1a968120b13074233ced4abddb3c2" +checksum = "147c81e77b74f5d0a52579c1cf982fffb8c4491fb3baabf0e4fa19e2f6f39030" dependencies = [ "bytemuck", "bytemuck_derive", @@ -4039,9 +4039,9 @@ dependencies = [ [[package]] name = "solana-inline-spl" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e530daba97082b7a6b1b57ae63b6517f7b43226bd94db80d2dd7f2896a6b70d" +checksum = "0f101319f4740095125c5006be1dc6d4b6108180def37ae94df42f16e78b93f4" dependencies = [ "bytemuck", "rustc_version", @@ -4050,9 +4050,9 @@ dependencies = [ [[package]] name = "solana-loader-v4-program" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8af633492b273fad7fcb31042bb9cd7119f8a56807d2b3940d4ad98e37b20b70" +checksum = "031a5c11cd84a398a19be442b3092f03457f785670a64edc339e9a676dfd033b" dependencies = [ "log", "solana-compute-budget", @@ -4065,9 +4065,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "024c7ae864a5217198bfcc1823914ee63f96f154f75d7f590ad3e02b3cb2e3a4" +checksum = "dcc3c188176db5d4e60c137525439c4b881dfd262dd306abcac4c568f15177a6" dependencies = [ "env_logger", "lazy_static", @@ -4076,9 +4076,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909dc71f8ab17dc8d6b14ab772497a32845b2e56cb2b003d6f0141f3ea48cf5c" +checksum = "5fe09f58977e579c3e91f0a7032a1d741e76327924ae868d17beb5d496b40c8f" dependencies = [ "log", "solana-sdk", @@ -4086,9 +4086,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4129101a4864ed9a6ab4838c4bdf69010166ae6a0f1e00994b14f2cbba97ec2" +checksum = "7860d18901af0b24e05d7631cd655924eb056d83a52040234f827cc3cc8da0c6" dependencies = [ "crossbeam-channel", "gethostname", @@ -4101,9 +4101,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90aaa1134f4ac34af24e7c93c56f854100a7b93d09f13d6afff1851e84b6dbdb" +checksum = "8b6723ddcc4393d9d2d5e258871461d0002e45c7d9b6ea895bff1011d16163e9" dependencies = [ "bincode", "clap 3.2.25", @@ -4130,9 +4130,9 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-perf" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9251db32c27acf187bb23545e2275dbd71420cdc49379e477941374fb8fc7bae" +checksum = "9393d11aa5643f6afdffa8ab7b12d8149b7b32409149f673f832f2be442fbe10" dependencies = [ "ahash", "bincode", @@ -4157,9 +4157,9 @@ dependencies = [ [[package]] name = "solana-poseidon" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb16bc682c7fdc448e81a7493816c67f48479fa13034a34664a47c56c4d7ae2" +checksum = "cb3927e1c5ef192f8d95211ee07f02463b86a2e4b47181fa9f7eb6a962c87a57" dependencies = [ "ark-bn254", "light-poseidon", @@ -4168,9 +4168,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46779502637be111d121691aace200175ec1a57643f9760a36450b52d4eccdfd" +checksum = "8d899c2a1d37290dcfeeb9d1c0032915a29bd48f35759f19ff1e0f6b096eca0b" dependencies = [ "ark-bn254", "ark-ec", @@ -4214,9 +4214,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "851845bee4a60dbb78e74ff9c40f3d3a4bf2f22db1245cc7d77ca198f383abce" +checksum = "c2612ef05b38afcbf642f9be889819713b23564a26d3f612b2ab5616c9ea4c19" dependencies = [ "base64 0.22.1", "bincode", @@ -4243,9 +4243,9 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09847358a514422e5a13cef726ad10b9e6c9ce143fa7b832a9a9b3e88f6b3203" +checksum = "7a454b356b645aff42b7151ba83ebc139a4fa561793f61272910c1d6ca258a32" dependencies = [ "assert_matches", "async-trait", @@ -4275,9 +4275,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc435e28c9a96b19a99ad08c080885b3d922b774284859de1ada7e34c077d7a5" +checksum = "be61b8e62654303ba158764fb37b4706cc280c7cd239dc977edaf599dfb79875" dependencies = [ "crossbeam-channel", "futures-util", @@ -4300,9 +4300,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abcf92fbb87d4fa444ec6c1849c5dcc6f695f96623ee5e8f8ab84fe5a9a48ef3" +checksum = "1bcf89e7ed0daabc4db107d6c38453bbd0ef84150f0acec760c65579361378cb" dependencies = [ "async-mutex", "async-trait", @@ -4326,9 +4326,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ad6797479cdc6f5e10219c6e7f2b4fec01b87c946cbc757184a5390cc155a9a" +checksum = "45d6268135fcf812d9e9add2dff578b7ac8a0d003d6f95b996aec7a0311aad8e" dependencies = [ "lazy_static", "num_cpus", @@ -4336,9 +4336,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcac9245717034f4b014adad878ecece1f06a8db85e5bc8e7ad37b6e095bd0ad" +checksum = "fc12b8f2e668712995ae972c497663fdcb61f19b925029d104e19917b8d66428" dependencies = [ "console", "dialoguer", @@ -4355,9 +4355,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4d62dc08ad4d9264e246904b3422ce5afdac6446c492ade5f1959cc10ea88d" +checksum = "846113929e8458f5dcb875d379cc28bdb9149ba68db80202b220795608bc3227" dependencies = [ "async-trait", "base64 0.22.1", @@ -4382,9 +4382,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec81e75c9d9ef31d7cc74208fffef2d107ef062df86d6a220525716387b78ed2" +checksum = "272eb64c9baf966eccf4fa5c8ed9344fe162d2a13a2ac09cf2cd2b40a85a3a65" dependencies = [ "anyhow", "base64 0.22.1", @@ -4406,9 +4406,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe1ed1db8792e59ee47c66f0a30a1caeaa64d45f5e6a621bf36bc132abc3855" +checksum = "23cf6f2875e47a5ac67b00dda4306646bb63ae5bb79ef408758cf1bad810497b" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4419,9 +4419,9 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8dd159c75426ea4af5b7394444a76de5badaac3b7e3b8982475712cb6996536" +checksum = "a67288559196913f43abfef1b12820a1233a1e32038d0cfbcbf6ebf1ca6a2690" dependencies = [ "aquamarine", "arrayref", @@ -4499,9 +4499,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469540c1313ec2887fc9547d9723955e3a92433593ed910892aa59ac347e5db1" +checksum = "b62d86ef4a245cec35b7b0c24a659e22cc2d1fbbad65c141e332cc5928ed04dc" dependencies = [ "bincode", "bitflags 2.6.0", @@ -4548,9 +4548,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa59130529bdfa2df945762785ea6c887cc07c901f52eb67ea4dfaa9e0b9c60b" +checksum = "23198ed620c4a61c97fe49bd907fc965659aea9a5ed0ea0cf90084eecc72a3c1" dependencies = [ "bs58", "proc-macro2", @@ -4567,9 +4567,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1c92091daa40d5ed71b303f1821d701d7c0948d053f70aac134a298b06da242" +checksum = "6bcc119c009f557d68998f0075866b6918a1c904ab6fe53ee3c5233f175e8d2b" dependencies = [ "crossbeam-channel", "log", @@ -4584,9 +4584,9 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1cdbbfbf65c349216083a1d07c826bec2fb95b0879b896fff77f3a35120b0e" +checksum = "e798a6139a4fff4a84a93378d071873a643b2f76e0b7a38c878fc924ab1a219e" dependencies = [ "bincode", "log", @@ -4600,9 +4600,9 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88888634933d27eaf5064052cf0cd01a47e1061a18e649cee1ce23e52a7a5156" +checksum = "2cef6776681796df95aeaacf5af2f017fd6e215579f6589ea67904bc384b4bcc" dependencies = [ "async-channel", "bytes", @@ -4634,9 +4634,9 @@ dependencies = [ [[package]] name = "solana-svm" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e56098dbb9610be5a92e2cdaf9bfe0766a06aa501f57f1b8236cbdd2a6bd84" +checksum = "6b237446f6485d7c3b3df5c8acb1dc69e6e3b3e4ebbdc17d7a7b7053bced48fa" dependencies = [ "itertools 0.12.1", "log", @@ -4660,9 +4660,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "292eb476204d1907d0c066778ed4b435e38c7ecb5d317b13a7a119c0424c959b" +checksum = "8b1ff7360fad80c1bf62e262e8ed312cf1ebc8838369a0d2c59004faf9f42cf4" dependencies = [ "bincode", "log", @@ -4675,9 +4675,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ca90cb83649bb1c19bf8b169110190080473e9298d6c716916e5551f0acb0a7" +checksum = "ff07c0d23dd839eda4324a02c8634855bdd1f72c385f4466e5caf78e7a5e2a25" dependencies = [ "bincode", "log", @@ -4690,9 +4690,9 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b83b28705c9559a48d04fd9f96e52c66bf56624b73c300edb4d517f5bb446022" +checksum = "fce3b3fb075bd06f360c74d77816d3527dbf9bb2f2e89f9e0a52a55c06575871" dependencies = [ "async-trait", "bincode", @@ -4714,9 +4714,9 @@ dependencies = [ [[package]] name = "solana-transaction-metrics-tracker" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433f8c9bef93aa8cb15bdb586115a2c74c18dacbbd591125e4687509b2f10494" +checksum = "f23895b81f3cc9ebf1472609bd2ce75b9bdea0f89a0c3245d5c72df354a92a4d" dependencies = [ "Inflector", "base64 0.22.1", @@ -4730,9 +4730,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be0ae1fe14d6375bb798e3f171ad89044b06030884323b27e789f1db2a553f6" +checksum = "4873ad4df45ef4f88b68982ac651caa93f489a4bfe62eedb2f59ea48da1df88e" dependencies = [ "Inflector", "base64 0.22.1", @@ -4757,9 +4757,9 @@ dependencies = [ [[package]] name = "solana-type-overrides" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68c0993feb343a389053226596c94e9f42c0dbf8685bfe98304e53e4848ff7de" +checksum = "540b1df966da86b0e183e124e48fef59605daf57b22809842b5273cb49277a89" dependencies = [ "lazy_static", "rand 0.8.5", @@ -4767,9 +4767,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b93785382752a294c722afae7c8cf8cb1451c0f8565d03ad3f158e589eda2689" +checksum = "91423aac2b1410e5f81faeb8cf655d63249d525761c4bd3f92a2c8e7641060bb" dependencies = [ "async-trait", "solana-connection-cache", @@ -4782,9 +4782,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b671d9844f8da7125efaca2ce5b48cd904b3a1b2cb32627c466f4bbb129e795a" +checksum = "cfc990baf7a1c8d08eff49add6b971b6f4c37c8a2ae4967b4c4300475226e71c" dependencies = [ "log", "rustc_version", @@ -4796,9 +4796,9 @@ dependencies = [ [[package]] name = "solana-vote" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e647b3cbfc63a1fc9e6daadcb54c328683ccce831c78de5ef7d4553af449b317" +checksum = "5755419c8efaea27fd5fcd241ba43bcf248e7e420bb4733211236517ae93f38b" dependencies = [ "itertools 0.12.1", "log", @@ -4811,9 +4811,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878ae9e9416c60f823aa316dbc255ed902b869ed9b19060b8a08f22fdebe1b83" +checksum = "8165c8bc37e34456f352715acb309eb65e014beca0297eaccdd4319dfea79981" dependencies = [ "bincode", "log", @@ -4831,9 +4831,9 @@ dependencies = [ [[package]] name = "solana-zk-elgamal-proof-program" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6361d36f702a746aa67a30b94eabe5dc1e7409b84d35794d45ca916b985c9afc" +checksum = "79bb28874614fc1dc33651401c049177c59d4a646b3ec0be64f27729e0a43d65" dependencies = [ "bytemuck", "num-derive", @@ -4845,9 +4845,9 @@ dependencies = [ [[package]] name = "solana-zk-sdk" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21de5fe76ac56e37c75040acac89ee100b1c6f95c0092a8fcdd59f4389539da3" +checksum = "b497ac230fa5ccc7509cfd99be56cb819b22b111cf57fc7e23eaf9e6ffcbb4fd" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -4874,9 +4874,9 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b28d5b06f3d3f5255bf26810c314aac6a98c812c1208c245486c22b4b90422c7" +checksum = "d420a69c1316116e01c67a0d75ebfaac3b119258e068c5313a1e064f63cab617" dependencies = [ "bytemuck", "num-derive", @@ -4888,9 +4888,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "2.0.2" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6530de68b612de86ed7dcffa9e4049f45a1538ce7a87c58007b5d54095fc808b" +checksum = "b286fa24abe68536297e232670d01d2c478f6d75a46311809c0a07bf251f3dfc" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -4919,9 +4919,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06beab07f4104d6ad70d47baa67ad1bcd501a2345a983e20c389bade7c72305e" +checksum = "ff08afd63f70a1ba712fb0017be41e93b017f7e874785b54bb5ec9aa8949781d" dependencies = [ "byteorder", "combine", diff --git a/Cargo.toml b/Cargo.toml index d8ce923..1a7c1ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,11 +22,11 @@ thiserror = "1.0.62" serde = "1.0.204" serde_with = "2.3.3" assert_matches = "1.5.0" -solana-program = "2.0.2" -solana-program-test = "2.0.2" -solana-sdk = "2.0.2" -solana-client = "2.0.2" -solana-zk-token-sdk = "2.0.2" +solana-program = "^2.0.2" +solana-program-test = "^2.0.2" +solana-sdk = "^2.0.2" +solana-client = "^2.0.2" +solana-zk-token-sdk = "^2.0.2" spl-associated-token-account = "4.0.0" spl-token-2022 = "4.0.0" spl-token-metadata-interface = "0.4.0" diff --git a/cli/README.md b/cli/README.md index 1082f6c..143e761 100644 --- a/cli/README.md +++ b/cli/README.md @@ -16,8 +16,8 @@ cargo run create-product --vendor ./tmp/keys/vendor1.json 'Product 1' 'SYMBOL' ' ```sh # the PRODUCT_PUBKEY is from "Create Product" step's command output -# the DEVICE_PUBKEY can get by `solana address -k ./tmp/keys/device1.json` -cargo run create-device --vendor ./tmp/keys/vendor1.json --product --device 'Device#1' 'METADATA_URI' +# the DEVICE can be keypair file or calc with `cargo run calc-device-pubkey --device ` +cargo run create-device --vendor ./tmp/keys/vendor1.json --product --device 'Device#1' 'METADATA_URI' ``` ## Activate Device diff --git a/cli/src/main.rs b/cli/src/main.rs index 4b130d8..f85473f 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1,3 +1,4 @@ +use std::path::Path; use std::time::{SystemTime, UNIX_EPOCH}; use std::{error::Error, str::FromStr, time::Duration}; @@ -32,6 +33,7 @@ struct Cli { enum Commands { Initialize(InitializeCliArgs), CreateProduct(CreateProductCliArgs), + CalcDevicePubkey(CalcDevicePubkeyCliArgs), CreateDevice(CreateDeviceCliArgs), GenerateMessage(GenerateMessageCliArgs), SignMessage(SignMessageCliArgs), @@ -70,7 +72,7 @@ struct CreateProductCliArgs { common: CommonArgs, } -#[derive(Debug, Clone, ValueEnum)] +#[derive(Debug, Clone, Copy, ValueEnum)] enum DeviceSigningAlgorithm { Ed25519, Secp256k1, @@ -85,14 +87,22 @@ impl Into for DeviceSigningAlgorithm { } } +#[derive(Debug, Args)] +struct CalcDevicePubkeyCliArgs { + #[arg(value_enum, long, default_value_t = DeviceSigningAlgorithm::Secp256k1)] + signing_alg: DeviceSigningAlgorithm, + #[arg(long = "device")] + device_keypair: String, +} + #[derive(Debug, Args)] struct CreateDeviceCliArgs { #[arg(long = "vendor")] vendor_keypair: String, #[arg(long = "product", value_parser = parse_pubkey)] product_pubkey: Pubkey, - #[arg(long = "device", value_parser = parse_pubkey)] - device_pubkey: Pubkey, + #[arg(long = "device")] + device: String, #[arg(value_enum, long, default_value_t = DeviceSigningAlgorithm::Secp256k1)] signing_alg: DeviceSigningAlgorithm, name: String, @@ -104,13 +114,23 @@ struct CreateDeviceCliArgs { common: CommonArgs, } -#[derive(Debug, Clone, ValueEnum)] +#[derive(Debug, Clone, Copy, ValueEnum)] enum SignatureType { Ed25519, Secp256k1, EthSecp256k1, } +impl Into for SignatureType { + fn into(self) -> DeviceSigningAlgorithm { + match self { + SignatureType::Ed25519 => DeviceSigningAlgorithm::Ed25519, + SignatureType::Secp256k1 => DeviceSigningAlgorithm::Secp256k1, + SignatureType::EthSecp256k1 => DeviceSigningAlgorithm::Secp256k1, + } + } +} + #[derive(Debug, Args)] struct DevActivateDeviceCliArgs { #[arg(long = "device")] @@ -133,10 +153,14 @@ struct GenerateMessageCliArgs { user_pubkey: Pubkey, #[arg(long = "product", value_parser = parse_pubkey)] product_pubkey: Pubkey, - #[arg(long = "device", value_parser = parse_pubkey)] - device_pubkey: Pubkey, + #[arg(long = "device")] + device_keypair: String, #[arg(long)] no_prefix: bool, + #[arg(value_enum, long, default_value_t = SignatureType::Secp256k1)] + signature_type: SignatureType, + #[arg(long, default_value = None)] + timestamp: Option, #[command(flatten)] common: CommonArgs, } @@ -153,8 +177,8 @@ struct SignMessageCliArgs { #[derive(Debug, Args)] struct ActivateDeviceOffchainCliArgs { - #[arg(long = "device", value_parser = parse_pubkey)] - device_pubkey: Pubkey, + #[arg(long = "device")] + device: String, #[arg(long = "user")] user_keypair: String, #[arg(long = "vendor", value_parser = parse_pubkey)] @@ -194,6 +218,7 @@ fn main() { match args.command { Commands::Initialize(args) => initialize_program(args), Commands::CreateProduct(args) => create_product(args), + Commands::CalcDevicePubkey(args) => calc_device_pubkey(args), Commands::CreateDevice(args) => create_device(args), Commands::GenerateMessage(args) => generate_message(args), Commands::SignMessage(args) => sign_message(args), @@ -289,8 +314,9 @@ fn create_product(args: CreateProductCliArgs) { match client.send_and_confirm_transaction(&transaction) { Ok(sig) => { - println!("Success: {:?}", sig); - println!("Product Token Created: {}", product_mint_pubkey); + eprintln!("Success: {:?}", sig); + eprint!("Product Token Created: "); + println!("{}", product_mint_pubkey); } Err(err) => { eprintln!("Error: {:?}", err); @@ -298,18 +324,25 @@ fn create_product(args: CreateProductCliArgs) { }; } -fn get_device_pubkey(device: &Keypair, signature_type: &SignatureType) -> Pubkey { - match signature_type { - SignatureType::Ed25519 => device.pubkey(), - SignatureType::Secp256k1 | SignatureType::EthSecp256k1 => { +fn get_device_pubkey(device: &Keypair, signing_alg: &DeviceSigningAlgorithm) -> Pubkey { + match signing_alg { + DeviceSigningAlgorithm::Ed25519 => device.pubkey(), + DeviceSigningAlgorithm::Secp256k1 => { let privkey = libsecp256k1::SecretKey::parse(device.secret().as_bytes()).unwrap(); let pubkey = libsecp256k1::PublicKey::from_secret_key(&privkey); let hash = keccak::hash(&pubkey.serialize()[1..]); - Pubkey::new_from_array(keccak::hash(&hash.as_ref()[12..]).to_bytes()) + Pubkey::new_from_array(hash.to_bytes()) } } } +fn calc_device_pubkey(args: CalcDevicePubkeyCliArgs) { + let device = read_key(&args.device_keypair); + let pubkey = get_device_pubkey(&device, &args.signing_alg); + + println!("Device Pubkey: {:?} {}", args.signing_alg, pubkey); +} + fn create_device(args: CreateDeviceCliArgs) { let client = get_client(&args.common.url); let token_program_id = spl_token_2022::ID; @@ -317,10 +350,16 @@ fn create_device(args: CreateDeviceCliArgs) { let vendor = read_key(&args.vendor_keypair); let payer = read_key(&args.common.payer.unwrap_or(args.vendor_keypair)); + let device_pubkey = if Path::new(&args.device).exists() { + let device = read_key(&args.device); + get_device_pubkey(&device, &args.signing_alg) + } else { + Pubkey::from_str(&args.device).unwrap() + }; let product_atoken_pubkey = spl_associated_token_account::get_associated_token_address_with_program_id( - &args.device_pubkey, + &device_pubkey, &args.product_pubkey, &token_program_id, ); @@ -329,7 +368,7 @@ fn create_device(args: CreateDeviceCliArgs) { &[ DEVICE_MINT_SEED_PREFIX, args.product_pubkey.as_ref(), - args.device_pubkey.as_ref(), + device_pubkey.as_ref(), ], &program_id, ); @@ -341,7 +380,7 @@ fn create_device(args: CreateDeviceCliArgs) { .payer(payer.pubkey()) .vendor(vendor.pubkey()) .product_mint(args.product_pubkey) - .device(args.device_pubkey) + .device(device_pubkey) .product_associated_token(product_atoken_pubkey) .name(args.name) .signing_alg(args.signing_alg.into()) @@ -356,9 +395,10 @@ fn create_device(args: CreateDeviceCliArgs) { match client.send_and_confirm_transaction(&transaction) { Ok(sig) => { - println!("Success: {:?}", sig); - println!("Device Token: {}", product_atoken_pubkey); - println!("DID Mint: {}", did_mint_pubkey); + eprintln!("Success: {:?}", sig); + eprintln!("Device Token: {}", product_atoken_pubkey); + eprint!("DID Mint: ",); + println!("{}", did_mint_pubkey) } Err(err) => { eprintln!("Error: {:?}", err); @@ -375,7 +415,7 @@ fn dev_activate_device(args: DevActivateDeviceCliArgs) { let user = read_key(&args.user_keypair); let payer = read_key(&args.common.payer.unwrap_or(args.user_keypair)); - let device_pubkey = get_device_pubkey(&device, &args.signature_type); + let device_pubkey = get_device_pubkey(&device, &args.signature_type.into()); let product_atoken_pubkey = spl_associated_token_account::get_associated_token_address_with_program_id( &device_pubkey, @@ -413,7 +453,7 @@ fn dev_activate_device(args: DevActivateDeviceCliArgs) { .concat(); let latest_block = client.get_latest_blockhash().unwrap(); - let signature = sign(args.signature_type, &device, &message); + let signature = sign(&args.signature_type, &device, &message); let transaction = Transaction::new_signed_with_payer( &[ActivateDeviceBuilder::new() @@ -436,11 +476,11 @@ fn dev_activate_device(args: DevActivateDeviceCliArgs) { match client.send_and_confirm_transaction(&transaction) { Ok(sig) => { - println!("Success: {:?}", sig); - println!("User: {}", user.pubkey()); - println!("Device: {}", device_pubkey); - println!("Mint: {}", did_mint_pubkey); - println!("AToken: {}", did_atoken_pubkey); + eprintln!("Success: {:?}", sig); + eprintln!("User: {}", user.pubkey()); + eprintln!("Device: {}", device_pubkey); + eprintln!("Mint: {}", did_mint_pubkey); + eprintln!("AToken: {}", did_atoken_pubkey); } Err(err) => { eprintln!("Error: {:?}", err); @@ -449,7 +489,7 @@ fn dev_activate_device(args: DevActivateDeviceCliArgs) { } fn sign( - signature_type: SignatureType, + signature_type: &SignatureType, keypair: &Keypair, message: &[u8], ) -> DeviceActivationSignature { @@ -490,7 +530,8 @@ fn sign( fn generate_message(args: GenerateMessageCliArgs) { let program_id = args.common.program_id.unwrap_or(PROGRAM_ID); let product_mint_pubkey = args.product_pubkey; - let device_pubkey = args.device_pubkey; + let device_keypair = read_key(&args.device_keypair); + let device_pubkey = get_device_pubkey(&device_keypair, &args.signature_type.into()); let (did_mint_pubkey, _did_mint_bump) = Pubkey::find_program_address( &[ @@ -501,11 +542,13 @@ fn generate_message(args: GenerateMessageCliArgs) { &program_id, ); - let timestamp = SystemTime::now() - .duration_since(UNIX_EPOCH) - .ok() - .unwrap() - .as_secs(); + let timestamp = args.timestamp.unwrap_or_else(|| { + SystemTime::now() + .duration_since(UNIX_EPOCH) + .ok() + .unwrap() + .as_secs() + }); let message = [ DEVICE_MESSAGE_PREFIX, did_mint_pubkey.as_ref(), @@ -544,16 +587,17 @@ fn decode_hex(hex_string: String) -> Vec { fn sign_message(args: SignMessageCliArgs) { let keypair = read_key(&args.keypair); let message = decode_hex(args.message); + let device_pubkey = get_device_pubkey(&keypair, &args.signature_type.into()); - match sign(args.signature_type, &keypair, &message) { + eprintln!("Pubkey: {:?} {}", args.signature_type, device_pubkey); + match sign(&args.signature_type, &keypair, &message) { DeviceActivationSignature::Ed25519(signature_bytes) => { - eprintln!("Pubkey: {}", keypair.pubkey()); - println!("Signature: 0x{}", hex::encode(signature_bytes)); + println!("0x{}", hex::encode(signature_bytes)); } DeviceActivationSignature::Secp256k1(signature_bytes, recovery_id) | DeviceActivationSignature::EthSecp256k1(signature_bytes, recovery_id) => { println!( - "Signature: {}{}", + "{}{}", hex::encode(&signature_bytes), hex::encode(&[recovery_id]) ); @@ -566,7 +610,8 @@ fn activate_device_offchain(args: ActivateDeviceOffchainCliArgs) { let program_id = args.common.program_id.unwrap_or(PROGRAM_ID); let token_program_id = spl_token_2022::ID; - let device_pubkey = args.device_pubkey; + let device_keypair = read_key(&args.device); + let device_pubkey = get_device_pubkey(&device_keypair, &args.signature_type.into()); let user = read_key(&args.user_keypair); let payer = read_key(&args.common.payer.unwrap_or(args.user_keypair)); diff --git a/scripts/test_all.sh b/scripts/test_all.sh new file mode 100755 index 0000000..d0eedad --- /dev/null +++ b/scripts/test_all.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env sh + +VENDOR=tmp/keys/vendor1.json +DEVICE=tmp/keys/device1.json +USER=tmp/keys/user1.json + +PRODUCT_NAME=$1 +if [ -e $PRODUCT_NAME ] +then + PRODUCT_NAME='Product 1' +fi + + +PROGRAM_BALANCE=`solana -u l balance hdMghjD73uASxgJXi6e1mGPsXqnADMsrqB1bveqABP1` +if [[ $PROGRAM_BALANCE == '0 SOL' ]] +then + # prepare keys + scripts/generate_demo_keys.sh + + # compile + cargo-build-sbf --tools-version v1.43 + + # deploy + solana -u l program deploy target/deploy/dephy_id_program.so --program-id ./program/keypair.json + + # init + cargo run initialize --admin tmp/keys/admin.json +fi + + +# create product +PRODUCT=`cargo run create-product --vendor $VENDOR "$PRODUCT_NAME" 'SYMBOL' 'METADATA_URI' -m desc="First Product by Example Vendor"` +echo $PRODUCT + +# create device +cargo run create-device --vendor $VENDOR --product $PRODUCT --device $DEVICE 'Device#1' 'METADATA_URI' + +# generate message +MESSAGE=`cargo run generate-message --user $USER --device $DEVICE --product $PRODUCT` +echo Message: $MESSAGE + +# sign message +SIGNATURE=`cargo run sign-message -k $DEVICE $MESSAGE` +echo Signature: $SIGNATURE + +# activate +cargo run activate-device-offchain --device $DEVICE --user $USER --product $PRODUCT --vendor $VENDOR --signature $SIGNATURE --message $MESSAGE