-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
feature 🚀New implemented featureNew implemented feature
Description
Why
We want to allow the discovery of available aggregators in a Mithril network by the client. This will allow a more decentralized, reliable and scalable the network, and ease of use for the end users
What
Create an interface for a aggregator discovery mechanism and use a first simple implementation in the client.
How
Create the aggregator discoverer
- Create a new
internal/mithril-aggregator-discoverycrate - Create a
AggregatorDiscoverertrait which gives access to a list of aggregator endpoints (given Cardano network and expected capabilities of the aggregator -needs to be specified, can be a type of signed entity or the type of proof in the certificate chain, or is the aggregator a leader-) and returns an error otherwise - Implement a centralized aggregator discoverer based on the
networks.jsonfile at the root of the repository - Implement the test doubles
- Implement an aggregator discoverer with shuffling
- Implement an aggregator discoverer with capabilities matching
Use the aggregator discoverer in the client
- In the client library:
- Replace
newfunction to the client builder which takes anAggregatorDiscoveryTypeenum (Automatic(MithrilNetwork)orUrl(String)) - Add a
with_capabilitiesto the client builder - Add a
with_genesis_verification_keyto the client builder which takes anGenesisVerificationKeyDiscoveryTypeenum (Automatic(MithrilNetwork)-later- andHex(String)) - If no matching aggregator is found, the build fails.
- Deprecate the
aggregatorfunction
- Replace
- In the client CLI:
- Add a
aggregator discoverycommand intools(list the available aggregators) - Add an expansion of
AGGREGATOR_ENDPOINT=autoto use the automatic aggregator discovery (no guarantee to use the same aggregator for 2 distinct command calls) - No breaking change in the commands API
- Add a
Documentation
- Update CI workflows
- Update examples
- Update documentation
- Document how to add a new aggregator in the discovery for a network
- Publish manually the first version of the crate on crates.io + setup crate owner (@jpraynaud)
Later
- In a follower aggregator, use the auto discovery for the chain synchronization to be able to match the capabilities of the aggregator (e.g. synchonize on a certificate chain with the same proof type)
- Can we make an auto-configuration also for the verification keys and the other parameters of the client?
- Implement a discoverer with SRV records (see CIP-0155)
- Implement a discoverer that queries multiple discoverers
Metadata
Metadata
Assignees
Labels
feature 🚀New implemented featureNew implemented feature