Closed greged93 closed 1 month ago
Can I take this up ?
Hey @swetshaw! Thanks for showing interest. We've created an application for you to contribute to Kakarot zkEVM. Go check it out on OnlyDust!
I am applying to this issue via OnlyDust platform.
Hello @greged93 , my name is Dilan. I´ve worked with rust a lot of times, im acquainted with the language so i think I should be able to complete this issue approximately in a week. I would like to investigate more and try to solve it. ¿Could i take this issue? I´m a responsible person so I'll try my best to help and complete the issue.
First, i'm going to see a little bit of how the project works. After I got an idea, i'm going to check in which part of the code is the problem located (in this case in the field of events). Finally i'm going to try and find a solution to the problem (which would be just to verify the origin present in "fromAddress" is the same of the ""KakarotAddress"). If i get a problem or a question about the project, i would ask in this section or if it exists, on Telegram/Discord.
Hey @DilanHern! Thanks for showing interest. We've created an application for you to contribute to Kakarot zkEVM. Go check it out on OnlyDust!
Hey sorry @DilanHern but I will assign this to Sweta as she commented first
Describe the enhancement request
Currently, we do not verify that origin of an event (present in the
fromAddress
field of events) is equal to theKakarotAddress
. We should verify this as it could pose an issue if we ever allow arbitrary calls to Cairo contracts from Kakarot.Details
In the function
toEthLog
, update the logic in order to verify that thefromAddress
of each event is theKakarotAddress
. This can be added in the lines below: https://github.com/kkrt-labs/kakarot-rpc/blob/3cee3db54ada8ee1622c625e51f1614c5feccb02/indexer/src/types/log.ts#L50-L53There, you can verify that the
fromAddress
field of the event is equal toKAKAROT_ADDRESS
which can be imported from: https://github.com/kkrt-labs/kakarot-rpc/blob/3cee3db54ada8ee1622c625e51f1614c5feccb02/indexer/src/constants.ts#L48-L52Time: 20 min