Having identical keys and public messages for the BN254 verification reduces the cost of the gas?
In the world of decentralized applications (APP), the verification of total signatures is an important step to ensure the integrity of the transactions. One of the common scenarios includes the aggregation of many signatures, which can involve a new signature with reduced gas costs due to the optimization of the Ethereum virtual machine (EVM) and the use of digital signatures.
BN254 signature diagram
BN254 is a function of rapid encrypted choice designed to verify total signatures. This is particularly useful for dealing with a large number of identical inputs, since it allows an efficient calculation calculation with a high -performance device called “signature device”.
Total signatures and gas costs
When many identical signatures join, the resulting signature is not necessarily different from the original. However, having keys and public messages identical for the BN254 verification has an impact on gas costs.
That’s why:
- Optimization of the abbreviation function : The BN254 quick choice function uses a combination of bits operations to calculate the final connection. During the aggregation of many signatures with identical inputs, the resulting shortcut value can be optimized by reducing the number of unique calculations requested.
- EVM optimization: Ethereum Virtual Machine (EVM) was designed to optimize gas costs for total signature. By reducing the existing logic of verification of signatures, EVM can reduce the general calculation costs associated with the verification of many signatures.
impact on gas costs
Studies have shown that the aggregation of many identical signatures from BN254 can lead to a reduction in gas costs compared to the verification of the individual signatures. However, this advantage depends on various factors:
- Number of signatures : the more identical to the aggregate signatures, the greater the potential saving on costs.
2.
- EVM version and configuration: EVM performance may vary according to the different versions and configuration.
To give you a difficult idea of what you can expect, here are some example of the survey on the signature of the aggregate:
- 100 identical signatures from BN254: 20-30 gas units per sign (g/Mr)
- Aggregate these signatures using the incorporated optimization of the hash function and reduce redundant calculations can lead to:
+ 2-5 g/sig (depending on the specific implementation)
It should be remembered that this is a simplified example and the real results may vary according to the specific use case.
Application
To summarize, have keys and public messages identical to the BN254 verification reduces gas costs when many identical signatures are aggregated. However, the impact depends on various factors, such as the number of signatures, the complexity of the signature scheme, the EVM version and the configuration. Although this optimization may not lead to significant savings on costs in any scenario, the technique can be useful when designing decentralized applications with aggregated applications.
If you have specific questions or want more details on the signature of aggregate and BN254, you can ask!