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

Commit

Permalink
📝 Fix: typos (#162)
Browse files Browse the repository at this point in the history
* Fix: typo

* Fix: typos

* Fix: typos

* Fix: typos

* Fix: typos

* Fix: typo

* Fix: typos

* Fix: typos

* Fix: typos

* Fix: typos

* Fix: typos

* Fix: typo

* Fix: typo

* Fix: typo

* Fix: typo

* Fix: typos

* Fix: typo

* Fix: typos

* Fix: typo

* Fix: typos

* Fix: typo
  • Loading branch information
omahs authored Jul 17, 2023
1 parent 1d64688 commit 74dd005
Show file tree
Hide file tree
Showing 21 changed files with 48 additions and 48 deletions.
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Depending on your goals and interests, you can choose different paths through th

* If you're a *security researcher* or *smart contract auditor* wanting to learn about the Account Abstraction feature and its implications, go for *Account Abstraction*.

* If you're a *blockchain enthusiast* curious about the underlying architecture and mechanics of Starknet and Cairo, explore *Starknet and Cairo CPU Arquitecture*.
* If you're a *blockchain enthusiast* curious about the underlying architecture and mechanics of Starknet and Cairo, explore *Starknet and Cairo CPU Architecture*.

* If you're a *cryptography expert* or *researcher* eager to understand the fundamentals of STARKs and their connection to the Starknet ecosystem, delve into *STARKs*.

Expand Down Expand Up @@ -222,4 +222,4 @@ a|
a|
a|
a|
|===
|===
4 changes: 2 additions & 2 deletions chapters/book/modules/chapter_1/pages/community_funds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Starknet is dedicated to bolstering community strength, unity, and outreach. As
. Provision of grants to community members undertaking projects that align with our philosophy and contribute to our broader objectives.
. Allocation of member education and training resources via online tutorials, webinars, mentorship programs, and more.
. Enhancement and upkeep of open, inclusive communication channels, such as Telegram groups, Discord servers and community forums.
.P romotion of community engagement via incentivized activities like idea contests, art contests, and problem-solving challenges.
. Promotion of community engagement via incentivized activities like idea contests, art contests, and problem-solving challenges.
. In addition, we are open to other creative initiatives that align with our philosophy and goals. Starknet recognizes that all community members are potential contributors to our mission, and we discourage any attempts to deter participation or collaboration.

== Community Ethics and Code of Conduct:
Expand Down Expand Up @@ -50,4 +50,4 @@ Non-compliance with these guidelines may result in fund termination and possible
== Revision and Updates:

The funds aim to help grow and strengthen the community. Adherence to these guidelines ensures effective and beneficial use of these funds for all community members.
We appreciate your cooperation and commitment to creating a vibrant, engaging, and supportive Starknet community. Together, we can construct a future unfettered by creative and innovative bounds.
We appreciate your cooperation and commitment to creating a vibrant, engaging, and supportive Starknet community. Together, we can construct a future unfettered by creative and innovative bounds.
2 changes: 1 addition & 1 deletion chapters/book/modules/chapter_1/pages/compute_costs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The advent of economical on-chain computation has the potential to significantly

3. **Computational Feeds**: The lower cost of execution also opens the door for feeds of aggregated and calculated data. For instance, traditional financial applications often rely on sophisticated data feeds that provide information on risk, yield, and volatility. Teams like Pragma are dedicated to bringing these types of feeds to the web3 space. Currently, Pragma has already launched two computational feeds on the Starknet testnet, including a volatility index and a yield curve.

4. **Storage Proofs**: With these cryptographic commitments, it is possible to trustlessly prove that a particular state existed at a specific time or block. While these proofs require some computation to verify, the low computational cost greatly enhances user experience. Storage proofs not only allow for the transfer of information between different chains in a decentralized manner but also offer access to historical data from the blockchain and much more. In the realm of oracles, storage proofs promise to revolutionize how data is handled and verified. For a deeper dive into storage proofs, be sure to check outhttps://book.starknet.io/chapter_6/storage_proofs.html[**Chapter 6: Pioneering Applications**].
4. **Storage Proofs**: With these cryptographic commitments, it is possible to trustlessly prove that a particular state existed at a specific time or block. While these proofs require some computation to verify, the low computational cost greatly enhances user experience. Storage proofs not only allow for the transfer of information between different chains in a decentralized manner but also offer access to historical data from the blockchain and much more. In the realm of oracles, storage proofs promise to revolutionize how data is handled and verified. For a deeper dive into storage proofs, be sure to check out https://book.starknet.io/chapter_6/storage_proofs.html[**Chapter 6: Pioneering Applications**].

=== Realization of On-Chain Gaming

Expand Down
6 changes: 3 additions & 3 deletions chapters/book/modules/chapter_1/pages/first_contract.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ starkli --version # To interact with Starknet

A smart wallet is composed of two parts: a Signer and an Account Descriptor. The signer is a smart contract that can sign transactions (we need its private key). The account descriptor is a json file that contains information about the smart wallet, such as its address and public key.

First, create a smart wallet via the Braavos or Argent X browser extensions. Follow you wallet (Argent or Braavos) instructions. After creating and funding your smart wallet with ETH (use the https://faucet.goerli.starknet.io/[Starknet Goerli Faucet] whenever you require it), you can deploy it to the Starknet's testnet for this tutorial.
First, create a smart wallet via the Braavos or Argent X browser extensions. Follow your wallet (Argent or Braavos) instructions. After creating and funding your smart wallet with ETH (use the https://faucet.goerli.starknet.io/[Starknet Goerli Faucet] whenever you require it), you can deploy it to the Starknet's testnet for this tutorial.

=== Creating a Signer

A Signer is an smart contract that can sign transactions. It's a crucial component of accounts in Starknet. To create a Signer we just need the private key of our smart wallet (the public key can be derived from it).
A Signer is a smart contract that can sign transactions. It's a crucial component of accounts in Starknet. To create a Signer we just need the private key of our smart wallet (the public key can be derived from it).

Starkli provides us with the ability to create a "keystore" file that securely stores the private key of our smart wallets each with a password. The accounts in the keystore file can be used to sign transactions using Starkli. The main advantage of this approach is that it prevents storing the private key as plain text on our computer. Instead, we use a password to create an encrypted file in the location of our choosing.

Expand Down Expand Up @@ -142,7 +142,7 @@ With the smart contract compiled, we're ready to declare it using Starkli. Howev

. The default an easiest option is to use Starknet Sequencer's Gateway. This is the option we will use in this tutorial and it is the default for Starkli. However, as you proceed with your Starknet journey, we recommend you to set up your own node or use a provider like Infura or Alchemy, because the Starknet Sequencer's Gateway could get saturated with requests and you may experience delays in your transactions.
. Use a provider like Infura or Alchemy. You can find more information about this in the https://book.starknet.io/chapter_1/environment_setup.html[Setting up your Environment] subchapter. Set up an API key and as endpoint select Starknet's testnet/goerli. In the Infura case, the endpoint looks like this: https://starknet-goerli.infura.io/v3/<API_KEY>; review the https://docs.infura.io/networks/starknet/how-to/choose-a-network[Infura documentation] for more information.
. Set up you own node and use the RPC provider of your node. Check out https://www.kasar.io/[Kasar] or the https://book.starknet.io/chapter_4/node.html[Chapter 4] of the Starknet Book to learn how to set up your own node.
. Set up your own node and use the RPC provider of your node. Check out https://www.kasar.io/[Kasar] or the https://book.starknet.io/chapter_4/node.html[Chapter 4] of the Starknet Book to learn how to set up your own node.

Here's the structure for the declaration command using the Starknet Sequencer's Gateway:

Expand Down
4 changes: 2 additions & 2 deletions chapters/book/modules/chapter_2/pages/asserts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Some key points about the `assert` statement in Cairo are:

3. The `assert` statement is helpful for input validation, ensuring that only valid inputs are processed by the contract.

4. The compiler will not notice if an assertions is not complied with. That is, the compiler will not check if the condition is true or false. The assertion is only checked at runtime: for example, in tests (more on this in a following chapter) or when the contract is deployed.
4. The compiler will not notice if an assertion is not complied with. That is, the compiler will not check if the condition is true or false. The assertion is only checked at runtime: for example, in tests (more on this in a following chapter) or when the contract is deployed.

[NOTE]
====
Expand All @@ -41,4 +41,4 @@ ____
StarknetBook is a work in progress, and your passion, expertise, and unique insights can help transform it into something truly exceptional. Don't be afraid to challenge the status quo or break the Book! Together, we can create an invaluable resource that empowers countless others.
Embrace the excitement of contributing to something bigger than ourselves. If you see room for improvement, seize the opportunity! Check out our https://github.com/starknet-edu/starknetbook/blob/main/CONTRIBUTING.adoc[guidelines] and join our vibrant community. Let's fearlessly build Starknet!
____
____
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ The contract has been deployed at address: 0x0447025aad44c69080e821ffef78f03b520

== Voter Eligibility Verification

In our voting contract, we have two functions to validate voter eligibility, `voter_can_vote` and `is_voter_registered`. These are read external functions, which mean they don't alter the state of the contract but only read the current state.
In our voting contract, we have two functions to validate voter eligibility, `voter_can_vote` and `is_voter_registered`. These are read external functions, which means they don't alter the state of the contract but only read the current state.

The `is_voter_registered` function checks whether a particular address is registered as an eligible voter in the contract. The `voter_can_vote` function, on the other hand, checks whether the voter at a specific address is currently eligible to vote, i.e., they are registered and haven't voted already.

Expand Down
6 changes: 3 additions & 3 deletions chapters/book/modules/chapter_2/pages/enums.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ You can define traits and implement them for your custom enums, this allows you
}
----

In the example above, we implemented the Processing traits for Message .Hers is ow it could be used to process a Quit message:
In the example above, we implemented the Processing traits for Message. Here is how it could be used to process a Quit message:

[source, bash]
----
Expand All @@ -107,7 +107,7 @@ mod Enum{
use option::OptionTrait;
// This function returns how much icecream there is left in the fridge.
// If it is before 10PM, there is 5 pieces left. At 10PM, someone eats them all, so there will be no more left.
// If it is before 10PM, there is 5 pieces left. At 10PM, someone eats them all, so there will be no more left.
fn maybe_icecream(time_of_day: u32) -> Option<u32> {
if time_of_day < 22_u32 {
Expand All @@ -119,4 +119,4 @@ fn maybe_icecream(time_of_day: u32) -> Option<u32> {
}
}
}
----
----
4 changes: 2 additions & 2 deletions chapters/book/modules/chapter_2/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ In practice, there are two different technologies for proving general programs:

Cairo addresses these limitations and offers more efficient solutions:

1. A low-level field data type called "felt252" is available, alongside a several types of uints
1. A low-level field data type called "felt252" is available, alongside several types of uints
2. Cairo is idiomatically write-once, resembling a functional programming language
3. Cairo provides full low-level access to underlying primitives

Expand Down Expand Up @@ -70,4 +70,4 @@ ____
StarknetBook is a work in progress, and your passion, expertise, and unique insights can help transform it into something truly exceptional. Don't be afraid to challenge the status quo or break the Book! Together, we can create an invaluable resource that empowers countless others.
Embrace the excitement of contributing to something bigger than ourselves. If you see room for improvement, seize the opportunity! Check out our https://github.com/starknet-edu/starknetbook/blob/main/CONTRIBUTING.adoc[guidelines] and join our vibrant community. Let's fearlessly build Starknet!
____
____
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ image::sec_over_u128.png[u128]

== 5. Private Data On-Chain.

In some cases, a smart contracts may needs to store secret values that can't be revelead to users, however this is not possible
In some cases, a smart contract may need to store secret values that can't be revealed to users, however this is not possible
if you store data on chain because all stored data is public and can be retrieved even if you don't publish your code. In the next
example, our smart contract will use a contructor parameter to set a password (12345678) and store it on chain:

Expand Down Expand Up @@ -375,4 +375,4 @@ ____
StarknetBook is a work in progress, and your passion, expertise, and unique insights can help transform it into something truly exceptional. Don't be afraid to challenge the status quo or break the Book! Together, we can create an invaluable resource that empowers countless others.
Embrace the excitement of contributing to something bigger than ourselves. If you see room for improvement, seize the opportunity! Check out our https://github.com/starknet-edu/starknetbook/blob/main/CONTRIBUTING.adoc[guidelines] and join our vibrant community. Let's fearlessly build Starknet!
____
____
4 changes: 2 additions & 2 deletions chapters/book/modules/chapter_2/pages/strings.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Currently, when coding with Cairo we need to constantly be converting between fe

image::starkutils.png[starkutils]

This is a tedious process, which the Cairo community is improving in the near the future.
This is a tedious process, which the Cairo community is improving in the near future.

== Summary

Expand Down Expand Up @@ -61,4 +61,4 @@ ____
StarknetBook is a work in progress, and your passion, expertise, and unique insights can help transform it into something truly exceptional. Don't be afraid to challenge the status quo or break the Book! Together, we can create an invaluable resource that empowers countless others.
Embrace the excitement of contributing to something bigger than ourselves. If you see room for improvement, seize the opportunity! Check out our https://github.com/starknet-edu/starknetbook/blob/main/CONTRIBUTING.adoc[guidelines] and join our vibrant community. Let's fearlessly build Starknet!
____
____
2 changes: 1 addition & 1 deletion chapters/book/modules/chapter_2/pages/types.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A list of primitive types in Cairo (not all), along with a brief description of
| Array<T> | A dynamic array data structure for elements of type T, used for creating and manipulating arrays.
|===

Similar to Rust, Cairo also supports type inference so the compiler will try to guess the type of a variable based on how the value is used. Incases where its not possible for compiler to guess the type of a variable, explicit annotation must be added.
Similar to Rust, Cairo also supports type inference so the compiler will try to guess the type of a variable based on how the value is used. In cases where it's not possible for compiler to guess the type of a variable, explicit annotation must be added.

Here is an example of using types in Cairo:

Expand Down
2 changes: 1 addition & 1 deletion chapters/book/modules/chapter_3/pages/hardhat.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

= Starknet Hardhat Plugin

Hardhat is a popular JS development environment for Ethereum, and if you are already familiar with it and want to use it on Starknet, then this plugin will come in hand!
Hardhat is a popular JS development environment for Ethereum, and if you are already familiar with it and want to use it on Starknet, then this plugin will come in handy!

== Getting Started

Expand Down
4 changes: 2 additions & 2 deletions chapters/book/modules/chapter_8/pages/arithmetization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,15 @@ This concludes the promised reduction, that translates the problem of checking w

Succinctness

Having a very efficient verification technique is key to STARKs, and it can be seen as comprised of two parts -- using a small number of queries, and having the verifier perform a small computation on each query. The former is achieved by error correction codes, which allow querying in very few places, and the latter we have sort of sweeped under the rug throughout this post, until now. The verifier's work can be summed up as 1) querying the composition polynomial in random places, and 2) checking low-degreeness based on these queries. Low degreeness succinct checking will be handled in the next post, but what exactly do we mean by "`querying the composition polynomial`"? The avid reader may have been suspicious of this expression, and rightfully so. The prover, after all, may be malicious. When the verifier asks for the evaluation of the composition polynomial at some x, the prover may reply with the evaluation of some truly low-degree polynomial, that will pass any low-degree testing, but is not the composition polynomial.
Having a very efficient verification technique is key to STARKs, and it can be seen as comprised of two parts -- using a small number of queries, and having the verifier perform a small computation on each query. The former is achieved by error correction codes, which allow querying in very few places, and the latter we have sort of swept under the rug throughout this post, until now. The verifier's work can be summed up as 1) querying the composition polynomial in random places, and 2) checking low-degreeness based on these queries. Low degreeness succinct checking will be handled in the next post, but what exactly do we mean by "`querying the composition polynomial`"? The avid reader may have been suspicious of this expression, and rightfully so. The prover, after all, may be malicious. When the verifier asks for the evaluation of the composition polynomial at some x, the prover may reply with the evaluation of some truly low-degree polynomial, that will pass any low-degree testing, but is not the composition polynomial.

To prevent this, the verifier explicitly queries the Fibonacci execution trace at some row w by asking for the values of $f$ in three places: $f(w)$, $f(gw)$, $f(g²w)$.

The verifier can now compute the value of the composition polynomial at w by:

image::succinctness.png[succintness]

Where the numerator can be computed using the values obtained from the prover, and the denominator... well, there's the rub (that was sweeped under the rug).
Where the numerator can be computed using the values obtained from the prover, and the denominator... well, there's the rub (that was swept under the rug).

On the one hand the denominator is completely independent of the execution trace, so the verifier can compute it before ever communicating with the prover.

Expand Down
Loading

0 comments on commit 74dd005

Please sign in to comment.