Update to solana 1.18 (#397)
* update solana from 1.17.28 -> 1.18.15 * remove legacy cu * use yellowstone 1.15 * use tagged geyser-grpc-connector version
This commit is contained in:
parent
5dd65155bf
commit
0d1d856305
|
@ -76,9 +76,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ahash"
|
||||
version = "0.8.5"
|
||||
version = "0.8.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd7d5a2cecb58716e47d67d5703a249964b14c7be1ec3cad3affc295b2d1c35d"
|
||||
checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"getrandom 0.2.12",
|
||||
|
@ -574,7 +574,7 @@ dependencies = [
|
|||
"bincode",
|
||||
"clap 4.5.4",
|
||||
"csv",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"dirs",
|
||||
"futures",
|
||||
"itertools 0.10.5",
|
||||
|
@ -689,6 +689,16 @@ dependencies = [
|
|||
"hashbrown 0.13.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "borsh"
|
||||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed"
|
||||
dependencies = [
|
||||
"borsh-derive 1.5.1",
|
||||
"cfg_aliases",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "borsh-derive"
|
||||
version = "0.9.3"
|
||||
|
@ -715,6 +725,20 @@ dependencies = [
|
|||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "borsh-derive"
|
||||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"proc-macro-crate 3.1.0",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.55",
|
||||
"syn_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "borsh-derive-internal"
|
||||
version = "0.9.3"
|
||||
|
@ -866,6 +890,12 @@ version = "1.0.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "cfg_aliases"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.37"
|
||||
|
@ -1223,7 +1253,7 @@ dependencies = [
|
|||
"anyhow",
|
||||
"bincode",
|
||||
"clap 4.5.4",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"futures",
|
||||
"itertools 0.10.5",
|
||||
"log",
|
||||
|
@ -1273,16 +1303,6 @@ dependencies = [
|
|||
"syn 2.0.55",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dashmap"
|
||||
version = "4.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"num_cpus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dashmap"
|
||||
version = "5.5.3"
|
||||
|
@ -1793,7 +1813,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "geyser-grpc-connector"
|
||||
version = "0.10.6+yellowstone.1.13"
|
||||
source = "git+https://github.com/blockworks-foundation/geyser-grpc-connector.git?tag=v0.10.6+yellowstone.1.13+solana.1.17.28#20f29c1e21e1682f124c0a3386cd4a85b1854f01"
|
||||
source = "git+https://github.com/blockworks-foundation/geyser-grpc-connector.git?tag=v0.10.6+yellowstone.1.15+solana.1.18#aa7a8daf6c05dfece2b33e020b53a112415e88cc"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-stream",
|
||||
|
@ -1806,7 +1826,9 @@ dependencies = [
|
|||
"log",
|
||||
"merge-streams",
|
||||
"solana-sdk",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tonic",
|
||||
"tonic-health",
|
||||
"tracing",
|
||||
"url",
|
||||
|
@ -1926,7 +1948,7 @@ version = "0.13.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
|
||||
dependencies = [
|
||||
"ahash 0.8.5",
|
||||
"ahash 0.8.11",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2583,7 +2605,7 @@ dependencies = [
|
|||
"chrono",
|
||||
"clap 4.5.4",
|
||||
"const_env",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"dotenv",
|
||||
"futures",
|
||||
"futures-util",
|
||||
|
@ -3372,6 +3394,29 @@ dependencies = [
|
|||
"toml_edit 0.21.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-error"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
|
||||
dependencies = [
|
||||
"proc-macro-error-attr",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-error-attr"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.79"
|
||||
|
@ -3884,9 +3929,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rustls"
|
||||
version = "0.21.10"
|
||||
version = "0.21.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba"
|
||||
checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e"
|
||||
dependencies = [
|
||||
"log",
|
||||
"ring 0.17.8",
|
||||
|
@ -4250,9 +4295,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-account-decoder"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c4e29f060cabd0e1bd90a63f8e1517ddd3365d3dc2eaa05f9a9fa542f4adeaaa"
|
||||
checksum = "b94ceb26c7d19530cb1bb49bf0f817647cb5fee691dae6779e19d33ac1d4fda1"
|
||||
dependencies = [
|
||||
"Inflector",
|
||||
"base64 0.21.7",
|
||||
|
@ -4275,14 +4320,14 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-address-lookup-table-program"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "71a93d1c1a0c13de20e13a0c9bd7275b00bb901b8b7c55424fea98f71cb37778"
|
||||
checksum = "195a93b87bd6794326a3c628cfcc8abaf70e476c4284bfb73545c873ba47c746"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"bytemuck",
|
||||
"log",
|
||||
"num-derive 0.3.3",
|
||||
"num-derive 0.4.2",
|
||||
"num-traits 0.2.18",
|
||||
"rustc_version",
|
||||
"serde",
|
||||
|
@ -4296,9 +4341,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-clap-utils"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62e5cdc0ae0c8ae79c39a4a362066d0d61764bc7ea7e033961fd7510fd24da2a"
|
||||
checksum = "32063b76137e13fba2f93fdf67f999d84ac587af962b48cb4115f272037b2fae"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"clap 2.34.0",
|
||||
|
@ -4313,13 +4358,13 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-client"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1e2301c2af7e5a1dba0855f710329a2bb993829ed9fdf8f6207d02ee6fc54a4"
|
||||
checksum = "31f6eaf198c544d4f448e6a86a51f9af8b328f041a490a007164a75194edf341"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bincode",
|
||||
"dashmap 4.0.2",
|
||||
"dashmap",
|
||||
"futures",
|
||||
"futures-util",
|
||||
"indexmap 2.2.6",
|
||||
|
@ -4346,9 +4391,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-config-program"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "595118948b966b110aad3f9d8d8464958abe379ecfa7a813b4fc82659c8259bc"
|
||||
checksum = "378259800dc9dad34828d8be4ce0de71146bac1cbbd310f8901f6f19d92c5ea3"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"chrono",
|
||||
|
@ -4360,9 +4405,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-connection-cache"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d363d6bb43e618b6010b47c2eb0579777ce4ed388ca15b84a610a738edf0b97e"
|
||||
checksum = "58b04571089f55754f5a09493ae0bcf8d8d5c8d9cd05be3e77c502f6b68c1a3b"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bincode",
|
||||
|
@ -4382,17 +4427,13 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-frozen-abi"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "96734b05823c8b515f8e3cc02641a27aee2c9760b1a43c74cb20f2a1ab0ab76c"
|
||||
checksum = "780402262644f9efe9ac7d885812d245007fe65fd56a3dfed83ed30d61b44c74"
|
||||
dependencies = [
|
||||
"ahash 0.8.5",
|
||||
"blake3",
|
||||
"block-buffer 0.10.4",
|
||||
"bs58",
|
||||
"bv",
|
||||
"byteorder",
|
||||
"cc",
|
||||
"either",
|
||||
"generic-array",
|
||||
"im",
|
||||
|
@ -4403,7 +4444,6 @@ dependencies = [
|
|||
"serde",
|
||||
"serde_bytes",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"sha2 0.10.8",
|
||||
"solana-frozen-abi-macro",
|
||||
"subtle",
|
||||
|
@ -4412,9 +4452,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-frozen-abi-macro"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a0f1291a464fd046135d019d57a81be165ee3d23aa7df880b47dac683a0582a"
|
||||
checksum = "df836de37aba77234c7afa1d857dc450fb9983572e4c6f595c84cdda65a63792"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -4433,7 +4473,7 @@ dependencies = [
|
|||
"bs58",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"futures",
|
||||
"itertools 0.10.5",
|
||||
"lazy_static",
|
||||
|
@ -4473,7 +4513,7 @@ dependencies = [
|
|||
"bs58",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"futures",
|
||||
"itertools 0.10.5",
|
||||
"lazy_static",
|
||||
|
@ -4516,7 +4556,7 @@ dependencies = [
|
|||
"bs58",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"futures",
|
||||
"itertools 0.10.5",
|
||||
"lazy_static",
|
||||
|
@ -4584,7 +4624,7 @@ dependencies = [
|
|||
"bincode",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"futures",
|
||||
"futures-util",
|
||||
"itertools 0.10.5",
|
||||
|
@ -4620,7 +4660,7 @@ dependencies = [
|
|||
"bs58",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"derive_more",
|
||||
"futures",
|
||||
"geyser-grpc-connector",
|
||||
|
@ -4662,7 +4702,7 @@ dependencies = [
|
|||
"bs58",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"futures",
|
||||
"itertools 0.10.5",
|
||||
"log",
|
||||
|
@ -4690,7 +4730,7 @@ dependencies = [
|
|||
name = "solana-lite-rpc-prioritization-fees"
|
||||
version = "0.2.4"
|
||||
dependencies = [
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"itertools 0.10.5",
|
||||
"jsonrpsee",
|
||||
"lazy_static",
|
||||
|
@ -4717,7 +4757,7 @@ dependencies = [
|
|||
"bytes",
|
||||
"chrono",
|
||||
"clap 4.5.4",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"dotenv",
|
||||
"futures",
|
||||
"itertools 0.10.5",
|
||||
|
@ -4758,7 +4798,7 @@ dependencies = [
|
|||
"clap 4.5.4",
|
||||
"countmap",
|
||||
"crossbeam-channel",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"dotenv",
|
||||
"futures",
|
||||
"itertools 0.10.5",
|
||||
|
@ -4799,7 +4839,7 @@ dependencies = [
|
|||
"chrono",
|
||||
"countmap",
|
||||
"crossbeam-channel",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"futures",
|
||||
"itertools 0.10.5",
|
||||
"lazy_static",
|
||||
|
@ -4837,7 +4877,7 @@ dependencies = [
|
|||
"bs58",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"dashmap 5.5.3",
|
||||
"dashmap",
|
||||
"derive_more",
|
||||
"futures",
|
||||
"itertools 0.10.5",
|
||||
|
@ -4857,9 +4897,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-logger"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c5977c8f24b83cf50e7139ffdb25d70bad6a177f18ccc79ca2293d6a987fa81c"
|
||||
checksum = "9906be6edd0e1b579510736c153dbc51e5968808098d1b1f8c89dbea960aba58"
|
||||
dependencies = [
|
||||
"env_logger",
|
||||
"lazy_static",
|
||||
|
@ -4868,9 +4908,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-measure"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a39ef01b2c65552d05013b2642ffd73258f2c80e3a59e44c499762047df9456"
|
||||
checksum = "7dc77e7f99fa5e845437ac9a593cd4bd67b5f9e4ba4a9578355eef25d3e839e9"
|
||||
dependencies = [
|
||||
"log",
|
||||
"solana-sdk",
|
||||
|
@ -4878,9 +4918,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-metrics"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ad30ff3775412f2929d440446aef8b070676920bc5df495ea6398a8f28ce91f"
|
||||
checksum = "b0a9f68887ac31f84ef69365bdc2d7ca6bf19d50a9c6ee10806adb033e24e318"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"gethostname",
|
||||
|
@ -4893,9 +4933,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-net-utils"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6eafd5178a38a039e12c14780f1b6a74f1e672d62357343e0aee6d0fc7e5bd18"
|
||||
checksum = "1ba07cceff31b644df6cd4acc909df077721fa047b624b9fa906d56bcc67435a"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"clap 3.2.25",
|
||||
|
@ -4915,11 +4955,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-perf"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "10d6293cddcc98ae092d00f43f741405da30aa083acb96666606130810b064f3"
|
||||
checksum = "0b7fa87b3344f96afe1395b5bb822db2ad03cdc2dbe8338636d57c58102a520b"
|
||||
dependencies = [
|
||||
"ahash 0.8.5",
|
||||
"ahash 0.8.11",
|
||||
"bincode",
|
||||
"bv",
|
||||
"caps",
|
||||
|
@ -4944,9 +4984,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-program"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6412447793f8a3ef7526655906728325093b472e481791ac5c584e8d272166dc"
|
||||
checksum = "48ecc7af7594674687260a4d7bcfb0588cefdbe9d0f6c4e9f3140999107566c4"
|
||||
dependencies = [
|
||||
"ark-bn254",
|
||||
"ark-ec",
|
||||
|
@ -4958,6 +4998,7 @@ dependencies = [
|
|||
"blake3",
|
||||
"borsh 0.10.3",
|
||||
"borsh 0.9.3",
|
||||
"borsh 1.5.1",
|
||||
"bs58",
|
||||
"bv",
|
||||
"bytemuck",
|
||||
|
@ -4975,7 +5016,7 @@ dependencies = [
|
|||
"log",
|
||||
"memoffset 0.9.1",
|
||||
"num-bigint 0.4.4",
|
||||
"num-derive 0.3.3",
|
||||
"num-derive 0.4.2",
|
||||
"num-traits 0.2.18",
|
||||
"parking_lot",
|
||||
"rand 0.8.5",
|
||||
|
@ -4998,9 +5039,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-program-runtime"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1977e741a6793fca27413507457d797df0f41bc0ae634247d112bc77ab2b0325"
|
||||
checksum = "0ef9218f50470228ebca12bb147650ca7052678aad915a4e19687ee215f8d947"
|
||||
dependencies = [
|
||||
"base64 0.21.7",
|
||||
"bincode",
|
||||
|
@ -5009,7 +5050,7 @@ dependencies = [
|
|||
"itertools 0.10.5",
|
||||
"libc",
|
||||
"log",
|
||||
"num-derive 0.3.3",
|
||||
"num-derive 0.4.2",
|
||||
"num-traits 0.2.18",
|
||||
"percentage",
|
||||
"rand 0.8.5",
|
||||
|
@ -5026,9 +5067,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-pubsub-client"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ad21dd5d6fe09116dbc29aec279b7cf08d250b564899dc87437bd780ed26290"
|
||||
checksum = "60325aaab2bcd99ca51e1ff5a4673027a03591353a944151690b38d5dadc2c0f"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"futures-util",
|
||||
|
@ -5051,9 +5092,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-quic-client"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6201869768fe133ce9b8088e4f718f53ff164b8e5df3d0d46a6563a22545924f"
|
||||
checksum = "d979690c6c392ffdb40a91e241a08ec3942eb217bddb0403b6174de0173ab61e"
|
||||
dependencies = [
|
||||
"async-mutex",
|
||||
"async-trait",
|
||||
|
@ -5078,9 +5119,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-rayon-threadlimit"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f100d0c3214d67bb847a1eefc7079f6bb755534266423f4c994ad3b40c685ed"
|
||||
checksum = "6902079fb9d0bd4c455b97f5e48e2412d98e0e1facf635ec6fc6b783c0f3e2af"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"num_cpus",
|
||||
|
@ -5088,14 +5129,14 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-remote-wallet"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3328c891079086b408a04e701470a346d517c9c51c0a96f2f166f616a3e1c3c8"
|
||||
checksum = "af88bad970c0dd63e98e7cc4c3c16a58acf32d4255aee79f611ea375592028ec"
|
||||
dependencies = [
|
||||
"console",
|
||||
"dialoguer",
|
||||
"log",
|
||||
"num-derive 0.3.3",
|
||||
"num-derive 0.4.2",
|
||||
"num-traits 0.2.18",
|
||||
"parking_lot",
|
||||
"qstring",
|
||||
|
@ -5107,9 +5148,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-rpc-client"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bfacf1163a375d98c29779a03ba278b2ef43494f77e33826a33f9460563c0887"
|
||||
checksum = "d1adab0dcdc851fc7bc6ca8c6926d9f56ed3982f1e4fabd67d362647b57143d3"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"base64 0.21.7",
|
||||
|
@ -5133,9 +5174,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-rpc-client-api"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7fab293a88113511e66607d76bd027edfe0b1372b467fd76bbb5af03448539a2"
|
||||
checksum = "6d6764712822bbc0259bbb5413377798a11462221863d000082f39968ce5ad03"
|
||||
dependencies = [
|
||||
"base64 0.21.7",
|
||||
"bs58",
|
||||
|
@ -5155,9 +5196,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-rpc-client-nonce-utils"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e43cb51374a6ec8fd401b3387334ef93e04f6d8ae87bbb29892aff42aeb1061"
|
||||
checksum = "49489fe59d308c10a2b3e3ecd3bee1107b9b67a325c99ffd278ba0870a5619cd"
|
||||
dependencies = [
|
||||
"clap 2.34.0",
|
||||
"solana-clap-utils",
|
||||
|
@ -5168,15 +5209,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-sdk"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "de1ce8848de4198f9bc7e4574252be02b1ed86ecbc2fff506780d5f8d6e4c4a8"
|
||||
checksum = "73bb113fa17e0607343afdc795c2c5230981c5b51c99b2c54fba91755879d65b"
|
||||
dependencies = [
|
||||
"assert_matches",
|
||||
"base64 0.21.7",
|
||||
"bincode",
|
||||
"bitflags 2.5.0",
|
||||
"borsh 0.10.3",
|
||||
"borsh 1.5.1",
|
||||
"bs58",
|
||||
"bytemuck",
|
||||
"byteorder",
|
||||
|
@ -5193,9 +5234,9 @@ dependencies = [
|
|||
"libsecp256k1",
|
||||
"log",
|
||||
"memmap2",
|
||||
"num-derive 0.3.3",
|
||||
"num-derive 0.4.2",
|
||||
"num-traits 0.2.18",
|
||||
"num_enum 0.6.1",
|
||||
"num_enum 0.7.2",
|
||||
"pbkdf2 0.11.0",
|
||||
"qstring",
|
||||
"qualifier_attr",
|
||||
|
@ -5210,6 +5251,7 @@ dependencies = [
|
|||
"serde_with",
|
||||
"sha2 0.10.8",
|
||||
"sha3 0.10.8",
|
||||
"siphasher",
|
||||
"solana-frozen-abi",
|
||||
"solana-frozen-abi-macro",
|
||||
"solana-logger",
|
||||
|
@ -5222,9 +5264,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-sdk-macro"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc5cc46bbda0a5472d8d0a4c846b22941436ac45c31456d3e885a387a5f264f7"
|
||||
checksum = "8fcdb3a94e2f04d856d2fba6feb4f6887a1da21a3ee0b64b69c08d15dc22d46c"
|
||||
dependencies = [
|
||||
"bs58",
|
||||
"proc-macro2",
|
||||
|
@ -5241,9 +5283,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183"
|
|||
|
||||
[[package]]
|
||||
name = "solana-streamer"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46f02b475fc20c55ebbcfa5638ff93f9b780414cc6185e3a6d0992bca0ae81ee"
|
||||
checksum = "c0e6132c9eefb372202e69e654e8c2a30b4c06635343dd6474467b9cca4b9dd9"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"bytes",
|
||||
|
@ -5274,9 +5316,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-thin-client"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b6ce2304764b8bb699db734fde9cd19ace038d3895d828a557ea0ec2a9e0ecd"
|
||||
checksum = "ca1c3ed492f61914aaa8074cf7a07f93bfd8d9adbf9846939e589b7b7c70fe39"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"log",
|
||||
|
@ -5289,9 +5331,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-tpu-client"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa3e2351625e26f55e5e08f8e5aadaa2380fd0649f25641d6ba3f3848dbe5c9a"
|
||||
checksum = "c3fbfce5d27608f4853dcb0c0d964f59420710a7a4486409e7583717c610c3cf"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bincode",
|
||||
|
@ -5313,9 +5355,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-transaction-status"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0841bbd1845c87043e4184961e45cc7c08b36d96d0d146256b26ea5c74630a0f"
|
||||
checksum = "6adbd8f3fccddeae87278a105dcf8a8792f8816c0f4fb5f7ae8f307af279ac49"
|
||||
dependencies = [
|
||||
"Inflector",
|
||||
"base64 0.21.7",
|
||||
|
@ -5338,9 +5380,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-udp-client"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bae54a100f0b0b5be065f5d05f2259f6d4a7b39f5866d579927f3ca35a01773b"
|
||||
checksum = "b90f8ebd26cac3cd563bf839ff8511f27698f2d220e58f7538b5d6d80d8970ed"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"solana-connection-cache",
|
||||
|
@ -5353,9 +5395,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-version"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5f69945e38d7440221e2fac0aaa57a9d72adb329b0de705ca5bd9ba981aedc16"
|
||||
checksum = "ac8714cf9f6caefc403e19770ad73ed2e4c866b7201e31dd17a9e06b6a693a57"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rustc_version",
|
||||
|
@ -5369,13 +5411,13 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-vote-program"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e574aafc3c5adc7106ab4605d8ad378c9a12f2cf1dec2e8ba1aa6fd97a5d5490"
|
||||
checksum = "b5de2428939c6e279901d4357bf02c809739e5b97164e8620e09a9e0b55c2327"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"log",
|
||||
"num-derive 0.3.3",
|
||||
"num-derive 0.4.2",
|
||||
"num-traits 0.2.18",
|
||||
"rustc_version",
|
||||
"serde",
|
||||
|
@ -5391,9 +5433,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-zk-token-sdk"
|
||||
version = "1.17.31"
|
||||
version = "1.18.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "597dddc8ab46852dea7fc3d22e031fa4ffdb1b2291ac24d960605424a510a5f5"
|
||||
checksum = "8dad1753ec3b189879c8756ac35471467116dfc93d7aeb68cfd28f22a02c850d"
|
||||
dependencies = [
|
||||
"aes-gcm-siv",
|
||||
"base64 0.21.7",
|
||||
|
@ -5405,7 +5447,7 @@ dependencies = [
|
|||
"itertools 0.10.5",
|
||||
"lazy_static",
|
||||
"merlin",
|
||||
"num-derive 0.3.3",
|
||||
"num-derive 0.4.2",
|
||||
"num-traits 0.2.18",
|
||||
"rand 0.7.3",
|
||||
"serde",
|
||||
|
@ -5732,6 +5774,18 @@ dependencies = [
|
|||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn_derive"
|
||||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b"
|
||||
dependencies = [
|
||||
"proc-macro-error",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.55",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sync_wrapper"
|
||||
version = "0.1.2"
|
||||
|
@ -5809,18 +5863,18 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9"
|
|||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.58"
|
||||
version = "1.0.61"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297"
|
||||
checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.58"
|
||||
version = "1.0.61"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7"
|
||||
checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -6787,13 +6841,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yellowstone-grpc-client"
|
||||
version = "1.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f4f6d836d214cb8789002d039412da354049e9ffe983c643ec492c4d934698f"
|
||||
version = "1.15.0+solana.1.18"
|
||||
source = "git+https://github.com/rpcpool/yellowstone-grpc.git?tag=v1.15.0+solana.1.18#54698c77c727eb33e23c2ab95384c98c688540e2"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"futures",
|
||||
"http",
|
||||
"thiserror",
|
||||
"tonic",
|
||||
"tonic-health",
|
||||
|
@ -6802,9 +6854,8 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yellowstone-grpc-proto"
|
||||
version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c00b66d40d85c405f14b420d7674e98c70d06f6b673f36c9e0285f81b9b797d"
|
||||
version = "1.14.0+solana.1.18"
|
||||
source = "git+https://github.com/rpcpool/yellowstone-grpc.git?tag=v1.15.0+solana.1.18#54698c77c727eb33e23c2ab95384c98c688540e2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
|
|
34
Cargo.toml
34
Cargo.toml
|
@ -22,25 +22,25 @@ members = [
|
|||
|
||||
[workspace.package]
|
||||
version = "0.2.4"
|
||||
authors = ["gmgalactus <gmgalactus@mango.markets>", "Aniket Prajapati <contact@aniketprajapati.me>"]
|
||||
authors = ["gmgalactus <gmgalactus@mango.markets>", "GroovieGermanikus <groovie@mango.markets>"]
|
||||
repository = "https://github.com/blockworks-foundation/lite-rpc"
|
||||
license = "AGPL"
|
||||
edition = "2021"
|
||||
|
||||
[workspace.dependencies]
|
||||
solana-sdk = "~1.17.28"
|
||||
solana-rpc-client = "~1.17.28"
|
||||
solana-rpc-client-api = "~1.17.28"
|
||||
solana-transaction-status = "~1.17.28"
|
||||
solana-version = "~1.17.28"
|
||||
solana-client = "~1.17.28"
|
||||
solana-net-utils = "~1.17.28"
|
||||
solana-pubsub-client = "~1.17.28"
|
||||
solana-streamer = "~1.17.28"
|
||||
solana-account-decoder = "~1.17.28"
|
||||
solana-ledger = "~1.17.28"
|
||||
solana-program = "~1.17.28"
|
||||
solana-address-lookup-table-program = "~1.17.28"
|
||||
solana-sdk = "~1.18.15"
|
||||
solana-rpc-client = "~1.18.15"
|
||||
solana-rpc-client-api = "~1.18.15"
|
||||
solana-transaction-status = "~1.18.15"
|
||||
solana-version = "~1.18.15"
|
||||
solana-client = "~1.18.15"
|
||||
solana-net-utils = "~1.18.15"
|
||||
solana-pubsub-client = "~1.18.15"
|
||||
solana-streamer = "~1.18.15"
|
||||
solana-account-decoder = "~1.18.15"
|
||||
solana-ledger = "~1.18.15"
|
||||
solana-program = "~1.18.15"
|
||||
solana-address-lookup-table-program = "~1.18.15"
|
||||
itertools = "0.10.5"
|
||||
rangetools = "0.1.4"
|
||||
serde = { version = "1.0.160", features = ["derive"] }
|
||||
|
@ -87,9 +87,9 @@ solana-lite-rpc-accounts = {path = "accounts", version = "0.2.4"}
|
|||
solana-lite-rpc-accounts-on-demand = {path = "accounts-on-demand", version = "0.2.4"}
|
||||
bench = { path = "bench", version="0.2.4" }
|
||||
|
||||
yellowstone-grpc-proto = "1.13.0"
|
||||
#geyser-grpc-connector = { path = "../../geyser-grpc-connector" }
|
||||
geyser-grpc-connector = { tag = "v0.10.6+yellowstone.1.13+solana.1.17.28", git = "https://github.com/blockworks-foundation/geyser-grpc-connector.git" }
|
||||
yellowstone-grpc-proto = { git = "https://github.com/rpcpool/yellowstone-grpc.git", tag = "v1.15.0+solana.1.18" }
|
||||
#geyser-grpc-connector = { path = "../geyser-grpc-connector" }
|
||||
geyser-grpc-connector = { tag = "v0.10.6+yellowstone.1.15+solana.1.18", git = "https://github.com/blockworks-foundation/geyser-grpc-connector.git" }
|
||||
|
||||
|
||||
async-trait = "0.1.68"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use anyhow::anyhow;
|
||||
use futures::StreamExt;
|
||||
use merge_streams::MergeStreams;
|
||||
use std::{
|
||||
|
@ -9,7 +10,7 @@ use std::{
|
|||
use geyser_grpc_connector::yellowstone_grpc_util::{
|
||||
connect_with_timeout_with_buffers, GeyserGrpcClientBufferConfig,
|
||||
};
|
||||
use geyser_grpc_connector::{GeyserGrpcClient, GeyserGrpcClientResult, GrpcSourceConfig};
|
||||
use geyser_grpc_connector::{GeyserGrpcClient, GrpcSourceConfig};
|
||||
use itertools::Itertools;
|
||||
use solana_lite_rpc_core::{
|
||||
commitment_utils::Commitment,
|
||||
|
@ -103,19 +104,14 @@ pub fn start_account_streaming_tasks(
|
|||
|
||||
let program_subscription = SubscribeRequest {
|
||||
accounts: subscribe_programs,
|
||||
slots: Default::default(),
|
||||
transactions: Default::default(),
|
||||
blocks: Default::default(),
|
||||
blocks_meta: Default::default(),
|
||||
entry: Default::default(),
|
||||
commitment: Some(processed_commitment.into()),
|
||||
accounts_data_slice: Default::default(),
|
||||
ping: None,
|
||||
commitment: Some(processed_commitment.into()),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let mut client = create_connection(&grpc_config).await?;
|
||||
|
||||
let account_stream = client.subscribe_once2(program_subscription).await.unwrap();
|
||||
let account_stream = client.subscribe_once(program_subscription).await.unwrap();
|
||||
|
||||
// each account subscription batch will require individual stream
|
||||
let mut subscriptions = vec![account_stream];
|
||||
|
@ -139,17 +135,12 @@ pub fn start_account_streaming_tasks(
|
|||
|
||||
let account_request = SubscribeRequest {
|
||||
accounts: accounts_subscription,
|
||||
slots: Default::default(),
|
||||
transactions: Default::default(),
|
||||
blocks: Default::default(),
|
||||
blocks_meta: Default::default(),
|
||||
entry: Default::default(),
|
||||
commitment: Some(processed_commitment.into()),
|
||||
accounts_data_slice: Default::default(),
|
||||
ping: None,
|
||||
commitment: Some(processed_commitment.into()),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let account_stream = client.subscribe_once2(account_request).await.unwrap();
|
||||
let account_stream = client.subscribe_once(account_request).await.unwrap();
|
||||
subscriptions.push(account_stream);
|
||||
}
|
||||
let mut merged_stream = subscriptions.merge();
|
||||
|
@ -216,7 +207,7 @@ pub fn start_account_streaming_tasks(
|
|||
|
||||
async fn create_connection(
|
||||
grpc_config: &GrpcSourceConfig,
|
||||
) -> GeyserGrpcClientResult<GeyserGrpcClient<impl Interceptor + Sized>> {
|
||||
) -> anyhow::Result<GeyserGrpcClient<impl Interceptor + Sized>> {
|
||||
connect_with_timeout_with_buffers(
|
||||
grpc_config.grpc_addr.clone(),
|
||||
grpc_config.grpc_x_token.clone(),
|
||||
|
@ -230,6 +221,7 @@ async fn create_connection(
|
|||
},
|
||||
)
|
||||
.await
|
||||
.map_err(|e| anyhow!("Failed to connect to grpc source: {e:?}"))
|
||||
}
|
||||
|
||||
pub fn create_grpc_account_streaming(
|
||||
|
|
|
@ -3,11 +3,6 @@ use crate::grpc::grpc_accounts_streaming::create_grpc_account_streaming;
|
|||
use crate::grpc_multiplex::{
|
||||
create_grpc_multiplex_blocks_subscription, create_grpc_multiplex_processed_slots_subscription,
|
||||
};
|
||||
use anyhow::Context;
|
||||
use futures::StreamExt;
|
||||
use geyser_grpc_connector::yellowstone_grpc_util::{
|
||||
connect_with_timeout_with_buffers, GeyserGrpcClientBufferConfig,
|
||||
};
|
||||
use geyser_grpc_connector::GrpcSourceConfig;
|
||||
use itertools::Itertools;
|
||||
use log::trace;
|
||||
|
@ -21,7 +16,6 @@ use solana_lite_rpc_core::{
|
|||
use solana_sdk::program_utils::limited_deserialize;
|
||||
use solana_sdk::vote::instruction::VoteInstruction;
|
||||
use solana_sdk::{
|
||||
borsh0_10::try_from_slice_unchecked,
|
||||
commitment_config::CommitmentConfig,
|
||||
compute_budget::{self, ComputeBudgetInstruction},
|
||||
hash::Hash,
|
||||
|
@ -36,13 +30,9 @@ use solana_sdk::{
|
|||
};
|
||||
use solana_transaction_status::{Reward, RewardType};
|
||||
use std::cell::OnceCell;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use tokio::sync::{broadcast, Notify};
|
||||
use tokio::sync::Notify;
|
||||
use tracing::trace_span;
|
||||
use yellowstone_grpc_proto::geyser::subscribe_update::UpdateOneof;
|
||||
use yellowstone_grpc_proto::geyser::{CommitmentLevel, SubscribeRequestFilterBlocks};
|
||||
|
||||
use crate::rpc_polling::vote_accounts_and_cluster_info_polling::{
|
||||
poll_cluster_info, poll_vote_accounts,
|
||||
|
@ -216,18 +206,16 @@ pub fn from_grpc_block_update(
|
|||
|
||||
fn map_compute_budget_instructions(message: &VersionedMessage) -> (Option<u32>, Option<u64>) {
|
||||
let cu_requested_cell: OnceCell<u32> = OnceCell::new();
|
||||
let legacy_cu_requested_cell: OnceCell<u32> = OnceCell::new();
|
||||
|
||||
let prioritization_fees_cell: OnceCell<u64> = OnceCell::new();
|
||||
let legacy_prio_fees_cell: OnceCell<u64> = OnceCell::new();
|
||||
|
||||
for compute_budget_ins in message.instructions().iter().filter(|instruction| {
|
||||
instruction
|
||||
.program_id(message.static_account_keys())
|
||||
.eq(&compute_budget::id())
|
||||
}) {
|
||||
if let Ok(budget_ins) =
|
||||
try_from_slice_unchecked::<ComputeBudgetInstruction>(compute_budget_ins.data.as_slice())
|
||||
if let Ok(budget_ins) = solana_sdk::borsh1::try_from_slice_unchecked::<
|
||||
ComputeBudgetInstruction,
|
||||
>(compute_budget_ins.data.as_slice())
|
||||
{
|
||||
match budget_ins {
|
||||
// aka cu requested
|
||||
|
@ -242,16 +230,6 @@ fn map_compute_budget_instructions(message: &VersionedMessage) -> (Option<u32>,
|
|||
.set(price)
|
||||
.expect("prioritization_fees must be set only once");
|
||||
}
|
||||
// legacy
|
||||
ComputeBudgetInstruction::RequestUnitsDeprecated {
|
||||
units,
|
||||
additional_fee,
|
||||
} => {
|
||||
let _ = legacy_cu_requested_cell.set(units);
|
||||
if additional_fee > 0 {
|
||||
let _ = legacy_prio_fees_cell.set(((units * 1000) / additional_fee) as u64);
|
||||
};
|
||||
}
|
||||
_ => {
|
||||
trace!("skip compute budget instruction");
|
||||
}
|
||||
|
@ -259,116 +237,11 @@ fn map_compute_budget_instructions(message: &VersionedMessage) -> (Option<u32>,
|
|||
}
|
||||
}
|
||||
|
||||
let cu_requested = cu_requested_cell
|
||||
.get()
|
||||
.or(legacy_cu_requested_cell.get())
|
||||
.cloned();
|
||||
let prioritization_fees = prioritization_fees_cell
|
||||
.get()
|
||||
.or(legacy_prio_fees_cell.get())
|
||||
.cloned();
|
||||
let cu_requested = cu_requested_cell.get().cloned();
|
||||
let prioritization_fees = prioritization_fees_cell.get().cloned();
|
||||
(cu_requested, prioritization_fees)
|
||||
}
|
||||
|
||||
pub fn create_block_processing_task(
|
||||
grpc_addr: String,
|
||||
grpc_x_token: Option<String>,
|
||||
block_sx: tokio::sync::mpsc::Sender<SubscribeUpdateBlock>,
|
||||
commitment_level: CommitmentLevel,
|
||||
mut exit_notify: broadcast::Receiver<()>,
|
||||
) -> AnyhowJoinHandle {
|
||||
tokio::spawn(async move {
|
||||
'main_loop: loop {
|
||||
let mut blocks_subs = HashMap::new();
|
||||
blocks_subs.insert(
|
||||
"block_client".to_string(),
|
||||
SubscribeRequestFilterBlocks {
|
||||
account_include: Default::default(),
|
||||
include_transactions: Some(true),
|
||||
include_accounts: Some(false),
|
||||
include_entries: Some(false),
|
||||
},
|
||||
);
|
||||
|
||||
// connect to grpc
|
||||
let mut client = connect_with_timeout_with_buffers(
|
||||
grpc_addr.clone(),
|
||||
grpc_x_token.clone(),
|
||||
None,
|
||||
Some(Duration::from_secs(10)),
|
||||
Some(Duration::from_secs(10)),
|
||||
GeyserGrpcClientBufferConfig {
|
||||
buffer_size: Some(65536),
|
||||
conn_window: Some(5242880),
|
||||
stream_window: Some(4194304),
|
||||
},
|
||||
)
|
||||
.await?;
|
||||
let mut stream = tokio::select! {
|
||||
res = client
|
||||
.subscribe_once(
|
||||
HashMap::new(),
|
||||
Default::default(),
|
||||
HashMap::new(),
|
||||
Default::default(),
|
||||
blocks_subs,
|
||||
Default::default(),
|
||||
Some(commitment_level),
|
||||
Default::default(),
|
||||
None,
|
||||
) => {
|
||||
res?
|
||||
},
|
||||
_ = exit_notify.recv() => {
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
loop {
|
||||
tokio::select! {
|
||||
message = stream.next() => {
|
||||
let Some(Ok(message)) = message else {
|
||||
break;
|
||||
};
|
||||
|
||||
let Some(update) = message.update_oneof else {
|
||||
continue;
|
||||
};
|
||||
|
||||
match update {
|
||||
UpdateOneof::Block(block) => {
|
||||
log::trace!(
|
||||
"received block, hash: {} slot: {}",
|
||||
block.blockhash,
|
||||
block.slot
|
||||
);
|
||||
block_sx
|
||||
.send(block)
|
||||
.await
|
||||
.context("Problem sending on block channel")?;
|
||||
}
|
||||
UpdateOneof::Ping(_) => {
|
||||
log::trace!("GRPC Ping");
|
||||
}
|
||||
_ => {
|
||||
log::trace!("unknown GRPC notification");
|
||||
}
|
||||
};
|
||||
},
|
||||
_ = exit_notify.recv() => {
|
||||
break 'main_loop;
|
||||
}
|
||||
}
|
||||
}
|
||||
drop(stream);
|
||||
drop(client);
|
||||
log::error!("Grpc block subscription broken (resubscribing)");
|
||||
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
|
||||
}
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
pub fn create_grpc_subscription(
|
||||
rpc_client: Arc<RpcClient>,
|
||||
grpc_sources: Vec<GrpcSourceConfig>,
|
||||
|
|
|
@ -11,7 +11,7 @@ use solana_lite_rpc_core::{
|
|||
AnyhowJoinHandle,
|
||||
};
|
||||
use solana_rpc_client_api::config::RpcBlockConfig;
|
||||
use solana_sdk::borsh0_10::try_from_slice_unchecked;
|
||||
use solana_sdk::borsh1::try_from_slice_unchecked;
|
||||
use solana_sdk::compute_budget::ComputeBudgetInstruction;
|
||||
use solana_sdk::program_utils::limited_deserialize;
|
||||
use solana_sdk::reward_type::RewardType;
|
||||
|
@ -222,22 +222,7 @@ pub fn from_ui_block(
|
|||
_ => None,
|
||||
};
|
||||
|
||||
let legacy_compute_budget = tx.message.instructions().iter().find_map(|i| {
|
||||
if i.program_id(tx.message.static_account_keys())
|
||||
.eq(&compute_budget::id())
|
||||
{
|
||||
if let Ok(ComputeBudgetInstruction::RequestUnitsDeprecated {
|
||||
units,
|
||||
additional_fee,
|
||||
}) = try_from_slice_unchecked(i.data.as_slice())
|
||||
{
|
||||
return Some((units, additional_fee));
|
||||
}
|
||||
}
|
||||
None
|
||||
});
|
||||
|
||||
let mut cu_requested = tx.message.instructions().iter().find_map(|i| {
|
||||
let cu_requested = tx.message.instructions().iter().find_map(|i| {
|
||||
if i.program_id(tx.message.static_account_keys())
|
||||
.eq(&compute_budget::id())
|
||||
{
|
||||
|
@ -250,7 +235,7 @@ pub fn from_ui_block(
|
|||
None
|
||||
});
|
||||
|
||||
let mut prioritization_fees = tx.message.instructions().iter().find_map(|i| {
|
||||
let prioritization_fees = tx.message.instructions().iter().find_map(|i| {
|
||||
if i.program_id(tx.message.static_account_keys())
|
||||
.eq(&compute_budget::id())
|
||||
{
|
||||
|
@ -264,13 +249,6 @@ pub fn from_ui_block(
|
|||
None
|
||||
});
|
||||
|
||||
if let Some((units, additional_fee)) = legacy_compute_budget {
|
||||
cu_requested = Some(units);
|
||||
if additional_fee > 0 {
|
||||
prioritization_fees = Some(calc_prioritization_fees(units, additional_fee))
|
||||
}
|
||||
};
|
||||
|
||||
let blockhash = tx.message.recent_blockhash();
|
||||
|
||||
let is_vote_transaction = tx.message.instructions().iter().any(|i| {
|
||||
|
@ -348,18 +326,3 @@ fn map_block_info(produced_block: &ProducedBlock) -> BlockInfo {
|
|||
block_time: produced_block.block_time,
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn calc_prioritization_fees(units: u32, additional_fee: u32) -> u64 {
|
||||
(units as u64 * 1000) / additional_fee as u64
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn overflow_u32() {
|
||||
// value high enough to overflow u32 if multiplied by 1000
|
||||
let units: u32 = 4_000_000_000;
|
||||
let additional_fee: u32 = 100;
|
||||
let prioritization_fees: u64 = calc_prioritization_fees(units, additional_fee);
|
||||
|
||||
assert_eq!(40_000_000_000, prioritization_fees);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ impl IdentityStakes {
|
|||
if let Some(stakes) = map_of_stakes.get(&self.identity.to_string()) {
|
||||
let only_stakes = map_of_stakes.iter().map(|x| *x.1).collect_vec();
|
||||
let identity_stakes = IdentityStakesData {
|
||||
peer_type: ConnectionPeerType::Staked,
|
||||
peer_type: ConnectionPeerType::Staked(*stakes), // Staked -> Staked(*stakes) .. not sure if that is correct
|
||||
stakes: *stakes,
|
||||
min_stakes: only_stakes.iter().min().map_or(0, |x| *x),
|
||||
max_stakes: only_stakes.iter().max().map_or(0, |x| *x),
|
||||
|
|
|
@ -15,7 +15,7 @@ use solana_sdk::pubkey::Pubkey;
|
|||
use solana_sdk::signature::{Keypair, Signature, Signer};
|
||||
|
||||
use solana_sdk::transaction::{Transaction, VersionedTransaction};
|
||||
use solana_streamer::nonblocking::quic::ConnectionPeerType;
|
||||
use solana_streamer::nonblocking::quic::{ConnectionPeerType, SpawnNonBlockingServerResult};
|
||||
use solana_streamer::packet::PacketBatch;
|
||||
use solana_streamer::quic::StreamStats;
|
||||
use solana_streamer::streamer::StakedNodes;
|
||||
|
@ -424,21 +424,23 @@ async fn solana_quic_streamer_start() {
|
|||
let keypair = Keypair::new();
|
||||
// gossip_host is used in the server certificate
|
||||
let gossip_host = "127.0.0.1".parse().unwrap();
|
||||
let (_, stats, t) = solana_streamer::nonblocking::quic::spawn_server(
|
||||
"test-quic-server",
|
||||
sock.try_clone().unwrap(),
|
||||
&keypair,
|
||||
gossip_host,
|
||||
sender,
|
||||
exit.clone(),
|
||||
1,
|
||||
staked_nodes,
|
||||
10,
|
||||
10,
|
||||
Duration::from_millis(1000),
|
||||
Duration::from_millis(1000),
|
||||
)
|
||||
.unwrap();
|
||||
let SpawnNonBlockingServerResult { stats, thread, .. } =
|
||||
solana_streamer::nonblocking::quic::spawn_server(
|
||||
"test-quic-server",
|
||||
sock.try_clone().unwrap(),
|
||||
&keypair,
|
||||
gossip_host,
|
||||
sender,
|
||||
exit.clone(),
|
||||
1,
|
||||
staked_nodes,
|
||||
10,
|
||||
10,
|
||||
9999, // max_streams_per_ms
|
||||
Duration::from_millis(1000),
|
||||
Duration::from_millis(1000),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let addr = sock.local_addr().unwrap().ip();
|
||||
let port = sock.local_addr().unwrap().port();
|
||||
|
@ -447,7 +449,7 @@ async fn solana_quic_streamer_start() {
|
|||
// sleep(Duration::from_millis(500)).await;
|
||||
|
||||
exit.store(true, Ordering::Relaxed);
|
||||
t.await.unwrap();
|
||||
thread.await.unwrap();
|
||||
|
||||
stats.report("test-quic-streamer");
|
||||
}
|
||||
|
@ -499,13 +501,14 @@ async fn start_literpc_client_direct_mode(
|
|||
|
||||
// get information about the optional validator identity stake
|
||||
// populated from get_stakes_for_identity()
|
||||
let stakes = if test_case_params.stake_connection {
|
||||
30
|
||||
} else {
|
||||
0
|
||||
};
|
||||
let identity_stakes = IdentityStakesData {
|
||||
peer_type: ConnectionPeerType::Staked,
|
||||
stakes: if test_case_params.stake_connection {
|
||||
30
|
||||
} else {
|
||||
0
|
||||
}, // stake of lite-rpc
|
||||
peer_type: ConnectionPeerType::Staked(stakes),
|
||||
stakes, // stake of lite-rpc
|
||||
min_stakes: 0,
|
||||
max_stakes: 40,
|
||||
total_stakes: 100,
|
||||
|
@ -599,13 +602,14 @@ async fn start_literpc_client_proxy_mode(
|
|||
|
||||
// get information about the optional validator identity stake
|
||||
// populated from get_stakes_for_identity()
|
||||
let stake = if test_case_params.stake_connection {
|
||||
30
|
||||
} else {
|
||||
0
|
||||
};
|
||||
let _identity_stakes = IdentityStakesData {
|
||||
peer_type: ConnectionPeerType::Staked,
|
||||
stakes: if test_case_params.stake_connection {
|
||||
30
|
||||
} else {
|
||||
0
|
||||
}, // stake of lite-rpc
|
||||
peer_type: ConnectionPeerType::Staked(stake), // not sure if that is correct
|
||||
stakes: stake, // stake of lite-rpc
|
||||
min_stakes: 0,
|
||||
max_stakes: 40,
|
||||
total_stakes: 100,
|
||||
|
@ -705,21 +709,23 @@ impl SolanaQuicStreamer {
|
|||
let keypair = Keypair::new();
|
||||
// gossip_host is used in the server certificate
|
||||
let gossip_host = "127.0.0.1".parse().unwrap();
|
||||
let (_, stats, jh) = solana_streamer::nonblocking::quic::spawn_server(
|
||||
"test-quic-server",
|
||||
udp_socket.try_clone().unwrap(),
|
||||
&keypair,
|
||||
gossip_host,
|
||||
sender,
|
||||
exit.clone(),
|
||||
MAX_QUIC_CONNECTIONS_PER_PEER,
|
||||
staked_nodes,
|
||||
10,
|
||||
10,
|
||||
Duration::from_millis(1000),
|
||||
Duration::from_millis(1000),
|
||||
)
|
||||
.unwrap();
|
||||
let SpawnNonBlockingServerResult { stats, thread, .. } =
|
||||
solana_streamer::nonblocking::quic::spawn_server(
|
||||
"test-quic-server",
|
||||
udp_socket.try_clone().unwrap(),
|
||||
&keypair,
|
||||
gossip_host,
|
||||
sender,
|
||||
exit.clone(),
|
||||
MAX_QUIC_CONNECTIONS_PER_PEER,
|
||||
staked_nodes,
|
||||
10,
|
||||
10,
|
||||
9999, // max_streams_per_ms
|
||||
Duration::from_millis(1000),
|
||||
Duration::from_millis(1000),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let addr = udp_socket.local_addr().unwrap().ip();
|
||||
let port = udp_socket.local_addr().unwrap().port();
|
||||
|
@ -728,7 +734,7 @@ impl SolanaQuicStreamer {
|
|||
Self {
|
||||
sock: udp_socket,
|
||||
exit,
|
||||
join_handler: jh,
|
||||
join_handler: thread,
|
||||
stats,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,6 @@ impl ActiveConnection {
|
|||
|
||||
let max_uni_stream_connections = compute_max_allowed_uni_streams(
|
||||
identity_stakes.peer_type,
|
||||
identity_stakes.stakes,
|
||||
identity_stakes.total_stakes,
|
||||
);
|
||||
let connection_pool = QuicConnectionPool::new(
|
||||
|
|
|
@ -20,7 +20,6 @@ use solana_lite_rpc_core::{
|
|||
AnyhowJoinHandle,
|
||||
};
|
||||
use solana_sdk::{
|
||||
borsh0_10::try_from_slice_unchecked,
|
||||
compute_budget::{self, ComputeBudgetInstruction},
|
||||
transaction::{Transaction, VersionedTransaction},
|
||||
};
|
||||
|
@ -165,8 +164,9 @@ impl TransactionService {
|
|||
.program_id(tx.message.static_account_keys())
|
||||
.eq(&compute_budget::id())
|
||||
{
|
||||
let ix_which =
|
||||
try_from_slice_unchecked::<ComputeBudgetInstruction>(ix.data.as_slice());
|
||||
let ix_which = solana_sdk::borsh1::try_from_slice_unchecked::<
|
||||
ComputeBudgetInstruction,
|
||||
>(ix.data.as_slice());
|
||||
if let Ok(ComputeBudgetInstruction::SetComputeUnitPrice(fees)) = ix_which {
|
||||
prioritization_fee = fees;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue