From c7efaea030d7970e6e570dffa404c5323211faaa Mon Sep 17 00:00:00 2001 From: JameStark <113911244+JameStark@users.noreply.github.com> Date: Tue, 15 Aug 2023 12:07:42 +0100 Subject: [PATCH 1/3] Hotfix for menu title vs nav consistency (#743) --- .../Starknet/modules/architecture_and_concepts/nav.adoc | 4 ++-- .../pages/Cryptography/p-value.adoc | 2 +- .../Data_Availability/on-chain-data.adoc | 8 ++++---- .../pages/Network_Architecture/Fees/fee-mechanism.adoc | 3 ++- .../L1-L2_Communication/token-bridge.adoc | 8 ++++---- .../pages/Smart_Contracts/Events/starknet-events.adoc | 4 ++-- .../pages/Smart_Contracts/contract-syntax.adoc | 2 +- .../modules/cli/pages/starknet-compiler-options.adoc | 2 +- .../Starknet/modules/quick_start/pages/account_setup.adoc | 4 ++-- .../modules/quick_start/pages/environment_setup.adoc | 4 ++-- components/Starknet/modules/tools/pages/audit.adoc | 2 +- .../Starknet/modules/tools/pages/ref_block_explorers.adoc | 2 +- 12 files changed, 23 insertions(+), 22 deletions(-) diff --git a/components/Starknet/modules/architecture_and_concepts/nav.adoc b/components/Starknet/modules/architecture_and_concepts/nav.adoc index fa4d738efe..25883d00fe 100644 --- a/components/Starknet/modules/architecture_and_concepts/nav.adoc +++ b/components/Starknet/modules/architecture_and_concepts/nav.adoc @@ -17,7 +17,7 @@ **** xref:Network_Architecture/L1-L2_Communication/token-bridge.adoc[Starkgate bridge] ** Accounts -*** xref:Accounts/introduction.adoc[Introduction to account abstraction] +*** xref:Accounts/introduction.adoc[What is an account?] *** xref:Accounts/approach.adoc[Starknet account structure] *** xref:Accounts/validate_and_execute.adoc[Validate and execute] *** xref:Accounts/deploying_new_accounts.adoc[Deploying new accounts] @@ -37,5 +37,5 @@ ** Cryptography *** xref:Cryptography/p-value.adoc[Field element type] *** xref:Cryptography/hash-functions.adoc[Hash functions] -*** xref:Cryptography/stark-curve.adoc[Stark curve] +*** xref:Cryptography/stark-curve.adoc[STARK curve] diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Cryptography/p-value.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Cryptography/p-value.adoc index 442ab6678c..15c144d171 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Cryptography/p-value.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Cryptography/p-value.adoc @@ -1,4 +1,4 @@ -= `P` value += Field element type The field element type in Starknet is based on the field in the underlying Cairo VM. In other words, a value stem:[$$x$$] of a field element type is an integer in the range of stem:[$$0≤x
Date: Tue, 15 Aug 2023 12:35:49 +0100 Subject: [PATCH 2/3] docs: Add clarification around contract_address_salt (#735) * Update contract-address.adoc * Update contract-address.adoc --- .../pages/Smart_Contracts/contract-address.adoc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/contract-address.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/contract-address.adoc index c747d89823..168414430f 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/contract-address.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/contract-address.adoc @@ -5,7 +5,7 @@ The contract address is a unique identifier of the contract on Starknet. It is a * `prefix` - The ASCII encoding of the constant string `STARKNET_CONTRACT_ADDRESS`. * `deployer_address` - The deployer address, unless `deploy_from_zero` is `true`, in which case it is `0`. -* `salt` - The salt passed by the contract calling the syscall. +* `salt` - The salt passed by the contract calling the syscall, provided by the transaction sender. * `class_hash` - See xref:./class-hash.adoc#computing_the_cairo_1_class_hash[the class hash documentation]. * `constructor_calldata_hash` - xref:Cryptography/hash-functions.adoc#pedersen_array_hash[Array hash] of the inputs to the constructor. @@ -21,6 +21,13 @@ contract_address := pedersen( constructor_calldata_hash) ---- +[NOTE] +==== +A random `salt` ensures unique addresses for smart contract deployments, preventing conflicts when deploying identical contract classes. + +It also thwarts replay attacks by influencing the transaction hash with a unique sender address. +==== + You can find more detail of the address computation in the https://github.com/starkware-libs/cairo-lang/blob/ed6cf8d6cec50a6ad95fa36d1eb4a7f48538019e/src/starkware/starknet/services/api/gateway/contract_address.py#L12[Cairo code repository]. From c22797eee8c8e69ec9289bba21e4c1d54340faf2 Mon Sep 17 00:00:00 2001 From: JameStark <113911244+JameStark@users.noreply.github.com> Date: Tue, 15 Aug 2023 12:39:26 +0100 Subject: [PATCH 3/3] docs: Change based on internal feedback: gateway doesn't differentiate (#730) * Change based on internal feedback: gateway doesn't differentiate between header and body * Update header.adoc * Update header.adoc --- .../pages/Network_Architecture/Blocks/header.adoc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/Blocks/header.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/Blocks/header.adoc index a0edaded19..1fcc2d4831 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/Blocks/header.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Network_Architecture/Blocks/header.adoc @@ -3,12 +3,8 @@ [id="block_structure"] = Block structure -In Starknet, the block is defined as a list of transactions and a block header. +In Starknet, the block is defined as a list of transactions and a block header containing the following fields: -[id="block_header"] -== Block header - -The following fields define the block header: [%autowidth] |===