I have been reading about transactions recently and I am interested in understanding how the size of a transaction is influenced by its building elements.
So for example we know that a transaction contains:
- a certain number of inputs
- a cetrain number of outputs
- a locking scrpit (scriptPubKey)
- an unlocking script (scriptSig)
... and other elements. What I would like to know is how much each of the elements contributes to the total size of the transaction. So for example how many bytes are the typical scripts? Do they vary in size? Do inputs have a (approximately) fixed size in bytes? Do outputs have a (approximately) fixed size in bytes? Is everything thus a simple game of addition?
Thank you very much for taking the time to read my question!