SKALE-4096 add more logs

parent 416359cc
...@@ -532,7 +532,6 @@ vector <string> calculateAllBlsPublicKeys(const vector <string> &public_shares) ...@@ -532,7 +532,6 @@ vector <string> calculateAllBlsPublicKeys(const vector <string> &public_shares)
public_share.Z = libff::alt_bn128_Fq2::one(); public_share.Z = libff::alt_bn128_Fq2::one();
public_values[j] = public_values[j] + public_share; public_values[j] = public_values[j] + public_share;
} }
} }
......
...@@ -392,7 +392,7 @@ int calc_public_shares(const char *decrypted_coeffs, char *public_shares, ...@@ -392,7 +392,7 @@ int calc_public_shares(const char *decrypted_coeffs, char *public_shares,
ret = 1; ret = 1;
} catch (...) { } catch (...) {
LOG_ERROR("Unknown throwable"); LOG_ERROR("Unknown throwable");
ret = 1; ret = 2;
} }
clean: clean:
......
...@@ -316,9 +316,11 @@ void trustedSetSEK(int *errStatus, char *errString, uint8_t *encrypted_sek) { ...@@ -316,9 +316,11 @@ void trustedSetSEK(int *errStatus, char *errString, uint8_t *encrypted_sek) {
(uint8_t *)aes_key_hex, &dec_len); (uint8_t *)aes_key_hex, &dec_len);
if (status == 0x3001) { if (status == 0x3001) {
LOG_ERROR("Could not decrypt LevelDB storage! \n" const char errorMessage [] = "Could not decrypt LevelDB storage! \n"
"If you upgraded sgxwallet software or if you are restoring from backup, please run sgxwallet with -b flag and " "If you upgraded sgxwallet software or if you are restoring from backup, please run sgxwallet with -b flag and "
"pass your backup key."); "pass your backup key.";
snprintf(errString, BUF_LEN, errorMessage);
LOG_ERROR(errorMessage);
} }
CHECK_STATUS2("sgx unseal SEK failed with status %d"); CHECK_STATUS2("sgx unseal SEK failed with status %d");
...@@ -360,8 +362,6 @@ void trustedSetSEKBackup(int *errStatus, char *errString, ...@@ -360,8 +362,6 @@ void trustedSetSEKBackup(int *errStatus, char *errString,
LOG_INFO("SGX call completed"); LOG_INFO("SGX call completed");
} }
void trustedGenerateEcdsaKey(int *errStatus, char *errString, void trustedGenerateEcdsaKey(int *errStatus, char *errString,
uint8_t *encryptedPrivateKey, uint64_t *enc_len, char *pub_key_x, char *pub_key_y) { uint8_t *encryptedPrivateKey, uint64_t *enc_len, char *pub_key_x, char *pub_key_y) {
LOG_INFO(__FUNCTION__); LOG_INFO(__FUNCTION__);
...@@ -1006,7 +1006,7 @@ void trustedGetPublicShares(int *errStatus, char *errString, uint8_t *encrypted_ ...@@ -1006,7 +1006,7 @@ void trustedGetPublicShares(int *errStatus, char *errString, uint8_t *encrypted_
CHECK_STATUS2("aes decrypt data - encrypted_dkg_secret failed with status %d"); CHECK_STATUS2("aes decrypt data - encrypted_dkg_secret failed with status %d");
status = calc_public_shares(decrypted_dkg_secret, public_shares, _t) != 0; status = calc_public_shares(decrypted_dkg_secret, public_shares, _t);
CHECK_STATUS("t does not match polynomial in db"); CHECK_STATUS("t does not match polynomial in db");
SET_SUCCESS SET_SUCCESS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment