-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
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.
There seems to be a lot of copy-pasta and things missing (or maybe I am looking at the wrong commit?)
ipc/provider/src/lib.rs
Outdated
conn.manager().chain_head_height().await | ||
} | ||
|
||
pub async fn get_genesis_epoch(&self, subnet: &SubnetID) -> anyhow::Result<ChainEpoch> { |
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.
Is this a duplicate of the genesis_epoch
above?
ipc/provider/src/lib.rs
Outdated
Some(conn) => conn, | ||
}; | ||
|
||
conn.manager().chain_head_height().await |
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.
Also, this doesn't seem what you want to do, right? :)
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.
right, this method should be removed.
}; | ||
|
||
conn.manager() | ||
.get_validator_changeset(subnet, start, end) |
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.
Where is this one implemented?
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.
In the evm manager instance.
ipc/provider/src/manager/subnet.rs
Outdated
@@ -128,6 +128,8 @@ pub trait SubnetManager: Send + Sync + TopDownCheckpointQuery { | |||
/// Trait to interact with a subnet to query the necessary information for top down checkpoint. | |||
#[async_trait] | |||
pub trait TopDownCheckpointQuery: Send + Sync { | |||
/// Returns the chain head height |
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.
This comment is wrong, right?
@@ -572,6 +598,25 @@ impl IpcProvider { | |||
|
|||
conn.manager().get_chain_id().await | |||
} | |||
|
|||
pub async fn get_chain_head_height(&self, subnet: &SubnetID) -> anyhow::Result<ChainEpoch> { | |||
let conn = match self.connection(subnet) { |
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.
Isn't the change set picked up from the parent?
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.
this is get chain head height? Anyways, for change set, it's from the subnet actor in parent, so the address should be derived from the subnet directly.
Add more top down finality util queries in provider.