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

Leverage "reorg_cache" when hydrating compact blocks #2480

Open
antiochp opened this issue Jan 28, 2019 · 0 comments
Open

Leverage "reorg_cache" when hydrating compact blocks #2480

antiochp opened this issue Jan 28, 2019 · 0 comments

Comments

@antiochp
Copy link
Member

The reorg cache is used in the case of an actual reorg, to allow the local txpool to be put back in a consistent state. We do not currently take advantage of it in the case of a short losing fork.

Say we have [tx1] in the txpool and we accept block B (containing the kernel for tx1), this evicts tx1 from the txpool.
If we then see block B' (a fork at same height as B), also containing the kernel for tx1
we don't see tx1 in the txpool and we currently go ask a peer for the full block B'.

But - we do have tx1 in the reorg cache, so we could go look for it in there (I think this would be safe to do).

We use the reorg cache to keep the txpool consistent, we don't currently take advantage of it directly when accepting blocks.

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

1 participant