Skip to content

fix(gnovm): remove duplicated escaped-hash delete in DelObject#5899

Merged
thehowl merged 3 commits into
gnolang:masterfrom
omarsy:pr/dedup-escaped-hash-delete
Jul 10, 2026
Merged

fix(gnovm): remove duplicated escaped-hash delete in DelObject#5899
thehowl merged 3 commits into
gnolang:masterfrom
omarsy:pr/dedup-escaped-hash-delete

Conversation

@omarsy

@omarsy omarsy commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

defaultStore.DelObject deletes the escaped object hash from the IAVL store twice, via two identical back-to-back blocks (the duplicate was introduced in #5415). This removes the redundant second block.

// delete escaped hash from iavl.
if oo.GetIsEscaped() && ds.iavlStore != nil {
    key := []byte(oid.String())
    ds.iavlStore.Delete(ds.gctx, key)
    if trace.StoreGasEnabled {
        trace.Store("IAVL_DEL_ESCAPED", 0, key, 0, "none")
    }
}
// delete escaped hash from iavl.   <-- removed: exact duplicate of the above
// if oo.GetIsEscaped() && ds.iavlStore != nil {
//     key := []byte(oid.String())
//     ds.iavlStore.Delete(ds.gctx, key)
// }

Impact

The second delete is a no-op for state, and gas-neutral: the cache store's per-key write dedup refunds the repeated charge, so this is dead code and wasted node work only. No gas goldens change.

Changed files

  • gnovm/pkg/gnolang/store.go — bug fix (dead-code removal), 5 lines deleted.

Verification

  • go test ./gno.land/pkg/sdk/vm/ -run Gas
  • go test ./gno.land/pkg/integration/ -run TestTestdata ✅ (no golden changes)
  • go test ./gnovm/pkg/gnolang/ -run Files -test.short

🤖 Generated with Claude Code

@github-actions github-actions Bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Jul 3, 2026
@Gno2D2 Gno2D2 added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Jul 3, 2026
@Gno2D2

Gno2D2 commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

🛠 PR Checks Summary

All Automated Checks passed. ✅

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

🟢 Maintainers must be able to edit this pull request (more info)
🟢 Pending initial approval by a review team member, or review from tech-staff

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: omarsy/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

Pending initial approval by a review team member, or review from tech-staff

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 Not (🔴 Pull request author is a member of the team: tech-staff)

Then

🟢 Requirement satisfied
└── 🟢 If
    ├── 🟢 Condition
    │   └── 🟢 Or
    │       ├── 🟢 User davd-gzl already reviewed PR 5899 with state APPROVED
    │       ├── 🔴 At least 1 user(s) of the team tech-staff reviewed pull request
    │       └── 🔴 This pull request is a draft
    └── 🟢 Then
        └── 🟢 Not (🔴 This label is applied to pull request: review/triage-pending)

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

@omarsy omarsy requested review from jaekwon, ltzmaxwell and thehowl July 3, 2026 17:22
@omarsy omarsy force-pushed the pr/dedup-escaped-hash-delete branch from ec62b79 to eaa133d Compare July 3, 2026 18:00
@omarsy omarsy requested a review from a team July 3, 2026 18:01
DelObject deleted the escaped object hash from the IAVL store twice,
via two identical back-to-back blocks (introduced in gnolang#5415). The
second delete is a no-op for state and gas-neutral (the cache store's
write dedup refunds the repeated charge), so this is dead code and
wasted node work only. No gas goldens change.
@omarsy omarsy force-pushed the pr/dedup-escaped-hash-delete branch from eaa133d to f003f39 Compare July 3, 2026 18:21
@Gno2D2 Gno2D2 removed the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Jul 3, 2026
@thehowl thehowl merged commit 02509c6 into gnolang:master Jul 10, 2026
90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 🤖 gnovm Issues or PRs gnovm related

Projects

Development

Successfully merging this pull request may close these issues.

4 participants