Repository navigation
Conversation
|
this PR is ready for another review. I resolved the merge conflicts with the main branch (pushed fe4eb8e). |
|
this PR is ready for another review. I resolved the merge conflicts with the main branch (pushed 59199bf). |
59199bf to
29f82a4
Compare
|
Warning Possible malicious code: please review before merging. An automated security scan flagged files in this pull request that appear to contain malicious code. Code like this can run automatically when a project is opened in an editor or its dependencies are installed, so it could compromise the machine of anyone who checks out this branch. Automated scans can be wrong, so this may be a false positive. Maintainers: please review the flagged files carefully before merging, on GitHub in your browser rather than by checking out the branch. The malicious part is often hidden far off to the right of an ordinary-looking line, so scroll sideways through each file. @AgentX010: this pull request adds or changes these files, possibly without your knowledge. Malware like this spreads by adding itself to repositories on machines it has infected, so your machine might be compromised. Please undo these changes in this pull request, and don't open or run other projects on that machine until you've checked it. Flagged files at commit Only merge once you're confident these files are safe. ℹ️ Posted automatically by Drips Wave. Questions? Contact support@drips.network. |
Overview
This PR adds a bounded audit record for every published Lens price aggregate. Each record captures the inputs the aggregate used, the inputs it rejected and why, and the method plus its parameters, so a disputed price can be reconstructed for a past timestamp. Records are retrievable via the price route, and storage growth is bounded and documented.
Related Issue
Changes
🧾 Aggregate Audit Records
[MODIFY]
prisma/schema.prismaPriceAuditRecordmodel keyed to the published aggregate (network, pairKey, timestamp) with the method, method parameters, and a bounded input set.PriceAuditInputmodel for per-input entries: the referencedprice_pointsrow, whether it was used or rejected, and the rejection reason.networkpredicate on the audit lookups so the composite index is usable, matching theprice_pointsaccess pattern.[MODIFY]
src/routes/price.ts[MODIFY]
docs/database-schema.mdVerification Results
PriceAuditInputstores used/rejected flag and rejection reasonsrc/routes/price.tsretrieves the record for a past timestampdocs/database-schema.mdCloses #245