contrib: negative cache, upgrade compatibility, tx rejection explainer, relayer fallback - #382
Closed
ebubechi-ihediwa wants to merge 1 commit into
Closed
Conversation
…ility, tx rejection explainer, and relayer fallback Closes Vellar-Wallet#285, Vellar-Wallet#107, Vellar-Wallet#23, Vellar-Wallet#80
|
@ebubechi-ihediwa Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@ebubechi-ihediwa is attempting to deploy a commit to the david's projects Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
Closing to reopen from a renamed branch (contrib/mock-route-suites). |
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
Four self-contained mock route suites under
contrib/routes/, each addressing one assigned issue:contrib/routes/issue-285-negative-cache-lookup-suite/: mock contract-hash lookup service with negative caching (30s TTL) for unknown-hash results, a metrics endpoint reporting negative cache hit rate, and the TTL rationale documented in the suite's README.contrib/routes/upgrade-compatibility-suite/:current-versionandcheck-upgradeendpoints comparing a proposed wasm hash's metadata (storage schema version, function signatures) against the currently deployed one, with a sample dataset containing one compatible and one incompatible upgrade pair.contrib/routes/issue-23-tx-rejection-explainer-suite/: evaluates a proposed transaction's authorization contexts against the same rules ascontrib/contracts/safety-policy, naming the specific rule responsible for a rejection (max-transfer-amount,non-transfer-call,unknown-interaction,no-interactions) instead of a generic failure, and honestly reportingunknownwhen an interaction can't be classified rather than implying safety. The README documents how divergence from the on-chain contract is prevented.contrib/routes/relayer-fallback/: mock relayer submission route that falls back to a secondary path when the primary fails (forceable via a request flag for testing), reporting which path handled the submission.Each suite is fully self-contained (its own
route.mjs/.test.mjs/README.md), touches nothing outsidecontrib/, and has no dependency on the pnpm workspace orturbopipeline.Test plan
Ran each suite's test script directly (all pass) and checked formatting with the pinned Prettier config:
node contrib/routes/issue-285-negative-cache-lookup-suite/route.test.mjsnode contrib/routes/upgrade-compatibility-suite/route.test.mjsnode contrib/routes/issue-23-tx-rejection-explainer-suite/route.test.mjsnode contrib/routes/relayer-fallback/route.test.mjsprettier --checkon all new filesCloses #285
Closes #107
Closes #23
Closes #80