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

fraud: remove block height from proof and make all fields on proof private #7

Open
vgonkivs opened this issue Jun 17, 2022 · 4 comments

Comments

@vgonkivs
Copy link
Member

We should remove BlockHeight from Proof structure and interface as it was used to fetch header using GetBlockByHeight method. in celestiaorg/celestia-node#827 the Proof structure was extended with BlockHash. So now we can replace GetBlockByHeight with GetBlockHash and remove BlockHeight field at all

@renaynay
Copy link
Member

What is the rationale for using hash over height?

@vgonkivs
Copy link
Member Author

vgonkivs commented Jun 20, 2022

Because height is not a unique number. In case, when BEFP is created, user should restart the node from previous block and will get a new block at known height. That's the reason why I added block hash. As we now store hash we can get a block by its hash and block height becomes redundant.

@vgonkivs vgonkivs changed the title fraud: remove block height from proof fraud: remove block height from proof and make all fields on proof private Jun 20, 2022
@adlerjohn
Copy link
Member

Re-orgs aren't possible under Tendermint, and under a weak subjectivity assumptions you can ignore everything that's not on the subjective canonical chain.

That being said, using hash can be better for things like proving that some orphaned block was invalid (e.g. to back-rationale a hard fork), as height alone doesn't identify that block. Would it be better to include both height and hash?

@Wondertan
Copy link
Member

We include. I am not sure there is a benefit to having two types of pointers to a block, thus the issue to remove one of them, particularly the height pointer.

@Wondertan Wondertan transferred this issue from celestiaorg/celestia-node Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: TODO
Development

No branches or pull requests

4 participants