diff --git a/Cargo.lock b/Cargo.lock index 7241da3..f099d04 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,7 +104,7 @@ checksum = "6b2d54853319fd101b8dd81de382bcbf3e03410a64d8928bbee85a3e7dcde483" [[package]] name = "anchor-attribute-access-control" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-syn", "anyhow", @@ -117,7 +117,7 @@ dependencies = [ [[package]] name = "anchor-attribute-account" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-syn", "anyhow", @@ -131,7 +131,7 @@ dependencies = [ [[package]] name = "anchor-attribute-constant" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-syn", "proc-macro2 1.0.47", @@ -141,7 +141,7 @@ dependencies = [ [[package]] name = "anchor-attribute-error" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-syn", "proc-macro2 1.0.47", @@ -152,7 +152,7 @@ dependencies = [ [[package]] name = "anchor-attribute-event" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-syn", "anyhow", @@ -164,7 +164,7 @@ dependencies = [ [[package]] name = "anchor-attribute-interface" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-syn", "anyhow", @@ -177,7 +177,7 @@ dependencies = [ [[package]] name = "anchor-attribute-program" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-syn", "anyhow", @@ -189,7 +189,7 @@ dependencies = [ [[package]] name = "anchor-attribute-state" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-syn", "anyhow", @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "anchor-client" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-lang", "anyhow", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "anchor-derive-accounts" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-syn", "anyhow", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "anchor-lang" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -252,7 +252,7 @@ dependencies = [ [[package]] name = "anchor-spl" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-lang", "solana-program", @@ -263,7 +263,7 @@ dependencies = [ [[package]] name = "anchor-syn" version = "0.25.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anyhow", "bs58 0.3.1", @@ -972,7 +972,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "checked_math" version = "0.1.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "proc-macro-error", "proc-macro2 1.0.47", @@ -1078,7 +1078,7 @@ dependencies = [ [[package]] name = "client" version = "0.1.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-client", "anchor-lang", @@ -3012,7 +3012,7 @@ dependencies = [ [[package]] name = "mango-v4" version = "0.1.0" -source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f" +source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#5019864b844ca6633ee7d1356c763d78fc52ad64" dependencies = [ "anchor-lang", "anchor-spl", diff --git a/Cargo.toml b/Cargo.toml index d6a6bc1..392599a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ members = [ # for gzip encoded responses jsonrpc-core-client = { git = "https://github.com/ckamm/jsonrpc.git", branch = "ckamm/http-with-gzip" } # force usage of mango-v4 submodules with 1.14.9 support -anchor-spl = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "ckamm/accountfetcher-send" } -anchor-lang = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "ckamm/accountfetcher-send" } -anchor-client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "ckamm/accountfetcher-send" } +anchor-spl = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" } +anchor-lang = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" } +anchor-client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" } switchboard-v2 = { git = "https://github.com/blockworks-foundation/sbv2-solana", branch = "mango-v4" } diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 82f7e9c..db3bac2 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -16,7 +16,7 @@ solana-client = "~1.14.9" solana-account-decoder = "~1.14.9" solana-sdk = "~1.14.9" -mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "ckamm/accountfetcher-send" } +mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" } arrayref = "*" bytemuck = "*" fixed = { version = "*", features = ["serde"] } diff --git a/lib/src/grpc_plugin_source.rs b/lib/src/grpc_plugin_source.rs index 3a4cc78..7d32947 100644 --- a/lib/src/grpc_plugin_source.rs +++ b/lib/src/grpc_plugin_source.rs @@ -396,6 +396,8 @@ pub async fn process_events( metrics_sender.register_u64("grpc_account_writes".into(), MetricType::Counter); let mut metric_account_queue = metrics_sender.register_u64("account_write_queue".into(), MetricType::Gauge); + let mut metric_dedup_queue = + metrics_sender.register_u64("dedup_queue".into(), MetricType::Gauge); let mut metric_slot_queue = metrics_sender.register_u64("slot_update_queue".into(), MetricType::Gauge); let mut metric_slot_updates = @@ -406,6 +408,7 @@ pub async fn process_events( metrics_sender.register_u64("grpc_snapshot_account_writes".into(), MetricType::Counter); loop { + metric_dedup_queue.set(msg_receiver.len() as u64); let msg = msg_receiver.recv().await.expect("sender must not close"); use geyser::{subscribe_update::UpdateOneof}; match msg { diff --git a/lib/src/orderbook_filter.rs b/lib/src/orderbook_filter.rs index aa9a5c3..73619d6 100644 --- a/lib/src/orderbook_filter.rs +++ b/lib/src/orderbook_filter.rs @@ -101,7 +101,7 @@ impl Serialize for OrderbookCheckpoint { let mut state = serializer.serialize_struct("OrderbookCheckpoint", 3)?; state.serialize_field("market", &self.market)?; state.serialize_field("bids", &self.bids)?; - state.serialize_field("bids", &self.asks)?; + state.serialize_field("asks", &self.asks)?; state.serialize_field("slot", &self.slot)?; state.serialize_field("write_version", &self.write_version)?; diff --git a/service-mango-orderbook/Cargo.toml b/service-mango-orderbook/Cargo.toml index 88467a1..cad41db 100644 --- a/service-mango-orderbook/Cargo.toml +++ b/service-mango-orderbook/Cargo.toml @@ -24,8 +24,8 @@ tokio = { version = "1", features = ["full"] } tokio-tungstenite = "0.17" bytemuck = "1.7.2" -mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "ckamm/accountfetcher-send" } -client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "ckamm/accountfetcher-send" } +mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" } +client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" } serum_dex = { git = "https://github.com/openbook-dex/program", branch = "master" } anchor-lang = "0.25.0" anchor-client = "0.25.0" diff --git a/service-mango-pnl/Cargo.toml b/service-mango-pnl/Cargo.toml index e958aea..a3f9558 100644 --- a/service-mango-pnl/Cargo.toml +++ b/service-mango-pnl/Cargo.toml @@ -21,7 +21,7 @@ tokio = { version = "1", features = ["full"] } serde = "1.0.130" serde_derive = "1.0.130" -mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "ckamm/accountfetcher-send" } -client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "ckamm/accountfetcher-send" } +mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" } +client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" } anchor-lang = "0.25.0" anchor-client = "0.25.0"