-
Notifications
You must be signed in to change notification settings - Fork 247
Open
Description
The current payref implementation is useful, but suffers from the following:
- It is only known after 5 blocks
- It is not resistant to reorgs more than 5 blocks.
Although we'd like to believe that reorgs of more than 5 blocks are not possible, we've seen from selfish mining attacks on Monero, that they are a possibility.
For example, if the payref is stored after 5 blocks, then a reorg happens. There is no way to find the output referenced by the payref.
This proposal aims to solve these, as well as allow for a use case where a reorg'ed payref can be used to find the new payref.
I suggest we make two new fields:
| name | calculated from | notes |
|---|---|---|
| provisional_payref | output_hash | The plain has of the output. Note that each output has a payref. This is not different from the current implementation |
| mined_payref | output_hash.block_hash | Note that this is concatenated, not hashed together as the current implementation is |
The downside of mined_payref is that it longer, but it allows a node to find the output by it's hash in the case it has been reorged out.
It should be noted that the provisional_payref is sufficient in all honest cases.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels