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: add migration to resolve deserialization issue with cardano_transactions_signing_config #1971

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

dlachaume
Copy link
Collaborator

@dlachaume dlachaume commented Oct 1, 2024

Content

This PR includes a fix for the issue introduced by the merged PR #1964, which added a migration to the epoch_setting table.
The cardano_transactions_signing_config column had a JSON default value that was not deserializable by serde.
This PR adds a new migration to correct this by providing a deserializable default value.

Error on testing-preview aggregator:

thread 'main' panicked at /home/runner/work/mithril/mithril/internal/mithril-persistence/src/sqlite/cursor.rs:35:76:
called `Result::unwrap()` on an `Err` value: InvalidData("Could not turn string '{}' to CardanoTransactionsSigningConfig. Error: missing field `security_parameter` at line 1 column 2")

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Issue(s)

Relates to #1924

@dlachaume dlachaume self-assigned this Oct 1, 2024
Copy link

github-actions bot commented Oct 1, 2024

Test Results

    4 files  ±0     54 suites  ±0   9m 44s ⏱️ -1s
1 311 tests +1  1 311 ✅ +1  0 💤 ±0  0 ❌ ±0 
1 522 runs  +1  1 522 ✅ +1  0 💤 ±0  0 ❌ ±0 

Results for commit 0939f56. ± Comparison against base commit e60e0c5.

♻️ This comment has been updated with latest results.

Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

You could probably squash the commits.

Comment on lines 582 to 588
// Temporary fix, should be removed
// Replace empty JSON values '{}' injected with Migration #28
let cardano_signing_config = self
.get_signed_entity_config()?
.cardano_transactions_signing_config;
#[allow(deprecated)]
epoch_settings_store.replace_cardano_signing_config_empty_values(cardano_signing_config)?;
Copy link
Member

@jpraynaud jpraynaud Oct 1, 2024

Choose a reason for hiding this comment

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

Maybe you can put this code in a dedicated block or add new lines before/after?

Co-authored-by: Sébastien Fauvel <sfauvel@users.noreply.github.com>
* mithril-aggregator from `0.5.71` to `0.5.72`
@sfauvel sfauvel force-pushed the ensemble/fix-epoch-setting-migration branch from 8773712 to 0939f56 Compare October 1, 2024 14:20
@sfauvel sfauvel temporarily deployed to testing-preview October 1, 2024 14:28 — with GitHub Actions Inactive
@sfauvel sfauvel temporarily deployed to testing-sanchonet October 1, 2024 14:28 — with GitHub Actions Inactive
@dlachaume dlachaume merged commit 22dde1e into main Oct 1, 2024
45 checks passed
@dlachaume dlachaume deleted the ensemble/fix-epoch-setting-migration branch October 1, 2024 14:54
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.

4 participants