filecoin-project / eudico

lotus, but also other things
Other
19 stars 14 forks source link

[minor bug] Allow checking list of checkpoints of a subnet if we are syncing with its parent #170

Closed adlrocha closed 2 years ago

adlrocha commented 2 years ago

The command ./eudico checkpoint list-checkpoints --subnet=<subnet_id> expects that the node is syncing with subnet_id and its parent. If the node is not syncing with the subnet, it requires the node to sync with it before checking the subnets. This is not correct, checkpoints are synced in the parent, so even if we are not syncing with the subnet we should be able to check its list of checkpoints.

adlrocha commented 2 years ago

In the end, this is not really a bug, it is working in the right way. We need to be syncing with the subnetAPI in order to access some values from the state of the subnet (like the heaviest tipset, or its checkpoint period) required to list the latest checkpoints.

We could probably come up with an alternative implementation of this function that doesn't require this data, and that supports listing the checkpoints from a specific epoch) but as this doesn't seem a priority we'll defer it to the future.