Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Update precompile addresses to be QIP2 compatible #72

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

jdowning100
Copy link

Precompile addresses are now in the format 0x[location-byte-prefix]000000000000000000000000000000000000[index-byte] where index-byte is the last byte of the precompile's original address in EVM. (1 is ecrecover, 2 is sha256, etc)
Basically, add the index byte to the location-specific zero address. The zero address is not a valid precompile.
This does still mean that we can have up to 255 precompiles, but we can hardfork to support 2 bytes for the index if we really need more than 255.

wizeguyy
wizeguyy previously approved these changes Feb 1, 2024
@jdowning100 jdowning100 merged commit 69f4640 into dominant-strategies:main Feb 29, 2024
6 of 7 checks passed
@jdowning100 jdowning100 deleted the update-precompiles branch February 29, 2024 17:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants