Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
camp 4/5
Browse files Browse the repository at this point in the history
  • Loading branch information
drspacemn committed Jul 28, 2022
1 parent 22dcb98 commit 6c9e1d1
Show file tree
Hide file tree
Showing 7 changed files with 202 additions and 7 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ Camp_2 will require the basic cairo-lang [setup](https://www.cairo-lang.org/docs

Camp_3 will require the ultimate development environment [setup](https://medium.com/starknet-edu/the-ultimate-starknet-dev-environment-716724aef4a7)

### Links

- community: <https://community.starknet.io>
- starknet docs: <https://docs.starknet.io>
- cairo docs: <https://www.cairo-lang.org/docs>

### Issues

If you find an issue/bug or have a feature request please submit an issue here
Expand Down
6 changes: 5 additions & 1 deletion camp_1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,13 @@ The goal of these proof systems is to prove `computational integrity` to a verif
`T`: Number of steps
`S1`: Final State

<h2 align="center" id="starks">STARKs</h2>

`UNDER CONSTRUCTION`:

<h2 align="center" id="starks">STARKs</h2>
While this seciton is being built we recommend reading this blog post series([1](https://medium.com/starkware/stark-math-the-journey-begins-51bd2b063c71), [2](https://medium.com/starkware/arithmetization-i-15c046390862), [3](https://medium.com/starkware/arithmetization-ii-403c3b3f4355)) on the math behind STARKs.

<hr>

<h3>Arithmetization</h3>

Expand Down
12 changes: 11 additions & 1 deletion camp_2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ Cairo stands for CPU AIR and consists of a single set of polynomial constraints

`Turing Complete`: Can simulate any Turing machine, as such supports any feasible computation

`UNDER CONSTRUCTION`:

While this seciton is being built we recommend reading the video session for this camp and the [cairo-lang docs](https://www.cairo-lang.org/docs/how_cairo_works/index.html).

<hr>

<h2 align="center" id="computational_integrity">Computational Integrity</h2>
STARKs

Expand All @@ -56,6 +62,8 @@ STARKs
<h3>SHARP</h3>

<h2 align="center" id="cairo_vm">Cairo VM</h2>
<h3><a href="https://github.com/FuzzingLabs/thoth">Disassembler(Thoth)</a></h3>
<h3><a href="https://github.com/crytic/amarna">Amarna</a></h3>

<hr>

Expand All @@ -64,4 +72,6 @@ STARKs
[<https://eprint.iacr.org/2021/1063.pdf>
, <https://arxiv.org/pdf/2109.14534.pdf>
, <https://www.cairo-lang.org/cairo-for-blockchain-developers>
, <https://www.cairo-lang.org/docs/how_cairo_works/index.html>]
, <https://www.cairo-lang.org/docs/how_cairo_works/index.html>
, <https://github.com/FuzzingLabs/thoth>
, <https://github.com/crytic/amarna>]
8 changes: 7 additions & 1 deletion camp_3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ warp transpile ERC20.sol WARP
warp deploy ERC20.json
```

`UNDER CONSTRUCTION`:

While this seciton is being built we recommend reading the video session for this camp and the [starknet docs](https://docs.starknet.io).

<hr>

<h2 align="center" id="storage">Storage</h2>

<h2 align="center" id="accounts">Accounts</h2>
Expand All @@ -63,4 +69,4 @@ The StarkNet OS is the Cairo program that runs StarkNet. The OS handles everythi

#### Sources

- <https://github.com/eqlabs/pathfinder/blob/2fe6f549a0b8b9923ed7a21cd1a588bc571657d6/crates/pathfinder/resources/fact_retrieval.py>
[<https://github.com/eqlabs/pathfinder/blob/2fe6f549a0b8b9923ed7a21cd1a588bc571657d6/crates/pathfinder/resources/fact_retrieval.py>]
42 changes: 41 additions & 1 deletion camp_4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,46 @@

|Presentation|Video|Workshop
|:----:|:----:|:----:|
|-|-|-|
|-|-| [starknet-debug](https://github.com/starknet-edu/starknet-debug) |

</div>

### Topics

<ol>
<li><a>Nile</a></a>
<li><a>Protostar</a></a>
<li><a>Hardhat</a></a>
<li><a>Nodes</a></a>
<li><a>Devnet</a></a>
<li><a>Testing</a></a>
<li><a>Libraries</a></a>
</ol>

`UNDER CONSTRUCTION`:

While this seciton is being built we recommend reading the video session for this camp and the [community resources page](https://github.com/gakonst/awesome-starknet).

<hr>

<h2 align="center" id="nile"><a href="https://github.com/OpenZeppelin/nile">Nile</a></h2>

<h2 align="center" id="protostar"><a href="https://docs.swmansion.com/protostar">Protostar</a></h2>

<h2 align="center" id="hardhat"><a href="https://github.com/Shard-Labs/starknet-hardhat-plugin">Hardhat</a></h2>

<h2 align="center" id="nodes">Nodes</h2>

### [Pathfinder](https://github.com/eqlabs/pathfinder)

### [Juno](https://github.com/NethermindEth/juno)

<h2 align="center" id="devnet"><a href="https://github.com/Shard-Labs/starknet-devnet">Devnet</a></h2>

<h2 align="center" id="testing">Testing</h2>

<h2 align="center" id="libraries">Libraries</h2>

#### Sources

[<https://github.com/gakonst/awesome-starknet>]
134 changes: 131 additions & 3 deletions camp_5/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,145 @@
<div align="center">
<h1>Camp 5: Peering into the Future</h1>

|Presentation|Video|Workshop
|Presentation|Video|Workshop|
|:----:|:----:|:----:|
|[B E Y O N D](https://drive.google.com/file/d/1LOvpX8mXvXIXaj2eybQz6ZvnvtkiTi8n/view?usp=sharing)|-|-|
|[B E Y O N D](https://drive.google.com/file/d/1LOvpX8mXvXIXaj2eybQz6ZvnvtkiTi8n/view?usp=sharing)|[video](https://drive.google.com/file/d/1o8vbsAWQs0VndlUWhmsKckdyNr7HYeCx/view?usp=sharing)| local meetups/mentoship |

</div>

### Topics

<ol>
<li><a>Data Availability</a></a>
<li><a>Volition</a></a>
<li><a>Recursion</a></a>
<li><a>Throughput</a></a>
<li><a>Decentralization</a></a>
<li><a>Building Community</a></a>
</ol>

<h2 align="center" id="data_availability">Data Availability</h2>

The data availability problem:

- STARK proofs generate a proof of computation
- ex: valid execution from genesis to block 100
- you don't need the output of the program to validate the program ran correctly
- ex: state of block 100
- my contract logic requires the state of block 100
- ex: if we don't have the state of block 100 "stored" somewhere our contract is essentially stuck

***Solution: Validity Rollup - store the state on secure L1***

- current state of StarkNet
- periodically store the rollup state to Ethereum
- inherit the security of the base chain

***Solution: Validium - store data "off chain"***

- IPFS, Celestia, cloud providers
- can secure with a Data Availablility Committee(DAC)
- data can be private
- less expensive

***Solution: Volition - hybrid***

- single chain can dynamically chose where data is stored
- application flexibility
- composability implications

<div align="center">
<h2 id="recurison">Recursion</h2>

[video](https://www.youtube.com/watch?v=hjTCIT9BGkA), [slides](https://docs.google.com/presentation/d/e/2PACX-1vRbnDDuGdjcMaUAg1rRztGsLpGhtPsMX1vCKk-sX4v0cHMZdOMWZh177qXYM8lacqGoSJ4X8NvEg8RX/pub?slide=id.g12fb33eb0c0_0_386)
</div>

Ability to verify a proof within a cairo program:

- Prover generates a proof of computation in `time T`
- Verifier uses proof to check the correctness of the compuation in `log(T)`

Enables the parallelization of proofs.

<h2 align="center" id="throughput">Throughput</h2>

### Parallelization

- access lists

### Compiler/VM Rust Rewrite

### Fractal Scaling

<h2 align="center" id="decentralization">Decentralization</h2>

StarkNet continues to evolve, and we gradually shift our gaze towards decentralization. While we expect StarkNet to be decentralized only at the end of the year, it’s not too early to decide on the decentralization scheme.

While every other decentralized network has only Sequencers, StarkNet has two components: Sequencers (that determine which transactions to execute) and Provers (that prove the correctness of the chosen transactions). A good decentralization approach is required to decentralize the Provers and answer questions like “who can publish proofs”’ or even “when do we publish proofs”? However, an approach that says: “let’s take some consensus algorithm for sequencing, and demand each sequencer to prove what he sequenced” is too naive and creates what we refer to as the "handoff problem.”

***Design Goals:***

`Permissionlessness` - anyone can be a Sequencer or a Prover (given they invest enough resources to it).

`Assuming rationality, not honesty` - Since anyone can participate, the protocol can’t assume parties blindly follow the protocol and enforce correct behavior by explicit checks and economic incentivization.

`Sufficiently Scalable` - the protocol should scale reasonably well, up until a point where we have a reasonably large number of participants. It’s hard to determine what number is “reasonably large.”

`Strong and Fast L2 Finality` - StarkNet state becomes final only after a batch is proven to L1 (which might take as long as several hours today). Therefore, the L2 decentralization protocol should make meaningful commitments regarding the planned execution order well before the next batch is proved.

`Inexpensive` - the users shouldn’t pay excessively high transaction fees to sponsor the work done by the entities (Sequencers and Provers) that run the StarkNet consensus protocol.

`Lightweight` - We want to leave most of StarkNet computational “real estate” for the applicative layer of StarkNet. As an extreme counterexample, a situation where 50% of the Cairo steps proven in each block are dedicated to verifying the consensus protocol itself is wasteful and does not make sense.

<h2 align="center" id="community">Building Community</h2>

It's all about relationships and the goal is to focus on the builders, not what is being built. Your objective is to plant the seed and let it grow:

- Involve community members early
- Lets them take the lead, even if they do things differently
- Focus on builders and not investors
- Make concrete call to actions

<h3>Organizing Meetups</h3>

Organizing a meetup is surprisingly time consuming you’ll probably have to do the first one
one your own.

Call for volunteers at the beginning at the end. When growing this group, ask for suggestions and ideas openly.
When decisions drag on, step in to move the ball forward

Steps:

- Register on meetup.com: ask us to create a group so you don't have to pay
- Pick a date(2-3 weeks in advance)
- Tweet about it, and we'll relay
- Find a venue, check equipment, plan for food and drinks
- Define Program
- 3 talks, 15-20min each
- We can present remotely if you want
- We can connect you to local builders, or fly some to present!
- We’ll send you swag
- We sponsor meetups with 1k USD to cover costs, ask for it

<h3>Running Workshop</h3>
Send a survey after your first meetup, with a form asking if people are interested in technical workshops.

Types of workshops

- 0 to 1
- Thematic (ERC20, ERC721)

Define Program (2-3h):

- Introduction 20-30mn
- Then people work
- Co education is a great tool
- Have people work in pair, 2 behind a single screen
- If a question is recurrent, say “ask these girls they solved it”
- Follow our repo to check new workshop
- Try to do them once before
- If you are looking for a specific theme, ask us
- Better yet, write your own

#### Sources

[<https://community.starknet.io/t/starknet-decentralization-kicking-off-the-discussion/711>]
1 change: 1 addition & 0 deletions camp_5/logarithms/python/logarithms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# example for logarithm intuition

0 comments on commit 6c9e1d1

Please sign in to comment.