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

evm: don't encode contract create output #1138

Merged
merged 1 commit into from
Sep 27, 2022
Merged

Conversation

nhynes
Copy link
Contributor

@nhynes nhynes commented Sep 27, 2022

This PR changes the confidential EVM create function to return the address, as would a non-confidential EVM. This will cause the gateway and downstream tools like the block explorer to display the correct address in the tx receipt.

There is no security risk to exposing the contract address, as it can be easily computed by observing that a transaction deposited new code (meaning a contract has been created) and then computing the address using the public sender address and nonce.

This PR should go in ASAP, as it's very annoying for devs who aren't able to use the block explorer as effectively.

@kostko
Copy link
Member

kostko commented Sep 27, 2022

Didn't we say this is going to be fixed in the gateway?

@codecov
Copy link

codecov bot commented Sep 27, 2022

Codecov Report

Merging #1138 (7467a0c) into main (69cbb88) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1138      +/-   ##
==========================================
+ Coverage   67.79%   67.81%   +0.02%     
==========================================
  Files         131      131              
  Lines       11586    11575      -11     
==========================================
- Hits         7855     7850       -5     
+ Misses       3699     3693       -6     
  Partials       32       32              
Impacted Files Coverage Δ
runtime-sdk/modules/evm/src/lib.rs 50.33% <100.00%> (-0.17%) ⬇️
runtime-sdk/modules/evm/src/test.rs 67.31% <100.00%> (+0.85%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@nhynes nhynes merged commit 0886f57 into main Sep 27, 2022
@nhynes nhynes deleted the nhynes/c10l-evm-create-output branch September 27, 2022 08:31
@nhynes
Copy link
Contributor Author

nhynes commented Sep 27, 2022

Didn't we say this is going to be fixed in the gateway?

No? Maybe that was in a private discussion to which I was not privy. This one gets a runtime fix because the gateway is really just reading out what it gets from the runtime. There's no reason for this output to be encrypted, so we'd might as well fix it here so that other gateway implementations don't also trip up.

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

Successfully merging this pull request may close these issues.

None yet

3 participants