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 Initial Chain Reader Trait #116

Closed
1 task
dutterbutter opened this issue Dec 20, 2019 · 0 comments
Closed
1 task

Implement Initial Chain Reader Trait #116

dutterbutter opened this issue Dec 20, 2019 · 0 comments
Assignees
Labels
Priority: 2 - High Very important and should be addressed ASAP

Comments

@dutterbutter
Copy link
Contributor

The TipIndex methods should be accessible via a ChainReader trait. Below demonstrates what that might look like.

  • ChainReader trait
// ChainReader reads the chain store.

trait ChainReader {
  GetHead() -> TipSetKey

  GetTipSet(tsKey TipSetKey) -> TipSet

  GetTipSetStateRoot(tsKey TipSetKey) -> cid.Cid

  GetTipSetReceiptsRoot(tsKey TipSetKey) ->  cid.Cid

  HasTipSetAndState(tsKey TipSetKey) -> bool

  HasTipSetAndStatesWithParentsAndEpoch(pTsKey TipSetKey, epoch ChainEpoch) -> bool

  GetTipSetAndStatesByParentsAndEpoch(pTsKey TipSetKey, epoch ChainEpoch) -> []TipSetMetadata

  PutTipSetMetadata(tsas TipSetMetadata)
}

The above methods exist in tip_index.go.

@dutterbutter dutterbutter self-assigned this Dec 20, 2019
@dutterbutter dutterbutter added Blockchain Priority: 2 - High Very important and should be addressed ASAP labels Dec 20, 2019
@dutterbutter dutterbutter changed the title Implement Initial Chain Reader trait Implement Initial Chain Reader Trait Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 2 - High Very important and should be addressed ASAP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant