-
Notifications
You must be signed in to change notification settings - Fork 78
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
feat: Misc icx fixes #498
base: main
Are you sure you want to change the base?
feat: Misc icx fixes #498
Conversation
.await | ||
.context("Failed to fetch root key from replica")?; | ||
async fn fetch_root_key_from_non_ic(agent: &Agent, replica: &Url) -> Result<()> { | ||
if is_mainnet(replica) { |
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.
Shouldn't this logic be the opposite? We should never fetch the root key on mainnet, and should always fetch it elsewhere.
if is_mainnet(replica) { | |
if !is_mainnet(replica) { |
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.
We could also consider the approach that icx-proxy takes: adding a --fetch-root-key
parameter.
https://github.com/dfinity/ic/blob/master/rs/boundary_node/icx_proxy/src/main.rs#L83
The primary target of this PR is updating the URLs that the root key is fetched for to include icp-api.io and icp0.io, while making the default port 4943, but I also took the opportunity to fix some documentation and panics, add a
--ic
flag as shorthand for mainnet, and make the flags repositionable.