Skip to content

Conversation

@adamspofford-dfinity
Copy link
Contributor

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.

@adamspofford-dfinity adamspofford-dfinity requested a review from a team as a code owner December 1, 2023 01:19
.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) {
Copy link

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.

Suggested change
if is_mainnet(replica) {
if !is_mainnet(replica) {

Copy link

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

nikolay-komarevskiy pushed a commit to nikolay-komarevskiy/agent-rs that referenced this pull request Feb 20, 2024
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.

1 participant