Sasha (@devdotsasha) header
Sasha (@devdotsasha) profile picture

Performance Engineer. Tokyo based 馃嚡馃嚨

Tokyo
Joined September 2022
Astra has lost the plot
2
206
I couldn't encapsulate everything frustrating about LLMs better, even if I tried
2
219
Replying to @albxllm
@albxllm is cooking, he'll need to refactor to rust though
238
Took me to go from hmm you know what would be cool? If i could capture the topic I'm talking about with Claude into a set of Anki flashcards. And push to a deck of my choosing. 15 minutes later, done.
1
2
425
my codex built eng blog goes pretty hard if you ask m
1
460
Anyways, something that made life easier - instead of passing TXs around, I pass TX builders around. I build at the very last moment before sending. Means I can resolve ALTs either from memory or the network - depending if the builder is latency sensitive. I can also compose builders that accept multiple builders as long as it implements the same trait. Super handy if I need to append a tip to instructions for a given TX for e.g. I also wrapped in an enum to avoid dynamic dispatch.
6
1,138
These EngineEvents are then fed into a generic strategy. The generic strategy can receive two structures: - EngineEvents - Ticks From both of these structures, we derive a Decision. This defines exactly ~what~ the engine should do, if anything. So, we've reduce a transaction, to a set of instructions, to a set of EngineEvents and finally to a set of Decision.
1
3
434
Each parser is defined for a particular program, or combined set of programs. It takes an input of a transaction and returns an EngineEvent. Which defines how the engine should run tick by tick. We can think of the backtest framework as a modified engine.
1
3
378
It made sense to invest a little bit of time to make the backtest framework generic over the strategy and parsers specific for a given instruction Ideally, I want to rerun the backtest across the same slot range for various parameterized strategies - typically we've done grid search to find the best parameter sets. This arrives at this initial design (still rough around the edges)
3
26
2,005
Day 4 progress: I've finished off the tx and instruction parser, not fun but done. Moved onto the backtesting framework now - works roughly as follows: - Parse blocks over range from repo (local or network) - Apply instructions we care about to internal state machine, get out a engine event and then some actionable decision - handle decisions for scheduled for slot - schedule application of current slot decisions to current slot + 1 This is absolute assumed worst case under normal network conditions, since we're receiving data block by block, we cannot realistic infer where to place our tx in the tx set. even with realistic latency estimation. So we schedule pessimistically to the end of the next slot. This serves as a sanity check. If it turns out this isn't profitable we have two options: 1) Use a more sophisticated model for simulated tx placement 2) Subscribe to shredstream / laserstream to get shred by shred data, this way we don't have to wait for blocks to complete. We also have timestamped shreds, meaning we can more accurately place our simulated tx based on assumed latencies.
3
7
1,561