Compare commits
2 Commits
3c2ce7647d
...
72c4f79911
Author | SHA1 | Date |
---|---|---|
Godmode Galactus | 72c4f79911 | |
Godmode Galactus | 92a0db9cc3 |
|
@ -1397,12 +1397,6 @@ dependencies = [
|
||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "crossbeam"
|
|
||||||
version = "0.2.12"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bd66663db5a988098a89599d4857919b3acf7f61402e61365acfd3919857b9be"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crossbeam-channel"
|
name = "crossbeam-channel"
|
||||||
version = "0.5.8"
|
version = "0.5.8"
|
||||||
|
@ -3015,12 +3009,6 @@ dependencies = [
|
||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "linked-hash-map"
|
|
||||||
version = "0.5.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linux-raw-sys"
|
name = "linux-raw-sys"
|
||||||
version = "0.3.8"
|
version = "0.3.8"
|
||||||
|
@ -3201,14 +3189,12 @@ dependencies = [
|
||||||
"mango",
|
"mango",
|
||||||
"mango-common",
|
"mango-common",
|
||||||
"mango-feeds-connector",
|
"mango-feeds-connector",
|
||||||
"multiqueue",
|
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"rayon",
|
"rayon",
|
||||||
"regex",
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_yaml 0.8.26",
|
|
||||||
"solana-account-decoder",
|
"solana-account-decoder",
|
||||||
"solana-clap-utils",
|
"solana-clap-utils",
|
||||||
"solana-cli-config",
|
"solana-cli-config",
|
||||||
|
@ -3430,19 +3416,6 @@ version = "0.8.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
|
checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "multiqueue"
|
|
||||||
version = "0.3.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4059673f3516669cbf7ebb448cb37171559ed22e6d8bc79cf0cf9394cf9e73fd"
|
|
||||||
dependencies = [
|
|
||||||
"crossbeam",
|
|
||||||
"futures 0.1.31",
|
|
||||||
"parking_lot 0.3.8",
|
|
||||||
"smallvec 0.3.4",
|
|
||||||
"time 0.1.45",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "native-tls"
|
name = "native-tls"
|
||||||
version = "0.2.11"
|
version = "0.2.11"
|
||||||
|
@ -3766,29 +3739,12 @@ dependencies = [
|
||||||
"syn 1.0.109",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "owning_ref"
|
|
||||||
version = "0.2.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9d52571ddcb42e9c900c901a18d8d67e393df723fcd51dd59c5b1a85d0acb6cc"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking"
|
name = "parking"
|
||||||
version = "2.1.0"
|
version = "2.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e"
|
checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "parking_lot"
|
|
||||||
version = "0.3.8"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "fa12d706797d42551663426a45e2db2e0364bd1dbf6aeada87e89c5f981f43e9"
|
|
||||||
dependencies = [
|
|
||||||
"owning_ref",
|
|
||||||
"parking_lot_core 0.2.14",
|
|
||||||
"thread-id",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking_lot"
|
name = "parking_lot"
|
||||||
version = "0.9.0"
|
version = "0.9.0"
|
||||||
|
@ -3821,18 +3777,6 @@ dependencies = [
|
||||||
"parking_lot_core 0.9.8",
|
"parking_lot_core 0.9.8",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "parking_lot_core"
|
|
||||||
version = "0.2.14"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"rand 0.4.6",
|
|
||||||
"smallvec 0.6.14",
|
|
||||||
"winapi 0.3.9",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking_lot_core"
|
name = "parking_lot_core"
|
||||||
version = "0.6.3"
|
version = "0.6.3"
|
||||||
|
@ -4333,19 +4277,6 @@ version = "0.7.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
|
checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rand"
|
|
||||||
version = "0.4.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293"
|
|
||||||
dependencies = [
|
|
||||||
"fuchsia-cprng",
|
|
||||||
"libc",
|
|
||||||
"rand_core 0.3.1",
|
|
||||||
"rdrand",
|
|
||||||
"winapi 0.3.9",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rand"
|
name = "rand"
|
||||||
version = "0.6.5"
|
version = "0.6.5"
|
||||||
|
@ -5097,18 +5028,6 @@ dependencies = [
|
||||||
"syn 2.0.18",
|
"syn 2.0.18",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde_yaml"
|
|
||||||
version = "0.8.26"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b"
|
|
||||||
dependencies = [
|
|
||||||
"indexmap",
|
|
||||||
"ryu",
|
|
||||||
"serde",
|
|
||||||
"yaml-rust",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_yaml"
|
name = "serde_yaml"
|
||||||
version = "0.9.21"
|
version = "0.9.21"
|
||||||
|
@ -5299,12 +5218,6 @@ dependencies = [
|
||||||
"autocfg 1.1.0",
|
"autocfg 1.1.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "smallvec"
|
|
||||||
version = "0.3.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e143aeee11cc8ece23c8336394de5138e598b84f5720fb8e895e2c6096322d88"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "smallvec"
|
name = "smallvec"
|
||||||
version = "0.6.14"
|
version = "0.6.14"
|
||||||
|
@ -5489,7 +5402,7 @@ dependencies = [
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
"serde_yaml 0.9.21",
|
"serde_yaml",
|
||||||
"solana-clap-utils",
|
"solana-clap-utils",
|
||||||
"solana-sdk",
|
"solana-sdk",
|
||||||
"url 2.4.0",
|
"url 2.4.0",
|
||||||
|
@ -5776,8 +5689,8 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-lite-rpc-core"
|
name = "solana-lite-rpc-core"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
source = "git+https://github.com/blockworks-foundation/lite-rpc.git?branch=mango_simulation_test#ddd9f95a4d23972a4a49ea4db0086030bb7d6a72"
|
source = "git+https://github.com/blockworks-foundation/lite-rpc.git?tag=v0.2.1#c1eed987f29417f8a3b8d147f43a112388f02e4f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
@ -5808,8 +5721,8 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-lite-rpc-services"
|
name = "solana-lite-rpc-services"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
source = "git+https://github.com/blockworks-foundation/lite-rpc.git?branch=mango_simulation_test#ddd9f95a4d23972a4a49ea4db0086030bb7d6a72"
|
source = "git+https://github.com/blockworks-foundation/lite-rpc.git?tag=v0.2.1#c1eed987f29417f8a3b8d147f43a112388f02e4f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-channel",
|
"async-channel",
|
||||||
|
@ -7009,17 +6922,6 @@ dependencies = [
|
||||||
"syn 2.0.18",
|
"syn 2.0.18",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "thread-id"
|
|
||||||
version = "3.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"redox_syscall 0.1.57",
|
|
||||||
"winapi 0.3.9",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "time"
|
name = "time"
|
||||||
version = "0.1.45"
|
version = "0.1.45"
|
||||||
|
@ -8205,15 +8107,6 @@ dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "yaml-rust"
|
|
||||||
version = "0.4.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
|
|
||||||
dependencies = [
|
|
||||||
"linked-hash-map",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "yasna"
|
name = "yasna"
|
||||||
version = "0.5.2"
|
version = "0.5.2"
|
||||||
|
|
|
@ -25,13 +25,11 @@ fixed-macro = "^1.1.1"
|
||||||
futures = "0.3.28"
|
futures = "0.3.28"
|
||||||
iter_tools = "0.1.4"
|
iter_tools = "0.1.4"
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
multiqueue = "^0.3.2"
|
|
||||||
rand = ">=0.8.5"
|
rand = ">=0.8.5"
|
||||||
rayon = "1.5.1"
|
rayon = "1.5.1"
|
||||||
serde = "1.0.136"
|
serde = "1.0.136"
|
||||||
serde_derive = "1.0.103"
|
serde_derive = "1.0.103"
|
||||||
serde_json = "1.0.79"
|
serde_json = "1.0.79"
|
||||||
serde_yaml = "0.8.23"
|
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
tokio = { version = "1.14.1", features = ["full"] }
|
tokio = { version = "1.14.1", features = ["full"] }
|
||||||
regex = "1.7.3"
|
regex = "1.7.3"
|
||||||
|
@ -49,8 +47,8 @@ solana-logger = "1.15.2"
|
||||||
solana-transaction-status = "1.15.2"
|
solana-transaction-status = "1.15.2"
|
||||||
solana-account-decoder = "1.15.2"
|
solana-account-decoder = "1.15.2"
|
||||||
|
|
||||||
solana-lite-rpc-core = { git = "https://github.com/blockworks-foundation/lite-rpc.git", branch = "mango_simulation_test" }
|
solana-lite-rpc-core = { git = "https://github.com/blockworks-foundation/lite-rpc.git", tag = "v0.2.1" }
|
||||||
solana-lite-rpc-services = { git = "https://github.com/blockworks-foundation/lite-rpc.git", branch = "mango_simulation_test" }
|
solana-lite-rpc-services = { git = "https://github.com/blockworks-foundation/lite-rpc.git", tag = "v0.2.1" }
|
||||||
|
|
||||||
|
|
||||||
# pin program to mango-v3 version of solana sdk
|
# pin program to mango-v3 version of solana sdk
|
||||||
|
|
|
@ -171,8 +171,6 @@ pub fn confirmation_by_lite_rpc_notification_stream(
|
||||||
let mut tx_record_rx = tx_record_rx;
|
let mut tx_record_rx = tx_record_rx;
|
||||||
let mut notification_stream = notification_stream;
|
let mut notification_stream = notification_stream;
|
||||||
|
|
||||||
#[allow(unused_assignments)]
|
|
||||||
let mut remove_tx = None;
|
|
||||||
while !transaction_map.is_empty() || !exit_signal.load(Ordering::Relaxed) {
|
while !transaction_map.is_empty() || !exit_signal.load(Ordering::Relaxed) {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
transaction_record = tx_record_rx.recv() => {
|
transaction_record = tx_record_rx.recv() => {
|
||||||
|
@ -184,7 +182,6 @@ pub fn confirmation_by_lite_rpc_notification_stream(
|
||||||
},
|
},
|
||||||
notification = notification_stream.recv() => {
|
notification = notification_stream.recv() => {
|
||||||
if let Some(notification) = notification {
|
if let Some(notification) = notification {
|
||||||
remove_tx = None;
|
|
||||||
|
|
||||||
match notification {
|
match notification {
|
||||||
NotificationMsg::BlockNotificationMsg(block_notification) => {
|
NotificationMsg::BlockNotificationMsg(block_notification) => {
|
||||||
|
@ -209,9 +206,8 @@ pub fn confirmation_by_lite_rpc_notification_stream(
|
||||||
},
|
},
|
||||||
_ => None
|
_ => None
|
||||||
};
|
};
|
||||||
remove_tx = Some(tx_notification.signature.clone());
|
|
||||||
let _ = tx_confirm_records.send(TransactionConfirmRecord {
|
let _ = tx_confirm_records.send(TransactionConfirmRecord {
|
||||||
signature: tx_notification.signature,
|
signature: tx_notification.signature.clone(),
|
||||||
confirmed_slot: Some(tx_notification.slot),
|
confirmed_slot: Some(tx_notification.slot),
|
||||||
confirmed_at: Some(Utc::now().to_string()),
|
confirmed_at: Some(Utc::now().to_string()),
|
||||||
sent_at: tx_sent_record.sent_at.to_string(),
|
sent_at: tx_sent_record.sent_at.to_string(),
|
||||||
|
@ -228,16 +224,14 @@ pub fn confirmation_by_lite_rpc_notification_stream(
|
||||||
priority_fees: tx_sent_record.priority_fees,
|
priority_fees: tx_sent_record.priority_fees,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
transaction_map.remove(&tx_notification.signature);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
// others do nothing
|
// others do nothing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(signature) = &remove_tx {
|
|
||||||
transaction_map.remove(signature);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_ = tokio::time::sleep(Duration::from_secs(1)) => {
|
_ = tokio::time::sleep(Duration::from_secs(1)) => {
|
||||||
|
|
Loading…
Reference in New Issue