bips icon indicating copy to clipboard operation
bips copied to clipboard

BIP: User-Defined Dynamic Relay Policy Scripts

Open dr-bonez opened this issue 3 months ago • 6 comments

dr-bonez avatar Sep 24 '25 18:09 dr-bonez

Link to related ML post: https://groups.google.com/g/bitcoindev/c/o3JZhiOa2PQ

jonatack avatar Sep 24 '25 20:09 jonatack

@dr-bonez looks cool!

Curious what would have been the issue with just the raw tx hex being the format for the external interface.

chrisguida avatar Sep 24 '25 21:09 chrisguida

@dr-bonez looks cool!

Curious what would have been the issue with just the raw tx hex being the format for the external interface.

@chrisguida That would require a significant amount of TX parsing code to be implemented in JS. Ideally the scripts should be fast and minimal. Plus the node implementation will generally have this data pre-parsed anyway, and implementing as getters will prevent unnecessary expensive computations if any of that data representation isn't used by the scripts

dr-bonez avatar Sep 24 '25 21:09 dr-bonez

This is a huge step toward lowering friction in Bitcoin modular relay policy could ease years of tension around mempool disagreements and help the network evolve without constant forks. By making relay policy modular, with a clean reference build (QuickJS + C++), devs get the freedom to experiment while keeping Bitcoin Core consensus intact, which is a far better design surface than battling over one rigid policy. Excited to see how the community can contribute here especially reviewers and C++ hands to help refine the reference implementation.

PLEB, x.com/mutonganakamoto

martinmutonga avatar Sep 25 '25 06:09 martinmutonga

Allows users to eliminate or extend mempool policies

The motivation for this BIP seems to make the assumption that allowing users to eliminate or extend mempool policies is sufficient motivation in itself, however I am not sure I am convinced of this assumption. Can you expand on what the motivation of allowing users to eliminate or extend mempool policies would be?

xstoicunicornx avatar Sep 25 '25 16:09 xstoicunicornx

To encourage consistency across implementations, transaction data available to scripts should conform to a well-defined type

If type safety and consistency are important enough to warrant TypeScript definitions in the spec, why not use TypeScript as the scripting language?

jasonribble avatar Oct 01 '25 05:10 jasonribble