Issues with bitcoin PoW anchoring through anyone-can-spend output
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 66
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Prime is supposed to be anchored to bitcoin with an anyone-can-spend single-use-seal that is spent, new block is committed in the spending transaction and new anyone-can-spend single-use-seal is created, if it so happens that there is not a proper commitment, a protocol reset happens through OP_RETURN announcement. Here are the problems I see along with possible solutions to them.
### 1. Selfish mining
Happens when a miner produces a valid commitment but doesn't release the prime block, instead he keeps the blocks for himself, and releases them at some point in the future causing a possibly massive re-org. With addition of secondary PoW (Prime PoW) this can be mitigated, but a party with >51% of Prime PoW would be able to cause massive re-orgs and double spends, so I don't see how this is necessary better than a separate blockchain with its own PoW.
A simple solution to this problem would be to publish whole prime blockheader on bitcoin, either through OP_RETURN or as a taproot inscription, then no miner can withold publishing of blockheader as it would be stored in the clear on bitcoin mainchain.
### 2. Replacement cycling attack
Anyone-can-spend outputs are prime candidates for attack via replacement cycling attack, as was recently discussed on the [bitcoin mailing list](https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2023-October/021999.html), this would allow ANY malicous party to censor Prime blocks from being committed to bitcoin mainchain. You can find a good description of the attack [here](https://www.nobsbitcoin.com/how-does-a-lightning-replacement-cycling-attack-work/). Basically this is a way to evict any transaction trying to spend the anyone-can-spend output from the mempool, so it never gets mined.
Solution for this would be to change the output from anyone-can-spend to an output script which requires PoW to be spent, this can be done through [signature grinding](https://github.com/VzxPLnHqr/sig-pow#sig-pow---work-locked-outputs).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository files, tests, or entry points. Start with the linked Bitcoin mailing-list discussion and the sig-pow reference; a concrete implementation target and acceptance criteria are still needed before work can be considered done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- blockchain
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100