Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally replace transaction production with IB production #215

Open
bwbush opened this issue Feb 24, 2025 · 4 comments
Open

Optionally replace transaction production with IB production #215

bwbush opened this issue Feb 24, 2025 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@bwbush
Copy link
Collaborator

bwbush commented Feb 24, 2025

It's difficult to compare the Haskell and Rust simulations because the Rust simulation includes transaction production but the Haskell does not.

Would it be possible to optionally turn off transactions and their transport and instead have the size of the IB block body generated according to a distribution?

@bwbush bwbush added the enhancement New feature or request label Feb 24, 2025
@SupernaviX
Copy link
Contributor

SupernaviX commented Feb 24, 2025

That should be possible. I can add a mode where transactions are not generated randomly or gossiped, and where IB generation produces a single transaction which gets bundled in the IB (as an implementation detail).

But there's nothing in the shared config format to describe an IB generation "distribution", so I don't think that would match what Haskell is doing. Should both sims use a distribution for this?

@Quantumplation
Copy link
Contributor

(Rereading this after writing it up, and I hope it doesn't come off as confrontational 😅 please read this with the understanding that I'm genuinely asking and trying to make sure we have alignment, and not as someone getting pissy or whatever 😛)

Can you elaborate on what the goal here is? I want to make sure we (Sundae Labs) understand the overall goal behind having multiple simulations, and how we plan to reason about differences in them? For example, I want to make sure we're not working towards "make sure the simulations match each other exactly", as then I'm not sure what the point of implementing the same thing multiple times would be.

I think the goal is for each simulation to be geared towards a specific goal; and where they differ, understand why they differ, what that tells us about the real world, and which questions the different simulations are better at answering.

For example, I see the Haskell simulation as far more accurate to the specific node-to-node communication protocols (going as far as modelling TCP congestion windows!); while the rust simulation is coarser grained and focused on answering questions about the behavior of a large network; we make some simplifying assumptions (like how we model TCP connections) with (hopefully) "good enough" approximations and distributions driven by insights from the Haskell simulation; and at the same time, add factors that might impact the behavior of the overall network that might not be worth modelling in Haskell, such as generating and propagating "real-ish" transactions.

If the goal of adding this is just to validate the hypothesis that the simplifying assumptions we've made are valid ones to make, or to inform the kinds of conclusions that are safe to draw from either simulation, then this request make sense.

But if the goal is more about making sure the graphs / implementations match closely, then I'm missing an important piece of context! 😅

@SupernaviX
Copy link
Contributor

@bwbush I've added a simulate-transactions setting to config. If it's false, the rust simulation won't do any TX propagation, and it'll use ib-body-avg-size-bytes as a fixed size for all IB bodies. As far as I can tell, this matches the Haskell behavior.

I have the same question/concern as Pi about the purpose of multiple simulations though. There's a limit to how valuable apples-to-apples comparisons are between sims which are simulating different things, and I'm concerned about having matching outputs as a goal.

@bwbush
Copy link
Collaborator Author

bwbush commented Mar 4, 2025

Can you elaborate on what the goal here is?

I'd like to study the block-propagation behavior without transactions creating noise in the network or in the block sizes.

I agree that we should discuss how much effort should be put in to comparing the simulations. We can do that at the next team session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants