# Getting Started

### What is Starknet?

Starknet is an Ethereum L1 settled L2 operated and developed by StarkWare Industries Ltd.

Currently Starknet is a so called zkRollup, you can read more about rollups and scaling solutions [here](https://ethereum.org/en/developers/docs/scaling/#rollups).

Starknet zkRollup supports general purpose Smart Contracts written in [Cairo Lang](https://www.cairo-lang.org/docs/#:~:text=Cairo%20is%20a%20programming%20language,to%20provide%20scalability%20to%20blockchains.).

Smart contracts on Starknet are interoperable which means they can call each others and access their storage.

Starknet by default does not have a mechanism that allows it's smart contracts to read data from Ethereum, for that reason Fossil has been built.

### What is an Ethereum Account?

Ethereum has two types of accounts:

* EOAs - This type of account is able to originate transactions by signing them with the corresponding cryptographic key.&#x20;
* Smart contracts - An account containing storage and code that executes whenever it receives a transaction originated by an EOA or is called by another smart contract.

No matter if an account is an EOA or a smart contract it will have the following properties:

* Balance - ETH balance denominated in wei.
* Code hash - The keccak256 hash of the bytecode.
* Nonce - a transaction counter in each account. That prevents replay attacks.
* Storage hash - Root of the storage Merkel Patricia Tree. 

All Ethereum account are committed to the state of the blockchain.

### What is a storage slot?

As mentioned above smart contracts have storage. The Storage structure of an Ethereum smart contract is a key-value store, where the key is also called a slot and has it's corresponding value that can change over time.

Storage slots are a deterministic numeric value, you can read more about how those are computed [here](https://docs.soliditylang.org/en/v0.4.20/miscellaneous.html#layout-of-state-variables-in-storage). The smart contract storage is committed in a form of a hash to its corresponding account's `storageHash`.

### What is a Merkle Patricia Tree?

Merkle Patricia Trees(MPTs) are data structure derived from standard Merkle trees. These are widely used in Ethereum to commit large amounts of data to a single hash, you can read more about MPTs [here](https://eth.wiki/fundamentals/patricia-tree).

### How does an Ethereum block look like?

Ethereum blocks contain the following properties but not all of them are included in the header:

| Property           | Part of the header |
| ------------------ | ------------------ |
| number             | yes                |
| basefee            | yes                |
| hash               | yes                |
| difficulty         | yes                |
| parent\_hash       | yes                |
| uncles\_hash       | yes                |
| beneficiary        | yes                |
| state\_root        | yes                |
| transactions\_root | yes                |
| receipts\_root     | yes                |
| logs\_bloom        | yes                |
| gas\_limit         | yes                |
| gas\_used          | yes                |
| timestamp          | yes                |
| extra\_data        | yes                |
| mix\_hash          | yes                |
| nonce              | yes                |
| transactions       | no                 |
| receipts           | no                 |
| uncles             | no                 |
| size               | no                 |

Any ethereum block has it's header which does not include transactions and receipts making it much much smaller than the entire block. Ethereum block headers have a size of \~1kb.

An Ethereum block hash is computed by hashing the RLP serialized header with keccak256.

### Tries in Ethereum

Fossil takes advantage of the fact that Ethereum commits it's state, receipts and transactions to MPT, that makes proving existence of accounts, storage slots values, receipt and transactions possible. You can read more about these tries [here](https://eth.wiki/fundamentals/patricia-tree#tries-in-ethereum).&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oiler.network/oiler-network/products/fossil/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
