transaction data needs to sit in the 1mb limit. but Segwit lets signatures sit outside.
[...]
in short. if schnorr was used the OP's example would still only be a couple hundred transactions but the weight outside the 1mb limit would be less.
meaning schnorr is not scaling. is unbloating the bloat of the 'witness' area
I think (you know better the internals than me, so correct me if I'm wrong) that for non-SegWit transactions the signatures are still inside the 1MB.
And since most transactions are still not SegWit, shouldn't you revise that math? Just telling.
again the area outside the 1mb area is just for signatures and more precisely just signatures of segwit addresses
for non segwit INPUTS the signature of it sits inside the 1mb BASE BLOCK
for segwit inputs the signature sits outside
but in both cases the input and outs, values etc still sit inside the 1mb
EG imagine one tx of 4 inputs
1Am4deup4ddr3555
bc1qM4d3up4ddr355
1Am4deup4ddr3555
1Am4deup4ddr3555
only 1 signature sits outside the 1mb output. yet the people that do stats of sgwit utility would treat that tx as 1 segwit tx. when reality shows it as 0.25 segwit
as for the byte for byte movement
they want to make it feel like the transaction is 4x smaller inside the 1mb area.. (the fake news that it can fit 4x more transactions) the reality is that there is less than 72byte decrease in the 1mb area
im not gonna go full anal precise math..
ill just give you an example where we say a signature is 70 bytes and the whole tx is 630bytes
1mb base 3mb witness
4x legacy inputs | 630bytes | 000bytes |
3x legacy 1 segwit inputs | 560bytes | 070bytes |
2x legacy 2 segwit inputs | 490bytes | 140bytes |
1x legacy 3 segwit inputs | 420bytes | 210bytes | *
4x segwit inputs | 350bytes | 280bytes | **
now here is the thing
the most leanest 1in 1 out is about 180bytes (again im simplying)
*you can fit in 1 lean segwit or 1 lean legacy
**you can fit in 1 lean legacy or 2 lean segwit
but you cant fit in another tx of the same 4input size as above
so although there is 4x space. its not 4x capacity
now what the OP's example done was use multisigs imagine each input was a 2sig multisig meaning the first 4xlegacy input is now 910 byte (again over simplifying)
1mb base 3mb witness
4x legacy inputs | 910bytes | 000bytes |
3x legacy 1 segwit inputs | 770bytes | 140bytes |*
2x legacy 2 segwit inputs | 630bytes | 280bytes |**
1x legacy 3 segwit inputs | 490bytes | 420bytes |***
4x segwit inputs | 350bytes | 560bytes |****
as you can see. now if all inputs were segwit and were multisig. you could fit in another
*1 lean 1in1out segwit tx
**1 lean 1in 1out legacy tx or 2 lean 1in1out segwit tx
***3 lean 1in 1out legacy tx or 3 lean 1in1out segwit tx or 1 4in segwitmultisig tx
****3 lean 1in1out legacy... or 4 lean 1in1out segwit.. or ... 1 4insegwitmultig tx with 1 lean 1in 1out segwit
but here is the thing.. to be able to get the 4 lean 1in 1out segwit. it requires the bloated segwit multisig
you will not gt another 3 or 4 tx's in if the other transactions were lean or standard to begin with.
ill explain
imagine the whole block was the lean legacy 1i1o (180bytes each)
max transactions = 5555 tx (kep this number in mind)
no block has ever been 5555tx. because not everyone uses the compressed keys of single 1in 1out
anyway
if the whole block was lean segwit 1i1o (110base 70witness)
max transactions = 9090tx (not 4x capacity, not even 2x capacity) base=1mb witness=0.636btc (1.636mb weight)
imagine the whole block was 4in1out legacy but not multisig(630byte each)
max transactions = 1587tx
if the whole block was segwit 4i1o not multisig
max transactions = 2857tx (again not even 2x)
..
but here is the statistics cheat
lets take just 1587 4in1ou.. mak then all segwit.. and then throw in loads of lean 1in1o segwit
max transactions = 1587 4in tx AND 4041 lean segwit
so thats 5628 transactions which is base=1mb winess=0.727mb witness (1.727 weight)
and as you can see not 4x capacity of the same format but just 3x of leaned small tx. (and thats the trick)
now lets do the multisig (910 bytes)
legacy multisig=1090 transactions
segwit multisig=2857 transactions
(as you can see thats 2.8x but only if the whole block is as such. but its only 2857 tx.. not 5555tx or 9090tx )
so although it looks like a bloated multig can get you 2.8x simply by converting every tx to segwit.. there is less tx to start with
anyway. lets take the 1090 multisigs. convert them to 1090 segwit multisig and then fill the spare space with lean 1i10 segwit just to do the same stats cheat
1090 sw multig + 5622lean = 6712 transactions. which is base=1mb witness=1mb (2mb weight)
so although it apears that your getting in 4x transactions. thats not 4x transactions of similar type.
and its not 4x transactions of the 5555tx of lean block.
its like imagine a bus of adults.. kick 1 adult out.. another adult gets a seat. but this time they are saying. noo lets let in 4 midgets to twist the statistics
where as the reality is real use of real tx's are not lean and there will never be ample supply of midgets
yet. if the block was 4mb of space for legacy to use.
you would get
4mb full use= 22,222 lean 1i1o transactions
4mb full use= 6349 of 4i1o transactions. (as oppose to 2857 in the segwit base|witness split)
4mb full use= 4395 of 4i10 multisig transactions (as oppose to the 2857 in the segwit base|witness split)
summary
you get more transactions in (without lean trickery to up tx count) per byte via a 4mb full access block rather than the base|witness limitation of a same pseudo 4mb 'weight'
in short get rid of the 1mb base limit so all transactions can really and properly use the 4mb 'weight' and then we can have more transactions
and yes. we can mix some of the multisigs and lean tx's to get more than 6349 and 4395 tx's listed just above the summary to also play the tricks and get closer to 20,000 transactions