https://github.com/zdenham/diamond-storage-conflict-test
Test how likely storage facets are to run over each other
https://github.com/zdenham/diamond-storage-conflict-test
Last synced: 8 months ago
JSON representation
Test how likely storage facets are to run over each other
- Host: GitHub
- URL: https://github.com/zdenham/diamond-storage-conflict-test
- Owner: zdenham
- Created: 2022-05-24T18:59:41.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-24T19:11:50.000Z (about 4 years ago)
- Last Synced: 2024-10-18T12:18:05.255Z (over 1 year ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Diamond Storage Conflict Test
Idea behind this was to run a really simple simulation to see how likely storage conflicts were to arise from diamond storage
It works by generating 1M bytes32 hashes from running `keccak256` on random 100 character strings. Then finding the "minimum difference" between the closest two storage addresses in bits.
## Conclusion
`bytes32` storage space is HUGE! It is probabilistically unlikely that any diamond storage would ever conflict.
To put it in perspective, program that created 1M storage slots, the _closest_ two slots of the 1M had `1.07583655498272086 e+55 Gigabyte` difference.