Skip to content

Commit

Permalink
docs: fix crypto.go path (#12612)
Browse files Browse the repository at this point in the history
Fix the `crypto.go` path
  • Loading branch information
RealMaxing authored Nov 6, 2024
1 parent 3c9ffb6 commit 2595385
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/programmers_guide/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ Accounts are identified by their addresses. Address is a 20-byte binary string,
contract and non-contract accounts.

For non-contract accounts, the address is derived from the public key, by hashing it and taking lowest 20 bytes of the
32-byte hash value, as shown in the function `PubkeyToAddress` in the file [crypto/crypto.go](../../crypto/crypto.go)
32-byte hash value, as shown in the function `PubkeyToAddress` in the file [crypto/crypto.go](../../erigon-lib/crypto/crypto.go)

For smart contract accounts created by a transaction without destination, or by `CREATE` opcode, the address is derived
from the address and the nonce of the creator, as shown in the function `CreateAddress` in the
file [crypto/crypto.go](../../crypto/crypto.go)
file [crypto/crypto.go](../../erigon-lib/crypto/crypto.go)

For smart contract accounts created by `CREATE2` opcode, the address is derived from the creator's address, salt (
256-bit argument supplied to the `CREATE2` invocation), and the code hash of the initialisation code (code that is
executed to output the actual, deployed code of the new contract), as shown in the function `CreateAddress2` in the
file [crypto/crypto.go](../../crypto/crypto.go)
file [crypto/crypto.go](../../erigon-lib/crypto/crypto.go)

In many places in the code, sets of accounts are represented by mappings from account addresses to the objects
representing the accounts themselves, for example, field `stateObjects` in the
Expand Down

0 comments on commit 2595385

Please sign in to comment.