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: add fetch_api_boundary_nodes API to ic-agent #509

Conversation

nikolay-komarevskiy
Copy link
Contributor

@nikolay-komarevskiy nikolay-komarevskiy commented Feb 5, 2024

Description

API boundary nodes were recently added to the certified state tree. Currently, there are no API boundary nodes and the subtree is empty. accordingly. API boundary nodes will be added to the registry via NNS proposals at some later stage.

IC clients should be able to retrieve all these API BNs in a convenient way.

This PR extends ic-agent API with a new method:
pub async fn fetch_api_boundary_nodes() -> Vec<ApiBoundaryNode>

How Has This Been Tested?

  1. Run this api_boundary_node_decentralization_test system-test. This test converts two unassigned nodes into API BNs.
  2. Instantiate an agent with any IC replica url provided in system-test logs during test execution.
  3. Retrieve API BNs via let api_bns = agent.fetch_api_boundary_nodes(effective_canister_id).await.
  4. Verify that two API BNs are discovered within the State Tree.

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@nikolay-komarevskiy nikolay-komarevskiy changed the title Add fetch_api_boundary_nodes API feat: add fetch_api_boundary_nodes API to ic-agent Feb 5, 2024
ic-agent/src/agent/mod.rs Outdated Show resolved Hide resolved
ic-agent/src/agent/mod.rs Outdated Show resolved Hide resolved
@nikolay-komarevskiy nikolay-komarevskiy force-pushed the add-fetch-api-boundary-nodes branch from ae2a65a to 0dce4fc Compare March 6, 2024 07:45
@nikolay-komarevskiy nikolay-komarevskiy marked this pull request as ready for review March 6, 2024 08:13
@nikolay-komarevskiy nikolay-komarevskiy requested a review from a team as a code owner March 6, 2024 08:13
@adamspofford-dfinity adamspofford-dfinity enabled auto-merge (squash) March 6, 2024 21:00
@adamspofford-dfinity adamspofford-dfinity merged commit a3cc081 into dfinity:main Mar 6, 2024
24 checks passed
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