Deprecate use of was_storage_removed and was_state_removed stored Postgres functions #101
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
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/ipld-eth-server#101
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?
These stored functions were needed prior to https://github.com/vulcanize/go-ethereum/pull/58 in order to properly consider "Removed" node types when querying our state and storage_cids tables for the state of a leaf node with a given leaf key at a given height/hash. Now that we have leaf keys stored for "Removed" node types, we no longer need to use these inefficient and messy functions and instead the "Removed" nodes are considered in the same way as a "Leaf" node when querying against leaf keys.
Related to #95 , #94 , #98
E.g. instead of
We can just do
This will return the latest node entry for a specific leaf key, including "Removed" types. We can check if the
node_type
returned is "Removed" and if it is handle the zero value appropriately. Alternatively, if we want to get the latest state of a node value at a leaf_key (last value before it was "Removed"), we just need to add a condition to the query to exclude "Removed" type nodes from the considered set.I.e.
The above will return the latest "Leaf" type node entry for a given leaf key at a given hash/height, ignoring "Removed" typed nodes.
Closed in https://github.com/vulcanize/ipld-eth-server/pull/98