-
Notifications
You must be signed in to change notification settings - Fork 2k
feat: convert pooled blobs transition #19095
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
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.
this is pretty straight forward actually
logic checks out only have one suggestion to sleep for a few seconds before we start doing this
let pool = pool.clone(); | ||
let spawner = task_spawner.clone(); | ||
let client = client.clone(); | ||
task_spawner.spawn(Box::pin(async move { |
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.
could we perhaps make this a standalone fn, feel like this would be easier to delete later, but maybe doesnt really matter
} | ||
// Remove transaction and sidecar from the pool, both are in memory | ||
// now | ||
let Some(tx) = pool.remove_transactions(vec![tx_hash]).pop() else { |
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.
let me add a new api fn for this
let last_iteration = | ||
client.latest_header().ok().flatten().is_none_or(|header| { | ||
client | ||
.chain_spec() | ||
.is_osaka_active_at_timestamp(header.timestamp()) | ||
}); |
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.
this exit condition assumes we're making it past the block, if that doesn't happen this loop will keep going, but since we have the timeout this is fine
dbdb714
to
178b2e0
Compare
178b2e0
to
8b7b074
Compare
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.
lgtm!
// Start converting not eaerlier than 4 seconds into current slot to ensure | ||
// that our pool only contains valid transactions for the next block (as | ||
// it's not Osaka yet). | ||
tokio::time::sleep(Duration::from_secs(4)).await; |
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.
nice
Based on #19084