Skip to content

Backward compatibility with latest release is broken #2730

@jpraynaud

Description

@jpraynaud

Why

We have noticed that the backward compatibility of the client CLI is broken between the unstable and the latest releases:

A panic occurs with the following stack trace:

Oct 07 18:19:51.719 DEBG Mithril Client CLI version: 0.12.30+6a7107e
Oct 07 18:19:51.719 DEBG Run Mode: dev
Oct 07 18:19:51.719 DEBG Reading configuration file './config/dev.json'.
src: MithrilCertificateVerifier
 Oct 07 18:19:51.726 DEBG New MithrilCertificateVerifier created
src: AggregatorHTTPClient
 Oct 07 18:19:51.731 DEBG GET url='http://localhost:8080/aggregator/artifact/snapshots'.
 Oct 07 18:19:51.731 DEBG Prepare request with version: 0.1.51
 Oct 07 18:19:51.732 WARN OpenAPI version may be incompatible, please update Mithril client library to the latest version., client_version: 0.1.51, aggregator_version: 0.1.53
{"mithril_client_cli_version":"0.12.30+6a7107e"}
Oct 07 18:19:51.738 DEBG Mithril Client CLI version: 0.12.30+6a7107e
Oct 07 18:19:51.738 DEBG Run Mode: dev
Oct 07 18:19:51.738 DEBG Reading configuration file './config/dev.json'.
src: MithrilCertificateVerifier
 Oct 07 18:19:51.746 DEBG New MithrilCertificateVerifier created
src: AggregatorHTTPClient
 Oct 07 18:19:51.752 DEBG GET url='http://localhost:8080/aggregator/artifact/snapshot/eea51647e12b78e862a491895a762f1f2849f0d70c8921404e5f8bc03f8da45b'.
 Oct 07 18:19:51.752 DEBG Prepare request with version: 0.1.51
Error: Internal error of the Aggregator

Caused by:
    invalid type: map, expected a string at line 1 column 199
    
    Stack backtrace:
       0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
       1: mithril_aggregator::database::record::signed_entity::<impl core::convert::TryFrom<mithril_aggregator::database::record::signed_entity::SignedEntityRecord> for mithril_common::messages::snapshot::SnapshotMessage>::try_from
       2: <mithril_aggregator::services::message::MithrilMessageService as mithril_aggregator::services::message::MessageService>::get_snapshot_message::{{closure}}
       3: <warp::filter::and_then::AndThenFuture<T,F> as core::future::future::Future>::poll
       4: <warp::filter::or::EitherFuture<T,U> as core::future::future::Future>::poll
       5: <warp::filter::or::EitherFuture<T,U> as core::future::future::Future>::poll
       6: <warp::filter::and::AndFuture<T,U> as core::future::future::Future>::poll
       7: <warp::filter::recover::RecoverFuture<T,F> as core::future::future::Future>::poll
       8: <warp::filter::and::AndFuture<T,U> as core::future::future::Future>::poll
       9: <warp::filters::cors::internal::WrappedFuture<F> as core::future::future::Future>::poll
      10: <warp::filters::log::internal::WithLogFuture<FN,F> as core::future::future::Future>::poll
      11: <hyper_util::service::oneshot::Oneshot<S,Req> as core::future::future::Future>::poll
      12: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_catch
      13: <hyper_util::server::conn::auto::UpgradeableConnection<I,S,E> as core::future::future::Future>::poll
      14: <hyper_util::server::graceful::GracefulConnectionFuture<C,F> as core::future::future::Future>::poll
      15: <warp::server::run::Graceful<Fut> as warp::server::run::Run>::run::{{closure}}::{{closure}}
      16: tokio::runtime::task::core::Core<T,S>::poll
      17: tokio::runtime::task::harness::Harness<T,S>::poll
      18: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
      19: tokio::runtime::scheduler::multi_thread::worker::Context::run
      20: tokio::runtime::context::scoped::Scoped<T>::set
      21: tokio::runtime::context::runtime::enter_runtime
      22: tokio::runtime::scheduler::multi_thread::worker::run
      23: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
      24: tokio::runtime::task::core::Core<T,S>::poll
      25: tokio::runtime::task::harness::Harness<T,S>::poll
      26: tokio::runtime::blocking::pool::Inner::run
      27: std::sys::backtrace::__rust_begin_short_backtrace
      28: core::ops::function::FnOnce::call_once{{vtable.shim}}
      29: std::sys::pal::unix::thread::Thread::new::thread_start
      30: start_thread
                 at ./nptl/pthread_create.c:447:8
      31: clone3
                 at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0

Stack backtrace:
   0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
   1: mithril_client::snapshot_client::SnapshotClient::get::{{closure}}
   2: mithril_client_cli::commands::cardano_db::show::CardanoDbShowCommand::execute::{{closure}}
   3: mithril_client_cli::commands::cardano_db::CardanoDbCommands::execute::{{closure}}
   4: mithril_client::ArtifactCommands::execute::{{closure}}
   5: tokio::runtime::park::CachedParkThread::block_on
   6: tokio::runtime::context::runtime::enter_runtime
   7: tokio::runtime::runtime::Runtime::block_on
   8: mithril_client::main
   9: std::sys::backtrace::__rust_begin_short_backtrace
  10: std::rt::lang_start::{{closure}}
  11: std::rt::lang_start_internal
  12: main
  13: __libc_start_call_main
             at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  14: __libc_start_main_impl
             at ./csu/../csu/libc-start.c:360:3
  15: _start

What

Investigate and fix the source of incompatibility.

How

  • Investigate the source of incompatibility
  • Fix the source of incompatibility
  • Run a successful backward compatibility test

Metadata

Metadata

Labels

bug ⚠️Something isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions