Giter VIP home page Giter VIP logo

Comments (6)

nemothenoone avatar nemothenoone commented on June 4, 2024

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.

from mina-state-proof.

lampardlamps avatar lampardlamps commented on June 4, 2024

@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.
In this Mina verification case, since you're talking about all the computation cost, I was expecting that the 3.5M number was in the unit of gas, and the ETH to pay should be 3.5M * gas price, so at the moment in the 0.4ETH ball park.

from mina-state-proof.

nemothenoone avatar nemothenoone commented on June 4, 2024

@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).

from mina-state-proof.

lampardlamps avatar lampardlamps commented on June 4, 2024

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?

from mina-state-proof.

nemothenoone avatar nemothenoone commented on June 4, 2024

@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.

from mina-state-proof.

lampardlamps avatar lampardlamps commented on June 4, 2024

from mina-state-proof.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.