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

Keypers crash when started before first keyper set activation #453

Open
jannikluhn opened this issue Jun 12, 2024 · 0 comments
Open

Keypers crash when started before first keyper set activation #453

jannikluhn opened this issue Jun 12, 2024 · 0 comments

Comments

@jannikluhn
Copy link
Contributor

When the keypers are started before the first keyper set gets active, they crash with an error like the following:

Error: could not retrieve keyper set index at block 10275942: VM execution error.
could not retrieve keyper set index at block 10275942: VM execution error.

This is because they try to fetch the current keyper set from the keyper set manager (see here), but the contract reverts if the given block number is older than the first activation block number (see here).

To fix this we'd ideally catch the error "NoActiveKeyperSet" and handle it appropriately. Unfortunately, the go contract bindings don't yet support custom error types (see here). One workaround could be to check if there's at least one keyper set and if its activation block number is earlier than the given value.

Note that this issue is much less critical than it might appear: We typically add a dummy keyper set with a single keyper as the first keyper set. Its activation block number doesn't really matter, so we can choose it much earlier than the one of the first real keyper set (maybe even in the past) to work around this issue.

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

No branches or pull requests

1 participant