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

Forking not working if origin URL uses https scheme #424

Closed
FabijanC opened this issue Apr 12, 2024 · 2 comments · Fixed by #470
Closed

Forking not working if origin URL uses https scheme #424

FabijanC opened this issue Apr 12, 2024 · 2 comments · Fixed by #470
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@FabijanC
Copy link
Contributor

FabijanC commented Apr 12, 2024

  1. Run Devnet in fork mode, forking from an https network
cargo run --release -- --accounts 0 --fork-network https://free-rpc.nethermind.io/sepolia-juno/v0_7 --fork-block 58801
  1. In a separate terminal, try getting a block that only exists in origin
curl -sSf http://127.0.01:5050 --json '{
	"jsonrpc": "2.0",
	"method": "starknet_getBlockWithTxHashes",
	"id": 0,
	"params": {
		"block_id": { "block_number": 58800 }
	}
}'
  1. Observe an error indicating that https is not supported

With https://rpc.pathfinder.equilibrium.co/integration-sepolia/rpc/v0_7 it's easier because simply changing https to http in the URL works, but with https://free-rpc.nethermind.io that's not possible.

@FabijanC FabijanC added the bug Something isn't working label Apr 12, 2024
@FabijanC FabijanC self-assigned this Apr 12, 2024
@FabijanC
Copy link
Contributor Author

FabijanC commented Apr 15, 2024

I'm having a hard time configuring it to use https://crates.io/crates/hyper-tls, which was recommended in https://users.rust-lang.org/t/hyper-client-and-https-how/21571. hyper::client::connect::HttpConnector is not the same as hyper_util::client::legacy::connect::http::HttpConnector. Basically there is another needed crate called hyper_util which contains its own struct called HttpConnector which doesn't implement all the traits that the rest of the code needs.
And when attempting to use reqwest::Client instead of hyper::Client, in #426, we get a not running on tokio 0.2.x runtime error, which might also be related to mismatching tokio requirements.

@FabijanC FabijanC added the help wanted Extra attention is needed label Apr 15, 2024
@FabijanC
Copy link
Contributor Author

Before resorting to the thread channels approach used in #379, I would wait to see if applying the dependency updates suggested in #451 would make it easier to implement any of the approaches suggested in my previous comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Status: Done
1 participant