From 99d1eba6ac3164cb6cb95e16069e1f4cca0e2d6b Mon Sep 17 00:00:00 2001 From: JameStark <113911244+JameStark@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:53:31 +0100 Subject: [PATCH 1/6] Update all instances of on-chain to onchain (#799) --- .../pages/Accounts/introduction.adoc | 4 ++-- .../pages/Network_Architecture/fee-mechanism.adoc | 4 ++-- .../pages/Network_Architecture/on-chain-data.adoc | 2 +- .../pages/Smart_Contracts/system-calls-cairo1.adoc | 4 ++-- .../Starknet/modules/quick_start/pages/account_setup.adoc | 2 +- .../modules/quick_start/pages/setting_up_a_smart_wallet.adoc | 2 +- .../modules/starknet_versions/pages/version_notes.adoc | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Accounts/introduction.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Accounts/introduction.adoc index 1dd8e89fa1..63e9bc93f3 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Accounts/introduction.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Accounts/introduction.adoc @@ -1,9 +1,9 @@ [id="what_is_an_account"] = What is an account? -An account represents a user on-chain, and enables that user to interact with the blockchain. +An account represents a user onchain, and enables that user to interact with the blockchain. -Through an account, you may send transactions and interact with other contracts. To "own" an on-chain asset (e.g. ERC20 token or an NFT), it has to be associated with your account address. +Through an account, you may send transactions and interact with other contracts. To "own" an onchain asset (e.g. ERC20 token or an NFT), it has to be associated with your account address. [id="ethereum_account_structure"] == Ethereum account structure diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc index fb6d2109ca..331812e7c4 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/fee-mechanism.adoc @@ -94,9 +94,9 @@ The weights are: [id="_on_chain_data"] -=== On-chain data +=== Onchain data -The on-chain data associated with a transaction is composed of three parts +The onchain data associated with a transaction is composed of three parts * Storage updates * L2→L1 messages diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/on-chain-data.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/on-chain-data.adoc index f955d98391..3da60d35d9 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/on-chain-data.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/on-chain-data.adoc @@ -4,7 +4,7 @@ [id="introduction"] == Introduction -In the current stage of the Alpha, Starknet operates in a ZK-Rollup mode. This means that upon the acceptance of a state update on-chain, the state diff between the previous and new state is sent as calldata to Ethereum. +In the current stage of the Alpha, Starknet operates in a ZK-Rollup mode. This means that upon the acceptance of a state update onchain, the state diff between the previous and new state is sent as calldata to Ethereum. This data allows anyone that observes Ethereum to reconstruct the current state of Starknet. diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/system-calls-cairo1.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/system-calls-cairo1.adoc index 8a7851f21d..e68dd2d828 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/system-calls-cairo1.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/system-calls-cairo1.adoc @@ -376,7 +376,7 @@ For information on accessing storage by using the storage variables, see xref:./ ==== Arguments [horizontal,labelwidth=35] -`_address_domain_`:: The domain of the key, used to separate between different data availability modes. This separation is used in Starknet to offer different data availability modes. Currently, only the on-chain mode (where all updates go to L1), indicated by domain `0`, is supported. Other address domains which will be introduced in the future will behave differently in terms of publication (in particular, they will not be posted on L1, creating a tradeoff between cost and security). +`_address_domain_`:: The domain of the key, used to separate between different data availability modes. This separation is used in Starknet to offer different data availability modes. Currently, only the onchain mode (where all updates go to L1), indicated by domain `0`, is supported. Other address domains which will be introduced in the future will behave differently in terms of publication (in particular, they will not be posted on L1, creating a tradeoff between cost and security). `_address_`:: The requested storage address. [discrete] @@ -428,7 +428,7 @@ For information on accessing storage by using the storage variables, see xref:./ ==== Arguments [horizontal,labelwidth=35] -`_address_domain_`:: The domain of the key, used to separate between different data availability modes. This separation is used in Starknet to offer different data availability modes. Currently, only the on-chain mode (where all updates go to L1), indicated by domain `0`, is supported. Other address domains which will be introduced in the future will behave differently in terms of publication (in particular, they will not be posted on L1, creating a tradeoff between cost and security). +`_address_domain_`:: The domain of the key, used to separate between different data availability modes. This separation is used in Starknet to offer different data availability modes. Currently, only the onchain mode (where all updates go to L1), indicated by domain `0`, is supported. Other address domains which will be introduced in the future will behave differently in terms of publication (in particular, they will not be posted on L1, creating a tradeoff between cost and security). `_address_`:: The requested storage address. `_value_`:: The value to write to the key. diff --git a/components/Starknet/modules/quick_start/pages/account_setup.adoc b/components/Starknet/modules/quick_start/pages/account_setup.adoc index 5e9348f561..5fac8cf98f 100644 --- a/components/Starknet/modules/quick_start/pages/account_setup.adoc +++ b/components/Starknet/modules/quick_start/pages/account_setup.adoc @@ -87,7 +87,7 @@ Press [ENTER] once youve funded the address. You have now successfully deployed a new account to Starknet. == Fetching an account -Account fetching allows you to recreate the account file from on-chain data alone. +Account fetching allows you to recreate the account file from onchain data alone. This could be helpful when: diff --git a/components/Starknet/modules/quick_start/pages/setting_up_a_smart_wallet.adoc b/components/Starknet/modules/quick_start/pages/setting_up_a_smart_wallet.adoc index 553aced96d..cb99acdeb5 100644 --- a/components/Starknet/modules/quick_start/pages/setting_up_a_smart_wallet.adoc +++ b/components/Starknet/modules/quick_start/pages/setting_up_a_smart_wallet.adoc @@ -90,7 +90,7 @@ While knowing the private key of a smart wallet is necessary to sign transaction == Creating an Account Descriptor -Starkli offers a command to collect all the required information from a smart wallet by providing its on-chain address. Using this data, the CLI generates a json file that can be used to sign transactions: +Starkli offers a command to collect all the required information from a smart wallet by providing its onchain address. Using this data, the CLI generates a json file that can be used to sign transactions: [source,shell] ---- diff --git a/components/Starknet/modules/starknet_versions/pages/version_notes.adoc b/components/Starknet/modules/starknet_versions/pages/version_notes.adoc index fecffd2a7d..e056e4f0d8 100644 --- a/components/Starknet/modules/starknet_versions/pages/version_notes.adoc +++ b/components/Starknet/modules/starknet_versions/pages/version_notes.adoc @@ -105,7 +105,7 @@ The introduction of Cairo 1.0 and Sierra has several effects on the system. Belo * A new version of the `declare` transaction, which allows sending the new class structure * The state commitment will now include contract classes -* Changes to the on-chain data format +* Changes to the onchain data format * New system call - `replace_class` From c86c2a995530d94a092d958f7d8f425a83d08046 Mon Sep 17 00:00:00 2001 From: Steve Goodman <39279277+stoobie@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:27:36 +0300 Subject: [PATCH 2/6] fix: Update token-bridge.adoc: Starkgate -> StarkGate (#795) * Update token-bridge.adoc: Starkgate -> StarkGate * Change to StarkGate in nav.adoc --------- Co-authored-by: JameStark <113911244+JameStark@users.noreply.github.com> --- .../Starknet/modules/architecture_and_concepts/nav.adoc | 2 +- .../pages/Network_Architecture/token-bridge.adoc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/Starknet/modules/architecture_and_concepts/nav.adoc b/components/Starknet/modules/architecture_and_concepts/nav.adoc index a643442e25..f8ea7161e5 100644 --- a/components/Starknet/modules/architecture_and_concepts/nav.adoc +++ b/components/Starknet/modules/architecture_and_concepts/nav.adoc @@ -14,7 +14,7 @@ *** L1-L2 messaging **** xref:Network_Architecture/messaging-mechanism.adoc[L1-L2 messaging] -**** xref:Network_Architecture/token-bridge.adoc[Starkgate bridge] +**** xref:Network_Architecture/token-bridge.adoc[StarkGate bridge] ** Accounts *** xref:Accounts/introduction.adoc[What is an account?] diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/token-bridge.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/token-bridge.adoc index 3524f41c33..1b9fe1c740 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/token-bridge.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/token-bridge.adoc @@ -1,8 +1,8 @@ [id="starkgate_token_bridge"] -= Starkgate bridge += StarkGate bridge [id="starkgate_general_architecture"] -== Starkgate general architecture +== StarkGate general architecture StarkGate is the Ethereum↔Starknet token bridge developed by StarkWare. Each supported token is associated with an L1 and L2 bridge contract that is communicating via Starknet's messaging mechanism. @@ -11,9 +11,9 @@ The bridges facilitate a user's ability to conduct their transactions with their For simplicity, we use terms such as "`deposit`", "`transact`", and "`transfer`" to refer to various operations involving a bridge, even though ETH and ERC20 tokens never actually leave Ethereum. [id="starkgate_alpha_limitations"] -== Starkgate Alpha limitations +== StarkGate Alpha limitations -In order to reduce the risks involved in using an Alpha version, Starkgate Alpha on Mainnet has limitations involving the deposit amount and total value locked in the L1 bridge contract: +In order to reduce the risks involved in using an Alpha version, StarkGate Alpha on Mainnet has limitations involving the deposit amount and total value locked in the L1 bridge contract: [%autowidth.stretch] |=== From 5f68d4ce18c02b2f2626f3c083760b7467367912 Mon Sep 17 00:00:00 2001 From: JameStark <113911244+JameStark@users.noreply.github.com> Date: Mon, 11 Sep 2023 11:34:26 +0100 Subject: [PATCH 3/6] James/setup (#803) * Environment setup using StarkLi and Scarb * Update environment_setup.adoc * Initial commit of updated Starkli and scarb quick start * Split the setup in to logical sections * Version 1 for deployment * Menu updates * Complete guide version 1 * Add version check for Scarb install too --- .../modules/quick_start/pages/account_setup.adoc | 2 +- .../modules/quick_start/pages/environment_setup.adoc | 9 ++++++++- .../quick_start/pages/setting_up_a_smart_wallet.adoc | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/components/Starknet/modules/quick_start/pages/account_setup.adoc b/components/Starknet/modules/quick_start/pages/account_setup.adoc index 5fac8cf98f..5e9348f561 100644 --- a/components/Starknet/modules/quick_start/pages/account_setup.adoc +++ b/components/Starknet/modules/quick_start/pages/account_setup.adoc @@ -87,7 +87,7 @@ Press [ENTER] once youve funded the address. You have now successfully deployed a new account to Starknet. == Fetching an account -Account fetching allows you to recreate the account file from onchain data alone. +Account fetching allows you to recreate the account file from on-chain data alone. This could be helpful when: diff --git a/components/Starknet/modules/quick_start/pages/environment_setup.adoc b/components/Starknet/modules/quick_start/pages/environment_setup.adoc index 7f1283de76..981e634be8 100644 --- a/components/Starknet/modules/quick_start/pages/environment_setup.adoc +++ b/components/Starknet/modules/quick_start/pages/environment_setup.adoc @@ -50,6 +50,13 @@ For macOS and Linux users, open your terminal and execute the following command: curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh ---- +Restart the terminal and run the following command to verify the installation: + +[source, bash] +---- +scarb --version +---- + You can run the same command to upgrade Scarb. === Windows installation @@ -62,7 +69,7 @@ Restart the terminal and run the following command to verify the installation: scarb --version ---- -You can run the same command to upgrade it: +You can run the same command to upgrade Scarb: [source, bash] ---- diff --git a/components/Starknet/modules/quick_start/pages/setting_up_a_smart_wallet.adoc b/components/Starknet/modules/quick_start/pages/setting_up_a_smart_wallet.adoc index cb99acdeb5..fd3b688a88 100644 --- a/components/Starknet/modules/quick_start/pages/setting_up_a_smart_wallet.adoc +++ b/components/Starknet/modules/quick_start/pages/setting_up_a_smart_wallet.adoc @@ -90,7 +90,7 @@ While knowing the private key of a smart wallet is necessary to sign transaction == Creating an Account Descriptor -Starkli offers a command to collect all the required information from a smart wallet by providing its onchain address. Using this data, the CLI generates a json file that can be used to sign transactions: +Starkli offers a command to collect all the required information from a smart wallet by providing its on-chain address. Using this data, the CLI generates a json file that can be used to sign transactions: [source,shell] ---- @@ -99,7 +99,7 @@ Fetch account config from an already deployed account contract ---- -Currently, the `fetch` command supports both Argent X and Braavos smart wallets. Make sure your wallet address is already deployed and input following command to create and save the account descriptor file: +The `fetch` command supports both Argent X and Braavos smart wallets. Make sure your wallet address is already deployed and input following command to create and save the account descriptor file: [source,shell] ---- From 6f2d18ff31690876f917ff730e7f386107f43fd5 Mon Sep 17 00:00:00 2001 From: JameStark <113911244+JameStark@users.noreply.github.com> Date: Mon, 11 Sep 2023 11:35:04 +0100 Subject: [PATCH 4/6] Clarify Sierra and its role in compilation (#769) --- .../pages/Smart_Contracts/cairo-and-sierra.adoc | 2 +- .../pages/Smart_Contracts/class-hash.adoc | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/cairo-and-sierra.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/cairo-and-sierra.adoc index bf73594611..579a3eb9bc 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/cairo-and-sierra.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/cairo-and-sierra.adoc @@ -5,7 +5,7 @@ Up until xref:starknet_versions:upcoming_versions.adoc[Starknet Alpha v0.11.0] u Next, the user would submit the compilation output (the xref:Smart_Contracts/contract-classes.adoc[contract class]) to the Starknet sequencer via a `declare` transaction. With Cairo 1.0, the contract class resulting from xref:Smart_Contracts/class-hash.adoc#cairo1_class[compiling Cairo 1.0] does not include Casm. Instead of Casm, it includes instructions in an intermediate representation called Sierra (Safe Intermediate Representation). -This new contract class is then compiled by the sequencer, via the Sierra → Casm compiler, to generate the Cairo assembly associated with this class. +This new contract class is then compiled by the sequencer, via the Sierra → Casm compiler, to generate the Cairo assembly associated with this class. The Casm code is then executed by the Starknet OS. == Why do we need Casm? diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/class-hash.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/class-hash.adoc index 828cd1fa71..29dea69e16 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/class-hash.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/class-hash.adoc @@ -7,8 +7,11 @@ The class hash is a hash chain of the definition of the class. [id="cairo1_class"] == Definition of a Cairo class -Classes written in Cairo are compiled into Sierra code. This Sierra code is what is executed on the Starknet platform. For information on how the compiler converts code from Cairo to Sierra, see xref:Smart_Contracts/cairo-and-sierra.adoc[Cairo -and Sierra]. +Classes written in Cairo are compiled into Sierra code. The Sierra code generated is an intermediate representation of the class. This new contract class is then compiled by the sequencer, via the Sierra → Casm compiler, to generate the Cairo +assembly associated with this class. The resulting Casm code is then executed by the Starknet OS. + +For information on how the compiler converts code from Cairo to +Sierra, see xref:Smart_Contracts/cairo-and-sierra.adoc[Cairo and Sierra]. The elements that define a class are: From 10e03b46e97338ea1d92be25e4ee73d05d0734a1 Mon Sep 17 00:00:00 2001 From: Elias Tazartes <66871571+Eikix@users.noreply.github.com> Date: Mon, 11 Sep 2023 19:38:30 +0900 Subject: [PATCH 5/6] Update approach.adoc (#779) Noticed an inaccurate information: In Ethereum, non-EOA accounts (so-called contract accounts) can increment their nonce by deploying a smart contract Co-authored-by: JameStark <113911244+JameStark@users.noreply.github.com> --- .../architecture_and_concepts/pages/Accounts/approach.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Accounts/approach.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Accounts/approach.adoc index 25eab2c79c..e521325db4 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Accounts/approach.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Accounts/approach.adoc @@ -19,7 +19,7 @@ While not mandatory at the protocol level, a richer standard interface for accou In Starknet, similar to Ethereum, every contract has a nonce. This nonce is sequential; when a transaction is sent from an account, its nonce must match the account's nonce and it's incremented after the transaction is executed (whether or not it was reverted). -Note that, similar to Ethereum, only the nonce of account contracts (that is, those adhering to the above structure) can be non-zero. +Note that, in Starknet, only the nonce of account contracts (that is, those adhering to the above structure) can be non-zero. This differs from Ethereum, where regular smart contracts (called ["Contract Accounts", as opposed to "Externally Owned Accounts"](https://ethereum.org/en/developers/docs/accounts/) can increment their nonce by deploying smart contracts, i.e. executing the CREATE and CREATE2 opcodes. A nonce serves two important roles: From 33a3705fc3c95fa7ba80dc70bad8ed1336643418 Mon Sep 17 00:00:00 2001 From: Masterdai Date: Mon, 11 Sep 2023 18:41:38 +0800 Subject: [PATCH 6/6] Update api-services.adoc (#778) Co-authored-by: JameStark <113911244+JameStark@users.noreply.github.com> --- components/Starknet/modules/tools/pages/api-services.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/Starknet/modules/tools/pages/api-services.adoc b/components/Starknet/modules/tools/pages/api-services.adoc index 5f6720ba51..a56c0f08fa 100644 --- a/components/Starknet/modules/tools/pages/api-services.adoc +++ b/components/Starknet/modules/tools/pages/api-services.adoc @@ -9,6 +9,7 @@ A list of recommended full-node & API providers. | Provider name | Description | More information |Alchemy |An API service for Starknet | link:https://www.alchemy.com/starknet[www.alchemy.com/starknet] |Bware labs | An API service for Starknet| link:https://blastapi.io/public-api/starknet[blastapi.io/public-api/starknet] +|Chainbase | An API service for Starknet| link:https://chainbase.com/chainNetwork/Starknet[chainbase.com/chainNetwork/Starknet] |Chainstack | An API service for Starknet| link:https://chainstack.com/build-better-with-starknet/[chainstack.com/build-better-with-starknet] |Infura | An API service for Starknet|link:https://www.infura.io/networks/ethereum/starknet^[www.infura.io/networks/ethereum/starknet] |Lava Protocol|An open-source protocol for reliable access to RPC data | link:https://www.lavanet.xyz/[www.lavanet.xyz] @@ -22,4 +23,4 @@ A list of recommended full-node & API providers. |Juno|A Starknet full-node written in go-lang by Nethermind |link:https://github.com/NethermindEth/juno[github.com/NethermindEth/juno] |Papyrus|A Starknet full-node written in Rust by StarkWare | link:https://github.com/starkware-libs/papyrus[github.com/starkware-libs/papyrus] |Pathfinder|A Starknet full-node written in Rust by Equilibrium |link:https://github.com/eqlabs/pathfinder[github.com/eqlabs/pathfinder] -|=== \ No newline at end of file +|===