You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need to implement the basic chain structures as defined in the spec under Chain. This task has a dependency on having a Chain Store implemented (e.g. for retrieving head tipset).
Chain type
Chain methods
Checkpoints
[ 1 ] The chain type is defined in the spec as:
type Chain struct {
HeadTipset Tipset
}
However, I cannot see this defined in the go-filecoin implementation or how its exactly used. The closest implementation to this and the chain methods are in the porcelain package here go-filecoin/internal/app/go-filecoin/porcelain/chain.go / .
[ 2 ] Much like the Chain type, the methods described in the spec are not clearly defined in the go implementation. As defined in the spec:
// Returns the tipset at or immediately prior to `epoch`.
func (chain *Chain_I) TipsetAtEpoch(epoch block.ChainEpoch) Tipset {
current := chain.HeadTipset()
for current.Epoch() > epoch {
current = current.Parents()
}
return current
}
// Draws randomness from the tipset at or immediately prior to `epoch`.
func (chain *Chain_I) RandomnessAtEpoch(epoch block.ChainEpoch) util.Bytes {
ts := chain.TipsetAtEpoch(epoch)
return ts.MinTicket().DrawRandomness(epoch)
}
func (chain *Chain_I) LatestCheckpoint() epoch block.ChainEpoch {
}
For TipsetAtEpoch, I think this should be TipSetByKey, where you would pass in a TipSetKey as a param rather than epoch imo.
[ 3 ] Checkpoints x3, can be implemented and are defined as:
type Checkpoint &block.BlockHeader
type SoftCheckpoint Checkpoint
type TrustedCheckpoint Checkpoint
For more information refer to Chain. I was not able to find any reference to checkpoint in the go implementation except for the rust file scheduler.rs under sector-builder.
The text was updated successfully, but these errors were encountered:
Started implementing, when the TipIndex from #106 is completed will open for PR.
Although not really well defined in the spec, and the use of SoftCheckpoint and Checkpoint don't seem to be referenced anywhere only TrustedCheckpoint.
@amerameen this issue originally was dependant on the TipIndex due to the method TipsetAtEpoch which was included #109 as a subtask of #106. Although the checkpoints have not been completed I have closed this issue as everything else has either been implemented elsewhere.
As for the checkpoints, I believe a new issue can be created when we complete blocksync and other sync functionality, otherwise it will sit as dead code for a while.
Need to implement the basic chain structures as defined in the spec under Chain. This task has a dependency on having a Chain Store implemented (e.g. for retrieving head tipset).
Chain
typeCheckpoints
[ 1 ] The chain type is defined in the spec as:
However, I cannot see this defined in the go-filecoin implementation or how its exactly used. The closest implementation to this and the chain methods are in the porcelain package here go-filecoin/internal/app/go-filecoin/porcelain/chain.go / .
[ 2 ] Much like the
Chain
type, the methods described in the spec are not clearly defined in the go implementation. As defined in the spec:For
TipsetAtEpoch
, I think this should beTipSetByKey
, where you would pass in aTipSetKey
as a param rather than epoch imo.[ 3 ] Checkpoints x3, can be implemented and are defined as:
For more information refer to Chain. I was not able to find any reference to checkpoint in the go implementation except for the rust file
scheduler.rs
under sector-builder.The text was updated successfully, but these errors were encountered: