Set up fly deployments, upgrade mango-v4
This commit is contained in:
parent
1b1063c5a7
commit
c2a942336c
|
@ -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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
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=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bs58 0.3.1",
|
||||
|
@ -411,6 +411,12 @@ dependencies = [
|
|||
"event-listener",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-once-cell"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f61305cacf1d0c5c9d3ee283d22f8f1f8c743a18ceb44a1b102bd53476c141de"
|
||||
|
||||
[[package]]
|
||||
name = "async-stream"
|
||||
version = "0.2.1"
|
||||
|
@ -966,7 +972,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||
[[package]]
|
||||
name = "checked_math"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
dependencies = [
|
||||
"proc-macro-error",
|
||||
"proc-macro2 1.0.47",
|
||||
|
@ -1072,12 +1078,13 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "client"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
dependencies = [
|
||||
"anchor-client",
|
||||
"anchor-lang",
|
||||
"anchor-spl",
|
||||
"anyhow",
|
||||
"async-once-cell",
|
||||
"async-trait",
|
||||
"base64 0.13.1",
|
||||
"bincode",
|
||||
|
@ -3005,7 +3012,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "mango-v4"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=dev#7a8f31c6118b0577aa6375af4643e41efe85e057"
|
||||
source = "git+https://github.com/blockworks-foundation/mango-v4?branch=ckamm/accountfetcher-send#0bad232315b6c5ddf420d728dfcb13c18a0fb50f"
|
||||
dependencies = [
|
||||
"anchor-lang",
|
||||
"anchor-spl",
|
||||
|
|
|
@ -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 = "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" }
|
||||
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" }
|
||||
switchboard-v2 = { git = "https://github.com/blockworks-foundation/sbv2-solana", branch = "mango-v4" }
|
||||
|
|
17
Dockerfile
17
Dockerfile
|
@ -1,24 +1,25 @@
|
|||
# syntax = docker/dockerfile:1.2
|
||||
# Base image containing all binaries, deployed to gcr.io/mango-markets/mango-geyser-services:latest
|
||||
FROM rust:1.59.0 as base
|
||||
RUN cargo install cargo-chef
|
||||
FROM rust:1.65.0 as base
|
||||
# RUN cargo install cargo-chef
|
||||
RUN rustup component add rustfmt
|
||||
RUN apt-get update && apt-get install -y clang cmake
|
||||
RUN apt-get update && apt-get install -y clang cmake ssh
|
||||
WORKDIR /app
|
||||
|
||||
FROM base AS plan
|
||||
COPY . .
|
||||
WORKDIR /app
|
||||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
# RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
FROM base as build
|
||||
COPY --from=plan /app/recipe.json recipe.json
|
||||
RUN cargo chef cook --release --recipe-path recipe.json
|
||||
# COPY --from=plan /app/recipe.json recipe.json
|
||||
# RUN cargo chef cook --release --recipe-path recipe.json
|
||||
COPY . .
|
||||
RUN cargo build --release --bin service-mango-fills --bin service-mango-pnl
|
||||
RUN cargo build --release --bin service-mango-fills --bin service-mango-pnl --bin service-mango-orderbook
|
||||
|
||||
FROM debian:bullseye-slim as run
|
||||
RUN apt-get update && apt-get -y install ca-certificates libc6
|
||||
COPY --from=build /app/target/release/service-mango-* /usr/local/bin/
|
||||
COPY --from=build /app/service-mango-pnl/template-config.toml ./pnl-config.toml
|
||||
COPY --from=build /app/service-mango-fills/template-config.toml ./fills-config.toml
|
||||
COPY --from=build /app/service-mango-fills/template-config.toml ./fills-config.toml
|
||||
COPY --from=build /app/service-mango-orderbook/template-config.toml ./orderbook-config.toml
|
25
fly.toml
25
fly.toml
|
@ -3,12 +3,13 @@ app = "mango-geyser-services"
|
|||
kill_signal = "SIGINT"
|
||||
kill_timeout = 5
|
||||
|
||||
[build]
|
||||
image = "us-docker.pkg.dev/mango-markets/gcr.io/mango-geyser-services:latest"
|
||||
# [build]
|
||||
# image = "us-docker.pkg.dev/mango-markets/gcr.io/mango-geyser-services:latest"
|
||||
|
||||
[processes]
|
||||
fills = "service-mango-fills fills-config.toml"
|
||||
pnl = "service-mango-pnl pnl-config.toml"
|
||||
orderbook = "service-mango-orderbook orderbook-config.toml"
|
||||
|
||||
[[services]]
|
||||
processes = ["fills"]
|
||||
|
@ -16,6 +17,7 @@ kill_timeout = 5
|
|||
protocol = "tcp"
|
||||
|
||||
[[services.ports]]
|
||||
handlers = ["tls", "http"]
|
||||
port = "8080"
|
||||
|
||||
[services.concurrency]
|
||||
|
@ -25,11 +27,26 @@ kill_timeout = 5
|
|||
|
||||
[[services]]
|
||||
processes = ["pnl"]
|
||||
internal_port = 2052
|
||||
internal_port = 8081
|
||||
protocol = "tcp"
|
||||
|
||||
[[services.ports]]
|
||||
port = "2052"
|
||||
handlers = ["tls", "http"]
|
||||
port = 8081
|
||||
|
||||
[services.concurrency]
|
||||
type = "connections"
|
||||
hard_limit = 1024
|
||||
soft_limit = 1024
|
||||
|
||||
[[services]]
|
||||
processes = ["orderbook"]
|
||||
internal_port = 8082
|
||||
protocol = "tcp"
|
||||
|
||||
[[services.ports]]
|
||||
handlers = ["tls", "http"]
|
||||
port = "8082"
|
||||
|
||||
[services.concurrency]
|
||||
type = "connections"
|
||||
|
|
|
@ -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 = "dev" }
|
||||
mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "ckamm/accountfetcher-send" }
|
||||
arrayref = "*"
|
||||
bytemuck = "*"
|
||||
fixed = { version = "*", features = ["serde"] }
|
||||
|
|
|
@ -326,7 +326,7 @@ fn publish_changes_serum(
|
|||
let mkt_pk_string = mkt.0.to_string();
|
||||
let evq_pk_string = mkt.1.to_string();
|
||||
let header_seq_num = header.seq_num;
|
||||
info!("start seq {} header seq {}", start_seq_num, header_seq_num);
|
||||
debug!("start seq {} header seq {}", start_seq_num, header_seq_num);
|
||||
for seq_num in start_seq_num..header_seq_num {
|
||||
let idx = (seq_num % MAX_NUM_EVENTS as u64) as usize;
|
||||
let event_view = events[idx].as_view().unwrap();
|
||||
|
@ -340,7 +340,7 @@ fn publish_changes_serum(
|
|||
// 3) all other events are matching the old event queue
|
||||
// the order of these checks is important so they are exhaustive
|
||||
if seq_num >= old_seq_num {
|
||||
info!("found new serum fill {} idx {}", mkt_pk_string, idx,);
|
||||
debug!("found new serum fill {} idx {}", mkt_pk_string, idx,);
|
||||
|
||||
metric_events_new.increment();
|
||||
fill_update_sender
|
||||
|
@ -359,12 +359,11 @@ fn publish_changes_serum(
|
|||
|
||||
match old_event_view {
|
||||
EventView::Fill { .. } => {
|
||||
info!("already got all fills???");
|
||||
// every already published event is recorded in checkpoint
|
||||
checkpoint.push(events[idx]);
|
||||
}
|
||||
EventView::Out { .. } => {
|
||||
info!(
|
||||
debug!(
|
||||
"found changed event {} idx {} seq_num {} header seq num {} old seq num {}",
|
||||
mkt_pk_string, idx, seq_num, header_seq_num, old_seq_num
|
||||
);
|
||||
|
|
|
@ -147,7 +147,6 @@ fn publish_changes(
|
|||
|
||||
match peer {
|
||||
None => {
|
||||
info!("level removed {}", previous_order.price);
|
||||
update.push(OrderbookLevel {
|
||||
price: previous_order.price,
|
||||
size: 0f64,
|
||||
|
@ -203,7 +202,7 @@ fn publish_changes(
|
|||
if update.len() == 0 {
|
||||
return;
|
||||
}
|
||||
info!("diff {} {:?}", mkt.1.name, update);
|
||||
|
||||
orderbook_update_sender
|
||||
.try_send(OrderbookFilterMessage::Update(OrderbookUpdate {
|
||||
market: mkt.0.to_string(),
|
||||
|
@ -237,7 +236,6 @@ fn publish_changes_serum(
|
|||
|
||||
match peer {
|
||||
None => {
|
||||
info!("level removed {}", previous_order.price);
|
||||
update.push(OrderbookLevel {
|
||||
price: previous_order.price,
|
||||
size: 0f64,
|
||||
|
@ -290,7 +288,6 @@ fn publish_changes_serum(
|
|||
None => info!("other bookside not in cache"),
|
||||
}
|
||||
|
||||
info!("diff {} {:?}", mkt.1.name, update);
|
||||
if update.len() > 0 {
|
||||
orderbook_update_sender
|
||||
.try_send(OrderbookFilterMessage::Update(OrderbookUpdate {
|
||||
|
@ -352,7 +349,6 @@ pub async fn init(
|
|||
if !relevant_pubkeys.contains(&account_write.pubkey) {
|
||||
continue;
|
||||
}
|
||||
info!("updating account {}", &account_write.pubkey);
|
||||
chain_cache.update_account(
|
||||
account_write.pubkey,
|
||||
AccountData {
|
||||
|
@ -470,7 +466,6 @@ pub async fn init(
|
|||
let account = &mut account_info.account.clone();
|
||||
let data = account.data_as_mut_slice();
|
||||
let len = data.len();
|
||||
info!("side pk {} side {}", side_pk, side);
|
||||
let inner = &mut data[5..len - 7];
|
||||
let slab = Slab::new(&mut inner[size_of::<OrderBookStateHeader>()..]);
|
||||
|
||||
|
|
|
@ -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 = "dev" }
|
||||
client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
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" }
|
||||
serum_dex = { git = "https://github.com/jup-ag/openbook-program", branch = "feat/expose-things" }
|
||||
anchor-lang = "0.25.0"
|
||||
anchor-client = "0.25.0"
|
||||
|
|
|
@ -275,10 +275,9 @@ async fn main() -> anyhow::Result<()> {
|
|||
Some(rpc_timeout),
|
||||
);
|
||||
let group_context = Arc::new(MangoGroupContext::new_from_rpc(
|
||||
&client.rpc_async(),
|
||||
Pubkey::from_str(&config.mango_group).unwrap(),
|
||||
client.cluster.clone(),
|
||||
client.commitment,
|
||||
)?);
|
||||
).await?);
|
||||
|
||||
let perp_queue_pks: Vec<(Pubkey, Pubkey)> = group_context
|
||||
.perp_markets
|
||||
|
@ -293,8 +292,8 @@ async fn main() -> anyhow::Result<()> {
|
|||
.collect();
|
||||
|
||||
let serum_market_ais = client
|
||||
.rpc()
|
||||
.get_multiple_accounts(serum_market_pks.as_slice())?;
|
||||
.rpc_async()
|
||||
.get_multiple_accounts(serum_market_pks.as_slice()).await?;
|
||||
let serum_market_ais: Vec<&Account> = serum_market_ais
|
||||
.iter()
|
||||
.filter_map(|maybe_ai| match maybe_ai {
|
||||
|
@ -317,11 +316,11 @@ async fn main() -> anyhow::Result<()> {
|
|||
let a: Vec<(String, String)> = group_context
|
||||
.serum3_markets
|
||||
.iter()
|
||||
.map(|(_, context)| (context.market.name().to_owned(), context.market.serum_market_external.to_string())).collect();
|
||||
.map(|(_, context)| (context.market.serum_market_external.to_string(), context.market.name().to_owned())).collect();
|
||||
let b: Vec<(String, String)> = group_context
|
||||
.perp_markets
|
||||
.iter()
|
||||
.map(|(_, context)| (context.market.name().to_owned(), context.address.to_string())).collect();
|
||||
.map(|(_, context)| (context.address.to_string(), context.market.name().to_owned())).collect();
|
||||
let market_pubkey_strings: HashMap<String, String> = [a, b]
|
||||
.concat()
|
||||
.into_iter()
|
||||
|
|
|
@ -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 = "dev" }
|
||||
client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
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" }
|
||||
serum_dex = { git = "https://github.com/openbook-dex/program", branch = "master" }
|
||||
anchor-lang = "0.25.0"
|
||||
anchor-client = "0.25.0"
|
||||
|
|
|
@ -286,10 +286,9 @@ async fn main() -> anyhow::Result<()> {
|
|||
Some(rpc_timeout),
|
||||
);
|
||||
let group_context = Arc::new(MangoGroupContext::new_from_rpc(
|
||||
&client.rpc_async(),
|
||||
Pubkey::from_str(&config.mango_group).unwrap(),
|
||||
client.cluster.clone(),
|
||||
client.commitment,
|
||||
)?);
|
||||
).await?);
|
||||
|
||||
// todo: reload markets at intervals
|
||||
let market_configs: Vec<(Pubkey, MarketConfig)> = group_context
|
||||
|
|
|
@ -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 = "dev" }
|
||||
client = { git = "https://github.com/blockworks-foundation/mango-v4", branch = "dev" }
|
||||
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" }
|
||||
anchor-lang = "0.25.0"
|
||||
anchor-client = "0.25.0"
|
||||
|
|
|
@ -119,7 +119,7 @@ fn start_pnl_updater(
|
|||
}
|
||||
|
||||
let pnl_vals =
|
||||
compute_pnl(context.clone(), account_fetcher.clone(), &mango_account.clone()).await.unwrap();
|
||||
compute_pnl(context.clone(), account_fetcher.clone(), &mango_account).await.unwrap();
|
||||
|
||||
// Alternatively, we could prepare the sorted and limited lists for each
|
||||
// market here. That would be faster and cause less contention on the pnl_data
|
||||
|
|
Loading…
Reference in New Issue