This repository has been archived by the owner on Jan 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* import the indexer to rpc * update dockerfiles and docker composes * fix * fix dockerfiles and docker composes
- Loading branch information
Showing
27 changed files
with
2,127 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
APIBARA_AUTH_TOKEN= | ||
DEBUG= | ||
|
||
# e.g. http://localhost:7171 or https://goerli.starknet.a5a.ch | ||
STREAM_URL=http://localhost:7171 | ||
STARTING_BLOCK=0 | ||
|
||
# one of: console, mongo | ||
SINK_TYPE=console | ||
|
||
# if SINK_TYPE=mongo, then this is required, e.g. mongodb://mongo:mongo@mongo:27017 | ||
MONGO_CONNECTION_STRING= | ||
MONGO_DATABASE_NAME= | ||
STARKNET_NETWORK= | ||
KAKAROT_ADDRESS= | ||
ALLOW_NET= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Kakarot Indexer | ||
|
||
Kakarot Indexer fits in the three-part architecture of the Kakarot zkEVM rollup | ||
(Kakarot EVM Cairo Programs, Kakarot RPC, Kakarot Indexer). It indexes the | ||
underlying CairoVM network on which Kakarot core is deployed in an Ethereum | ||
compatible format. | ||
|
||
<p align="center" style="margin-top: 25px; margin-bottom: 25px;"> | ||
<img src="./docs/kakarot_indexer.png" alt="Kakarot Indexer" width="80%" | ||
style="border-radius: 10px;"> | ||
</p> | ||
|
||
## Table of Contents | ||
|
||
- [Motivation and FAQ](#motivation-and-faq) | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
- [License](#license) | ||
|
||
## Motivation and FAQ | ||
|
||
_Why is an indexer needed?_ | ||
|
||
- Because CairoVM chains (also called StarknetOS chains) have different data | ||
types, it is necessary to reformat the data in an Ethereum compatible way. We | ||
decided to perform this reformatting outside of the CairoVM chain, resulting | ||
in duplication of data, but more modularity. Note that this reformatting | ||
could've been done at runtime, at a high computational cost. Lastly, a third | ||
option would consist in forking a CairoVM client (e.g. Starknet) and change | ||
the data types directly within the storage of the full node. | ||
|
||
_Why not directly modify a CairoVM client?_ | ||
|
||
- CairoVM chains are very novel and evolve quite fast. We are thus waiting for | ||
more stability to directly fork/modify a client. New engines, storage | ||
technologies and other innovations are being developed by talented teams (e.g. | ||
[Starknet](https://starkware.co/starknet/), | ||
[Katana](https://book.dojoengine.org/toolchain/katana/overview.html), | ||
[Madara](https://madara-docs.vercel.app/)). | ||
|
||
<details> | ||
<summary>For reference, click to see how the above mentioned monolithic architecture | ||
would look like (note that it is not the current architecture of Kakarot zkEVM): | ||
</summary> | ||
|
||
<p align="center"> | ||
<img src="./docs/Monolith_Kakarot_zkEVM_not_live.png" | ||
alt="Kakarot Monolithic Architecture" width="50%" style="border-radius: 10px;"> | ||
</p> | ||
|
||
</details> | ||
|
||
## Installation | ||
|
||
The Kakarot Indexer is based on the [Apibara](https://www.apibara.com/docs) | ||
third-party service, an indexing product for StarknetOS chains. Apibara relies | ||
on [Deno](https://deno.com/), a specific Javascript runtime. Follow the Deno | ||
installation requirements to be able to interact with the codebase. | ||
|
||
## Usage | ||
|
||
Although this codebase is open-source, it relies on third-party software, the | ||
[DNA protocol](https://www.apibara.com/docs/advanced/streaming-protocol). One | ||
may read the code, run it locally, or self-host the indexer using Apibara's | ||
documentation and API keys. | ||
|
||
## License | ||
|
||
[MIT License](./docs/LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"tasks": { | ||
"dev": "deno run --watch main.ts" | ||
} | ||
} |
Oops, something went wrong.