I have processed 1000 blocks starting from Block #461653.I computed several metrics, including the supposed size of witness data and non-witness data (onchain), assuming all P2SH inputs/outputs are converted to P2PWSH and all P2PKH inputs/outputs are converted to P2WPKH.This takes into account that other types of transactions will not be modified by Segwit (e.g. OP_RETURN outputs, or P2PK). This analysis doesn't take into account that LN transactions may affect the current state, increasing the segwit/nosegwit ratio.Among a lot of information, I've got the following real world results...acMainChainSpace =352608924acSegwitSpace =599400403Ratio segwit/nosegwit=1.6999This implies that the 75% that discount is not the best option to prevent witness spam in a block of 4 MB, as stated in https://segwit.org/why-a-discount-factor-of-4-why-not- .2-or-8-bbcebe91721e The non-witness data weight factor should not be 4 but 2.35. The closest integer value is 2, which leads to a 50% witness discount.The Bitcoinj source code is available for anyone to review. I encourage anyone to re-compute this with another utility to cross-check. Maybe Antoine Le Calvez (p2sh.info) would like to double-check.
_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin- dev