-
Couldn't load subscription status.
- Fork 0
fix: submit channel refactors #94
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
This stack of pull requests is managed by Graphite. Learn more about stacking. |
9a88965 to
8a1e80b
Compare
8a1e80b to
0498aae
Compare
a239bcb to
2fd44a7
Compare
444d0f3 to
f762131
Compare
f762131 to
8c0eaa5
Compare
2d47dc8 to
455791f
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.
nice progress. some nits:
| ); | ||
|
|
||
| // NB: These errors are all handled the same way but are logged for debugging purposes | ||
| if e.as_revert_data() |
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.
style: DRY
macro_rules! check_selector {
($e:ident, $rd:ident, $selector:ident, $msg:literal) => {
if $rd.starts_with(&$selector) {
debug!("incorrect host block");
bail!(e)
}
}
}
if let Some(rd) = e.as_revert_data() {
check_selector!(e, rd, IncorrectHostBlock::SELECTOR, "incorrect host block")
check_selector!(e, rd, Zenith::BadSignature::SELECTOR, "...")
...
bail!(e)
}
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.
started messing around here
https://github.com/init4tech/builder/pull/98/files
9ef1835 to
70591dd
Compare
| init4-bin-base = { version = "0.4.1", features = ["perms"] } | ||
|
|
||
| signet-constants = { git = "https://github.com/init4tech/signet-sdk", rev = "b8251ff0fec7cb14ca87e6f95c14f56bc2593049" } | ||
| signet-sim = { git = "https://github.com/init4tech/signet-sdk", rev = "b8251ff0fec7cb14ca87e6f95c14f56bc2593049" } | ||
| signet-tx-cache = { git = "https://github.com/init4tech/signet-sdk", rev = "b8251ff0fec7cb14ca87e6f95c14f56bc2593049" } | ||
| signet-types = { git = "https://github.com/init4tech/signet-sdk", rev = "b8251ff0fec7cb14ca87e6f95c14f56bc2593049" } | ||
| signet-zenith = { git = "https://github.com/init4tech/signet-sdk", rev = "b8251ff0fec7cb14ca87e6f95c14f56bc2593049" } | ||
| signet-constants = { git = "https://github.com/init4tech/signet-sdk", rev = "ba5894f6fac35299d495ae115cd465a1f0791637" } |
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.
note that technically there's a version mismatch here: bin-base will pull signet-constants from commit bd183b627dcb0eb682da801093b13f1f8311446b while this dep will be exclusively using this commit. This shouldn't cause problems right now, but it is something to be aware of. We could bump signet-constants as a patch release to make sure it's at the commit? @prestwich
7371bc5 to
0a3a830
Compare
Closes ENG-1109
0a3a830 to
0e8eda5
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.
just a few nits, but i think we can proceed with this
| init4-bin-base = { version = "0.4.1", features = ["perms"] } | ||
|
|
||
| signet-constants = { git = "https://github.com/init4tech/signet-sdk", rev = "bd183b627dcb0eb682da801093b13f1f8311446b" } | ||
| signet-sim = { git = "https://github.com/init4tech/signet-sdk", rev = "bd183b627dcb0eb682da801093b13f1f8311446b" } | ||
| signet-tx-cache = { git = "https://github.com/init4tech/signet-sdk", rev = "bd183b627dcb0eb682da801093b13f1f8311446b" } | ||
| signet-types = { git = "https://github.com/init4tech/signet-sdk", rev = "bd183b627dcb0eb682da801093b13f1f8311446b" } | ||
| signet-zenith = { git = "https://github.com/init4tech/signet-sdk", rev = "bd183b627dcb0eb682da801093b13f1f8311446b" } | ||
| signet-constants = { git = "https://github.com/init4tech/signet-sdk", rev = "ba5894f6fac35299d495ae115cd465a1f0791637" } | ||
| signet-sim = { git = "https://github.com/init4tech/signet-sdk", rev = "ba5894f6fac35299d495ae115cd465a1f0791637" } | ||
| signet-tx-cache = { git = "https://github.com/init4tech/signet-sdk", rev = "ba5894f6fac35299d495ae115cd465a1f0791637" } | ||
| signet-types = { git = "https://github.com/init4tech/signet-sdk", rev = "ba5894f6fac35299d495ae115cd465a1f0791637" } | ||
| signet-zenith = { git = "https://github.com/init4tech/signet-sdk", rev = "ba5894f6fac35299d495ae115cd465a1f0791637" } |
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's upgrade this to the 0.2.0 tag (we can now just use tag instead)
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.
unless we need test-utils or rpc, we can actually skip the tag = and just use published?
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.
just nits
| let block = block_build.build().await; | ||
| debug!(block = ?block, "finished block simulation"); | ||
| let built_block = block_build.build().await; | ||
| debug!(block_number = ?built_block.block_number(), "finished building block"); |
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.
the ? is unnecessary, as block_number is a u64 which is a valid tracing value
| let Some(block_env) = self.block_env.borrow_and_update().clone() else { return }; | ||
|
|
||
| debug!(block_env = ?block_env, "building on block"); | ||
| debug!(block_env = ?block_env, "building on block env"); |
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.
debug!(?block_env, ...)
no need to do = as we're not renaming or invoking any expressions
|
|
||
| // manually retrieve nonce | ||
| let nonce = | ||
| self.provider().get_transaction_count(self.provider().default_signer_address()).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.
good target for a utility function
| let SendableTx::Envelope(tx) = self.provider().fill(tx).await? else { | ||
| bail!("failed to fill transaction") | ||
| }; | ||
| debug!(tx_hash = ?tx.hash(), host_block_number = %resp.req.host_block_number, "sending transaction to network"); |
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.
no need for the % on the host block number. it's a u64, right?
Merge activity
|

fix: submit channel refactors
This PR includes several fixes and refactors to the channel submission logic.
Skips instead of erroringretry_countincrements to some code paths that weren't previously ticking the countcallresults of the blob transaction to aid with debuggingAdditionally, there are some configuration changes that needed to be made.
Closes ENG-1079
See: Builder Retry Logic