Merge branch 'groovie/MAN-68-mango-feeds-dependencies'
This commit is contained in:
commit
e72a1b4a15
File diff suppressed because it is too large
Load Diff
64
Cargo.toml
64
Cargo.toml
|
@ -8,12 +8,64 @@ members = [
|
|||
"service-mango-orderbook",
|
||||
]
|
||||
|
||||
|
||||
[patch.crates-io]
|
||||
# for gzip encoded responses
|
||||
jsonrpc-core-client = { git = "https://github.com/ckamm/jsonrpc.git", branch = "ckamm/http-with-gzip-default-v18.0.0" }
|
||||
# force usage of mango-v4 submodules with 1.14.9 support
|
||||
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" }
|
||||
|
||||
[workspace.dependencies]
|
||||
solana-rpc = "~1.14.9"
|
||||
solana-client = "~1.14.9"
|
||||
solana-account-decoder = "~1.14.9"
|
||||
solana-sdk = "~1.14.9"
|
||||
solana-logger = "~1.14.9"
|
||||
|
||||
anchor-spl = "0.27.0"
|
||||
anchor-lang = "0.27.0"
|
||||
anchor-client = "0.27.0"
|
||||
|
||||
mango-v4 = { tag = "program-v0.16.0", git = "https://github.com/blockworks-foundation/mango-v4.git"}
|
||||
mango-v4-client = { tag = "program-v0.16.0", git = "https://github.com/blockworks-foundation/mango-v4.git" }
|
||||
|
||||
serum_dex = { git = "https://github.com/jup-ag/openbook-program", branch = "feat/expose-things", features = ["no-entrypoint"] }
|
||||
# this works in solana-rpc-client-simple; solves anchor 0.28.0 issue
|
||||
#serum_dex = { git = "https://github.com/openbook-dex/program.git", tag = "v0.5.10", default-features=false, features = ["no-entrypoint", "program"] }
|
||||
|
||||
jsonrpc-core = "18.0.0"
|
||||
jsonrpc-core-client = { version = "18.0.0", features = ["ws", "http"] }
|
||||
|
||||
fixed = { tag = "program-v0.16.0", git = "https://github.com/blockworks-foundation/mango-v4.git" }
|
||||
bs58 = "0.5"
|
||||
base64 = "0.21.0"
|
||||
log = "0.4"
|
||||
rand = "0.7"
|
||||
anyhow = "1.0"
|
||||
toml = "0.5"
|
||||
bytes = "1.0"
|
||||
itertools = "0.10.5"
|
||||
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
futures = "0.3.17"
|
||||
futures-core = "0.3"
|
||||
futures-channel = "0.3"
|
||||
futures-util = "0.3"
|
||||
ws = "^0.9.2"
|
||||
async-channel = "1.6"
|
||||
async-trait = "0.1"
|
||||
bytemuck = "1.7.2"
|
||||
jemallocator = "0.3.2"
|
||||
chrono = "0.4.23"
|
||||
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tokio-tungstenite = "0.17"
|
||||
tokio-postgres = { version = "0.7", features = ["with-chrono-0_4"] }
|
||||
tokio-postgres-rustls = "0.9.0"
|
||||
postgres-types = { version = "0.2", features = ["array-impls", "derive", "with-chrono-0_4"] }
|
||||
postgres-native-tls = "0.5"
|
||||
native-tls = "0.2"
|
||||
rustls = "0.20.8"
|
||||
# postgres_query hasn't updated its crate in a while
|
||||
postgres_query = { git = "https://github.com/nolanderc/rust-postgres-query", rev = "b4422051c8a31fbba4a35f88004c1cefb1878dd5" }
|
||||
|
||||
|
||||
|
|
|
@ -9,40 +9,42 @@ description = "Listen to Solana account updates via geyser or websockets"
|
|||
[lib]
|
||||
|
||||
[features]
|
||||
default = ["solana-1-14"]
|
||||
default = []
|
||||
solana-1-14 = []
|
||||
solana-1-15 = []
|
||||
# v1.15.x got yanked
|
||||
#solana-1-15 = ["rpc-account-scan-migrated"]
|
||||
solana-1-16 = ["rpc-account-scan-migrated"]
|
||||
rpc-account-scan-migrated = []
|
||||
|
||||
[dependencies]
|
||||
jsonrpc-core = "18.0.0"
|
||||
jsonrpc-core-client = { version = "18.0.0", features = ["ws", "http"] }
|
||||
jsonrpc-core = { workspace = true }
|
||||
jsonrpc-core-client = { workspace = true }
|
||||
|
||||
solana-rpc = "1.14.9"
|
||||
solana-client = "1.14.9"
|
||||
solana-account-decoder = "1.14.9"
|
||||
solana-sdk = "1.14.9"
|
||||
solana-rpc = { workspace = true }
|
||||
solana-client = { workspace = true }
|
||||
solana-account-decoder = { workspace = true }
|
||||
solana-sdk = { workspace = true }
|
||||
solana-logger = { workspace = true }
|
||||
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
rustls = "0.20.8"
|
||||
tokio = { workspace = true }
|
||||
rustls = { workspace = true }
|
||||
|
||||
serde = "1.0.130"
|
||||
serde_derive = "1.0.130"
|
||||
serde = { workspace = true }
|
||||
serde_derive = { workspace = true }
|
||||
|
||||
log = "0.4"
|
||||
anyhow = "1.0"
|
||||
log = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
|
||||
itertools = "0.10.5"
|
||||
|
||||
futures = "0.3.17"
|
||||
futures = { workspace = true }
|
||||
|
||||
async-channel = "1.6"
|
||||
async-trait = "0.1"
|
||||
async-channel = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
|
||||
warp = "0.3"
|
||||
|
||||
yellowstone-grpc-proto = "1.1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
solana-logger = "*"
|
||||
clap = { version = "4.4.2", features = ["derive", "env"] }
|
||||
|
||||
clap = { version = "3.1.8", features = ["derive", "env"] }
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
pub mod account_write_filter;
|
||||
pub mod chain_data;
|
||||
pub mod grpc_plugin_source;
|
||||
pub mod memory_target;
|
||||
pub mod metrics;
|
||||
pub mod snapshot;
|
||||
pub mod websocket_source;
|
||||
|
@ -12,14 +13,14 @@ use {
|
|||
solana_sdk::{account::Account, pubkey::Pubkey},
|
||||
};
|
||||
|
||||
#[cfg(all(feature = "solana-1-14", feature = "solana-1-15"))]
|
||||
compile_error!(
|
||||
"feature \"solana-1-14\" and feature \"solana-1-15\" cannot be enabled at the same time"
|
||||
);
|
||||
|
||||
#[cfg(feature = "solana-1-14")]
|
||||
// client stub v 1.15+ moved account scan request to a dedicated
|
||||
// module to identify users and allow deprecation (potentially) at same point
|
||||
// see https://github.com/solana-labs/solana/pull/28968
|
||||
#[cfg(not(feature = "rpc-account-scan-migrated"))]
|
||||
// 1.14.x
|
||||
use solana_rpc::rpc::rpc_accounts::AccountsDataClient as GetProgramAccountsClient;
|
||||
#[cfg(feature = "solana-1-15")]
|
||||
// 1.15.x
|
||||
#[cfg(feature = "rpc-account-scan-migrated")]
|
||||
use solana_rpc::rpc::rpc_accounts_scan::AccountsScanClient as GetProgramAccountsClient;
|
||||
|
||||
pub use solana_sdk;
|
||||
|
|
|
@ -5,6 +5,7 @@ use solana_client::{
|
|||
rpc_config::{RpcAccountInfoConfig, RpcProgramAccountsConfig},
|
||||
rpc_response::{OptionalContext, RpcKeyedAccount},
|
||||
};
|
||||
|
||||
use solana_rpc::rpc::rpc_accounts::AccountsDataClient;
|
||||
use solana_sdk::{commitment_config::CommitmentConfig, slot_history::Slot};
|
||||
|
||||
|
|
|
@ -9,52 +9,48 @@ license = "AGPL-3.0-or-later"
|
|||
|
||||
|
||||
[dependencies]
|
||||
mango-feeds-connector = { path = "../connector" }
|
||||
#mango-feeds-connector = { path = "../connector" }
|
||||
|
||||
jsonrpc-core = "18.0.0"
|
||||
jsonrpc-core-client = { version = "18.0.0", features = ["ws", "http"] }
|
||||
|
||||
solana-rpc = "~1.14.9"
|
||||
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 = "dev", features = ["client"] }
|
||||
bytemuck = "*"
|
||||
fixed = { version = "*", features = ["serde"] }
|
||||
serum_dex = { workspace = true }
|
||||
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tokio-postgres = { version = "0.7", features = ["with-chrono-0_4"] }
|
||||
tokio-postgres-rustls = "0.9.0"
|
||||
postgres-types = { version = "0.2", features = ["array-impls", "derive", "with-chrono-0_4"] }
|
||||
postgres-native-tls = "0.5"
|
||||
native-tls = "0.2"
|
||||
mango-v4 = { workspace = true }
|
||||
mango-v4-client = { workspace = true }
|
||||
fixed = { workspace = true }
|
||||
|
||||
bytemuck = { workspace = true }
|
||||
|
||||
tokio = { workspace = true }
|
||||
tokio-postgres = { workspace = true }
|
||||
tokio-postgres-rustls = { workspace = true }
|
||||
postgres-types = { workspace = true }
|
||||
postgres-native-tls = { workspace = true }
|
||||
native-tls = { workspace = true }
|
||||
|
||||
# postgres_query hasn't updated its crate in a while
|
||||
postgres_query = { git = "https://github.com/nolanderc/rust-postgres-query", rev = "b4422051c8a31fbba4a35f88004c1cefb1878dd5" }
|
||||
postgres_query = { workspace = true }
|
||||
|
||||
serde = "1.0.130"
|
||||
serde_derive = "1.0.130"
|
||||
serde_json = "1.0.68"
|
||||
serde = { workspace = true }
|
||||
serde_derive = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
bs58 = "*"
|
||||
base64 = "0.21.0"
|
||||
log = "0.4"
|
||||
rand = "0.7"
|
||||
anyhow = "1.0"
|
||||
bytes = "1.0"
|
||||
itertools = "0.10.5"
|
||||
chrono = "0.4.23"
|
||||
bs58 = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
log = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
bytes = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
|
||||
futures = "0.3.17"
|
||||
futures-core = "0.3"
|
||||
futures = { workspace = true }
|
||||
futures-core = { workspace = true }
|
||||
|
||||
async-channel = "1.6"
|
||||
async-trait = "0.1"
|
||||
|
||||
anchor-lang = "0.25.0"
|
||||
|
||||
serum_dex = { git = "https://github.com/jup-ag/openbook-program", branch = "feat/expose-things", features = ["no-entrypoint"] }
|
||||
async-channel = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
|
||||
[build-dependencies]
|
||||
tonic-build = { version = "0.6", features = ["compression"] }
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
pub mod memory_target;
|
||||
pub mod postgres_types_numeric;
|
||||
pub mod serum;
|
||||
|
||||
use anchor_lang::prelude::Pubkey;
|
||||
use serde::{ser::SerializeStruct, Serialize, Serializer};
|
||||
use serde_derive::Deserialize;
|
||||
|
||||
pub use mango_feeds_connector::*;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
pub struct PostgresConfig {
|
||||
|
@ -38,13 +35,6 @@ pub struct PostgresTlsConfig {
|
|||
pub client_key_path: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
pub struct Config {
|
||||
pub postgres_target: PostgresConfig,
|
||||
pub source: SourceConfig,
|
||||
pub metrics: MetricsConfig,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct StatusResponse<'a> {
|
||||
pub success: bool,
|
||||
|
|
|
@ -7,40 +7,45 @@ license = "AGPL-3.0-or-later"
|
|||
|
||||
[dependencies]
|
||||
mango-feeds-lib = { path = "../lib" }
|
||||
solana-logger = "*"
|
||||
bs58 = "*"
|
||||
log = "*"
|
||||
anyhow = "*"
|
||||
toml = "*"
|
||||
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
futures = "0.3.17"
|
||||
futures-core = "0.3"
|
||||
futures-channel = "0.3"
|
||||
futures-util = "0.3"
|
||||
ws = "^0.9.2"
|
||||
async-channel = "1.6"
|
||||
async-trait = "0.1"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tokio-tungstenite = "0.17"
|
||||
bytemuck = "1.7.2"
|
||||
jemallocator = "0.3.2"
|
||||
chrono = "0.4.23"
|
||||
solana-sdk = "~1.14.9"
|
||||
solana-client = { workspace = true }
|
||||
solana-logger = { workspace = true }
|
||||
solana-sdk = { workspace = true }
|
||||
|
||||
tokio-postgres = { version = "0.7", features = ["with-chrono-0_4"] }
|
||||
tokio-postgres-rustls = "0.9.0"
|
||||
postgres-types = { version = "0.2", features = ["array-impls", "derive", "with-chrono-0_4"] }
|
||||
postgres-native-tls = "0.5"
|
||||
native-tls = "0.2"
|
||||
anchor-lang = { workspace = true }
|
||||
anchor-client = { workspace = true }
|
||||
|
||||
mango-v4 = { workspace = true }
|
||||
mango-v4-client = { workspace = true }
|
||||
|
||||
serum_dex = { workspace = true }
|
||||
|
||||
bs58 = { workspace = true }
|
||||
log = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
toml = { workspace = true }
|
||||
|
||||
serde = { workspace = true }
|
||||
serde_derive = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
futures-core = { workspace = true }
|
||||
futures-channel = { workspace = true }
|
||||
futures-util = { workspace = true }
|
||||
ws = { workspace = true }
|
||||
async-channel = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio-tungstenite = { workspace = true }
|
||||
bytemuck = { workspace = true }
|
||||
jemallocator = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
|
||||
tokio-postgres = { workspace = true }
|
||||
tokio-postgres-rustls = { workspace = true }
|
||||
postgres-types = { workspace = true }
|
||||
postgres-native-tls = { workspace = true }
|
||||
native-tls = { workspace = true }
|
||||
# postgres_query hasn't updated its crate in a while
|
||||
postgres_query = { git = "https://github.com/nolanderc/rust-postgres-query", rev = "b4422051c8a31fbba4a35f88004c1cefb1878dd5" }
|
||||
base64 = "0.21.0"
|
||||
|
||||
mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
mango-v4-client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
serum_dex = { git = "https://github.com/jup-ag/openbook-program", branch = "feat/expose-things", features = ["no-entrypoint"] }
|
||||
anchor-lang = "0.25.0"
|
||||
anchor-client = "0.25.0"
|
||||
|
|
|
@ -7,28 +7,37 @@ edition = "2018"
|
|||
|
||||
[dependencies]
|
||||
mango-feeds-lib = { path = "../lib" }
|
||||
solana-client = "1"
|
||||
solana-logger = "1"
|
||||
solana-sdk = "1"
|
||||
bs58 = "*"
|
||||
log = "*"
|
||||
anyhow = "*"
|
||||
toml = "*"
|
||||
mango-feeds-connector = { path = "../connector" }
|
||||
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
futures-channel = "0.3"
|
||||
futures-util = "0.3"
|
||||
ws = "^0.9.2"
|
||||
async-channel = "1.6"
|
||||
async-trait = "0.1"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tokio-tungstenite = "0.17"
|
||||
bytemuck = "1.7.2"
|
||||
solana-client = { workspace = true }
|
||||
solana-logger = { workspace = true }
|
||||
solana-sdk = { workspace = true }
|
||||
|
||||
anchor-lang = { workspace = true }
|
||||
anchor-client = { workspace = true }
|
||||
|
||||
mango-v4 = { workspace = true }
|
||||
mango-v4-client = { workspace = true }
|
||||
|
||||
serum_dex = { workspace = true }
|
||||
|
||||
bs58 = { workspace = true }
|
||||
log = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
toml = { workspace = true }
|
||||
|
||||
serde = { workspace = true }
|
||||
serde_derive = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
futures-channel = { workspace = true }
|
||||
futures-util = { workspace = true }
|
||||
ws = { workspace = true }
|
||||
async-channel = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio-tungstenite = { workspace = true }
|
||||
bytemuck = { workspace = true }
|
||||
|
||||
jsonrpc-core = { workspace = true }
|
||||
jsonrpc-core-client = { workspace = true }
|
||||
|
||||
mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
mango-v4-client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
serum_dex = { git = "https://github.com/openbook-dex/program" }
|
||||
anchor-lang = "0.25.0"
|
||||
anchor-client = "0.25.0"
|
||||
|
|
|
@ -4,15 +4,14 @@ mod openbook_crank_sink;
|
|||
mod transaction_builder;
|
||||
mod transaction_sender;
|
||||
|
||||
use anchor_client::{
|
||||
solana_sdk::{commitment_config::CommitmentConfig, signature::Keypair},
|
||||
Cluster,
|
||||
};
|
||||
use anchor_lang::prelude::Pubkey;
|
||||
use anchor_client::Cluster;
|
||||
use bytemuck::bytes_of;
|
||||
use log::*;
|
||||
use mango_v4_client::{Client, MangoGroupContext, TransactionBuilderConfig};
|
||||
use solana_client::nonblocking::rpc_client::RpcClient;
|
||||
use solana_sdk::commitment_config::CommitmentConfig;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::signature::Keypair;
|
||||
use std::iter::FromIterator;
|
||||
use std::{
|
||||
collections::HashSet,
|
||||
|
@ -24,10 +23,12 @@ use std::{
|
|||
time::Duration,
|
||||
};
|
||||
|
||||
use mango_feeds_lib::EntityFilter::FilterByAccountIds;
|
||||
use mango_feeds_lib::FilterConfig;
|
||||
use mango_feeds_lib::{grpc_plugin_source, metrics, websocket_source, MetricsConfig, SourceConfig};
|
||||
use mango_feeds_connector::FilterConfig;
|
||||
use mango_feeds_connector::{
|
||||
grpc_plugin_source, metrics, websocket_source, MetricsConfig, SourceConfig,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
use mango_feeds_connector::EntityFilter::FilterByAccountIds;
|
||||
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
pub struct Config {
|
||||
|
|
|
@ -7,7 +7,7 @@ use std::{
|
|||
use async_channel::Sender;
|
||||
use async_trait::async_trait;
|
||||
use log::*;
|
||||
use mango_feeds_lib::{account_write_filter::AccountWriteSink, chain_data::AccountData};
|
||||
use mango_feeds_connector::{account_write_filter::AccountWriteSink, chain_data::AccountData};
|
||||
use solana_sdk::{
|
||||
account::ReadableAccount,
|
||||
instruction::{AccountMeta, Instruction},
|
||||
|
|
|
@ -6,9 +6,8 @@ use std::{
|
|||
use async_channel::Sender;
|
||||
use async_trait::async_trait;
|
||||
use log::*;
|
||||
use mango_feeds_lib::{
|
||||
account_write_filter::AccountWriteSink, chain_data::AccountData, serum::SerumEventQueueHeader,
|
||||
};
|
||||
use mango_feeds_connector::{account_write_filter::AccountWriteSink, chain_data::AccountData};
|
||||
use mango_feeds_lib::serum::SerumEventQueueHeader;
|
||||
use serum_dex::{instruction::MarketInstruction, state::EventView};
|
||||
use solana_sdk::{
|
||||
account::ReadableAccount,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use mango_feeds_lib::{
|
||||
use mango_feeds_connector::{
|
||||
account_write_filter::{self, AccountWriteRoute},
|
||||
metrics::Metrics,
|
||||
AccountWrite, SlotUpdate,
|
||||
|
|
|
@ -7,40 +7,45 @@ license = "AGPL-3.0-or-later"
|
|||
|
||||
[dependencies]
|
||||
mango-feeds-lib = { path = "../lib" }
|
||||
solana-logger = "*"
|
||||
bs58 = "*"
|
||||
log = "*"
|
||||
anyhow = "*"
|
||||
toml = "*"
|
||||
mango-feeds-connector = { path = "../connector" }
|
||||
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
futures = "0.3.17"
|
||||
futures-core = "0.3"
|
||||
futures-channel = "0.3"
|
||||
futures-util = "0.3"
|
||||
ws = "^0.9.2"
|
||||
async-channel = "1.6"
|
||||
async-trait = "0.1"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tokio-tungstenite = "0.17"
|
||||
bytemuck = "1.7.2"
|
||||
jemallocator = "0.3.2"
|
||||
chrono = "0.4.23"
|
||||
solana-sdk = "~1.14.9"
|
||||
solana-client = { workspace = true }
|
||||
solana-logger = { workspace = true }
|
||||
solana-sdk = { workspace = true }
|
||||
|
||||
tokio-postgres = { version = "0.7", features = ["with-chrono-0_4"] }
|
||||
tokio-postgres-rustls = "0.9.0"
|
||||
postgres-types = { version = "0.2", features = ["array-impls", "derive", "with-chrono-0_4"] }
|
||||
postgres-native-tls = "0.5"
|
||||
native-tls = "0.2"
|
||||
# postgres_query hasn't updated its crate in a while
|
||||
postgres_query = { git = "https://github.com/nolanderc/rust-postgres-query", rev = "b4422051c8a31fbba4a35f88004c1cefb1878dd5" }
|
||||
base64 = "0.21.0"
|
||||
anchor-lang = { workspace = true }
|
||||
anchor-client = { workspace = true }
|
||||
|
||||
mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
mango-v4-client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
serum_dex = { git = "https://github.com/jup-ag/openbook-program", branch = "feat/expose-things", features = ["no-entrypoint"] }
|
||||
anchor-lang = "0.25.0"
|
||||
anchor-client = "0.25.0"
|
||||
mango-v4 = { workspace = true }
|
||||
mango-v4-client = { workspace = true }
|
||||
|
||||
serum_dex = { workspace = true }
|
||||
|
||||
bs58 = { workspace = true }
|
||||
log = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
toml = { workspace = true }
|
||||
|
||||
serde = { workspace = true }
|
||||
serde_derive = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
futures-channel = { workspace = true }
|
||||
futures-util = { workspace = true }
|
||||
ws = { workspace = true }
|
||||
async-channel = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio-tungstenite = { workspace = true }
|
||||
bytemuck = { workspace = true }
|
||||
jemallocator = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
|
||||
jsonrpc-core = { workspace = true }
|
||||
jsonrpc-core-client = { workspace = true }
|
||||
|
||||
tokio-postgres = { workspace = true }
|
||||
postgres-native-tls = { workspace = true }
|
||||
native-tls = { workspace = true }
|
||||
postgres_query = { workspace = true }
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
use log::*;
|
||||
use mango_feeds_lib::{
|
||||
use mango_feeds_connector::{
|
||||
chain_data::{AccountData, ChainData, ChainDataMetrics, SlotData},
|
||||
metrics::{MetricType, Metrics},
|
||||
serum::SerumEventQueueHeader,
|
||||
AccountWrite, MarketConfig, SlotUpdate,
|
||||
AccountWrite, SlotUpdate,
|
||||
};
|
||||
use mango_feeds_lib::serum::SerumEventQueueHeader;
|
||||
use mango_feeds_lib::MarketConfig;
|
||||
use solana_sdk::{
|
||||
account::{ReadableAccount, WritableAccount},
|
||||
clock::Epoch,
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
use chrono::{TimeZone, Utc};
|
||||
use log::*;
|
||||
use mango_feeds_lib::{
|
||||
metrics::{MetricType, MetricU64, Metrics},
|
||||
*,
|
||||
};
|
||||
use mango_feeds_connector::metrics::{MetricType, MetricU64, Metrics};
|
||||
use mango_feeds_lib::PostgresConfig;
|
||||
use native_tls::{Certificate, Identity, TlsConnector};
|
||||
use postgres_native_tls::MakeTlsConnector;
|
||||
use postgres_query::Caching;
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
mod fill_event_filter;
|
||||
mod fill_event_postgres_target;
|
||||
|
||||
use anchor_client::{
|
||||
solana_sdk::{commitment_config::CommitmentConfig, signature::Keypair},
|
||||
Cluster,
|
||||
};
|
||||
use anchor_client::Cluster;
|
||||
use anchor_lang::prelude::Pubkey;
|
||||
use futures_channel::mpsc::{unbounded, UnboundedSender};
|
||||
use futures_util::{
|
||||
|
@ -12,14 +9,14 @@ use futures_util::{
|
|||
pin_mut, SinkExt, StreamExt, TryStreamExt,
|
||||
};
|
||||
use log::*;
|
||||
use mango_feeds_lib::{
|
||||
grpc_plugin_source, metrics,
|
||||
metrics::{MetricType, MetricU64},
|
||||
websocket_source, EntityFilter, FilterConfig, MarketConfig, MetricsConfig, PostgresConfig,
|
||||
SourceConfig, StatusResponse,
|
||||
};
|
||||
use mango_feeds_connector::{grpc_plugin_source, metrics, metrics::{MetricType, MetricU64}, websocket_source, FilterConfig, MetricsConfig, SourceConfig, EntityFilter};
|
||||
use mango_feeds_lib::MarketConfig;
|
||||
use mango_feeds_lib::PostgresConfig;
|
||||
use mango_feeds_lib::StatusResponse;
|
||||
use mango_v4_client::{Client, MangoGroupContext, TransactionBuilderConfig};
|
||||
use service_mango_fills::{Command, FillCheckpoint, FillEventFilterMessage, FillEventType};
|
||||
use solana_sdk::commitment_config::CommitmentConfig;
|
||||
use solana_sdk::signature::Keypair;
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
env,
|
||||
|
|
|
@ -7,30 +7,36 @@ license = "AGPL-3.0-or-later"
|
|||
|
||||
[dependencies]
|
||||
mango-feeds-lib = { path = "../lib" }
|
||||
solana-logger = "*"
|
||||
bs58 = "*"
|
||||
log = "*"
|
||||
anyhow = "*"
|
||||
toml = "*"
|
||||
mango-feeds-connector = { path = "../connector" }
|
||||
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
futures-channel = "0.3"
|
||||
futures-util = "0.3"
|
||||
ws = "^0.9.2"
|
||||
async-channel = "1.6"
|
||||
async-trait = "0.1"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tokio-tungstenite = "0.17"
|
||||
bytemuck = "1.7.2"
|
||||
itertools = "0.10.5"
|
||||
solana-client = { workspace = true }
|
||||
solana-logger = { workspace = true }
|
||||
solana-sdk = { workspace = true }
|
||||
|
||||
solana-sdk = "~1.14.9"
|
||||
anchor-lang = { workspace = true }
|
||||
anchor-client = { workspace = true }
|
||||
|
||||
mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
mango-v4-client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
fixed = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" , version = "1.11.0", features = ["serde", "borsh", "debug-assert-in-release"] }
|
||||
serum_dex = { git = "https://github.com/jup-ag/openbook-program", branch = "feat/expose-things", features = ["no-entrypoint"] }
|
||||
anchor-lang = "0.25.0"
|
||||
anchor-client = "0.25.0"
|
||||
mango-v4 = { workspace = true }
|
||||
mango-v4-client = { workspace = true }
|
||||
|
||||
serum_dex = { workspace = true }
|
||||
|
||||
fixed = { workspace = true }
|
||||
|
||||
bs58 = { workspace = true }
|
||||
log = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
toml = { workspace = true }
|
||||
|
||||
serde = { workspace = true }
|
||||
serde_derive = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
futures-channel = { workspace = true }
|
||||
futures-util = { workspace = true }
|
||||
ws = { workspace = true }
|
||||
async-channel = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio-tungstenite = { workspace = true }
|
||||
bytemuck = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
mod orderbook_filter;
|
||||
|
||||
use anchor_client::{
|
||||
solana_sdk::{commitment_config::CommitmentConfig, signature::Keypair},
|
||||
Cluster,
|
||||
};
|
||||
use anchor_lang::prelude::Pubkey;
|
||||
use anchor_client::Cluster;
|
||||
use futures_channel::mpsc::{unbounded, UnboundedSender};
|
||||
use futures_util::{
|
||||
future::{self, Ready},
|
||||
|
@ -13,6 +9,9 @@ use futures_util::{
|
|||
use itertools::Itertools;
|
||||
use log::*;
|
||||
use mango_v4_client::{Client, MangoGroupContext, TransactionBuilderConfig};
|
||||
use solana_sdk::commitment_config::CommitmentConfig;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::signature::Keypair;
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
fmt,
|
||||
|
@ -32,14 +31,16 @@ use tokio::{
|
|||
};
|
||||
use tokio_tungstenite::tungstenite::{protocol::Message, Error};
|
||||
|
||||
use mango_feeds_lib::EntityFilter::FilterByAccountIds;
|
||||
use mango_feeds_lib::{
|
||||
grpc_plugin_source, metrics, websocket_source, MarketConfig, MetricsConfig, SourceConfig,
|
||||
use mango_feeds_connector::EntityFilter::FilterByAccountIds;
|
||||
use mango_feeds_connector::{
|
||||
grpc_plugin_source, metrics, websocket_source, MetricsConfig, SourceConfig,
|
||||
};
|
||||
use mango_feeds_lib::{
|
||||
use mango_feeds_connector::{
|
||||
metrics::{MetricType, MetricU64},
|
||||
FilterConfig, StatusResponse,
|
||||
FilterConfig,
|
||||
};
|
||||
use mango_feeds_lib::MarketConfig;
|
||||
use mango_feeds_lib::StatusResponse;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use service_mango_orderbook::{BookCheckpoint, LevelCheckpoint, OrderbookFilterMessage};
|
||||
|
|
|
@ -2,16 +2,16 @@ use anchor_lang::AccountDeserialize;
|
|||
use fixed::types::I80F48;
|
||||
use itertools::Itertools;
|
||||
use log::*;
|
||||
use mango_feeds_lib::metrics::MetricU64;
|
||||
use mango_feeds_lib::{
|
||||
base_lots_to_ui, base_lots_to_ui_perp, price_lots_to_ui, price_lots_to_ui_perp, MarketConfig,
|
||||
OrderbookSide,
|
||||
};
|
||||
use mango_feeds_lib::{
|
||||
use mango_feeds_connector::metrics::MetricU64;
|
||||
use mango_feeds_connector::{
|
||||
chain_data::{AccountData, ChainData, ChainDataMetrics, SlotData},
|
||||
metrics::{MetricType, Metrics},
|
||||
AccountWrite, SlotUpdate,
|
||||
};
|
||||
use mango_feeds_lib::{
|
||||
base_lots_to_ui, base_lots_to_ui_perp, price_lots_to_ui, price_lots_to_ui_perp, MarketConfig,
|
||||
OrderbookSide,
|
||||
};
|
||||
use mango_v4::accounts_zerocopy::{AccountReader, KeyedAccountReader};
|
||||
use mango_v4::state::OracleConfigParams;
|
||||
use mango_v4::{
|
||||
|
@ -367,7 +367,7 @@ pub async fn init(
|
|||
max_staleness_slots: None, // don't check oracle staleness to get an orderbook
|
||||
};
|
||||
|
||||
if let Ok((oracle_price, _slot)) = state::oracle_price_and_slot(
|
||||
if let Ok((oracle_price, _state)) = state::oracle_price_and_state(
|
||||
&keyed_account,
|
||||
&oracle_config.to_oracle_config(),
|
||||
mkt.1.base_decimals,
|
||||
|
|
|
@ -7,22 +7,31 @@ license = "AGPL-3.0-or-later"
|
|||
|
||||
[dependencies]
|
||||
mango-feeds-lib = { path = "../lib" }
|
||||
solana-logger = "~1.14.9"
|
||||
solana-sdk = "~1.14.9"
|
||||
log = "0.4"
|
||||
anyhow = "1.0"
|
||||
toml = "0.5"
|
||||
bytemuck = "1.7.2"
|
||||
mango-feeds-connector = { path = "../connector" }
|
||||
|
||||
solana-client = { workspace = true }
|
||||
solana-logger = { workspace = true }
|
||||
solana-sdk = { workspace = true }
|
||||
|
||||
anchor-lang = { workspace = true }
|
||||
anchor-client = { workspace = true }
|
||||
|
||||
mango-v4 = { workspace = true }
|
||||
mango-v4-client = { workspace = true }
|
||||
|
||||
serum_dex = { workspace = true }
|
||||
|
||||
log = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
toml = { workspace = true }
|
||||
bytemuck = { workspace = true }
|
||||
|
||||
jsonrpsee = { version = "0.9.0", features = ["http-server"] }
|
||||
|
||||
async-trait = "0.1"
|
||||
fixed = { version = "1.9.0", features = ["serde"] }
|
||||
bs58 = "0.3.1"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
async-trait = { workspace = true }
|
||||
fixed = { workspace = true }
|
||||
bs58 = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
|
||||
serde = "1.0.130"
|
||||
serde_derive = "1.0.130"
|
||||
mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
mango-v4-client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
anchor-lang = "0.25.0"
|
||||
anchor-client = "0.25.0"
|
||||
serde = { workspace = true }
|
||||
serde_derive = { workspace = true }
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use {
|
||||
log::*,
|
||||
mango_feeds_lib::chain_data::ChainData,
|
||||
mango_feeds_lib::*,
|
||||
mango_feeds_connector::chain_data::ChainData,
|
||||
serde_derive::{Deserialize, Serialize},
|
||||
solana_sdk::pubkey::Pubkey,
|
||||
std::str::FromStr,
|
||||
|
@ -17,7 +16,7 @@ use {
|
|||
use anchor_client::Cluster;
|
||||
use anchor_lang::Discriminator;
|
||||
use fixed::types::I80F48;
|
||||
use mango_feeds_lib::metrics::*;
|
||||
use mango_feeds_connector::metrics::*;
|
||||
use mango_v4::state::{MangoAccount, MangoAccountValue, PerpMarketIndex};
|
||||
use mango_v4_client::{
|
||||
chain_data, health_cache, AccountFetcher, Client, MangoGroupContext, TransactionBuilderConfig,
|
||||
|
@ -153,6 +152,7 @@ struct PnlResponseItem {
|
|||
}
|
||||
|
||||
use jsonrpsee::http_server::HttpServerHandle;
|
||||
use mango_feeds_connector::{grpc_plugin_source, memory_target, metrics, FilterConfig, MetricsConfig, SnapshotSourceConfig, SourceConfig, EntityFilter};
|
||||
|
||||
fn start_jsonrpc_server(
|
||||
config: JsonRpcConfig,
|
||||
|
|
Loading…
Reference in New Issue