Skip to content

Commit

Permalink
more clarity about the choice of the multplpier constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarak Ben Youssef committed Feb 2, 2024
1 parent 88de167 commit 4fa6fda
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fvm/evm/handler/addressAllocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ const (
ledgerAddressAllocatorKey = "AddressAllocator"
// `addressIndexMultiplierConstant` is used for mapping address indices
// into deterministic random-looking address postfixes.
// The constant must be an ODD number. It is a "nothing-up-my-sleeves" constant.
// The constant must be an ODD number.
// It is a "nothing-up-my-sleeves" constant, chosen to be big enough so that
// the index and its corresponding address look less "related".
// Note that the least significant byte was set to "77" instead of "88" to force
// the odd parity.
// Look at `mapAddressIndex` for more details.
addressIndexMultiplierConstant = uint64(0xFFEEDDCCBBAA9977)
)
Expand Down

0 comments on commit 4fa6fda

Please sign in to comment.