[Question] Mina SNARK verification cost on Ethereum #37
Replies: 6 comments
-
Hey, @lampardlamps! The amount of gWei you mentioned (e.g. 138 gWei) is the amount of small fractions of ETH people pay to get their transaction's data into the Ethereum cluster. So the gas price we can see, for example, on Etherscan, is a median amount of gWei people currently pay to miners according to the overall Ethereum cluster transaction processing supply/demand balance. So, taking out of consideration these supply/demand fluctuations, Mina's verification will cost something like 3,5m gas (some gWei), which is 0.0035 ETH (hope I didn't screw up with zeroes - you can always check that number with, for example, https://gwei.io). This is much more than the average transaction processing cost on Ethereum, but much better than the straightforward way of verifying Mina's state proof on EVM. We actually think, that this cost is going to be reduced even more (not dramatically, but anyway) because of the circuit optimizations we've figured out during the implementation. Instead of putting only a part of Pickles proof under the FRI-alike proof, we've put the whole Pickles proof verification ((including Poseidon parts alike computations etc)) under the FRI-alike proof. |
Beta Was this translation helpful? Give feedback.
-
@nemothenoone thank you very much for your reply! My confusion was that you seem to use 'gas' and 'gwei' interchangeably, but to my limited understanding, they should not be? The computation cost on Ethereum is marked as gas, but for each gas, you need to pay a gas price (unit: gwei/gas), and the two multiplied together gives the ETH amount you need to pay. For example, a simple ETH transfer is 21,000 gas, if using gas price of 100 gwei/gas, then the cost is 2.1M gwei = 0.0021 ETH = $8USD; when the net work is congested, the tranfer fee in gas is still 21,000 gas, but the gas price rises considerably, hiking up the price in ETH or USD you pay to miners. |
Beta Was this translation helpful? Give feedback.
-
@lampardlamps Oh, now I got what you're talking about. You're right, using gWei as gas and vice versa is not what one should do. I guess we gotta remove that from the demo page of ours to avoid further confusion. Yes, a single verification cost theoretical estimation is somewhere around 3.5m gas. Not gWei, yes. But, please notice, that this is a cost estimation not for a single transaction, but for the whole state verification (all the transactions submitted to Mina since the last state proof was submitted to Ethereum). It is only required to verify state proof once to get all the transactions it contains confirmed on Ethereum side. So in case we're talking about per-transaction cost - it is definitely much lower (depending on the amount of transactions being confirmed with a single state proof verification). |
Beta Was this translation helpful? Give feedback.
-
Thanks @nemothenoone. Great! Yes, I understand it's the whole state verification, and it's totally awesome! Can I ask - the Solana light client verifier that you guys are developing (which costs ~2M gas), is it also a whole-state verification? |
Beta Was this translation helpful? Give feedback.
-
@lampardlamps Solana's light client state verification is about proving and verifying only some part of a state (crucial one, which contains validators signatures and replication packet hash). So the security of such method is a little bit lower since it is not possible (for now, we're working on it) to verify the whole Solana (and others) state. |
Beta Was this translation helpful? Give feedback.
-
Thanks again for the explanation. These are fantastic developments, can't
wait them to be out in the open for tests!
…On Thu, 6 Jan 2022 at 22:31, Mikhail Komarov ***@***.***> wrote:
@lampardlamps <https://github.com/lampardlamps> Solana's light client
state verification is about proving and verifying only some part of a state
(crucial one, which contains validators signatures and replication packet
hash). So the security of such method is a little bit lower since it is not
possible (for now, we're working on it) to verify the whole Solana (and
others) state.
—
Reply to this email directly, view it on GitHub
<#36 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM7TGF2K4CZDZRKJMOGHFLUUYJ23ANCNFSM5LIRZVOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks for your great work and I had fun reading your blogs and playing with the demo. Just a rudimentary question re the demo if I may: it's stated that 'the verification cost on Ethereum is 3.5M gas (0.0035 ETH)'. I'm a bit confused about the 0.0035ETH part, since I thought the actual cost should be 3.5M gas * gas price (138 gWei at the time of this post), so the total cost would be 0.0035*138 = 0.47ETH? Could you clarify this please, thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions