-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
bugfix: Improve the BlockCommitterHttpApi
client to use url
apis better
#2599
Conversation
BlockCommitterHttpApi
client to use url
apis betterBlockCommitterHttpApi
client to use url
apis better
let path = format!("/v1/costs?variant=specific&value={l2_block_number}&limit={NUMBER_OF_BUNDLES}"); | ||
let full_path = url.join(&path)?; |
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.
what path was it constructing previously?
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 was getting "//v1".
if let Some(url) = &self.url { | ||
tracing::debug!("getting da costs by l2 block number: {l2_block_number}"); | ||
let formatted_url = format!("{url}/v1/costs?variant=specific&value={l2_block_number}&limit={NUMBER_OF_BUNDLES}"); | ||
let response = self.client.get(formatted_url).send().await?; | ||
let path = format!("/v1/costs?variant=specific&value={l2_block_number}&limit={NUMBER_OF_BUNDLES}"); |
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 have the same issue with SS service, could you also apply it there please?=D
@@ -87,8 +88,10 @@ pub async fn estimate_transaction( | |||
let request = SimulateRequest { | |||
tx_bytes: tx_bytes.to_string(), | |||
}; | |||
let path = "/cosmos/tx/v1beta1/simulate"; |
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.
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.
Ah.. I just found the first one. Didn't look farther.
## Version v0.41.1 * fault_proving(compression): include block_id in da compressed block headers by @rymnc in #2551 * chore: Add myself and Andrea as codeowner for graphql API + related crates by @netrome in #2570 * fix(integration_tests): remove flake from produce_block__l1_committed_block_affects_gas_price by @rymnc in #2566 * bugfix: Improve the `BlockCommitterHttpApi` client to use `url` apis better by @MitchTurner in #2599 * Fix version compatibility error by @AurelienFT in #2608 * Improve error messages for responses from committer by @MitchTurner in #2609 * Update async processor tests by @rafal-ch in #2577 * The amount of returned dust coins is limited by factor relative to the amount of selected big coins by @rafal-ch in #2610 * fix(da_compression): invalid decompression of utxo id and CoinConfig fix by @rymnc in #2593 * Use latest gas price to estimate next price for tx pool checks by @MitchTurner in #2612 * Set Latest Recorded Height on startup by @MitchTurner in #2603 * Use latest gas price to estimate next block gas price during dry runs by @MitchTurner in #2615 * Check that fuel-core lib builds correctly without default features by @rafal-ch in #2594 * Expose indexation status in `NodeInfo` endpoint by @rafal-ch in #2595 **Full Changelog**: v0.41.0...v0.41.1
Linked Issues/PRs
Description
Before we were just building a String from the
Url
type, rather than using its apis. That was bad and this is more robust. I feel like it could be more precise than this, but I'm not finding a better way looking at theurl
docs.