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

feat: Misc icx fixes #498

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

feat: Misc icx fixes #498

wants to merge 5 commits into from

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
Member

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
Member

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.

2 participants