Closed jpraynaud closed 8 months ago
Ping @abailly-iohk, @scarmuega, @falcucci
@scarmuega, @falcucci, following our discussion, here are some information on the way dependencies of the ChainObserver
work.
In order to test the new PallasObserver
, you will need to update the dependency injection in the aggregator and signer.
I'd suggest that you make the change in 2 phases:
Era ReaderAdapter
+1 for working on this issue. I am following this because once the switch is done it allows docker set ups to remove the cardano-cli dependency from the container. This dependency has been annoying me a bit as it currently means you either have to
Both ways do work, but it'll be much more elegant when the cardano-cli isn't needed anymore.
Keep up the great work! 👏 ~Robin
Why
Today, the Mithril signer and aggregator communicate with the Cardano node with the Cardano cli which acts as a proxy for providing some of the information essential to running a Mithril network. This communication is not optimal, and we could communicate directly with the Cardano node instead.
What
The Mithril signer and aggregator (will) rely on some information that are provided by the Cardano node :
The signer and aggregator rely on an a common
ChainObserver
trait:That is currently implemented by the
CliObserver
.We would like to have a new implementation
CardanoObserver
of this trait that:A good candidate library to implement this is
pallas
andpallas-network
that already has an implementation of the mini-protocols.Note: The signer and aggregator nodes already have a defined configuration parameter with the path of the Cardano node socket
cardano_node_socket_path
:How
get_current_epoch
in Pallas chain observerget_current_datums
in Pallas chain observerget_current_stake_distribution
in Pallas chain observerget_current_kes_period
in Pallas chain observerChainObserver
trait is fully implemented by the Pallas chain observerpallas
can give access to the aforementioned information from the Cardano node (all of subset of them)CardanoObserver
for the current version of theChainObserver
trait without relying on the Cardano cliCardanoObserver
and activate the dependency with a specific configuration (e.g. by adding a new adapter configuration parameter, a bit like theera_reader_adapter_type
in signer and aggregator)ChainObserver
trait, add them (with blanket implementation to not break currentCliObserver
)?Acceptance Criteria