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

BlockChain module problems #70

Open
johningve opened this issue Jul 1, 2022 · 0 comments
Open

BlockChain module problems #70

johningve opened this issue Jul 1, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request performance

Comments

@johningve
Copy link
Member

I noticed that there are some problems with the BlockChain module:

First, PruneToHeight only removes entries from the blockAtHeight map, not the blocks map, so blocks are never entirely removed.

Second, the Get method requests a block from any replica. If one replica responds, it will store the requested block in the maps. This could be problematic because the entry in blockAtHeight for height h might be overwritten by a malicious replica. This could for example be done by sending an invalid vote referencing a block that the malicious replica has created. The block will be fetched before the vote is invalidated. If this block specifies view h, it will be stored in blockAtHeight for height h. I don't think this is a threat to consensus, but it interferes with the detection of forked blocks and may cause blocks to remain unpruned.

Third, it might be nice to be able to configure how many blocks should be kept in memory.

@johningve johningve self-assigned this Jul 1, 2022
@meling meling added enhancement New feature or request performance labels Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

No branches or pull requests

2 participants