Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 07164F82 for ; Sun, 21 Jan 2018 05:49:34 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from APC01-PU1-obe.outbound.protection.outlook.com (mail-oln040092254082.outbound.protection.outlook.com [40.92.254.82]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 34BFA284 for ; Sun, 21 Jan 2018 05:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=yDs31YyhhI2NYRFtlpqcL9kr9W8ThXYyRyz9WWhD9v8=; b=UuvAXvVuFt7lUe6kqH2xqTAn/x/uoptQCsdjWeGqWRvz8nLRX7NTtWGOw6eKYMzkmqnKg13hoNJ3WEFydqBhIoYwTYUP9Wl5Z+F7P70FjKJaNIQsRM58Mp6MwdZ/yyH/FcveQnv7/5kZeeMuLNsae3D8u+vL6dwU5rhedmOygFwHvFkO69UJUKstOxEQFf3cv219acsIwA+RHFHU9/rW04j3TqKotAf/YwE5TbjlWkD8h8T1jADUAq35c6VYeY28Ylp8A7QhlAeOo9tPuMQdDy1VDIVedZuVib+3Atqnu5XJ8bw02X/IYERj5ogIgyqZt/2rqeB1m9YZUu6Kz506Rg== Received: from PU1APC01FT004.eop-APC01.prod.protection.outlook.com (10.152.252.58) by PU1APC01HT200.eop-APC01.prod.protection.outlook.com (10.152.253.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.19; Sun, 21 Jan 2018 05:49:26 +0000 Received: from PS2P216MB0179.KORP216.PROD.OUTLOOK.COM (10.152.252.60) by PU1APC01FT004.mail.protection.outlook.com (10.152.252.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.5 via Frontend Transport; Sun, 21 Jan 2018 05:49:26 +0000 Received: from PS2P216MB0179.KORP216.PROD.OUTLOOK.COM ([10.171.225.19]) by PS2P216MB0179.KORP216.PROD.OUTLOOK.COM ([10.171.225.19]) with mapi id 15.20.0428.019; Sun, 21 Jan 2018 05:49:26 +0000 From: Damian Williamson To: Alan Evans , Bitcoin Protocol Discussion Thread-Topic: [bitcoin-dev] BIP Proposal: Revised: UTPFOTIB - Use Transaction Priority For Ordering Transactions In Blocks Thread-Index: AQHTgvBb8N0JH3cL9Uqi71Bvfy6OVqNja4nVgBiHCzmAANSbS4AALeeAgAD56SI= Date: Sun, 21 Jan 2018 05:49:25 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-AU, en-US Content-Language: en-AU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:0DA2FF218225785C1CBB8401F790F43A5E6E27899157ED4CCA0006A8FE64224E; UpperCasedChecksum:5964196C75AFE97A3FC4F4422B60A46B366798FC993252ED5B51657F9FF7354E; SizeAsReceived:7581; Count:46 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [5ZIezbAZS+W040YlhiNSoEGreM6wENTU] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; PU1APC01HT200; 6:ioUfHIeeE7rbwnZIsyyT4Ocg0ZTEXof4/bHQ8HTLbK3a5+BuDSvcIsSaT2Ta3wYZ1Vke6tMf9sprqWre0edFzKVn7LNEwvCikwYWfWt7m2k33hI0UdXE+aY8QCLzhgku3NZoXET1gmSIgzWhyEOuGX8uUdIib/v+fjn0mVKYEJmzNFFVB6LSSBQSC+ioXIqME78rRkZUaBXrKVISK+YIeQpsps7DKyjjemCs+K8pg00rUE9Ffm9hE8oG3yJ6sbaPwE3iqYNaAmjFo0pL8cAowmUi9M+gFewThN38cG7eYRbZLrftQDzCyWyKKgHywI+RLK2vqXA+RDf5f8FhfFbZjzjvt/MmjGgqT7Jum3UEOfo=; 5:JCJ1J7KGNo2COTABCUwC7DRAkytZ5rAV7KMCYfYw4TUo0Mjscw7P8AMuHE7LTpN8pDSpl9SVj5goaX6YDxSLIV/MeYX39XlLHfIguYlZLsQWNplfDBAgpN68Q3mX/XpE/c98uZSFHqF0yPdHIZ4nfYuQvE8a+qp0TihE90QIMQg=; 24:ZCSYslFQobZqYELxRLHlqziJdPbb6m2bmKtatGuWgf9R86leQmziSLDzr/VwDoIx+RrmYPsdBnS6N6CIwojW90y+CAolH6RJiKVZqUF2TF8=; 7:+cFV66H/gQUjeYZs+d27HFDI55Dflwo1r8jGlmS6fRerAGhf3SegwPpvfHNzhDYJExq4pqmR35fn2UGPQugZ1+jruw4eJS8PxAnVTMtfM9cVSxKj2488SbJ0sw0KLh4/a1oBLm/KEBmS+YLWDGxBZPMNMFkTtoD82luT7VMgbLfoSymri2WOsKMqc7DhTEEniPIWHwdO/hgrVqERVbxwEP1w7OihV39qvPA5+sJeDPPW7/RqUM32TyUkGmcZjX0C x-incomingheadercount: 46 x-eopattributedmessage: 0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125374)(1701031045); SRVR:PU1APC01HT200; x-ms-traffictypediagnostic: PU1APC01HT200: x-ms-office365-filtering-correlation-id: 8482ecc3-7cb4-4d46-56c0-08d56092bb28 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:PU1APC01HT200; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:PU1APC01HT200; x-forefront-prvs: 0559FB9674 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:PU1APC01HT200; H:PS2P216MB0179.KORP216.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_PS2P216MB0179D1D9BBD720A93A7F2E739DED0PS2P216MB0179KORP_" MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8482ecc3-7cb4-4d46-56c0-08d56092bb28 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2018 05:49:25.6924 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1APC01HT200 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Sun, 21 Jan 2018 15:36:37 +0000 Subject: Re: [bitcoin-dev] BIP Proposal: Revised: UTPFOTIB - Use Transaction Priority For Ordering Transactions In Blocks X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jan 2018 05:49:34 -0000 --_000_PS2P216MB0179D1D9BBD720A93A7F2E739DED0PS2P216MB0179KORP_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Good afternoon Alan, It is stated in the proposal that it is intended for blocks to be validated= as the output of the priority method, to ensure that they conform. Unfortu= nately, the math necessary for this sort of statistical function is outside= the scope of my formal education and I will need to rely on someone to dev= elop what is necessary. If it does turn out that this is not ultimately pos= sible then I suppose at that stage the proposal would need to be abandoned = since I agree - validation must be necessary. Blocks created with cheating = should be too unlikely. >All block created with dynamic size should be verified to ensure conformity to a probability distribution curve resulting from the priority method. Since the input is a probability, the output should conform to a probability distribution. Regards, Damian Williamson ________________________________ From: Alan Evans Sent: Sunday, 21 January 2018 1:46:41 AM To: Damian Williamson; Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] BIP Proposal: Revised: UTPFOTIB - Use Transactio= n Priority For Ordering Transactions In Blocks I don't see any modifications to the proposal that addresses the issue that= miners will always be free to choose their own priority that a few people = brought up before. I understand you think it's in the miners best long-term interest to follow= these rules, but even if a miner agrees with you, if that miner thinks the= other miners are following the fee curve, they will know it makes no overa= ll difference if they cheat (you can't prove how long a miner has had a tra= nsaction in their mempool). The opportunity to cheat, the anonymity of mining, the low negative effect = of a single cheating instance, all combined with a financial incentive to c= heat means that cheating will be rife. On Sat, Jan 20, 2018 at 8:04 AM, Damian Williamson via bitcoin-dev > wrote: Tried a different approach for the curves, would appreciate it if someone h= as the energy to work on this and help me to resolve it a bit more scientif= ically: p(tx) =3D (((((fx - (fl - 0.00000001)) / (fh - (fl - 0.00000001))) * 100) += 1) ^ y) + (((((wx - 0.9) / ((86400 * n) - 0.9)) * 100) + 1) ^ y) p is the calculated priority number for tx the specific valid transaction. fx is the fee in BTC/KB for the specific transaction. fl is the lowest valid fee in BTC/KB currently in the nodes mempool. fh is the highest valid fee in BTC/KB currently in the nodes mempool. wx is the current wait in seconds for tx the specific valid transaction. n is the number of days maximum wait consensus value. y can be 10 or, y can be a further developed to be a formula based on the n= umber of required inclusions to vary the steepness of the curve as the memp= ool size varies. In the next step, the random value must be: if random(101^y) < p then transaction is included; Regards, Damian Williamson ________________________________ From: Damian Williamson > Sent: Saturday, 20 January 2018 10:25:43 AM To: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] BIP Proposal: Revised: UTPFOTIB - Use Transactio= n Priority For Ordering Transactions In Blocks An example curve: The curve curently described here is ineffective at acheiving the requireme= nts. It seems to be not nearly steep enough resulting in too many inclusion= s (as it happens, this may not metter - needs further evaluation) and, the = lower end values seem problematically small but, results in a number betwee= n 100 for the highest fee BTC/KB and a small fraction of 1 for the lowest. = This math needs to be improved. pf(tx) =3D sin2((fx-(fl-0.00000001))/(fh-(fl-0.00000001))*1.570796326795)*1= 00 pf is the calculated priority number for the fee for tx the specifc valid t= ransaction. fx is the fee in BTC/KB for the specific transaction. fl is the lowest valid fee in BTC/KB currently in the nodes mempool. fh is the highest valid fee in BTC/KB currently in the nodes mempool. ________________________________ From: bitcoin-dev-bounces@lists.linuxfoundation.org > on behalf of Dami= an Williamson via bitcoin-dev > Sent: Thursday, 4 January 2018 8:01:10 PM To: Bitcoin Protocol Discussion Subject: [bitcoin-dev] BIP Proposal: Revised: UTPFOTIB - Use Transaction Pr= iority For Ordering Transactions In Blocks This proposal has a new update, mostly minor edits. Additionally, I had a l= ogic flaw in the hard fork / soft fork declaration statement. The specific = terms of the CC-BY-SA-4.0 licence the document is published under have now = been updated to include additional permissions available under the MIT lice= nce. Recently, on Twitter: I am looking for a capable analyst/programmer to work on a BIP proposal as = co-author. Will need to format several Full BIP's per these BIP process req= uirements: ( https://github.com/bitcoin/bips/blob/master/bip-0002.mediawiki= ) from a BIP Proposal, being two initially for non-consensus full-interope= rable pre-rollout on peer service layer & API/RPC layer and, a reference im= plementation for Bitcoin Core per: ( https://github.com/bitcoin/bitcoin/blo= b/master/CONTRIBUTING.md ). Interested parties please reply via this list t= hread: ( https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-Decem= ber/015485.html ) #Bitcoin #BIP Regards, Damian Williamson ________________________________ From: bitcoin-dev-bounces@lists.linuxfoundation.org > on behalf of Dami= an Williamson via bitcoin-dev > Sent: Monday, 1 January 2018 10:04 PM To: bitcoin-dev@lists.linuxfoundation.org Subject: [bitcoin-dev] BIP Proposal: Revised: UTPFOTIB - Use Transaction Pr= iority For Ordering Transactions In Blocks Happy New Year all. This proposal has been further amended with several minor changes and a few additions. I believe that all known issues raised so far have been sufficiently addressed. Either that or, I still have more work to do. ## BIP Proposal: Revised: UTPFOTIB - Use Transaction Priority For Ordering Transactions In Blocks Schema: ########## Document: BIP Proposal Title: UTPFOTIB - Use Transaction Priority For Ordering Transactions In Blocks Published: 26-12-2017 Revised: 01-01-2018 Author: Damian Williamson > Licence: Creative Commons Attribution-ShareAlike 4.0 International License. URL: http://thekingjameshrmh.tumblr.com/post/168948530950/bip-proposal- utpfotib-use-transaction-priority-for-order ########## ### 1. Abstract This document proposes to address the issue of transactional reliability in Bitcoin, where valid transactions may be stuck in the transaction pool for extended periods or never confirm. There are two key issues to be resolved to achieve this: 1. The current transaction bandwidth limit. 2. The current ad-hoc methods of including transactions in blocks resulting in variable and confusing confirmation times for valid transactions, including transactions with a valid fee that may never confirm. It is important with any change to protect the value of fees as these will eventually be the only payment that miners receive. Rather than an auction model for limited bandwidth, the proposal results in a fee for priority service auction model. It would not be true to suggest that all feedback received so far has been entirely positive although, most of it has been constructive. The previous threads for this proposal are available here: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-December/s ubject.html In all parts of this proposal, references to a transaction, a valid transaction, a transaction with a valid fee, a valid fee, etc. is defined as any transaction that is otherwise valid with a fee of at least 0.00001000 BTC/KB as defined as the dust level, interpreting from Bitcoin Core GUI. Transactions with a fee lower than this rate are considered dust. In all parts of this proposal, dust and zero-fee transactions are always ignored and/or excluded unless specifically mentioned. It is generally assumed that miners currently prefer to include transactions with higher fees. ### 2. The need for this proposal We all must learn to admit that transaction bandwidth is still lurking as a serious issue for the operation, reliability, safety, consumer acceptance, uptake and, for the value of Bitcoin. I recently sent a payment which was not urgent so; I chose three-day target confirmation from the fee recommendation. That transaction has still not confirmed after now more than six days - even waiting twice as long seems quite reasonable to me (note for accuracy: it did eventually confirm). That transaction is a valid transaction; it is not rubbish, junk or, spam. Under the current model with transaction bandwidth limitation, the longer a transaction waits, the less likely it is ever to confirm due to rising transaction numbers and being pushed back by transactions with rising fees. I argue that no transactions with fees above the dust level are rubbish or junk, only some zero fee transactions might be spam. Having an ever- increasing number of valid transactions that do not confirm as more new transactions with higher fees are created is the opposite of operating a robust, reliable transaction system. While the miners have discovered a gold mine, it is the service they provide that is valuable. If the service is unreliable they are not worth the gold that they mine. This is reflected in the value of Bitcoin. Business cannot operate with a model where transactions may or may not confirm. Even a business choosing a modest fee has no guarantee that their valid transaction will not be shuffled down by new transactions to the realm of never confirming after it is created. Consumers also will not accept this model as Bitcoin expands. If Bitcoin cannot be a reliable payment system for confirmed transactions then consumers, by and large, will simply not accept the model once they understand. Bitcoin will be a dirty payment system, and this will kill the value of Bitcoin. Under the current system, a minority of transactions will eventually be the lucky few who have fees high enough to escape being pushed down the list. Once there are more than x transactions (transaction bandwidth limit) every ten minutes, only those choosing twenty-minute confirmation (2 blocks) from the fee recommendations will have initially at most a fifty percent chance of ever having their payment confirm by the time 2x transactions is reached. Presently, not even using fee recommendations can ensure a sufficiently high fee is paid to ensure transaction confirmation. I also argue that the current auction model for limited transaction bandwidth is wrong, is not suitable for a reliable transaction system and, is wrong for Bitcoin. All transactions with valid fees must confirm in due time. Currently, Bitcoin is not a safe way to send payments. I do not believe that consumers and business are against paying fees, even high fees. What is required is operational reliability. This great issue needs to be resolved for the safety and reliability of Bitcoin. The time to resolve issues in commerce is before they become great big issues. The time to resolve this issue is now. We must have the foresight to identify and resolve problems before they trip us over. Simply doubling block sizes every so often is reactionary and is not a reliable permanent solution. I have written this proposal for a technical solution but, need your help to write it up to an acceptable standard to be a full BIP. ### 3. The problem Everybody wants value. Miners want to maximise revenue from fees (and we presume, to minimise block size). Consumers need transaction reliability and, (we presume) want low fees. The current transaction bandwidth limit is a limiting factor for both. As the operational safety of transactions is limited, so is consumer confidence as they realise the issue and, accordingly, uptake is limited. Fees are artificially inflated due to bandwidth limitations while failing to provide a full confirmation service for all valid transactions. Current fee recommendations provide no satisfaction for transaction reliability and, as Bitcoin scales, this will worsen. Transactions are included in blocks by miners using whatever basis they prefer. We expect that this is usually a fee-based priority. However, even transactions with a valid fee may be left in the transaction pool for some time. As transaction bandwidth becomes an issue, not even extreme fees can ensure a transaction is processed in a timely manner or at all. Bitcoin must be a fully scalable and reliable service, providing full transaction confirmation for every valid transaction. The possibility to send a transaction with a fee lower than one that is acceptable to allow eventual transaction confirmation should be removed from the protocol and also from the user interface. Bitcoin should be capable of reliably and inexpensively processing casual transactions, and also priority processing of fee paying at auction for priority transactions in the shortest possible timeframe. ### 4. Solution summary #### Main solution Provide each valid transaction in the mempool with an individual transaction priority each time before choosing transactions to include in the current block. The priority being a function of the fee (on a curve), and the time waiting in the transaction pool (also on a curve) out to n days (n =3D 60 days ?), and extending past n days. The value for fee on a curve may need an upper limit. The transaction priority to serve as the likelihood of a transaction being included in the current block, and for determining the order in which transactions are tried to see if they will be included. Nodes will need to keep track of when a transaction is first seen. It is satisfactory for each node to do this independently provided the full mempool and information survives node restart. If there is a more reliable way to determine when a transaction was first seen on the network then it should be utilised. > My current default installation of Bitcoin Core v0.15.1 does not currently seem to save and load the mempool on restart, despite the notes in the command line options panel that the default for persistmempool is 1. In the debug panel, some 90,000 transactions before restart, some 200 odd shortly after. Manually setting persistmempool=3D1 in the conf file does not seem to make any difference. Perhaps it is operating as expected and I am not sure what to observe, but does not seem to be observably saving and loading the mempool on restart. This will need to be resolved. Use a dynamic target block size to make the current block. This marks a shift from using block size or weight to a count of transactions. Determine the target block size using; pre-rollout(current average valid transaction pool size) x ( 1 / (144 x n days ) ) =3D number of transactions to be included in the current block. The block created should be a minimum 1MB in size regardless if the target block size is lower. If the created block size consistently contains too few transactions and the number of new transactions created is continuously greater than the block size will accommodate then I expect eventually ageing transactions will be over-represented as a portion of the block contents. Once another new node conforming to the proposal makes a block, the block size will be proportionately larger as the transaction pool has grown. If block size is too large on average then this will shrink the transaction pool. Miners will likely want to conform to the proposal, since making blocks larger than necessary makes more room in each block potentially lowering the highest fees paid for priority service. Always making blocks smaller than the proposal requires will in time lower the utility value of Bitcoin, a different situation but akin to the current. Transactions will still always confirm but with longer and longer wait periods. The auction at the front of the queue for priority will be destroyed as there will be eventually no room in blocks besides ageing transations and, there will be little value paying higher than the minimum fee. Obviously, neither of these scenarios are in a miner's interests. Without a consensus as to what size dynamic block to create, enforcement of dynamic block size is not currently possible. It may be possible for a consensus to be formed in the future but here I cannot speculate. I can only suggest that it is in the interest of Bitcoin as a whole and, in the interest of each node to conform to the proposal. Some nodes failing to conform to the proposed requirements of dynamic size or transaction priority in this proposal will not be destructive to the operation of the proposal. If necessary, nodes that have not yet adopted the proposal will just continue to create standard fixed size unordered blocks, although, if the current mechanisms of block validation include the fixed block size then it is unlikely that these nodes will be able to validate the blockchain going forward. In this case a hard fork and a full transfer to the new method should be required. If dynamic blocks with ordered transactions will be valid to existing nodes then only a soft fork is required. There is no proposed change to the internal construction of blocks, only to the block size and using an ordered method of transaction selection. > The default value for mempoolexpiry in Bitcoin Core may in future need to be adjusted to match something more than n days or, perhaps using less than n =3D 14 days may be a more sensible approach? All block created with dynamic size should be verified to ensure conformity to a probability distribution curve resulting from the priority method. Since the input is a probability, the output should conform to a probability distribution. The curves used for the priority of transactions would have to be appropriate. Perhaps a mathematician with experience in probability can develop the right formulae. My thinking is a steep curve. I suppose that the probability of all transactions should probably account for a sufficient number of inclusions that the target block size is met on average although, it may not always be. As a suggestion, consider including some dust or zero-fee transactions to pad if each valid transaction is tried and the target block size is not yet met, highest BTC transaction value first? **Explanation of the operation of priority:** > If transaction priority is, for example, a number between one (low) and one-hundred (high) it can be directly understood as the percentage chance in one-hundred of a transaction being included in the block. Using probability or likelihood infers that there is some function of random. Try the transactions in priority order from highest to lowest, if random (100) < transaction priority then the transaction is included until the target block size is met. > To break it down further, if both the fee on a curve value and the time waiting on a curve value are each a number between one and one- hundred, a rudimentary method may be to simply multiply those two numbers, to find the priority number. For example, a middle fee transaction waiting thirty days (if n =3D 60 days) may have a value of five for each part (yes, just five, the values are on a curve). When multiplied that will give a priority value of twenty-five, or, a twenty-five percent chance at that moment of being included in the block; it will likely be included in one of the next four blocks, getting more likely each chance. If it is still not included then the value of time waiting will be higher, making for more probability. A very low fee transaction would have a value for the fee of one. It would not be until near sixty-days that the particular low fee transaction has a high likelihood of being included in the block. In practice it may be more useful to use numbers representative of one- hundred for the highest fee priority curve down to a small fraction of one for the lowest fee and, from one for a newly seen transaction up to a proportionately high number above one-hundred for the time waiting curve. It is truely beyond my level of math to resolve probability curves accurately without much trial and error. The primary reason for addressing the issue is to ensure transactional reliability and scalability while having each valid transaction confirm in due time. #### Pros * Maximizes transaction reliability. * Overcomes transaction bandwidth limit. * Fully scalable. * Maximizes possibility for consumer and business uptake. * Maximizes total fees paid per block without reducing reliability; because of reliability, in time confidence and overall uptake are greater; therefore, more transactions. * Market determines fee paid for transaction priority. * Fee recommendations work all the way out to 30 days or greater. * Provides additional block entropy; greater security since there is less probability of predicting the next block. _Although this is not necessary it is a product of the operation of this proposal._ #### Cons * Could initially lower total transaction fees per block. * Must be first be programmed. #### Pre-rollout Nodes need to have at a minimum a loose understanding of the average (since there is no consensus) size of the transaction pool as a requirement to enable future changes to the way blocks are constructed. A new network service should be constructed to meet this need. This service makes no changes to any existing operation or function of the node. Initially, Bitcoin Core is a suitable candidate. For all operations we count only valid transactions. **The service must:** * Have an individual temporary (runtime permanent only) Serial Node ID. * Accept communication of the number of valid transactions in the mempool of another valid Bitcoin node along with the Serial Node ID of the node whose value is provided. * Disconnect the service from any non-Bitcoin node. Bitcoin Core may handle this already? * Expire any value not updated for k minutes (k =3D 30 minutes?). * Broadcast all mempool information the node has every m minutes (m =3D 10 minutes?), including its own. * Nodes own mempool information should not be broadcast or used in calculation until the node has been up long enough for the mempool to normalise for at least o minutes (o =3D 300 minutes ?) * Alternatively, if loading nodes own full mempool from disk on node restart (o =3D 30 minutes ?) * Only new or updated mempool values should be transmitted to the same node. Updated includes updated with no change. * All known mempool information must survive node restart. * If the nodes own mempool is not normalised and network information is not available to calculate an average just display zero. * Internally, the average transaction pool size must return the calculated average if an average is available or, if none is available just the number of valid transactions in the node's own mempool regardless if it is normalised. Bitcoin Core must use all collated information on mempool size to calculate a figure for the average mempool size. The calculated figure should be displayed in the appropriate place in the Debug window alongside the text Network average transactions. Consideration must be given before development of the network bandwidth this would require. All programming must be consistent with the current operation and conventions of Bitcoin Core. Methods must work on all platforms. As this new service does not affect any existing service or feature of Bitcoin or Bitcoin Core, this can technically be programmed now and included in Bitcoin Core at any time. ### 5. Solution operation This is a simplistic view of the operation. The actual operation will need to be determined accurately in a spec for the programmer. 1. Determine the target block size for the current block. 2. Assign a transaction priority to each valid transaction in the mempool. 3. Select transactions to include in the current block using probability in transaction priority order until the target block size is met. If target block size is not met, include dust and zero-fee transactions to pad. 4. Solve block. 5. Broadcast the current block when it is solved. 6. Block is received. 7. Block verification process. 8. Accept/reject block based on verification result. 9. Repeat. ### 6. Closing comments It may be possible to verify blocks conform to the proposal by showing that the probability for all transactions included in the block statistically conforms to a probability distribution curve, *if* the individual transaction priority can be recreated. I am not that deep into the mathematics; however, it may also be possible to use a similar method to do this just based on the fee, that statistically, the block conforms to a fee distribution. Any dust and zero-fee transactions would have to be ignored. This solution needs a competent mathematician with experience in probability and statistical distribution. It is trivial to this proposal to offer that a node provides the next block size with a block when it is solved. I am not sure that this creates any actual benefit since the provided next block size is only one node's view, as it is the node may seemingly just as well use its own view and create the block. Providing a next block size only adds additional complexity to the required operation, however, perhaps providing the next block size is not trivial in what is accomplished and the feature can be included in the operation. Instead of the pre-rollout network service providing data as to valid transactions in mempool, it could directly provide data as to the suggested next block size if that is preferred, using a similar operation as is suggested now and averaging all received suggested next block sizes. It may be foreseeable in the future for Bitcoin to operate with a network of dedicated full blockchain & mempool servers. This would not be without challenges to overcome but would offer several benefits, including to the operation of this proposal, and especially as the RAM and storage requirements of a full node grows. It is easy to foresee that in just another seven years of operation a Bitcoin Full Node will require at least 300GB of storage and, if the mempool only doubles in size, over 1GB of RAM. There has been some concern expressed over spam and very low fee transactions, and an infinite block size resulting. I hope that for those concerned using the dust level addresses the issue, especially as the value of Bitcoin grows. Notwithstanding this proposal, all blocks including those with dynamic size each have limited transaction space per block. This proposal results in a fee for priority service auction, where the probability of a transaction to be included in limited space in the next available block is auctioned to the highest bidders and all other transactions must wait until they reach priority by ageing to gain significant probability. Under this proposal the mempool can grow quite large while the confirmation service continues in a stable and reliable manner. Several incentives for attackers are removed, where there is no longer multiple potential incentives for unnecessarily filling blocks or flooding the mempool with transactions, whether such transactions are fraudulent, valid or, otherwise. Adoption of this proposal and adherence results in a reliable, stable fee paying transaction confirmation service and a beneficial auction. This proposal is necessary. I implore, at the very least, that we use some method that validates full transaction reliability and enables scalability of Bitcoin. If not this proposal, an alternative. I have done as much with this proposal as I feel that I am able so far but continue to take your feedback. Regards, Damian Williamson [![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/ 88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/) BIP Proposal: UTPFOTIB - Use Transaction Priority For Ordering Transactions In Blocks by [Damian Williamson <willtech@live.com.au>](http://thek= ingjameshrmh.tumblr.com/post/1 68948530950/bip-proposal-utpfotib-use-transaction-priority-for-order) is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/). Based on a work at https://lists.linuxfoundation.org/pipermail/bitcoin- dev/2017- December/015371.html](https://lists.linuxfoundation.org/pipermail/bitco in-dev/2017-December/015371.html). Permissions beyond the scope of this license may be available at [https ://opensource.org/licenses/BSD-3- Clause](https://opensource.org/licenses/BSD-3-Clause). _______________________________________________ bitcoin-dev mailing list bitcoin-dev@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev _______________________________________________ bitcoin-dev mailing list bitcoin-dev@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev --_000_PS2P216MB0179D1D9BBD720A93A7F2E739DED0PS2P216MB0179KORP_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Good afternoon Alan,


It is stated in the proposal that= it is intended for blocks to be validated as the output of the priority me= thod, to ensure that they conform. Unfortunately, the math necessary for th= is sort of statistical function is outside the scope of my formal education and I will need to rely on someon= e to develop what is necessary. If it does turn out that this is not ultima= tely possible then I suppose at that stage the proposal would need to be ab= andoned since I agree - validation must be necessary. Blocks created with cheating should be too unlikely.


>All block created with dynamic size should be verified= to ensure
conformity to a probability distribution curve resulting from the
priority method. Since the input is a probability, the output should
conform to a probability distribution.


Regards,

Damian Williamson


From: Alan Evans <theala= nevans@gmail.com>
Sent: Sunday, 21 January 2018 1:46:41 AM
To: Damian Williamson; Bitcoin Protocol Discussion
Subject: Re: [bitcoin-dev] BIP Proposal: Revised: UTPFOTIB - Use Tra= nsaction Priority For Ordering Transactions In Blocks
 
I don't see any modifications to the proposal that address= es the issue that miners will always be free to choose their own priority t= hat a few people brought up before.

I understand you think it's in the miners best long-term interest to f= ollow these rules, but even if a miner agrees with you, if that miner think= s the other miners are following the fee curve, they will know it makes no = overall difference if they cheat (you can't prove how long a miner has had a transaction in their memp= ool).

The opportunity to cheat, the anonymity of mining, the low n= egative effect of a single cheating instance, all combined with a financial= incentive to cheat means that cheating will be rife.


On Sat, Jan 20, 2018 at 8:04 AM, Damian Willia= mson via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> = wrote:

Tried a different approach for= the curves, would appreciate it if someone has the energy to work on this = and help me to resolve it a bit more scientifically:

 
p(tx) =3D (((((fx - (fl - 0.00000001)) / (fh - (fl - 0.00000001))) * 100) + 1) ^ y) + (((((wx<= /sub> - 0.9) / ((86400 * n) - 0.9)) * 100) + 1) ^ y)

p is the calculated priority n= umber for tx the specific valid transac= tion.
fx is the fee in BTC/KB for the specifi= c transaction.
fl is the lowest valid fee in BTC/KB cu= rrently in the nodes mempool.
fh is the highest valid fee in BTC/KB c= urrently in the nodes mempool.
wx is the current wait in second= s for tx the specific valid transaction= .
n is the number of days maximum wait consensus value.
y can be 10 or, y can be a further developed to be a formula based on the n= umber of required inclusions to vary the steepness of the curve as the memp= ool size varies.

In the next step, the random v= alue must be:
if random(101^y) < p then transaction is included;

Regards,
Damian Williamson


From: Damian Williamson <willtech@live.com.au>
Sent: Saturday, 20 January 2018 10:25:43 AM
To: Bitcoin Protocol Discussion
Subject: Re: [bitcoin-dev] BIP Proposal: Revised: UTPFOTIB - Use Tra= nsaction Priority For Ordering Transactions In Blocks
 

An example curve:

The curve curently described here is ineffective at acheiving the requir= ements. It seems to be not nearly steep enough resulting in too many inclus= ions (as it happens, this may not metter - needs further evaluation) and, t= he lower end values seem problematically small but, results in a number between 100 for the highest fee BTC/KB and = a small fraction of 1 for the lowest. This math needs to be improved.


pf(tx) =3D sin2((fx-(fl= -0.00000001))/(fh-(fl-0.00000001))*1.= 570796326795)*100


pf is the calculated priority number for the fee for tx<= /sub> the specifc valid transaction.
fx is the fee in BTC/KB for the specific transaction.
fl is the lowest valid fee in BTC/KB currently in the nodes memp= ool.
fh is the highest valid fee in BTC/KB currently in the nodes mem= pool.


From= : bitcoin-dev-bounces@lists.linuxfoundation.org <bitcoin-dev-bounces@lists.linuxfoundation.org> on behalf of Damian Williamson via bitcoin-dev <bitcoin-dev@lists.= linuxfoundation.org>
Sent: Thursday, 4 January 2018 8:01:10 PM
To: Bitcoin Protocol Discussion
Subject: [bitcoin-dev] BIP Proposal: Revised: UTPFOTIB - Use Transac= tion Priority For Ordering Transactions In Blocks
 

This proposal has a new update, = mostly minor edits. Additionally, I had a logic flaw in the hard fork / sof= t fork declaration statement. The specific terms of the CC-BY-SA-4.0 licence the document is published under have now = been updated to include additional permissions available under the MIT lice= nce.


Recently, on Twitter:

I am looking for a capable analy= st/programmer to work on a BIP proposal as co-author. Will need to format s= everal Full BIP's per these BIP process requirements: ( https://github.com/bitcoin/bips/blob/master/bip-0002.mediawiki ) from a BIP Proposal, being two initially for non-consensus full-interop= erable pre-rollout on peer service layer & API/RPC layer and, a referen= ce implementation for Bitcoin Core per: ( https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md ). Interested parties please reply via this list thread: ( https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-Dece= mber/015485.html ) #Bitcoin #BIP


Regards,

Damian Williamson




Fro= m: bitcoin-dev-bounces@lists.linuxfoundation.org <bitcoin-dev-bounces@lists.linuxfoundation.org> on behalf of Damian Williamson via bitcoin-dev <bitcoin-dev@lists.= linuxfoundation.org>
Sent: Monday, 1 January 2018 10:04 PM
To: bitcoin-dev@lists.linuxfoundation.org
Subject: [bitcoin-dev] BIP Proposal: Revised: UTPFOTIB - Use Transac= tion Priority For Ordering Transactions In Blocks
 
Happy New Year all.
This proposal has been further amended with several minor changes and a
few additions.

I believe that all known issues raised so far have been sufficiently
addressed. Either that or, I still have more work to do.

## BIP Proposal: Revised: UTPFOTIB - Use Transaction Priority For
Ordering Transactions In Blocks

Schema:  
##########  
Document: BIP Proposal  
Title: UTPFOTIB - Use Transaction Priority For Ordering Transactions In
Blocks  
Published: 26-12-2017  
Revised: 01-01-2018  
Author: Damian Williamson <willtech@live.com.au>  
Licence: Creative Commons Attribution-ShareAlike 4.0 International
License.  
URL: http://thekingjameshrmh.tumblr.com/post/168948530950/bip-proposal= -
utpfotib-use-transaction-priority-for-order  
##########

### 1. Abstract

This document proposes to address the issue of transactional
reliability in Bitcoin, where valid transactions may be stuck in the
transaction pool for extended periods or never confirm.

There are two key issues to be resolved to achieve this:

1.  The current transaction bandwidth limit.
2.  The current ad-hoc methods of including transactions in block= s
resulting in variable and confusing confirmation times for valid
transactions, including transactions with a valid fee that may never
confirm.

It is important with any change to protect the value of fees as these
will eventually be the only payment that miners receive. Rather than an
auction model for limited bandwidth, the proposal results in a fee for
priority service auction model.

It would not be true to suggest that all feedback received so far has
been entirely positive although, most of it has been constructive.

The previous threads for this proposal are available here:  
https= ://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-December/= s
ubject.html

In all parts of this proposal, references to a transaction, a valid
transaction, a transaction with a valid fee, a valid fee, etc. is
defined as any transaction that is otherwise valid with a fee of at
least 0.00001000 BTC/KB as defined as the dust level, interpreting from
Bitcoin Core GUI. Transactions with a fee lower than this rate are
considered dust.

In all parts of this proposal, dust and zero-fee transactions are
always ignored and/or excluded unless specifically mentioned.

It is generally assumed that miners currently prefer to include
transactions with higher fees.

### 2. The need for this proposal

We all must learn to admit that transaction bandwidth is still lurking
as a serious issue for the operation, reliability, safety, consumer
acceptance, uptake and, for the value of Bitcoin.

I recently sent a payment which was not urgent so; I chose three-day
target confirmation from the fee recommendation. That transaction has
still not confirmed after now more than six days - even waiting twice
as long seems quite reasonable to me (note for accuracy: it did
eventually confirm). That transaction is a valid transaction; it is not
rubbish, junk or, spam. Under the current model with transaction
bandwidth limitation, the longer a transaction waits, the less likely
it is ever to confirm due to rising transaction numbers and being
pushed back by transactions with rising fees.

I argue that no transactions with fees above the dust level are rubbish
or junk, only some zero fee transactions might be spam. Having an ever-
increasing number of valid transactions that do not confirm as more new
transactions with higher fees are created is the opposite of operating
a robust, reliable transaction system.

While the miners have discovered a gold mine, it is the service they
provide that is valuable. If the service is unreliable they are not
worth the gold that they mine. This is reflected in the value of
Bitcoin.

Business cannot operate with a model where transactions may or may not
confirm. Even a business choosing a modest fee has no guarantee that
their valid transaction will not be shuffled down by new transactions
to the realm of never confirming after it is created. Consumers also
will not accept this model as Bitcoin expands. If Bitcoin cannot be a
reliable payment system for confirmed transactions then consumers, by
and large, will simply not accept the model once they understand.
Bitcoin will be a dirty payment system, and this will kill the value of
Bitcoin.

Under the current system, a minority of transactions will eventually be
the lucky few who have fees high enough to escape being pushed down the
list.

Once there are more than x transactions (transaction bandwidth limit)
every ten minutes, only those choosing twenty-minute confirmation (2
blocks) from the fee recommendations will have initially at most a
fifty percent chance of ever having their payment confirm by the time
2x transactions is reached. Presently, not even using fee
recommendations can ensure a sufficiently high fee is paid to ensure
transaction confirmation.

I also argue that the current auction model for limited transaction
bandwidth is wrong, is not suitable for a reliable transaction system
and, is wrong for Bitcoin. All transactions with valid fees must
confirm in due time. Currently, Bitcoin is not a safe way to send
payments.

I do not believe that consumers and business are against paying fees,
even high fees. What is required is operational reliability.

This great issue needs to be resolved for the safety and reliability of
Bitcoin. The time to resolve issues in commerce is before they become
great big issues. The time to resolve this issue is now. We must have
the foresight to identify and resolve problems before they trip us
over.  Simply doubling block sizes every so often is reactionary = and is
not a reliable permanent solution.

I have written this proposal for a technical solution but, need your
help to write it up to an acceptable standard to be a full BIP.

### 3. The problem

Everybody wants value. Miners want to maximise revenue from fees (and
we presume, to minimise block size). Consumers need transaction
reliability and, (we presume) want low fees.

The current transaction bandwidth limit is a limiting factor for both.
As the operational safety of transactions is limited, so is consumer
confidence as they realise the issue and, accordingly, uptake is
limited. Fees are artificially inflated due to bandwidth limitations
while failing to provide a full confirmation service for all valid
transactions.

Current fee recommendations provide no satisfaction for transaction
reliability and, as Bitcoin scales, this will worsen.

Transactions are included in blocks by miners using whatever basis they
prefer. We expect that this is usually a fee-based priority. However,
even transactions with a valid fee may be left in the transaction pool
for some time. As transaction bandwidth becomes an issue, not even
extreme fees can ensure a transaction is processed in a timely manner
or at all.

Bitcoin must be a fully scalable and reliable service, providing full
transaction confirmation for every valid transaction.

The possibility to send a transaction with a fee lower than one that is
acceptable to allow eventual transaction confirmation should be removed
from the protocol and also from the user interface.

Bitcoin should be capable of reliably and inexpensively processing
casual transactions, and also priority processing of fee paying at
auction for priority transactions in the shortest possible timeframe.

### 4. Solution summary

#### Main solution

Provide each valid transaction in the mempool with an individual
transaction priority each time before choosing transactions to include
in the current block. The priority being a function of the fee (on a
curve), and the time waiting in the transaction pool (also on a curve)
out to n days (n =3D 60 days ?), and extending past n days. The value for fee on a curve may need an upper limit. The transaction priority to
serve as the likelihood of a transaction being included in the current
block, and for determining the order in which transactions are tried to
see if they will be included.

Nodes will need to keep track of when a transaction is first seen. It
is satisfactory for each node to do this independently provided the
full mempool and information survives node restart. If there is a more
reliable way to determine when a transaction was first seen on the
network then it should be utilised.

> My current default installation of Bitcoin Core v0.15.1 does not
currently seem to save and load the mempool on restart, despite the
notes in the command line options panel that the default for
persistmempool is 1. In the debug panel, some 90,000 transactions
before restart, some 200 odd shortly after. Manually setting
persistmempool=3D1 in the conf file does not seem to make any difference. Perhaps it is operating as expected and I am not sure what to observe,
but does not seem to be observably saving and loading the mempool on
restart. This will need to be resolved.

Use a dynamic target block size to make the current block. This marks a
shift from using block size or weight to a count of transactions.
Determine the target block size using; pre-rollout(current average
valid transaction pool size) x ( 1 / (144 x n days ) ) =3D number of
transactions to be included in the current block. The block created
should be a minimum 1MB in size regardless if the target block size is
lower.

If the created block size consistently contains too few transactions
and the number of new transactions created is continuously greater than
the block size will accommodate then I expect eventually ageing
transactions will be over-represented as a portion of the block
contents. Once another new node conforming to the proposal makes a
block, the block size will be proportionately larger as the transaction
pool has grown.  If block size is too large on average then this = will
shrink the transaction pool.

Miners will likely want to conform to the proposal, since making blocks
larger than necessary makes more room in each block potentially
lowering the highest fees paid for priority service. Always making
blocks smaller than the proposal requires will in time lower the
utility value of Bitcoin, a different situation but akin to the
current. Transactions will still always confirm but with longer and
longer wait periods. The auction at the front of the queue for priority
will be destroyed as there will be eventually no room in blocks besides
ageing transations and, there will be little value paying higher than
the minimum fee. Obviously, neither of these scenarios are in a miner's
interests.

Without a consensus as to what size dynamic block to create,
enforcement of dynamic block size is not currently possible. It may be
possible for a consensus to be formed in the future but here I cannot
speculate. I can only suggest that it is in the interest of Bitcoin as
a whole and, in the interest of each node to conform to the proposal.
Some nodes failing to conform to the proposed requirements of dynamic
size or transaction priority in this proposal will not be destructive
to the operation of the proposal.

If necessary, nodes that have not yet adopted the proposal will just
continue to create standard fixed size unordered blocks, although, if
the current mechanisms of block validation include the fixed block size
then it is unlikely that these nodes will be able to validate the
blockchain going forward. In this case a hard fork and a full transfer
to the new method should be required. If dynamic blocks with ordered
transactions will be valid to existing nodes then only a soft fork is
required. There is no proposed change to the internal construction of
blocks, only to the block size and using an ordered method of
transaction selection.

> The default value for mempoolexpiry in Bitcoin Core may in future
need to be adjusted to match something more than n days or, perhaps
using less than n =3D 14 days may be a more sensible approach?

All block created with dynamic size should be verified to ensure
conformity to a probability distribution curve resulting from the
priority method. Since the input is a probability, the output should
conform to a probability distribution.

The curves used for the priority of transactions would have to be
appropriate. Perhaps a mathematician with experience in probability can
develop the right formulae. My thinking is a steep curve. I suppose
that the probability of all transactions should probably account for a
sufficient number of inclusions that the target block size is met on
average although, it may not always be. As a suggestion, consider
including some dust or zero-fee transactions to pad if each valid
transaction is tried and the target block size is not yet met, highest
BTC transaction value first?

**Explanation of the operation of priority:**

> If transaction priority is, for example, a number between one (low) and one-hundred (high) it can be directly understood as the percentage
chance in one-hundred of a transaction being included in the block.
Using probability or likelihood infers that there is some function of
random. Try the transactions in priority order from highest to lowest,
if random (100) < transaction priority then the transaction is included<= br> until the target block size is met. 

> To break it down further, if both the fee on a curve value and the
time waiting on a curve value are each a number between one and one-
hundred, a rudimentary method may be to simply multiply those two
numbers, to find the priority number. For example, a middle fee
transaction waiting thirty days (if n =3D 60 days) may have a value of
five for each part  (yes, just five, the values are on a curve). = When
multiplied that will give a priority value of twenty-five, or, a
twenty-five percent chance at that moment of being included in the
block; it will likely be included in one of the next four blocks,
getting more likely each chance. If it is still not included then the
value of time waiting will be higher, making for more probability. A
very low fee transaction would have a value for the fee of one. It
would not be until near sixty-days that the particular low fee
transaction has a high likelihood of being included in the block.

In practice it may be more useful to use numbers representative of one-
hundred for the highest fee priority curve down to a small fraction of
one for the lowest fee and, from one for a newly seen transaction up to
a proportionately high number above one-hundred for the time waiting
curve. It is truely beyond my level of math to resolve probability
curves accurately without much trial and error.

The primary reason for addressing the issue is to ensure transactional
reliability and scalability while having each valid transaction confirm
in due time.

#### Pros

*   Maximizes transaction reliability.
*   Overcomes transaction bandwidth limit.
*   Fully scalable.
*   Maximizes possibility for consumer and business uptake.<= br> *   Maximizes total fees paid per block without reducing rel= iability;
because of reliability, in time confidence and overall uptake are
greater; therefore, more transactions.
*   Market determines fee paid for transaction priority.
*   Fee recommendations work all the way out to 30 days or g= reater.
*   Provides additional block entropy; greater security sinc= e there is
less probability of predicting the next block. _Although this is not
necessary it is a product of the operation of this proposal._

#### Cons

*   Could initially lower total transaction fees per block.<= br> *   Must be first be programmed.

#### Pre-rollout

Nodes need to have at a minimum a loose understanding of the average
(since there is no consensus) size of the transaction pool as a
requirement to enable future changes to the way blocks are constructed.

A new network service should be constructed to meet this need. This
service makes no changes to any existing operation or function of the
node. Initially, Bitcoin Core is a suitable candidate.

For all operations we count only valid transactions.

**The service must:**

*   Have an individual temporary (runtime permanent only) Se= rial Node
ID.
*   Accept communication of the number of valid transactions= in the
mempool of another valid Bitcoin node along with the Serial Node ID of
the node whose value is provided.
*   Disconnect the service from any non-Bitcoin node. Bitcoi= n Core may
handle this already?
*   Expire any value not updated for k minutes (k =3D 30 min= utes?).
*   Broadcast all mempool information the node has every m m= inutes (m =3D
10 minutes?), including its own.
*   Nodes own mempool information should not be broadcast or= used in
calculation until the node has been up long enough for the mempool to
normalise for at least o minutes (o =3D 300 minutes ?)
*   Alternatively, if loading nodes own full mempool from di= sk on node
restart (o =3D 30 minutes ?)
*   Only new or updated mempool values should be transmitted= to the
same node. Updated includes updated with no change.
*   All known mempool information must survive node restart.=
*   If the nodes own mempool is not normalised and network i= nformation
is not available to calculate an average just display zero.
*   Internally, the average transaction pool size must retur= n the
calculated average if an average is available or, if none is available
just the number of valid transactions in the node's own mempool
regardless if it is normalised.

Bitcoin Core must use all collated information on mempool size to
calculate a figure for the average mempool size.

The calculated figure should be displayed in the appropriate place in
the Debug window alongside the text Network average transactions.

Consideration must be given before development of the network bandwidth
this would require. All programming must be consistent with the current
operation and conventions of Bitcoin Core. Methods must work on all
platforms.

As this new service does not affect any existing service or feature of
Bitcoin or Bitcoin Core, this can technically be programmed now and
included in Bitcoin Core at any time.

### 5. Solution operation

This is a simplistic view of the operation. The actual operation will
need to be determined accurately in a spec for the programmer.

1.  Determine the target block size for the current block.
2.  Assign a transaction priority to each valid transaction in th= e
mempool.
3.  Select transactions to include in the current block using
probability in transaction priority order until the target block size
is met. If target block size is not met, include dust and zero-fee
transactions to pad.
4.  Solve block.
5.  Broadcast the current block when it is solved.
6.  Block is received.
7.  Block verification process.
8.  Accept/reject block based on verification result.
9.  Repeat.

### 6. Closing comments

It may be possible to verify blocks conform to the proposal by showing
that the probability for all transactions included in the block
statistically conforms to a probability distribution curve, *if* the
individual transaction priority can be recreated. I am not that deep
into the mathematics; however, it may also be possible to use a similar
method to do this just based on the fee, that statistically, the block
conforms to a fee distribution. Any dust and zero-fee transactions
would have to be ignored. This solution needs a competent mathematician
with experience in probability and statistical distribution.

It is trivial to this proposal to offer that a node provides the next
block size with a block when it is solved. I am not sure that this
creates any actual benefit since the provided next block size is only
one node's view, as it is the node may seemingly just as well use its
own view and create the block. Providing a next block size only adds
additional complexity to the required operation, however, perhaps
providing the next block size is not trivial in what is accomplished
and the feature can be included in the operation.

Instead of the pre-rollout network service providing data as to valid
transactions in mempool, it could directly provide data as to the
suggested next block size if that is preferred, using a similar
operation as is suggested now and averaging all received suggested next
block sizes.

It may be foreseeable in the future for Bitcoin to operate with a
network of dedicated full blockchain & mempool servers. This would not<= br> be without challenges to overcome but would offer several benefits,
including to the operation of this proposal, and especially as the RAM
and storage requirements of a full node grows. It is easy to foresee
that in just another seven years of operation a Bitcoin Full Node will
require at least 300GB of storage and, if the mempool only doubles in
size, over 1GB of RAM.

There has been some concern expressed over spam and very low fee
transactions, and an infinite block size resulting. I hope that for
those concerned using the dust level addresses the issue, especially as
the value of Bitcoin grows.

Notwithstanding this proposal, all blocks including those with dynamic
size each have limited transaction space per block. This proposal
results in a fee for priority service auction, where the probability of
a transaction to be included in limited space in the next available
block is auctioned to the highest bidders and all other transactions
must wait until they reach priority by ageing to gain significant
probability. Under this proposal the mempool can grow quite large while
the confirmation service continues in a stable and reliable manner.
Several incentives for attackers are removed, where there is no longer
multiple potential incentives for unnecessarily filling blocks or
flooding the mempool with transactions, whether such transactions are
fraudulent, valid or, otherwise. Adoption of this proposal and
adherence results in a reliable, stable fee paying transaction
confirmation service and a beneficial auction.

This proposal is necessary. I implore, at the very least, that we use
some method that validates full transaction reliability and enables
scalability of Bitcoin. If not this proposal, an alternative.

I have done as much with this proposal as I feel that I am able so far
but continue to take your feedback.

Regards,  
Damian Williamson

[![Creative Commons License](https://i.creativecommons.org/l/by-s= a/4.0/
88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/)=  
<span xmlns:dct=3D"http://purl.org/dc/terms/"
href=3D"http://purl.org/dc/dcmitype/Text" property=3D"dct:title= "
rel=3D"dct:type">BIP Proposal: UTPFOTIB - Use Transaction Prio= rity For
Ordering Transactions In Blocks</span> by [Damian Williamson
&lt;will= tech@live.com.au&gt;](http://thekingjameshrmh.tumblr.com/pos= t/1
68948530950/bip-proposal-utpfotib-use-transaction-priority-for-or= der)
is licensed under a [Creative Commons Attribution-ShareAlike 4.0
International License](http://creativecommons.org/licenses/by-s= a/4.0/).
Based on a work at https://lists.linuxfoundation.org/pipermail/bitcoin-
dev/2017-
December/015371.html](https://lists.linuxfoundation.org/pipe= rmail/bitco
in-dev/2017-December/015371.html).
Permissions beyond the scope of this license may be available at [https
://open= source.org/licenses/BSD-3-
Clause](https://opensource.org/licenses/BSD-3-Clause).


_______________________________________________
bitcoin-dev mailing list
= bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/b= itcoin-dev

_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.= linuxfoundation.org
https://lists.linuxfoundation.org= /mailman/listinfo/bitcoin-dev


--_000_PS2P216MB0179D1D9BBD720A93A7F2E739DED0PS2P216MB0179KORP_--