-
Notifications
You must be signed in to change notification settings - Fork 11
feat: block interval and parallel block proving #90
Conversation
9197924
to
d260a41
Compare
6f5d0e7
to
bc2ff6e
Compare
bc2ff6e
to
c69de80
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.
5733a4a
to
fc17dbb
Compare
319c8a9
to
c090919
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.
nits
* feat: implement concurrent block proving #88 #89 * Update prover/src/lib.rs Co-authored-by: 0xaatif <[email protected]> * fix suggestion * Fix duplicated import when #[cfg(feature = "test_only")] --------- Co-authored-by: 0xaatif <[email protected]> Co-authored-by: Marko Atanasievski <[email protected]>
} => Ok(try_stream! { | ||
let mut current = start_block; | ||
loop { | ||
let last_block_number = provider.get_block_number().await.map_err(|e: alloy::transports::RpcError<_>| { |
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'm surprised you can't elide the type. Also .context
could work here
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.
Compiler insisted for some reason
current += 1; | ||
yield current; | ||
} else { | ||
info!("Waiting for the new blocks to be mined, requested block number: {current}, \ |
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: I prefer structured logging for stats
} | ||
} | ||
}), | ||
_ => Err(anyhow!( |
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: could be bail!
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.
Out of curiosity, have we tested the new behavior against actual multiple blocks? To make sure workers are picking up jobs properly, there's no weird synchronicity issues, we don't get overlasting delays on the first blocks upon increased work pressure, etc...
@Nashtare Yes, I did tests with 5 blocks range, both |
Once this is in |
|
Resolves #87
Resolves #88
Resolves #89