Skip to content
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

Merged
merged 6 commits into from
Jan 21, 2025

Conversation

MitchTurner
Copy link
Member

@MitchTurner MitchTurner commented Jan 18, 2025

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 the url docs.

@MitchTurner MitchTurner changed the title Improve the BlockCommitterHttpApi client to use url apis better bugfix: Improve the BlockCommitterHttpApi client to use url apis better Jan 18, 2025
@MitchTurner MitchTurner marked this pull request as ready for review January 18, 2025 20:03
Comment on lines +134 to +135
let path = format!("/v1/costs?variant=specific&value={l2_block_number}&limit={NUMBER_OF_BUNDLES}");
let full_path = url.join(&path)?;
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting "//v1".

AurelienFT
AurelienFT previously approved these changes Jan 20, 2025
rymnc
rymnc previously approved these changes Jan 20, 2025
@MitchTurner MitchTurner self-assigned this Jan 20, 2025
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}");
Copy link
Collaborator

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

@MitchTurner MitchTurner dismissed stale reviews from rymnc and AurelienFT via cdfec32 January 20, 2025 20:55
AurelienFT
AurelienFT previously approved these changes Jan 20, 2025
@@ -87,8 +88,10 @@ pub async fn estimate_transaction(
let request = SimulateRequest {
tx_bytes: tx_bytes.to_string(),
};
let path = "/cosmos/tx/v1beta1/simulate";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have this problem in all requests=D
image

Copy link
Member Author

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.

@rymnc rymnc merged commit 1a294e2 into master Jan 21, 2025
31 checks passed
@rymnc rymnc deleted the fix-url-scheme branch January 21, 2025 09:08
@MitchTurner MitchTurner mentioned this pull request Jan 22, 2025
MitchTurner added a commit that referenced this pull request Jan 22, 2025
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants