Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

IPC-299: Implementation of provider methods #309

Merged
merged 23 commits into from
Sep 14, 2023

Conversation

adlrocha
Copy link
Contributor

@adlrocha adlrocha commented Sep 8, 2023

This PR includes the implementation of all the relevant methods currently required for the cli in the IpcProvider.

Copy link
Contributor

@cryptoAtwill cryptoAtwill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel we might not need gateway address as parameters anymore since it should be part of the subnet config already and we should use the one passed in from config.

ipc/provider/src/lib.rs Outdated Show resolved Hide resolved
Some(addr) => addr,
};

conn.manager().list_child_subnets(gateway_addr).await
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gateway address should not be needed in list_child_subnets as manager should already know which subnet it is managing and hence should have already known the gateway address. Ideally, manager should have owned the gateway address?.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is a huge change, I will fix it in a follow up PR. Tracked in this issue: https://github.com/consensus-shipyard/ipc-agent/issues/316

) -> anyhow::Result<ChainEpoch> {
todo!()
let parent = subnet.parent().ok_or_else(|| anyhow!("no parent found"))?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should remove this as well, so that we can fund address in root subnets

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the case, right? When funding you need to connect to the parent and send a fund to the gateway. So there shouldn't be a fund from the root as an argument.

@adlrocha adlrocha merged commit 1d5510c into ipc-299-cli Sep 14, 2023
3 checks passed
@adlrocha adlrocha deleted the ipc-299-provider-impl branch September 14, 2023 08:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants