Consider adding pendingEffectiveAmount data to claim information #203
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
Epic
good first issue
hacktoberfest
hard fork
help wanted
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
soft fork
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
work in progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbrycrd#203
Loading…
Reference in a new issue
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?
Currently, we have a data field called EffectiveAmount which shows the current claim bid, including any tips and supports. During a claim takeover bid, the effective amount of the newly bid claim is set to 0 until the takeover completes. If another user tries to take over the vanity URL, they will only be aware of the current vanity claim bid, and not the pending one which could be outbidding theirs. Optimally, we would show the current and any pending claim takeover bids.
Can confirm that this is indeed the case, can check via getclaimsforname for example (but also same case with getclaimbyid)
This happens because a claim's effective amount is only calculated in the claim trie. When claims are not activated yet, there are not placed in the claim trie, they are placed in a queue. In the queue, effective amount does not matter because it is only important for calculating the winning claim of the name and claims in the queue cannot win.
Claims have in itself nEffectiveAmount that is calculated despite current height, which is actual reason to not show it. I think we should serialize nEffectiveAmount from CClaimValue @BrannonKing told that on other issue.
One possible solution is to serialize nEffectiveAmount from CClaimValue to use it for pendingEffectiveAmount when current height is lower that claim valid height. But serialize it we should enforce to re-index, @kaykurokawa can you confirm or decline?
After some kind of implementations pendingEffectiveAmount should replace effectiveAmount in result or effectiveAmount should presents event with 0 value which indicate that pendingEffectiveAmount can be in?
#232
@bvbfan does your fix also take into account supports? I also noticed supports don't show until the takeover occurs.
@tzarebczan it should.
Updated requirement: we need to expose queued claims/supports in the RPC methods where it makes sense to do so. getclaimsforname needs to return items that are not yet valid. The effectiveAmount should match should go with things that are valid at the specified block. The pendingEffectiveAmount should be the amount after everything we know about is activated.
Merged via https://github.com/lbryio/lbrycrd/pull/303