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: keep alternative blocks in LMDB #5524

Merged
merged 1 commit into from Jul 24, 2019

Conversation

moneromooo-monero
Copy link
Collaborator

@moneromooo-monero moneromooo-monero commented May 8, 2019

Alternative blocks are cleared on startup unless --keep-alt-blocks
is passed on the command line

Alternative blocks are cleared on startup unless --keep-alt-blocks
is passed on the command line
@hyc
Copy link
Collaborator

@hyc hyc commented May 8, 2019

Any reason not to do this by default? Is there a bloat risk? If alt blocks are only stored in RAM for now, isn't there already a bloat risk?

@moneromooo-monero
Copy link
Collaborator Author

@moneromooo-monero moneromooo-monero commented May 8, 2019

Blocks are small, and the current code does not keep them, which means any reorg failure due to this will be cleared by a restart. I did wonder about making this the default, but then thought that it's an unbounded set, even if blocks are small. I'm open to changing the default if there's support for it.

@moneromooo-monero
Copy link
Collaborator Author

@moneromooo-monero moneromooo-monero commented May 8, 2019

"Blocks" here really means blocks, not blocks plus their transactions. So, small.

@Mitchellpkt
Copy link

@Mitchellpkt Mitchellpkt commented May 8, 2019

Thanks, this is great! Will update the Noncesense archival network to stash alt blocks this way. We really appreciate this feature.

If a transaction (/hash) shows up in an alt block but not a main block, will it be recoverable/retrievable this way? Would be convenient for post-mortem analysis, comparing key images <> ring members.

@moneromooo-monero
Copy link
Collaborator Author

@moneromooo-monero moneromooo-monero commented May 8, 2019

It will not.

@moneromooo-monero
Copy link
Collaborator Author

@moneromooo-monero moneromooo-monero commented May 8, 2019

Actually... it might. I think the tx will stay in the txpool for a bit, then end up dropped after 7 days. So if you're quick enough, you should find it.

hyc
hyc approved these changes Jul 24, 2019
@luigi1111 luigi1111 merged commit 06b8f29 into monero-project:master Jul 24, 2019
6 of 10 checks passed
luigi1111 added a commit that referenced this issue Jul 24, 2019
06b8f29 blockchain: keep alternative blocks in LMDB (moneromooo-monero)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants