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

Implement Basic TipSet Manager #38

Closed
4 tasks
dutterbutter opened this issue Nov 26, 2019 · 3 comments
Closed
4 tasks

Implement Basic TipSet Manager #38

dutterbutter opened this issue Nov 26, 2019 · 3 comments

Comments

@dutterbutter
Copy link
Contributor

Defined in the spec as:

The Chain Tips Manager is a subcomponent of Filecoin consensus that is technically up to the implementer, but since the pseudocode in previous sections reference it, it is documented here for clarity.

The Chain Tips Manager is responsible for tracking all live tips of the Filecoin blockchain, and tracking what the current ‘best’ tipset is.

Required:

  • fn ticket_from_round // returns the ticket that is at round 'r' in the chain behind 'head'
  • fn tipset_from_round // returns the tipset that contains round 'r'
  • fn get_best_tipset // returns the best known tipset
  • fn add_losing_ticket // adds the losing ticket to the chaintips manager so that blocks can be mined on top of it

I don't exactly know where this functionality lives within go-filecoin but the spec contains details.

@ansermino
Copy link
Member

fn ticket_from_round // returns the ticket that is at round 'r' in the chain behind 'head'

seems we need some notion of round. Any thoughts on whats needed for this?

fn add_losing_ticket // adds the losing ticket to the chaintips manager so that blocks can be mined on top of it

why loosing ticket?

@dutterbutter
Copy link
Contributor Author

dutterbutter commented Dec 9, 2019

Based on the specification, it seems they are using the term round interchangeably with epoch. They define an epoch as:

An epoch refers to the period over which a given random seed is used in Expected Consensus.
In the current Filecoin implementation, each round is an epoch.

@austinabell has stubbed ChainEpoch in ferret/vm/src/runtime/mod.rs but looks like it still needs to be formally defined.

As for the losing ticket I am not sure why they are referring it to as losing...based on everything else I've read it should be the winning ticket that blocks are mined on top of BUT the ChainTipsManager in the spec indicates losing...

@dutterbutter
Copy link
Contributor Author

Closing this issue as I believe this to be essentially the TipIndex tracker, just the wording chosen in the spec is poor. For example, tipset_from_round is essentially get_tipset_by_epoch which is included in #113

vmx pushed a commit to dignifiedquire/forest that referenced this issue Mar 19, 2020
* feat(upgrade filecoin-proofs to use POST_SECTORS_COUNT=4)

* feat(update to 0.6.4 which includes parameters.json)

* ensure correct paramfetch installed

* bump cache key

* use 0.7.3 FFI crate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants