-
Notifications
You must be signed in to change notification settings - Fork 0
[feat] adds simulation to block loop #71
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
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
/// | ||
/// An `Instant` representing the deadline. | ||
pub fn calculate_deadline(&self) -> Instant { | ||
let now = SystemTime::now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created ENG-1019 to capture this.
- sets the builder main function to use multi-threaded runtime - this allows us to avoid a potential panic and enables a safe `unwrap`
BASEFEE_DEFAULT | ||
} | ||
}; | ||
tracing::debug!(basefee = basefee, "setting basefee"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit don't need the =
unless you're modifying something:
debug!(basefee, "setting basefee");
} | ||
/// Different error types that the Simulator handles | ||
#[derive(Debug, Error)] | ||
pub enum SimulatorError { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type seems unnecessary for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we should merge this today and then iterate
[feat] adds simulation to block loop
This PR adds simulation to the block builder loop.
SlotCalculator
for managing slot timings.Configuration
Deploying this PR will require additional environment variables to be set
CONCURRENCY_LIMIT
to limit how many concurrent simulations the block builder runs.START_TIMESTAMP
to 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