Kaz Wesley [ARCHIVE] on Nostr: 📅 Original date posted:2014-07-18 📝 Original message:Peers exchanging mempool ...
📅 Original date posted:2014-07-18
📝 Original message:Peers exchanging mempool priority policies is great; that accomplishes
the flexibility in what txes to remember that I was going for with the
forget-filters, but much more neatly, with less overhead and some side
benefits.
Here's what I'm picturing now:
- exchange priority policies in peer introductions
- assign unique sequential IDs in the order the transactions were
inved (per peer)
- receiving a getdata for a tx updates last-known-peer-received inv to
all invs up to the one referenced
- include ID-last-received, last-known-peer-received in sparse block
- reference txes in sparse block by index in receiver's
prioritiziation with peer's sent invs up to ID-last-received and
sender's prior invs up to last-known-peer-received
Possible new messages:
- sparseblock
- invack message a node can send at times when it's received a bunch
of invs it already has, so it hasn't acked with a getdata in a while
- gettx: getdata, but using new sequential ID to save 28 bytes per tx
It seems important for ordering policies to be able to be specified in
as much detail as possible. Parameters that should be available:
- total inputs
- total outputs
- bytes
- coin days destroyed
- net UTXO size change
- sigops
- is data carrier
- is output raw multisig
- age in mempool
- what else?
This parameter set should be extensible to allow for unforeseen future factors.
Ordering policies should allow arbitrary algebraic combinations of
their parameters, as well as thresholds. Boolean combinations of
sub-policies would also be desirable. This could be implemented with a
tx-script-like stack-based language, in which each supported tx
property is pushed onto the stack by a particular opcode, and
+-*//min/max/boolean operators combine them to yield the sort key.
Difficult parameters:
* Coin-days-destroyed: changes, peers need agreement on when (if?)
it's recalculated. Probably can just not recalculate, but peers still
need agreement on "time seen" to get CDD.
* Age in mempool: seems intractable in terms of time, but could be
done easily in terms of "how many txes old is this sequential ID"
One potential pitfall: this allows for an environment of completely
heterogeneous mempool policies. I think that's a good thing, but we
need to avoid a situation where only least-common-denominator
transactions make it farther than a hop or two, and we don't want
nodes to have a strong preference for connecting to like-minded peers
since clustering reduces overall connectivity. It may be worthwhile to
add a parallel mechanism for relay policies, to differentiate between
what a node would keep in its mempool vs. what it wouldn't even relay
and doesn't want to see at all. Relay policies could be specified just
like prioritization policies, but with the final stack value evaluated
in a boolean context.
An interesting additional use of policy-scripts would be a
standardized way for miners to include a policy script in a coinbase,
allowing miners a mechanism to advertise things like their relative
price of sigops vs bytes. Nodes may then choose to take this
information into account in order to optimize their mempool policies
for likelihood of consistency with future blocks. Since policy scripts
provide only relative information on prices of different transaction
properties rather than an absolute fee, this should not allow miners
to "vote fees up", although care would need to be taken they wouldn't
be able to drive up prices by claiming common transaction types are at
the high end of the fee scale.
Published at
2023-06-07 15:24:08Event JSON
{
"id": "d6b252d58cd7c194026e47c99dddb7d1e405de85d17ec5b3cd8f52a08d6e4857",
"pubkey": "fb86e09da2994d49831e6fa34cbe7c71aef99054c8ac90c8438c5594b4ce2f60",
"created_at": 1686151448,
"kind": 1,
"tags": [
[
"e",
"3507527acf6651445fc18e718512a320c7c5edde322b321b00914bf719d85722",
"",
"root"
],
[
"e",
"a91ae384bc618d37594256a93f928136f5bbc2fdcf2a2c2ae4d5a7799cc0951e",
"",
"reply"
],
[
"p",
"b25e10e25d470d9b215521b50da0dfe7a209bec7fedeb53860c3e180ffdc8c11"
]
],
"content": "📅 Original date posted:2014-07-18\n📝 Original message:Peers exchanging mempool priority policies is great; that accomplishes\nthe flexibility in what txes to remember that I was going for with the\nforget-filters, but much more neatly, with less overhead and some side\nbenefits.\n\nHere's what I'm picturing now:\n- exchange priority policies in peer introductions\n- assign unique sequential IDs in the order the transactions were\ninved (per peer)\n- receiving a getdata for a tx updates last-known-peer-received inv to\nall invs up to the one referenced\n- include ID-last-received, last-known-peer-received in sparse block\n- reference txes in sparse block by index in receiver's\nprioritiziation with peer's sent invs up to ID-last-received and\nsender's prior invs up to last-known-peer-received\n\nPossible new messages:\n- sparseblock\n- invack message a node can send at times when it's received a bunch\nof invs it already has, so it hasn't acked with a getdata in a while\n- gettx: getdata, but using new sequential ID to save 28 bytes per tx\n\nIt seems important for ordering policies to be able to be specified in\nas much detail as possible. Parameters that should be available:\n- total inputs\n- total outputs\n- bytes\n- coin days destroyed\n- net UTXO size change\n- sigops\n- is data carrier\n- is output raw multisig\n- age in mempool\n- what else?\nThis parameter set should be extensible to allow for unforeseen future factors.\n\nOrdering policies should allow arbitrary algebraic combinations of\ntheir parameters, as well as thresholds. Boolean combinations of\nsub-policies would also be desirable. This could be implemented with a\ntx-script-like stack-based language, in which each supported tx\nproperty is pushed onto the stack by a particular opcode, and\n+-*//min/max/boolean operators combine them to yield the sort key.\n\nDifficult parameters:\n* Coin-days-destroyed: changes, peers need agreement on when (if?)\nit's recalculated. Probably can just not recalculate, but peers still\nneed agreement on \"time seen\" to get CDD.\n* Age in mempool: seems intractable in terms of time, but could be\ndone easily in terms of \"how many txes old is this sequential ID\"\n\nOne potential pitfall: this allows for an environment of completely\nheterogeneous mempool policies. I think that's a good thing, but we\nneed to avoid a situation where only least-common-denominator\ntransactions make it farther than a hop or two, and we don't want\nnodes to have a strong preference for connecting to like-minded peers\nsince clustering reduces overall connectivity. It may be worthwhile to\nadd a parallel mechanism for relay policies, to differentiate between\nwhat a node would keep in its mempool vs. what it wouldn't even relay\nand doesn't want to see at all. Relay policies could be specified just\nlike prioritization policies, but with the final stack value evaluated\nin a boolean context.\n\nAn interesting additional use of policy-scripts would be a\nstandardized way for miners to include a policy script in a coinbase,\nallowing miners a mechanism to advertise things like their relative\nprice of sigops vs bytes. Nodes may then choose to take this\ninformation into account in order to optimize their mempool policies\nfor likelihood of consistency with future blocks. Since policy scripts\nprovide only relative information on prices of different transaction\nproperties rather than an absolute fee, this should not allow miners\nto \"vote fees up\", although care would need to be taken they wouldn't\nbe able to drive up prices by claiming common transaction types are at\nthe high end of the fee scale.",
"sig": "147030554064a5532402fa5cc6a322650e0228d53aef9579fc6f8d21e7b715d1e479a6d682fd0fed65feaafc71629399fc33cf979f5b72de7e36b5ccb0a3d9fb"
}