-
Notifications
You must be signed in to change notification settings - Fork 80
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
Error deleting validator #537
Comments
Hi @pablomendezroyo, it looks like you've hit an edge case whereby the slashing protection database is completely empty and an export of slashing protection data is attempted. The genesis validators root is created for the first time upon signing something or when importing slashing protection data. We will look at getting this tidied up, thanks for reporting. Please note, the key manager API is still in early access and so it is expected it may contain bugs until we are satisfied it is production-ready. |
Note for whoever implements this fix... We discussed adding the genesis validators root into the database before the first object is signed, e.g. at startup or when a validator is registered. However the GVR currently comes in via the signing request from the validator client. Although we could determine it, we don't really want to introduce this logic into web3signer if we can help it. Instead, we think outputting an empty The implementation in private IncrementalExporter createIncrementalExporter(final ByteArrayOutputStream outputStream) {
return slashingProtection.isPresent() && slashingProtection.hasDataToExport()
? slashingProtection.get().createIncrementalExporter(outputStream)
// Using no-op exporter instead of returning an optional so can use try with for closing
: new NoOpIncrementalExporter();
} |
The problem can be recreated by adding this (failing) test in @Test
public void deletingExistingKeyWithNoSlashingProtectionReturnDeleted() throws URISyntaxException {
createBlsKey("eth2/bls_keystore.json", "somepassword");
setupSignerWithKeyManagerApi(false);
callDeleteKeystores(composeRequestBody())
.then()
.contentType(ContentType.JSON)
.assertThat()
.statusCode(200)
.body("data[0].status", is("deleted"))
.and()
.body("slashing_protection", is(emptySlashingData));
} |
Context
/eth/v1/keystores
/eth/v1/keystores
Note the validator was imported without slashing protection data, it still was without slashing protection data at the time of trying to be deleted (the client was still syncing)
The error
Error when deleting keystores
The text was updated successfully, but these errors were encountered: