-
Notifications
You must be signed in to change notification settings - Fork 0
feat: passes sim result to the submit tasks #100
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
Open
dylanlott
wants to merge
10
commits into
main
Choose a base branch
from
dylan/block-env-refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e09c853
passes sim result to the submit tasks
dylanlott 66ee5f3
better logging
dylanlott 5bfb2f9
cleanup
dylanlott d0696f8
fmt
dylanlott 6b2690c
remove verbose logging
dylanlott f90743b
clippy
dylanlott 8be4ae9
fix: don't submit empty blocks
dylanlott 2b773d2
bump trevm to include bugfix
dylanlott abf70a8
refactor: attach host block header to SimEnv
dylanlott 8dad7d2
clippy + fmt
dylanlott File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,8 @@ use tokio::{ | |
sync::{mpsc, watch}, | ||
task::JoinHandle, | ||
}; | ||
use trevm::revm::context::BlockEnv; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: no newline |
||
use crate::tasks::env::SimEnv; | ||
|
||
/// Cache task for the block builder. | ||
/// | ||
|
@@ -16,8 +17,7 @@ use trevm::revm::context::BlockEnv; | |
#[derive(Debug)] | ||
pub struct CacheTask { | ||
/// The channel to receive the block environment. | ||
env: watch::Receiver<Option<BlockEnv>>, | ||
|
||
env: watch::Receiver<Option<SimEnv>>, | ||
/// The channel to receive the transaction bundles. | ||
bundles: mpsc::UnboundedReceiver<TxCacheBundle>, | ||
/// The channel to receive the transactions. | ||
|
@@ -27,7 +27,7 @@ pub struct CacheTask { | |
impl CacheTask { | ||
/// Create a new cache task with the given cache and channels. | ||
pub const fn new( | ||
env: watch::Receiver<Option<BlockEnv>>, | ||
env: watch::Receiver<Option<SimEnv>>, | ||
bundles: mpsc::UnboundedReceiver<TxCacheBundle>, | ||
txns: mpsc::UnboundedReceiver<TxEnvelope>, | ||
) -> Self { | ||
|
@@ -45,10 +45,10 @@ impl CacheTask { | |
break; | ||
} | ||
if let Some(env) = self.env.borrow_and_update().as_ref() { | ||
basefee = env.basefee; | ||
info!(basefee, number = env.number, timestamp = env.timestamp, "block env changed, clearing cache"); | ||
basefee = env.signet.basefee; | ||
info!(basefee, env.signet.number, env.signet.timestamp, "rollup block env changed, clearing cache"); | ||
cache.clean( | ||
env.number, env.timestamp | ||
env.signet.number, env.signet.timestamp | ||
); | ||
} | ||
} | ||
|
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.