firedancer-io / firedancer

Firedancer is Jump Crypto's Solana consensus node implementation.
https://firedancer.io
Other
795 stars 139 forks source link

standardize dcache bounds checking for links #826

Open mmcgee-jump opened 9 months ago

mmcgee-jump commented 9 months ago

Since all links are now specified in the topology, we can automatically bounds check messages received on links (mtu, chunk, wmark etc) to make sure they are valid, rather than every tile needing to remember to do this in during_frag etc

ameya-deshmukh commented 7 months ago

@mmcgee-jump is this open to pick up?

mmcgee-jump commented 7 months ago

Sure! Although it's not obvious to me how to do it cleanly, and might be a tricky task. The mux tile kind of needs a way to know the extents of the dcache that each fragment it's receiving is for. It doesn't have that knowledge currently, and it might be tricky to provide it (eg, sometimes a fragment has passed through multiple mcaches, and mixed together into another mcache stream, so it would also need to understand how that).

ripatel-fd commented 7 months ago

@mmcgee-jump IMO we should standardize the use of the orig field. Then, pass a table of (chunk) bounds for each orig to the recipient.

mmcgee-jump commented 3 months ago

Not sure what you mean by orig field here? tsorig? If the producer can specify orig field they would just forge a bad one. The consumer needs to basically know where frags can come at init without being told at runtime.