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] |=== 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].