1

I’m trying to track all the gas paid by Starknet on Ethereum.

This Dune board tracks gas spent by SHARP Operator in transactions to Merkle Verifier, FRI Verifier, GPS Verifier and Memory Page Fact Registry.

Where can I find more information about each category? What part of the gas costs are assignable to Starknet vs StarkEx.

Do the above transactions cover all L1 gas costs by Starknet or should I also look at gas spent by the StarkNet Operator (0x2c169dfe5fbba12957bdd0ba47d9cedbfe260ca7)? Anything else I’m missing.

My current understanding based on docs is the following:

  • Transactions from the SHARP Operator to Memory Page Fact Registry cover the cost of storing transaction data on L1. All of these transactions are assignable to Starknet
  • Transactions from the SHARP Operator to SHARP GPS Verifier are for ttransaction verification. They are also mostly Starknet, but it's hard to identify what %
  • I don't have much context to the Merkle or FRI Verifier I assume these also have to do with tx verification.
  • Starknet Operator calls different functions on the Starknet Core Contract (0xc662c410c0ecf747543f5ba90660f6abebd9c8c4) on L1. Are these just for passing information or for verification as well?
  • It seems to have sent transactions before Starknet mainnet launch.
Andrzej
  • 87
  • 6
Vpum
  • 11
  • 3

2 Answers2

0

SHARP sends STARK proofs for a large number of Cairo statements. These statements can come from StarkNet, StarkEx and sometimes directly from clients using SHARP for other apps. The mix is not visible on L1, though most of the traffic in recent days came from StarkNet.

The STARK proof is submitted in a series of transactions that together form the proof. These are:

  1. Memory page registrations - data that is considered output of the Cairo statements. This includes call data that serves as rollup data for StarkNet as well as state update information for both StarkNet and StarkEx. These transactions consume the bulk of gas used by SHARP these days.
  2. Merkle proof registrations - the STARK proof is composed of a few Merkle decommitments whereby the prover commits to data in the initial steps of the proof.
  3. Fri-Merkle proof registrations - these are decommitments to FRI layers which is the Low Degree Test that STARK uses.
  4. Verify and Register proof - this is the final tx of the proof that references all the above registrations and combines them soundly into one big proof. This tx also registers the on-chain facts attesting to the verification of each of the individual statements in the proof for consumption by the various StarkNet or StarkEx contracts in their UpdateState txs. As such, this tx size also depends on the number of jobs to which the proof attests.

If you are interested in the details of the verifier logic, the source code is public at the StarkWare git repo

gidi
  • 1
  • Thank you for the response! What about the StarkNet Operator calls (0x2C169DFe5fBbA12957Bdd0Ba47d9CEDbFE260CA7) to the StarkNet Core Contract (0xc662c410C0ECf747543f5bA90660f6ABeBD9C8c4)? What's the functionality and can the gas costs for these be separated between StarkNet and StarkEx? – Vpum Mar 29 '23 at 14:23
0

You can try to check it with Nodes Provider like GetBlock for example. Use the appropriate JSON-RPC methods "eth_getTransactionByHash" And from this info,use the "gasPrice" and "gasUsed "fields to calculate the gas fees paid for each transaction.

Charly El
  • 10
  • 2