kkrt-labs / kakarot-rpc

Kakarot ZK EVM Ethereum RPC adapter
MIT License
136 stars 101 forks source link

feat: implement eth_getProof #792

Open Eikix opened 8 months ago

Eikix commented 8 months ago

we want getProof

we need to implement it as a Starknet RPC adapter ->

  1. use getProof of starknet provider
  2. translate it to Eth format
Eikix commented 4 months ago

Reopening this issue as some partners have asked us this feature

cc @greged93 @tcoratger this needs additional and precise scoping to be able to assert amount of work needed and whether it's prio or not!

greged93 commented 4 months ago

I think this might require a meeting with the partners which want to use it so we can understand if it's possible from our side.

greged93 commented 4 months ago

So after some research I think there are a couple of issues with this:

Eikix commented 4 months ago

Just received from builder:

Note from Scroll tech lead: we have a fork of geth, and use a binary trie with Poseidon hash, yes. the RPC just returns a proof on this state data structure. it's a simpler structure than Ethereum's MPT. more prover friendly but not optimized for execution speed. in our case we'd need to provide our own SDK for Scroll's storage proofs

greged93 commented 4 months ago

I guess that would work then, if we have our own code for verification. Will need to scope this a lot more and divide into multiple issues. How urgent is this? Because this will take quite some effort

Eikix commented 4 months ago

Not urgent

Eikix commented 1 month ago

Afaik Antiyro and @apoorvsadana from Madara are pushing for starknet_getProof implementation, how can we integrate it with eth_getProof?

Ref: https://github.com/starkware-libs/starknet-specs/pull/227/files

greged93 commented 1 month ago

once we have the starknet_getProof, we can get the proof for the two slots and return these as the proof for one slot. You can also get the contract proof from starknet_getProof.

all in all it will be converting from the starknet data to eth data and make a custom verification script for the users.

Eikix commented 2 weeks ago

Still waiting for starknet_getProof from starknet nodes