From 0caff0b3a9b75d287d72bb5cb7d26a4f2944f9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Kj=C3=A6rstad?= Date: Tue, 28 Mar 2023 11:48:17 +0200 Subject: [PATCH] #0026 Max Tx Size Consensus Limit --- RFCs-by-status.md | 1 + .../0026-max-tx-size-consensus-limit.md | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 text/0026-max-tx-size-consensus-limit/0026-max-tx-size-consensus-limit.md diff --git a/RFCs-by-status.md b/RFCs-by-status.md index bbcf2e5..8270dac 100644 --- a/RFCs-by-status.md +++ b/RFCs-by-status.md @@ -12,6 +12,7 @@ A list of all RFCs by their current status. - [#0012 Cold Minting](./text/0012-cold-minting/0012-cold-minting.md) - [#0024 PoW Spacing Augmentation](./text/0024-pow-spacing-augmentation/0024-pow-spacing-augmentation.md) - [#0025 PoS Only Confirmations](./text/0025-pos-only-confirmations/0025-pos-only-confirmations.md) + - [#0026 Max Tx Size Consensus Limit](./text/0026-max-tx-size-consensus-limit.md) ## Agreed RFCs diff --git a/text/0026-max-tx-size-consensus-limit/0026-max-tx-size-consensus-limit.md b/text/0026-max-tx-size-consensus-limit/0026-max-tx-size-consensus-limit.md new file mode 100644 index 0000000..45637a5 --- /dev/null +++ b/text/0026-max-tx-size-consensus-limit/0026-max-tx-size-consensus-limit.md @@ -0,0 +1,41 @@ +# Max Tx Size Consensus Limit + +- Status: proposed +- Type: protocol consensus rule +- Related components: `consensus` +- Start Date: 28-Mar-2023 +- Discussion: https://github.com/peercoin/rfcs/issues/53 +- Supersedes: N/A +- Superseded by: N/A +- Author: sandakersmann + +## Summary + +Add a Max Tx Size Consensus Limit to the protocol consensus rules. + +## Conventions + +- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119). + +## Consideration + +Bitcoin Core did not add a Max Tx Size Consensus Limit since they have MAX_BLOCK_SIGOPS_COST and a very low MAX_BLOCK_WEIGHT. When Peercoin wants to increase the MAX_BLOCK_WEIGHT in the future, it’s important that we have a Max Tx Size Consensus Limit in place to avoid excessively large transactions on the blockchain. We can not depend on Bitcoin Core to implement this since they have no intentions to increase MAX_BLOCK_WEIGHT. + +## Detailed design + +Add new consensus rule to `src/consensus/consensus.h` like Bitcoin Cash Node has done: https://github.com/bitcoin-cash-node/bitcoin-cash-node/blob/master/src/consensus/consensus.h + +The Max Tx Size Consensus Limit should be put just above the current size of the biggest transaction in the blockchain. + +## Advantages + +* Avoid excessively large transactions on the blockchain + +## Drawbacks + +* Hardfork of protocol rules + +## Alternatives + +* Not increase MAX_BLOCK_WEIGHT +