Skip to content

Instantly share code, notes, and snippets.

@norcalli
Created December 2, 2019 05:42
Show Gist options
  • Save norcalli/53fd558a6377e7c38a4ccc8f0fcbb0dc to your computer and use it in GitHub Desktop.
Save norcalli/53fd558a6377e7c38a4ccc8f0fcbb0dc to your computer and use it in GitHub Desktop.
[2019-12-02T05:40:33Z INFO engsim] This is engsim v0.1.0 (built from cbb3c327)
[2019-12-02T05:40:33Z INFO engsim] Order senders can now connect on port 3347
[2019-12-02T05:40:34Z INFO simulation::queue] Added a feed starting at 2018-07-01 23:00:00 UTC
[2019-12-02T05:40:34Z INFO engsim] ---- Controller handshake ----
[2019-12-02T05:40:34Z INFO engsim] No controller; skipping handshake
[2019-12-02T05:40:34Z INFO engsim] ---- Fast-forward phase ----
[2019-12-02T05:40:34Z INFO simulation::queue] Fast-forwarding to 2018-07-02 00:00:00 UTC
[2019-12-02T05:40:37Z INFO simulation::queue] Fast-forward complete (skipped 35739 messages)
[2019-12-02T05:40:37Z INFO engsim] FF complete; broadcasting summary quotes
[2019-12-02T05:40:37Z INFO epimetheus] Started HTTP thread
[2019-12-02T05:40:37Z INFO engsim] Summary broadcast complete (sent 1871 packets)
[2019-12-02T05:40:37Z INFO engsim] ---- Real-time phase ----
[2019-12-02T05:40:37Z INFO engsim] Synchronising clocks: mkt 2018-07-02 00:00:00 UTC := wall 2019-12-01 21:40:37.180824076 -08:00
[2019-12-02T05:40:37Z INFO engsim] Broadcasting market data to 239.1.2.3
[2019-12-02T05:40:38Z WARN matching] Place 10@840, but limits are 1275..2475 - historical, allowing it
[2019-12-02T05:40:39Z WARN matching] Place 1@376, but limits are 1275..2475 - historical, allowing it
[2019-12-02T05:40:40Z ERROR reconstruct::kospi] Saw an A3 followed by a G7 where the first appeared to leave -1 lots behind.
[2019-12-02T05:40:41Z WARN matching] Place 1@146, but limits are 1275..2475 - historical, allowing it
[2019-12-02T05:40:48Z WARN matching] Place 10@693, but limits are 1025..2225 - historical, allowing it
[2019-12-02T05:40:57Z INFO engsim] Order sender connected from 127.0.0.1:45106. Assigned id 0
[2019-12-02T05:40:59Z ERROR matching] Place 10@100, but limits are 29655..30255 - live, rejecting it
Panic while running /home/ashkan/works/tsuru/engine/target/debug/engsim.
This is engsim v0.1.0 (built from cbb3c327).
The invocation was: target/debug/engsim -K -s mdf-kospi200-krx3.20180702-10199.enp1s0f2.p1p1.pcapng.xz --no-controller
Message: attempt to subtract with overflow
Location: matching/src/lib.rs:723
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
(6 post panic frames hidden)
6: core::panicking::panic::h2f49f09cf859b728
at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/panicking.rs:49
7: matching::PlaceIter::result::hd13efc068c86daa0
at /home/ashkan/works/tsuru/engine/matching/src/lib.rs:723
721 │ working_qty,
722 │ missed_qty,
723 > execd_qty: self.quote.qty - working_qty - missed_qty,
724 │ rejected,
725 │ limit_changes: self.limit_changes.drain(..).map(|(_, x)| x).collect(),
8: matching::PlaceIter::finalize::hff020d740a9a0e30
at /home/ashkan/works/tsuru/engine/matching/src/lib.rs:669
667 │ // It's actually fine to call result() multiple times, but having
668 │ // finalize() drop the PlaceIter makes using it a bit more convenient.
669 > self.result()
670 │ }
671 │
9: simulation::exchange::SimExchange::place::he6127b83fdaa9205
at /home/ashkan/works/tsuru/engine/simulation/src/exchange.rs:254
252 │
253 │ // We've done the trades and exec acks, now we do the quote and the place/miss ack
254 > let place_result = iter.finalize();
255 │ let quote_delay = self.clock.send_packet();
256 │ for (lower, upper) in place_result.limit_changes {
10: <simulation::queue::Simulation as core::iter::traits::iterator::Iterator>::next::h7f1fa38e87039efe
at /home/ashkan/works/tsuru/engine/simulation/src/queue.rs:344
342 │ OrderCondition::AndKill => 0,
343 │ };
344 > self.simex.place(
345 │ Some(order.id),
346 │ order.quote,
11: engsim::main_2::h10634c247a94eec6
at /home/ashkan/works/tsuru/engine/src/main.rs:266
264 │ while conv.now() >= conv.mkt_time(sim.next_time()) {
265 │ let ts = Instant::now();
266 > let (time, event) = match sim.next() {
267 │ Some(x) => x,
268 │ None => {
12: engsim::main::hf764a22866d4b32e
at /home/ashkan/works/tsuru/engine/src/main.rs:114
112 │ announce!();
113 │
114 > match main_2(args) {
115 │ Ok(()) => process::exit(0),
116 │ Err(e) => {
(11 runtime init frames hidden)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment