EH-1: Humanize insufficient-gas fee-mismatch errors for end users (#371) #888
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic!888
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "verify/issue-371-fee-mismatch-user-copy"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When Keplr (or another extension) signs a fee far below the dApp envelope on LocalTerra, the UI now shows short retail copy instead of developer diagnostics (GitLab issue refs,
ulunaamounts,npm cihints, Station-specific steps).extensionSignedFeeGuard.tsand the cosmes patch throwEXTENSION_SIGNED_FEE_UNDERSHOOT_USER_MESSAGE; detailed diagnostics log toconsole.warn.humanizeTerraTxError.tsmaps legacy throws to the same retail copy.terraBroadcast.tsno longer bypasses humanization for fee-undershoot errors.Verification checklist
GitLab #127, shell commands, rawuluna, or gas unit valuesextensionSignedFeeGuard.test.ts,humanizeTerraTxError.test.ts(verbatim issue repro string),humanizeUserFacingError.test.tsEXTENSION_SIGNED_FEE_UNDERSHOOT_USER_MESSAGEin unit testsnpm cicosmesPatch127.test.ts—EXTENSION_SIGNED_FEE_UNDERSHOOT_USER_MESSAGEpresent;npm ci+ patch-package apply cleanbroadcastTerraExecuteContractssurfaces humanized copy (not raw diagnostic)terraBroadcast.test.ts— legacy diagnostic input →/Transaction fee mismatch//on LocalTerra, Keplr low gas limit, approve swapmake has-localterra→ not running; no.env.local). Automated tests cover the exact observed error string from the issue.Commands
Follow-ups
make setup-cloud-localterra) to close the browser QA loop for EH-1.changed the description
changed the description
Security review — MR !888
Commit reviewed:
630cacb79b35ff966eafcbb665896f36602d3ff1Scope: EH-1 / #371 — humanize extension signed-fee undershoot errors for end users (
extensionSignedFeeGuard.ts,humanizeTerraTxError.ts,terraBroadcast.ts, cosmesKeplrExtensionpatch, unit tests, docs).Outcome:
FINDINGS: 0medium+Summary: Security review: no medium+ findings on this diff.
This change reduces information disclosure by replacing developer diagnostics (GitLab refs,
uluna/gas amounts, shell hints) with a fixed retail string in thrown errors and UI paths (tryHumanizeTerraTxMessage,humanizeUserFacingError,TxResultAlert). Detailed fee/gas context is retained only inconsole.warn. Post-sign fee validation (EXTENSION_SIGNED_FEE_MIN_PERCENT= 95%) and broadcast blocking behavior are unchanged.Reviewed attack surfaces (no exploitable path found):
dangerouslySetInnerHTML).EXTENSION_SIGNED_FEE_UNDERSHOOT_PREFIX): Would at most map to the same generic retail message; no privilege or funds impact.Prior threads: None (first security review on this MR).
Inline findings: None.
added 74 commits
mainf8bde22b- Merge origin/main into verify/issue-371-fee-mismatch-user-copyCompare with previous version
Resolved merge conflicts with
origin/main:terraBroadcast.ts: kept main's split sign/broadcast recovery imports andisTerraTxTimeoutMessage; EH-1 humanization viatryHumanizeTerraTxMessageunchanged.humanizeTerraTxError.ts/ tests: retained retail fee-mismatch copy and prefix/user-message matching from #371; merged main's stricter negative assertions.extensionSignedFeeGuard.ts: removed duplicateEXTENSION_SIGNED_FEE_UNDERSHOOT_USER_MESSAGEexport from auto-merge.AGENTS_TERRACLASSIC_GAS.md: combined #371 UI-copy notes with main's cosmes patch SHA-256 guard (#367)..cosmes-patch-sha256: updated to match the #371 cosmes patch (retail throw inKeplrExtension).Sanity: 59 targeted unit tests passed (
extensionSignedFeeGuard,humanizeTerraTxError,humanizeUserFacingError,terraBroadcast,cosmesPatch127).Security review — MR !888
Commit reviewed:
f8bde22b5e7aa37e625bb9c4f8d7a6c873bd087aScope: EH-1 / #371 — humanize extension signed-fee undershoot errors for end users (
extensionSignedFeeGuard.ts,humanizeTerraTxError.ts, cosmesKeplrExtensionpatch, unit tests, docs).terraBroadcast.tsunchanged on this diff (humanization already routes viatryHumanizeTerraTxMessageonmain).Outcome:
FINDINGS: 0medium+Summary: Security review: no medium+ findings on this diff.
This change reduces client-side information disclosure by replacing developer diagnostics (GitLab refs,
uluna/gas amounts, shell hints) with a fixed retail string in thrown errors and UI paths (tryHumanizeTerraTxMessage,humanizeUserFacingError,TxResultAlert). Detailed fee/gas context is retained only inconsole.warn. Post-sign fee validation (EXTENSION_SIGNED_FEE_MIN_PERCENT= 95%) and broadcast blocking interraWalletSignTxRaw/ patchedKeplrExtensionare unchanged.Reviewed attack surfaces (no exploitable path found):
dangerouslySetInnerHTML).EXTENSION_SIGNED_FEE_UNDERSHOOT_PREFIX): Would at most map to the same generic retail message; no privilege or funds impact.isDefiniteBroadcastRejection: Fee-guard failures still throw before broadcast; generic message does not weaken rejection classification vs the prior diagnostic throw.Prior threads: Review on
630cacb(pre–origin/mainmerge) — same conclusion; re-reviewed current HEADf8bde22after merge.Inline findings: None.
mentioned in commit
87b6f9a3da