Disregarding value, but instead going by size in the protocol, what are the largest transactions so far in the history of Bitcoin, in terms of:
- byte size
- number of inputs ("vin")
- number of outputs ("vout")
- total number of inputs and outputs
The largest single transaction to date is 465,554 bytes. It's hash is 659135664894e50040830edb516a76f704fd2be409ecd8d1ea9916c002ab28a2.
The same transaction has the largest number of inputs: 2,585.
Two transactions tie for the largest number of outputs: 623463a2a8a949e0590ffe6b2fd3e4e1028b2b99c747e82e899da4485eb0b6be and 5143cf232576ae53e8991ca389334563f14ea7a7c507a3e081fbef2538c84f6e both have 3,075 outputs
The same two transactions have the largest number of inputs plus outputs, although they only have a single input so the total is 3,076 inputs plus outputs.
Note, however, that the blockchain has been used to store information by manipulating output addresses so it is more than likely that the transactions listed in 3) are not "real", in that they do not contain spendable outputs.
The largest transaction by size to date was the Mega Transaction mined by f2pool on 7 July 2015: It was 999,657 bytes, had 5,569 inputs and 1 output.
The transaction filled a complete block by itself and that block was widely cited as taking 25 seconds to validate. The transaction caused a lot of discussion back then, and prompted e.g. this blog post about the Mega Transaction's validation time by Rusty Russell.
Scripts to find it out yourself + preprocessed data
I have uploaded scripts that extract most of the data you ask at: https://github.com/cirosantilli/bitcoin-strings-with-txids including the top 10k transactions for each category.
Those scripts rely on https://github.com/alecalve/python-bitcoin-blockchain-parser which parses the blockchain data offline and without the need for a running local server.
The scripts could quickly update the data at any time efficiently from the last snapshot, and this is what I've found when I last updated on February 2021:
byte size: list at data/tx_size_bytes
: bb41a757f405890fb0f5856228e23b715702d714d59bf2b1feb70d8b2b4e3e08 (Jul 2015) with 999,657 bytes, it regroups a bunch of smaller outputs into one big one. The values are small, so it's likely made for the data and not value.
This transaction is sometimes dubbed "The Megatransaction", and is mentioned e.g. at:
https://en.bitcoin.it/wiki/July_2015_flood_attack:
The July 2015 flood attack was a large "stress test" of the Bitcoin network. The possibly distributed attack has provoked hundreds of thousands of transactions, leaving over 80,000 in the mempool at one time. The attack is subsequent to stress tests executed in June.
Longest-time-verifying block: unsurprisingly it also took the longest to verify
number of inputs: data/tx_nins
: f2e197a6d8d088b13afd0f99d4027da36a9413b9f3d7730ba5278132ebc950a7 (Aug 2015) + 8 other tied with 20,000
number of outputs: data/tx_nouts
: dd9f6bbf80ab36b722ca95d93268667a3ea6938288e0d4cf0e7d2e28a7a91ab3 (Jan 2016) with 13,107 outputs. Some of them have been spent, so it is not all just data embedding
i found transactions with 20,000 inputs cf1032c2213e6faea04f1813aa6890e7f588bb378cb98e7425aec83c11d4457c 30b3b19b4d14fae79b5d55516e93f7399e7eccd87403b8dc048ea4f49130595a f2e197a6d8d088b13afd0f99d4027da36a9413b9f3d7730ba5278132ebc950a7 8dabbf51f78c1e7286866af1de403118c5ddbe57ca93b54859245916d2bf1063 740ac533882221099e7202bbdafbb99ec589c6e74fd2fe7ca1274b46ea4f0a96 dd6067e71c04cb62f8e5aa52ecc99b01ffcd551a52727d046a2fabb14eb39b4d