Bitcoin Forum
July 26, 2021, 05:58:16 PM *
News: Latest Bitcoin Core release: 0.21.1 [Torrent]
   Home   Help Search Login Register More  
Pages: [1]
Author Topic: Constraint solving the mempool  (Read 80 times)
Offline Offline

Activity: 2408
Merit: 1820

View Profile
June 16, 2019, 03:45:28 AM
Merited by bones261 (2), ETFbitcoin (1)

I've been playing a lot with constraint solving (thanks to my work on coinsayer) and when you have a hammer, everything looks like a nail -- so I was thinking of how it'd look if you applied a constraint solver to a bitcoin node's mempool. The goal would be to simplify a lot of the rules, logic and remove the arbitrary limitations and rules that currently exist (that can be both annoying, and pretty incentive incompatible).

So I was thinking, imagine we allowed our mempool to contain transactions that conflict with each other -- as long as they don't conflict with the transactions in the blockchain.

So to figure out which transactions should be in the next block is actually a pretty straight forward optimization problem.  Basically find the set of transactions that maximizes the fees subject to it not exceed  MAX_SIGOPS / MAX_WEIGHT / have any of the same inputs / and input references to an unconfirmed transaction, must then also include that transaction. You could even throw in a few extras without too much work (e.g. tie break on first seen transactions)

Now lets for a second pretend latency is unimportant (I think it's pretty solvable by running the solver, and caching the and incrementally updating it as an approximation).

So the real tricky part is some anti-DoS stuff. We need to come up with:

A) a rule that would ban a peer for sending us too much crap
b) a rule for knowing which transactions are worthy of forwarding to a peer

And we need to do it such that rule b) never causes our node to be banned by someone following rule a)


Any ideas?

Check out for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!