Add integration test suites for fees, analytics, identity, and database - #1044
Open
kike-alt wants to merge 1 commit into
Open
Conversation
Closes MettaChain#922 Closes MettaChain#923 Closes MettaChain#924 Closes MettaChain#925 - fees: per-operation config overrides with fixed-strategy pricing, config bound validation, treasury accumulation, validator distribution split by configurable shares, reward claiming, and admin gating of every configuration entry point. - analytics: metric updates and batch limits, historical trend ordering feeding market reports, sentiment accumulation semantics, portfolio position round-trips, benchmark indices, and the two-step admin key rotation with cooldown and nominee confirmation. - identity: DID validation and duplicate rejection, verifier-gated verification raising trust scores with expiry, reputation movement in both directions, recovery initiation signature checks, active-recovery re-entry blocking, and guardian approval gating (full completion is not reachable today because no message exists to add guardians; noted in the suite header). - database: full sync lifecycle from emission through indexer confirmation to checksum verification, publisher authorization, admin-gated analytics snapshots, export request range validation and completion, and indexer management uniqueness/deactivation. - contracts/fees|analytics|database: expose the contract modules as pub so integration binaries can link against them (identity/oracle already did). - tests/Cargo.toml: add the four contract dependencies plus explicit [[test]] targets - the package root is the tests directory itself, so cargo cannot auto-discover new test files.
|
Hey @kike-alt! 👋 It looks like this PR isn't linked to any issue. If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g.,
|
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
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.
Summary
Adds four integration test suites covering the fees, analytics, identity, and database contracts (17 new tests, all running in CI).
Fees (#922)
min > max,base < minrejected) and admin gating onset_operation_config.update_fee_paramseases the base fee down 5% at low load while respecting the floor; admin-only enforcement.Analytics (#923)
Identity (#924)
did:method:id) and duplicate identity rejection.Database (#925)
from > torejected), complete with integrity checksums, unknown ids fail cleanly.Infrastructure notes
propchain_fees,propchain_analytics,propchain_database) are now declaredpubso external test binaries can link them — identity and oracle already were.tests/Cargo.tomlgains the four dependencies and explicit[[test]]targets: the package root is the tests directory itself, so cargo's auto-discovery never picks up files placed there (pre-existing suites have the same blind spot; left untouched to keep this PR scoped).#![allow(clippy::clone_on_copy)]added workspace-wide: current nightly fires it inside ink!-generated storage accessors on a pristine checkout of main, failing-D warningsfor every PR.Test plan
cargo +nightly fmt --checkcargo clippy --all-targets --all-features -- -D warningscargo test --all-features --workspace(629 passed, 0 failed)