Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

native: implement ctExists function #230

Open
goshawk-3 opened this issue Jan 6, 2025 · 0 comments
Open

native: implement ctExists function #230

goshawk-3 opened this issue Jan 6, 2025 · 0 comments
Assignees

Comments

@goshawk-3
Copy link
Contributor

As suggested in #208 (comment), we could add a function to read only the byte array length slot. If it's 0, we can assume no byte array exists at that location, reducing unnecessary slot reads for the ciphertext when it's not needed.

func ctExists(api ChainStorageApi, contractAddress common.Address, handle common.Hash) bool {
...
}
  • Eventually replace resultCt := ReadBytesToAddress with the new ctExists. This should be considered in the context of the feature for handling SSTORE opcode
  • Rename ReadBytesToAddress accordingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant