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

Remove optional height indexing interface #1896

Merged
merged 9 commits into from Aug 24, 2023

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

All VMs now implement height indexing - so we can add the methods to the VM interface.

How this works

Moves methods from the HeightIndexedChainVM interface to the `ChainVM interface.

How this was tested

CI

@@ -18,7 +18,7 @@ jobs:
with:
go-version: '~1.19.12'
check-latest: true
- uses: bufbuild/buf-setup-action@v1.23.1
- uses: bufbuild/buf-setup-action@v1.26.1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be factored out - but did this because the brew tap only includes the latest version

Comment on lines +111 to +112
ERROR_HEIGHT_INDEX_INCOMPLETE = 3;
ERROR_STATE_SYNC_NOT_IMPLEMENTED = 4;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: requires version bump

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the flipped values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We always just bump the rpcchainvm version anyways - so no need for compatibility at the proto level.

vms/proposervm/vm.go Outdated Show resolved Hide resolved
@StephenButtolph StephenButtolph added vm This involves virtual machines cleanup Code quality improvement labels Aug 24, 2023
@StephenButtolph StephenButtolph added this to the v1.10.9 milestone Aug 24, 2023
@StephenButtolph StephenButtolph self-assigned this Aug 24, 2023
@StephenButtolph StephenButtolph marked this pull request as ready for review August 24, 2023 16:09
// ErrIndexIncomplete is used to indicate that the VM is currently repairing its
// index.
//
// TODO: Remove after v1.11.x activates.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just reasoning aloud here: is this true even for the ProposerVM? I mean once we're sure that any VM will implement its height index, there won't be cases there proposerVM height index can be incomplete (following a successful initialization)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The index can still be repaired async until v1.11.x

Copy link
Contributor

@abi87 abi87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, apart from a couple of questions.

@StephenButtolph StephenButtolph merged commit 9851214 into dev Aug 24, 2023
16 checks passed
@StephenButtolph StephenButtolph deleted the remove-optional-interface branch August 24, 2023 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code quality improvement vm This involves virtual machines
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants