-
Notifications
You must be signed in to change notification settings - Fork 52
feat: prepare aggregator client usage in mithril client and publication #2842
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
Merged
Alenar
merged 17 commits into
main
from
djo/2827/prepare_aggregator_client_usage_in_mithril-client
Dec 4, 2025
Merged
feat: prepare aggregator client usage in mithril client and publication #2842
Alenar
merged 17 commits into
main
from
djo/2827/prepare_aggregator_client_usage_in_mithril-client
Dec 4, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allow to see logs in failing tests without having to explicitly show the logs content in the assertion error message.
…hing failure Before the client would crash if the api version could not be computed, now it will only log an error.
To remove clutter in tests
by using `when.any_request()` on the mock server, since the pathing is tested by the happy path tests (such as the `ok_200` tests).
… v2 snapshots List can be done using an `EpochSpecifier` in oder to scope it to an epoch, the latest epoch (with or without and offest)
…stribution Getting one item can be done using an `EpochSpecifier` in oder to scope it to an epoch, the latest epoch (with or without and offest)
8900a40 to
da3599b
Compare
jpraynaud
approved these changes
Dec 4, 2025
Member
jpraynaud
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
internal/mithril-aggregator-client/src/query/get/get_cardano_transaction_proof.rs
Outdated
Show resolved
Hide resolved
internal/mithril-aggregator-client/src/query/get/get_cardano_transaction_proof.rs
Outdated
Show resolved
Hide resolved
By sending them in the client directly instead of in the queries. Queries can add context throught additional key/value pair by overloading the `entry_log_additional_fields` method.
* mithril-aggregator-client from `0.1.3` to `0.1.4` * mithril-client from `0.12.35` to `0.12.36` * mithril-common from `0.6.31` to `0.6.32`
da3599b to
d376da3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Content
This PR add to the
mithril-aggregator-clientcrate all the query needed by themithril-clientlibrary. Allowing its upcoming usage and ensuring that everything is ready before a publication tocrates.io.Details
mithril-aggregator-clientNew GET queries:
GetAggregatorStatusQuery: call/statusGetCardanoDatabaseQuery: call/artifact/cardano-database/{hash}GetCardanoDatabaseListQuery: call/artifact/cardano-databaseorartifact/cardano-database/epoch/{specifier}GetCardanoStakeDistributionQuery: call/artifact/cardano-stake-distribution/{hash}orartifact/cardano-stake-distribution/epoch/{specifier}GetCardanoStakeDistributionsListQuery: call/artifact/cardano-stake-distributionsGetCardanoTransactionQuery: call/artifact/cardano-transaction/{hash}GetCardanoTransactionProofQuery: call/proof/cardano-transaction?transaction_hashes={hashes}withhashesbeing a comma separated listGetCardanoTransactionsListQuery: call/artifact/cardano-transactionsGetMithrilStakeDistributionQuery: call/artifact/mithril-stake-distribution/{hash}GetMithrilStakeDistributionsListQuery: call/artifact/mithril-stake-distributionsGetSnapshotQuery: call/artifact/snapshot/{hash}GetSnapshotsListQuery: call/artifact/snapshotsNew POST queries:
PostIncrementCardanoDatabaseAncillaryRestoredStatisticQuery: call/statistics/cardano-database/ancillary-files-restoredwithout a bodyPostIncrementCardanoDatabaseImmutablesRestoredStatisticQuery: call/statistics/cardano-database/immutable-files-restoredwith aCardanoDatabaseImmutableFilesRestoredMessagebody containing the number of restored filesPostIncrementCardanoDatabaseRestorationStatisticQuery: call either/statistics/cardano-database/complete-restorationorstatistics/cardano-database/partial-restorationdepending of the constructor called (no body supplied)PostIncrementSnapshotDownloadStatisticQuery: call/statistics/snapshotwith aSnapshotDownloadMessagebodyClient enhancements:
mithril-api-versionheader and without checking api version returned by the aggregator.entry_log_additional_fieldsmethod if they need to add context (such as some information extracted from the query body).{HTTP_VERB} {query_route}; aggregator={endpoint}, [optional additional key values from query])Misc:
/fromGetAggregatorFeaturesQueryroute, as this resulted in a//in the reworked entry debug logmithril-commonMemoryDrainForTestalso send messages to stdout for easier debugging in failing tests when asserting specific logs are emitted. Note: this allow removal of print of the full log in assertion messages since they are now always logged.Dummyimpl for some types used in aggregator client testsPre-submit checklist
Issue(s)
Relates to #2827