serai-dex / serai

Other
262 stars 49 forks source link

Support RBF #284

Closed kayabaNerve closed 1 month ago

kayabaNerve commented 1 year ago

Beyond needing a dedicated secondary signing loop, for re-signing a TX which has taken too long, we need to update the scheduler.

https://github.com/serai-dex/serai/blob/0c9c1aeff192f08bc5e05ece0456593e81d76070/processor/src/main.rs#L221-L227

This is the problematic block.

kayabaNerve commented 1 year ago

I had an interesting idea where instead of supporting RBF, we create an anyone-can-spend output on each transaction. If it lags, anyone could use child-pays-for-parent to bump its priority.

Unfortunately, this doesn't work as a malicious actor could spend the output without RBF enabled. If they don't increase the fee rate, this wouldn't be an instance of CPFP, yet an honest volunteer wouldn't be able to perform CPFP due to the occupation of the output.

kayabaNerve commented 9 months ago

mempoolfullrbf solves the above concern. If it's truly enabled by default now, it'd be the solution here.

kayabaNerve commented 1 month ago

Resolved in above commit on the processor-smash branch.

kayabaNerve commented 2 weeks ago

https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-28.0.md notes how mempoolfullrbf was enabled by default.