Closed brson closed 1 year ago
Practically, I think we have three somewhat different sets of txs flowing through the system:
I think it's reasonable to measure the transaction envelope count for cases 1 and 2, but case 3 is fairly prominent in the txsets I see. I just clicked one at random and found https://horizon.stellar.org/ledgers/43261506/operations?limit=100 which is someone doing an airdrop of claimable balances, clearly those 100 ops are not so much "one thing" as "a stream of zillions of separate things arbitrarily split into 100-op chunks".
(Put another way: it seems odd / unfortunate to me that if we raised the MAX_OPS_PER_TX number, currently set to 100 somewhat arbitrarily, our "TPS" number as reported here would appear to go down due to the prevalence of such case #3 transactions. Or put yet another way: if you started measuring "TPS" this way we'd have an incentive to lower MAX_OPS_PER_TX, which seems not great!)
Probably some simple heuristics could distinguish most of the batch transactions from the atomic sequence (that would be fair to count as 1 tx):
After thinking over this for a while, I am not inclined to judge how users use transactions. If they are grouping ops into a transaction I can only assume they have a reason.
Adding per-chain heuristics for one chain would lead to per-chain heuristics for more chains, and I don't see any way to manage that situation.
We are reporting stellar "operations", but operations are performed in a single atomic transaction. In this way stellar is like solana, but on solana we are reporting the transaction count, not the "instruction" count.
Stellar operations and transactions: https://developers.stellar.org/docs/fundamentals-and-concepts/stellar-data-structures/operations-and-transactions
I think we should be reporting the transaction count instead.
In general we should define transactions as the user-visible unit of atomic writes.
Here are my recent thoughts about what we should consider a "transaction": https://github.com/Aimeedeer/realtps/issues/48
cc @graydon @leighmcculloch thoughts?