Fix state leaf key removed query #99
Labels
No Label
bug
critical
documentation
duplicate
enhancement
Epic
good first issue
help wanted
Integration tests
invalid
question
v5
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/ipld-eth-server#99
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
The issue of storage key removal is fixed in https://github.com/vulcanize/ipld-eth-server/pull/83/ but the same issue exists for state key removal.
Query to fetch storage leaf node
8a105812c2/pkg/eth/ipld_retriever.go (L146-L160)
Example:
The above query will fetch the latest leaf node and this is passed on to
was_storage_removed
This is the code before it was fixed.
8a105812c2/db/migrations/00014_create_stored_functions.sql (L4-L17)
This will always return false as the
height
inwas_storage_removed
is theblock_number
passed , soheight
=block_number
butblock_number > height
condition will evaluate to false.This is fixed for the storage node in the master branch.
000c0ef066/db/migrations/00014_create_stored_functions.sql (L11-L14)
Added a fix for state node https://github.com/vulcanize/ipld-eth-server/pull/98
Due to this incorrect query
removed
value was false and we were trying to decode nil value which lead to panic000c0ef066/pkg/eth/ipld_retriever.go (L403-L409)
Fixed in https://github.com/vulcanize/ipld-eth-server/issues/101