[feat] adds simulation to block loop#71
Merged
Merged
Conversation
- shifts the tx-poller to a more actor oriented approach by streaming transactions out of the cache. - transaction deduplication and validation is intended to be carried out by the simulator.
* fix: break loop on closure and improve tracing * refactor: break out the task future
- adds init4 metrics - updates provider types to account for alloy changes
- align to alloy @ 0.12.6 - transfer off of zenith-rs and use signet-sdk instead
ac4bbb1 to
47a2ed7
Compare
47a2ed7 to
1ee991f
Compare
Evalir
reviewed
Apr 29, 2025
Evalir
reviewed
Apr 29, 2025
prestwich
requested changes
Apr 30, 2025
prestwich
reviewed
Apr 30, 2025
prestwich
reviewed
Apr 30, 2025
prestwich
reviewed
Apr 30, 2025
prestwich
reviewed
Apr 30, 2025
| /// | ||
| /// An `Instant` representing the deadline. | ||
| pub fn calculate_deadline(&self) -> Instant { | ||
| let now = SystemTime::now(); |
Member
There was a problem hiding this comment.
i don't like that we're constantly mixing timestamps and Duration/Instant. it makes it very hard to reason about the logic. cc @anna-carroll can we add more convenience functions to SlotCalculator to make these easier? what are the common actions we want to take using a calculator?
prestwich
reviewed
Apr 30, 2025
prestwich
reviewed
Apr 30, 2025
prestwich
reviewed
May 1, 2025
- sets the builder main function to use multi-threaded runtime - this allows us to avoid a potential panic and enables a safe `unwrap`
prestwich
reviewed
May 6, 2025
prestwich
reviewed
May 6, 2025
| BASEFEE_DEFAULT | ||
| } | ||
| }; | ||
| tracing::debug!(basefee = basefee, "setting basefee"); |
Member
There was a problem hiding this comment.
nit don't need the = unless you're modifying something:
debug!(basefee, "setting basefee");
prestwich
reviewed
May 6, 2025
| } | ||
| /// Different error types that the Simulator handles | ||
| #[derive(Debug, Error)] | ||
| pub enum SimulatorError { |
Member
There was a problem hiding this comment.
type seems unnecessary for now?
prestwich
reviewed
May 6, 2025
Member
prestwich
left a comment
There was a problem hiding this comment.
i think we should merge this today and then iterate
prestwich
approved these changes
May 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

[feat] adds simulation to block loop
This PR adds simulation to the block builder loop.
SlotCalculatorfor managing slot timings.Configuration
Deploying this PR will require additional environment variables to be set
CONCURRENCY_LIMITto limit how many concurrent simulations the block builder runs.START_TIMESTAMPto set the starting timestamp of the chain for anchoring slot calculation.Testing
This code is still being tested before final merge.
The current test plan is to