-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Anchor
trait and make anchors unique to (Txid, BlockId)
#1507
Comments
Anchor
trait and make anchors unique to `(Txid, BlockIdAnchor
trait and make anchors unique to (Txid, BlockId)
I’d like to take this if nobody else has. |
I don't think it is good practice to change the anchor metadata ( |
I think that our interpretation of anchor has to remain the anchor block is not necessarily the block it is in. For example, lets say I have a tx A with a descendant B. I find out B is confirmed then I know the ancestor A is confirmed also but I don't know where. We should return A as confirmed and anchor it to B's anchor. We can note that the confirmation is transitive so applications can decide what to do here but I think that this should just work. I had a look at the code and it doesn't look like we do transitive confirmations but somehow do transitive last_seen :P. Another problem with removing the anchor trait: It's attractive for the |
Could we say A is transitively anchored to the block which B is anchored in? I think we can use the We can add the idea of transitive anchors later on. To make this change backwards compatible,
Would you give an example where this would be useful? How would it look if a tx is anchored to multiple blocks? I feel like we can add this functionality later on? I.e. have a method on |
@LagginTimes we have a thumbs up from @LLFourn. Please go ahead with the PR. |
Per comment in #1515 moving this out of the alpha milestone. |
The Problem
Why remove
Anchor
trait?We don't need it. Confirmation block and anchor block will be the same block after #1489 is merged.
Anchor representation in
TxGraph
andtx_graph::ChangeSet
is badThis is how anchors are represented now.
However, we can have multiple
A
s that have the same anchor blockBlockId
for the sameTxid
. This is not ideal. Ideally, we want one anchor per(BlockId, Txid)
.The Proposal
Where
AM
is "anchor metadata". I.e. You can store block time here (u32
).The text was updated successfully, but these errors were encountered: