split inner to owned and ref variants#2225
Conversation
6500660 to
6582a59
Compare
6582a59 to
70e6c30
Compare
db2d873 to
3b38969
Compare
16ebc5e to
662fc1a
Compare
|
recently @Shourya742 asked this over Discord:
it took me a while to find bandwidth to look at this carefully, but I was finally able to do it today first, thanks @Shourya742 for the detailed explanation... the reasoning feels very clear and I can get a very good understanding of the problem at hand overall, PR looks solid too, and I'm excited for the much leaner codebase we're achieving as a result now, looking at conversely, main purpose of so the only part of the message above that I would push back is:
while this principle definitely holds true for crates such as so for the case of perhaps a good way to summarize this into a rule-of-thumb: as frames arrive over the wire:
I'm sure none of this will not come as a surprise to you, as I vaguely recall that we've had similar discussions in dev calls in the past (and your mental model on these kinds of concepts is usually way sharper than mine 😅) nevertheless, it's a good exercise to re-visit this point now so we can confidently move on in this direction without looking back later TLDR: with regards to |
|
I'm proof-reading my message above and I realized that it's maybe too centered around and given the main sentence that I was trying to push back against is:
perhaps one could argue that using but I think the core of my rationale remains, while channel state will always outlive whatever buffer a frame was decoded from, so borrowing a message that can be stored somewhere else is either impossible (if that memory is reused, the compiler won't allow it) or just indirect ownership with bad ergonomics (a lifetime parameter leaked into every type that holds a channel) and terrible consequences with regards to memory fragmentation so TLDR: taking |
3a4ee36 to
f6b0f51
Compare
closes: #2180
companion stratum-mining/sv2-apps#616