Add minconf param to claimtrie RPC commands #44
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#44
Loading…
Add table
Add a link
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?
The following commands need a
minconf
param to specify how many confirmations are required (aka how many blocks back to look). Default minconf should be 6, like other commands (e.g. listnameclaims).If you change this, please parameterize this. I do not want 6 to be the
only option.
On Mon, Sep 12, 2016 at 6:52 PM, Umpei Kay Kurokawa <
notifications@github.com> wrote:
Jeremy Kauffman, Founder, LBRY http://lbry.io/
(267) 210-4292
Build LBRY: get https://lbry.io/get, follow https://twitter.com/lbryio,
like https://facebook.com/lbryio
add a minconf argument like other rpc commands maybe ?
In
listnameclaims
, the defaultminconf
appears to be set to 1. Do we want to change it to 6 everywhere?https://github.com/lbryio/lbrycrd/blob/master/src/wallet/rpcwallet.cpp#L764
We discussed changing minconf from 1 to 6 everywhere it previously existed. However, in working on this, it only exists in rpcwallet. I'm adding it to rpcclaimtrie. Hence, I don't think that we need to keep the same default, and I'm hesitant to change the out-of-the-box API.
How does this affect lbryumx that uses these calls to get claim information? Will it not be available until 6 confirmations? Cc @ful0n
lbryumx would be affected (unless we set the default to 1). It could be updated to pass in the number of confirmations that it cares about.
So a related motivation for this was the issue of synchronization, as well as confirm depth.
So lbryum-server, (now lbryumx, but still has same issue I believe) in order to access the claimtrie uses "pass through" commands, which makes direct queries to lbrycrd and passes it along to the client. This is in contrast to the "direct response" commands used in commands related to address balances where lbryum server responds directly to the client using its own internal state that is synchronized to lbrycrd.
This results in a synchronization problem because a) lbryum-server may not have synced yet to the latest block on lbrycrd. Thus the pass through commands and direct response commands will return inconsistent results due to being on different blocks b) lbryum-server could make multiple "pass through" commands on a single query, meaning that lbrycrd may have incremented a block in between those commands, also returning inconsistent states.
Now the minconf argument doesn't solve the issue of synchronization but a blockhash argument (already included in getnameproof) would solve the issue. Users can also implement minconf through blockhash as well.
I should also note that this method to solve synchronization may be a bit slow as we will need to roll back the claimtrie a X number of blocks. Another way to solve the synchronization issue is to store the different claimtries for X number of blocks, either within lbrycrd or within lbryum server (perhaps utilizing lbrycrd-go? I heard that it has this feature).
Probablly, this needs to be a new issue..
After further discussion on this, we have decided that taking a block hash will be more effective than a minconf number. I'm going to make that change and resubmit.
Done via #189