[Reposted from FVM Forum] What is the TPS value for FEVM/FVM? #597
trruckerfling
started this conversation in
Developers
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
[OP @maciej, Nov 2022]
As of Jan 2022, the FVM Forum will be merging into the Filecoin Community Discussion here, as FVM and Filecoin often go hand-in-hand for builders
This is actually not an easy question to answer. Let me explain
Note: in Filecoin “transactions” are called “messages”, so I’ll stick to “messages” from now.
Explanation
Every 30 sec (called “epoch”) the chain produces a tipset, which consists of 1 or more blocks. Usually there are around 3-7 blocks per tipset (eg. take a look at this tipset). There is a hard limit of 10 000 messages per block. However, there is also a hard limit of 10_000_000_000 gas per block, so the total gas limit of messages in a block can’t be > 10_000_000_000.
This tends to be the limiting factor when it comes to messages-per-second question. This makes it hard to reason about the number of messages per block as each message has vastly different gas consumption. Again, you can explore it by taking look at one of the blocks and one of its messages and seeing the gas used.
So when you send a message to an EVM actor, this message will consume certain amount of gas, depending on many factors like computation, memory usage, input parameters etc.
Back-Of-The-Envelope Calculation.
Let’s assume all messages are “send” messages i.e they transfer certain token value between actors. Looking at the explorer we can see “send” messages use around 500_000 gas. So in a theoretical scenario where there are only “send” messages in a block there could be 10_000_000_000 / 500_000 = 20_000 messages. If we assume 5 blocks per tipset then we have 100_000 messages in a tipset (assuming no duplications of messages between blocks). So if tipsets are created every 30s it gives us 100_000/30s = ~3300 messages per second (“tps”).
Will it be improved in a future?
Other project we have is called Interplanetary Consensus (IPC). It’s gonna enable subchains and increase scalability by many orders of magnitude. Current estimates are Q3 2023 for mainnet.
Beta Was this translation helpful? Give feedback.
All reactions