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

fix(vn scanning): only scan since last scan and restart accepted contracts #4252

Merged
merged 6 commits into from
Jun 30, 2022

Conversation

brianp
Copy link
Contributor

@brianp brianp commented Jun 30, 2022

Description

The VN was starting the scanning from the genesis block because it had no mechanism for restarting already accepted contracts when restarting the VN. To fix this we're recording all the contracts we're a part of and their states. Already accepted contracts will persist their constitution properties for reference when restarting the side chain later on.
Additionally we're storing the last scanned block information so we can restart scanning from the place you left off.

I've removed the block height interval check. It seemed useless when we're using a sleep interval and may at some point cause us to miss a contract if it was done under very short expiry times.

Motivation and Context

The VN is getting better with how it's managing everything but restarts caused problems that we can now solve via global db.

How Has This Been Tested?

Integration tests still pass (although we could now validate the stored state of found contracts)
Manually

When restarting already accepted contracts we need to have all the
constitution rules, which means we need to store them when we first scan
the consitution proposal.
@aviator-app aviator-app bot merged commit 43b4a53 into tari-project:development Jun 30, 2022
@brianp brianp deleted the vn-scanning-improvements branch February 13, 2023 20:50
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

2 participants