From ea7e231c2d9afeff1d2751e6a1b7c22f605652d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=BAc=C3=A1s=20Meier?= Date: Tue, 8 Oct 2024 11:49:12 -0700 Subject: [PATCH] Implement an event for candlestick data (#4889) ## Describe your changes This adds a new event `EventCandlestickData`, containing a directed trading pair and a candlestick, allowing us to emit events for when trading activity producing a stick happens on a given pair, at a given height. ## Issue ticket number and link Closes #4868 ## Checklist before requesting a review - [x] If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: > event addition only --- .../src/gen/proto_descriptor.bin.no_lfs | Bin 102002 -> 102050 bytes .../component/dex/src/component/chandelier.rs | 8 ++ crates/core/component/dex/src/event.rs | 39 +++++- .../src/gen/penumbra.core.component.dex.v1.rs | 21 ++++ .../penumbra.core.component.dex.v1.serde.rs | 112 ++++++++++++++++++ .../proto/src/gen/proto_descriptor.bin.no_lfs | Bin 646138 -> 646769 bytes .../penumbra/core/component/dex/v1/dex.proto | 11 ++ 7 files changed, 189 insertions(+), 2 deletions(-) diff --git a/crates/cnidarium/src/gen/proto_descriptor.bin.no_lfs b/crates/cnidarium/src/gen/proto_descriptor.bin.no_lfs index f41da7426e0409c58117d4e9d6a186a1632aff36..383649ad97d9ab3daa8efd3942653231e8e3d5a5 100644 GIT binary patch delta 10206 zcmY*fdvsOhmCrf%eBXD@xw*;By-9%ZN_d3#OKnF)>NtS4E=M|3r?ZxJIU>eN>nN2t z)tTwKBLgBq8p8pCghq5MAdB!=7sTiiwJ4fOkQt&u$qa}FR3r)tni87%?eB5U=|8OO zefIu+d;j+So|p3*__M#`wts1tJz%u8B&Znu82)``^a}htsha-YUHt_9y?)HUTTAl$ z#$4(8EA}URkzv&Z_4!LvZm7*Y%Pl|YC!9hnL2aLB?6a>^T+rMCC1W zZ=G{Z<^0-57S>cQSX6m;&B6z3=Fh9GxqEWuKP;-Lyz`!#d9@EcShHyI*oAjZp1*M6 zxX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_~K3PD9bxRyq&8Gx<1Tu}$*4}WXF}9>FZrWC< zG27bWm^M@}rGRH!JfquBDKJu79BXN4fxCQLe9SZ)Mt$ut9xs0#OXbaaE+YBn9N- zac^o!0v%zXh%o8Cc)SpkjxopM<+P*=FQ+gR$mA&@C@@aMz3W0y+MJSPzxt+;>r(jVi$4y|00UnHIW(sOZt zlza>=S4r(~A%9!K`RU>dw&kEi%Uy_@JqjWQyAZF`XKIKT>Oy?{1cVO+YPoOXZXk8b zL5B4=aak^(p`W!N(-;@?V~d@2xr;U_rAAU0Z4W2~JTKZFPzsE6(e{8+pa(A69?%Mu z{37+hy=E|AT#0)Vs&2{N@j%_fE0;dFR3%=QeQ@bR`58%P&TaUtnI!;f#4DCrrBDFn z`X_m%KoD2r_(`6AI3xu|te5#$lFnnd)yo1X>ZW>WrjRlORK3jT`=wF_!UB0o@S(?dQ zFfCz pb::EventSwap { pb::EventSwap { @@ -135,3 +137,36 @@ pub fn vcb_debit( new_balance: Some(new_balance.into()), } } + +#[derive(Clone, Debug)] +pub struct EventCandlestickData { + pub pair: DirectedTradingPair, + pub stick: CandlestickData, +} + +impl TryFrom for EventCandlestickData { + type Error = anyhow::Error; + + fn try_from(value: pb::EventCandlestickData) -> Result { + fn inner(value: pb::EventCandlestickData) -> anyhow::Result { + Ok(EventCandlestickData { + pair: value.pair.ok_or(anyhow!("missing `pair`"))?.try_into()?, + stick: value.stick.ok_or(anyhow!("missing `stick`"))?.try_into()?, + }) + } + inner(value).context(format!("parsing {}", pb::EventCandlestickData::NAME)) + } +} + +impl From for pb::EventCandlestickData { + fn from(value: EventCandlestickData) -> Self { + Self { + pair: Some(value.pair.into()), + stick: Some(value.stick.into()), + } + } +} + +impl DomainType for EventCandlestickData { + type Proto = pb::EventCandlestickData; +} diff --git a/crates/proto/src/gen/penumbra.core.component.dex.v1.rs b/crates/proto/src/gen/penumbra.core.component.dex.v1.rs index 47bd11a9a1..3878535c9e 100644 --- a/crates/proto/src/gen/penumbra.core.component.dex.v1.rs +++ b/crates/proto/src/gen/penumbra.core.component.dex.v1.rs @@ -1555,6 +1555,27 @@ impl ::prost::Name for EventValueCircuitBreakerDebit { ::prost::alloc::format!("penumbra.core.component.dex.v1.{}", Self::NAME) } } +/// Emitted whenever there's non-empty candlestick data for a particular pair. +/// +/// Beware: if there's no activity on a given pair, there's no guarantee +/// that a candlestick will be emitted. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EventCandlestickData { + /// The pair the candlestick is for. + #[prost(message, optional, tag = "1")] + pub pair: ::core::option::Option, + /// The candlestick for this particular pair. + #[prost(message, optional, tag = "2")] + pub stick: ::core::option::Option, +} +impl ::prost::Name for EventCandlestickData { + const NAME: &'static str = "EventCandlestickData"; + const PACKAGE: &'static str = "penumbra.core.component.dex.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("penumbra.core.component.dex.v1.{}", Self::NAME) + } +} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DexParameters { diff --git a/crates/proto/src/gen/penumbra.core.component.dex.v1.serde.rs b/crates/proto/src/gen/penumbra.core.component.dex.v1.serde.rs index ef2766ee27..cb4fbff28d 100644 --- a/crates/proto/src/gen/penumbra.core.component.dex.v1.serde.rs +++ b/crates/proto/src/gen/penumbra.core.component.dex.v1.serde.rs @@ -2225,6 +2225,118 @@ impl<'de> serde::Deserialize<'de> for EventBatchSwap { deserializer.deserialize_struct("penumbra.core.component.dex.v1.EventBatchSwap", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for EventCandlestickData { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.pair.is_some() { + len += 1; + } + if self.stick.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("penumbra.core.component.dex.v1.EventCandlestickData", len)?; + if let Some(v) = self.pair.as_ref() { + struct_ser.serialize_field("pair", v)?; + } + if let Some(v) = self.stick.as_ref() { + struct_ser.serialize_field("stick", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for EventCandlestickData { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "pair", + "stick", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pair, + Stick, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "pair" => Ok(GeneratedField::Pair), + "stick" => Ok(GeneratedField::Stick), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = EventCandlestickData; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct penumbra.core.component.dex.v1.EventCandlestickData") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pair__ = None; + let mut stick__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Pair => { + if pair__.is_some() { + return Err(serde::de::Error::duplicate_field("pair")); + } + pair__ = map_.next_value()?; + } + GeneratedField::Stick => { + if stick__.is_some() { + return Err(serde::de::Error::duplicate_field("stick")); + } + stick__ = map_.next_value()?; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(EventCandlestickData { + pair: pair__, + stick: stick__, + }) + } + } + deserializer.deserialize_struct("penumbra.core.component.dex.v1.EventCandlestickData", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for EventPositionClose { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result diff --git a/crates/proto/src/gen/proto_descriptor.bin.no_lfs b/crates/proto/src/gen/proto_descriptor.bin.no_lfs index a1b2955a571836ef3b777301c5b908cafb93b694..1b37ab32d8b5c5dc7cafc4dfe8c1efe6e9a36c26 100644 GIT binary patch delta 12150 zcmZWvdwf*YozFdU&pCJQblb1+U~A)T_cQ|N`XSu+HQ9Q zp%jqDFu)+#RH+hV36BOubnBxinhI!_XjIq*X#pV+2m(q8((ms)=1xERNAj89@BV(@ z-}5~0{mah&?f>1M`&ZVve(KH_WZAZUU-oepBuo1K9RHv1yA=P2_M_k1`#pvKlluRM zv!LF$s(qr6{MP2-i}w^S$A3CEB4AvfEJx*e`p!9gi+y))Ja*p$@yhB)=EUa?8!-F+Vbf;M z9yn}n^_;4i5B@u8+!w2wIk!4qIenNPyX&F2ftfYCx@y);JZgOGg`rM@o=u%Hb!_a1 zl@D8y%4yY)RL+?3c&0ty&+$1q=PK{gq#!bqZ=WKR1-zh>B|}7ZEwQ9WWVb1nlu>uY z0zSUn&!xECtf*MX*>WDz&)qD5E#xxWFZBgIro=2t&RAd8dl7eiKhKw%%fRM2x&Eq< zk%L}Mon~M;FZ{l4C*{2A;iT4@kZ*i0XH0SyTISi^Ggka3;g}OS076Pe?RYggC&8#pO3iS|3c#fsyR7m$EmxU z1AI=*0G|WDndjS{=fH2~J$f2I4*X_bI>M5`Z{~xB`xBM>XoHsI%$FzK(-Oc7z_$eO z0`M(CdIaEGc;~JLPXNA!mkhQf;9Gd#L4HcR5AtBr-}%hF2LpTw{DT3$1pYyuZ<|d5 z{~#|dGk_BK2YIhimLxzv^g90?h3~ScIKtVVlg=w|CysF0$&55cP4_u>OH8YQh7~aE z&;tXV@;UF)HLU@GqnR4i$6y2+)P_ehH9-G~yIqZq1Yw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;^FCV=7;R2`E%4Q>S_Ct9U>;# zY5Q9Ph-At~>P-tGa87eG`KkH#F%Oml+#9Mu=czS^hZSep zlp7%+Qv6gyM+y<9mw8-|0TG~=c{1hG4-w`Oor65AJIm(6la`0U$digR$m9A;GoHe8 zkbY0MKzX7_*Le8JSvKc}d8$hINrfGgV6XAGK0@OuJg;$FxPMl8LV74%*30I@kt*|$ z$T(7E9uk=$sWJ}<47o@-qB3j3w|ZF(9H|~_B1fvn8WGo@(eV_HYXojpzNs8xTNmDW zj(ru5bhn7#Uf59S1*J~J^)Dvz6pnQQD-HF+JUZsohi{%^-});4hGTu?NH>Y~BCdZb zh^KI@7wYF-%&kd^bt2~%rdTzwTqnHIejhby4OMHSU}H+(cfupDva0aVdG?2!p~hg) z>mQIngx5wfME?d1BJelThsgg_76mMZHg0}+^wKYgH&;a?2@T>Rts OC-6@;KhWoW+VlUYaHoj? diff --git a/proto/penumbra/penumbra/core/component/dex/v1/dex.proto b/proto/penumbra/penumbra/core/component/dex/v1/dex.proto index 0ec1b5a9b8..862af7abaa 100644 --- a/proto/penumbra/penumbra/core/component/dex/v1/dex.proto +++ b/proto/penumbra/penumbra/core/component/dex/v1/dex.proto @@ -737,6 +737,17 @@ message EventValueCircuitBreakerDebit { num.v1.Amount new_balance = 3; } +// Emitted whenever there's non-empty candlestick data for a particular pair. +// +// Beware: if there's no activity on a given pair, there's no guarantee +// that a candlestick will be emitted. +message EventCandlestickData { + // The pair the candlestick is for. + DirectedTradingPair pair = 1; + // The candlestick for this particular pair. + CandlestickData stick = 2; +} + message DexParameters { // Whether or not the DEX is enabled. bool is_enabled = 1;